Discussion:
Calcular Sensacion Termica con Python
Juan Carlos Ojeda
2011-04-20 21:01:10 UTC
Permalink
Pense que teniamos alguna bateria para esto pero no la encontre,
quiero Calcular Sensacion Termica con Python y mi Float() no flota:


Sensacion Termica = 33 + (T - 33)*(0.474 + 0.454√(V)-0.0454.V)


Donde T es int() con la temperatura y V es int() con la velocidad del
Viento,
creo que a mi el calculo me esta dando incorrecto, por eso agradesco la
yuda.
Si alguien contesta lo pongo en la wiki, Como seria esto en Python???
--
.
Martin Chikilian
2011-04-20 21:22:18 UTC
Permalink
Juan Carlos,

Dado que los floats no son muy precisos en general, yo usaría algo como
NumPy para estos cálculos... pero si insistís con una solucion out of the
box, lo único que pienso te hace falta para tu cálculo es math.sqrt para las
raíces cuadradas.

Saludos,

Martín

PD: cuándo decís que "tu float no flota", a qué te referís? Estás probando
algo y te da error? Qué error sería en tal caso?
Post by Juan Carlos Ojeda
Pense que teniamos alguna bateria para esto pero no la encontre,
Sensacion Termica = 33 + (T - 33)*(0.474 + 0.454√(V)-0.0454.V)
Donde T es int() con la temperatura y V es int() con la velocidad del
Viento,
creo que a mi el calculo me esta dando incorrecto, por eso agradesco la
yuda.
Si alguien contesta lo pongo en la wiki, Como seria esto en Python???
--
.
_______________________________________________
http://listas.python.org.ar/listinfo/pyar
PyAr - Python Argentina - Sitio web: http://www.python.org.ar/
Juan Carlos Ojeda
2011-04-20 22:06:15 UTC
Permalink
No necesito que sea preciso, una solucion out of the box seria ideal, como
seria la cosa entons ?

PD: el archivo lo acabo de borrar sin querer borrando los .pyc :( por eso
pregunte, para no tratar de vuelta si igual no andaba.
Post by Martin Chikilian
Juan Carlos,
Dado que los floats no son muy precisos en general, yo usaría algo como
NumPy para estos cálculos... pero si insistís con una solucion out of the
box, lo único que pienso te hace falta para tu cálculo es math.sqrt para las
raíces cuadradas.
Saludos,
Martín
PD: cuándo decís que "tu float no flota", a qué te referís? Estás probando
algo y te da error? Qué error sería en tal caso?
Post by Juan Carlos Ojeda
Pense que teniamos alguna bateria para esto pero no la encontre,
Sensacion Termica = 33 + (T - 33)*(0.474 + 0.454√(V)-0.0454.V)
Donde T es int() con la temperatura y V es int() con la velocidad del
Viento,
creo que a mi el calculo me esta dando incorrecto, por eso agradesco la
yuda.
Si alguien contesta lo pongo en la wiki, Como seria esto en Python???
--
.
_______________________________________________
http://listas.python.org.ar/listinfo/pyar
PyAr - Python Argentina - Sitio web: http://www.python.org.ar/
_______________________________________________
http://listas.python.org.ar/listinfo/pyar
PyAr - Python Argentina - Sitio web: http://www.python.org.ar/
--
.
Juan Carlos Ojeda
2011-04-20 22:07:23 UTC
Permalink
Post by Juan Carlos Ojeda
No necesito que sea preciso, una solucion out of the box seria ideal, como
seria la cosa entons ?
PD: el archivo lo acabo de borrar sin querer borrando los .pyc :( por eso
pregunte, para no tratar de vuelta si igual no andaba.
Perdon por el top-post
--
.
Sebastian Bassi
2011-04-20 22:32:30 UTC
Permalink
Post by Juan Carlos Ojeda
No necesito que sea preciso, una solucion out of the box seria ideal, como
seria la cosa entons ?
v=20
t=20
33+(t-33)*(.474+.454*((v-.0454)*v)**.5)
-91.067948482542661

Me da cualquier cosa pero supongo que porque no se cuales son las unidades
que hay que usar para esa formula en particular.

Estab mirando wikipedia y dice esto (en ingles y fijate que segun que
formula sea las unidades que usan):

The original formula for the index was:
[image: WCI=(10\sqrt{V}-V+10.5) \cdot
(33-T_{a})][4]<http://en.wikipedia.org/wiki/Wind_chill#cite_note-3>
[5] <http://en.wikipedia.org/wiki/Wind_chill#cite_note-4>Where:*W**C**I* =
Wind chill index, kcal/m2/h*V* = Wind velocity, m/s*T**a* = Air temperature,
°C

The general public seems to have been put off by the strange sounding units,
either the old ones or the newer watts per square metre, and developed a
strong preference for Equivalent Temperature, a deceptive simplification
that only seems to be easier to understand. Even in the cold areas of
Canada, broadcast media began to switch to the newer method of reporting
after metrification.
[edit<http://en.wikipedia.org/w/index.php?title=Wind_chill&action=edit&section=4>
]North American wind chill index

In November 2001 the National Weather
Service<http://en.wikipedia.org/wiki/National_Weather_Service>
implemented
the new wind chill index, used by the U.S. and Canadian weather services,
which is determined by iterating a model of skin temperature under various
wind speeds and temperatures. The model used standard engineering
correlations of wind speed and heat transfer rate. Heat transfer was
calculated for a bare face in wind, facing the wind, while walking into it
at 1.4 metres per second (3.1 mph). The model corrects the officially
measured wind speed to the wind speed at face height, assuming the person is
in an open field.[6] <http://en.wikipedia.org/wiki/Wind_chill#cite_note-5> The
results of this model may be approximated, to within one degree, from the
following formula:
[image: T_{wc}=13.12 + 0.6215 T_a-11.37 V^{+0.16} + 0.3965 T_a
V^{+0.16}\,\!]where [image: T_{wc}\,\!] is the wind chill index based on the
Celsius scale, [image: T_a\,\!] is the air temperature in °C, and [image:
V\,\!] is the air speed in
km/h<http://en.wikipedia.org/wiki/Kilometres_per_hour> measured
at 10 metres (33 ft), standard
anemometer<http://en.wikipedia.org/wiki/Anemometer>
height).[7] <http://en.wikipedia.org/wiki/Wind_chill#cite_note-6>

The equivalent formula in US customary
units<http://en.wikipedia.org/wiki/US_customary_units>
is:
[image: T_{wc}=35.74+0.6215 T_a-35.75 V^{+0.16}+0.4275 T_a V^{+0.16}\,\!]
where [image: T_{wc}\,\!] and [image: T_a\,\!] are measured in °F, and [image:
V\,\!] in mph <http://en.wikipedia.org/wiki/Miles_per_hour>.
Juan Carlos Ojeda
2011-04-20 22:36:06 UTC
Permalink
Post by Sebastian Bassi
v=20
t=20
33+(t-33)*(.474+.454*((v-.0454)*v)**.5)
-91.067948482542661
Me da cualquier cosa
Claro, algo parecido tenia yo...
:)
--
.
Ariel Rossanigo
2011-04-20 23:56:21 UTC
Permalink
Post by Juan Carlos Ojeda
Post by Sebastian Bassi
v=20
t=20
33+(t-33)*(.474+.454*((v-.0454)*v)**.5)
-91.067948482542661
Me da cualquier cosa
Claro, algo parecido tenia yo...
:)
--
Post by Sebastian Bassi
t= 20
v = 20
33 + (t- 33)*(0.474 + 0.454 * math.sqrt((v))-0.0454*v)
12.24

Saludos.
[0]: http://www.lenntech.es/calculadoras/viento/sensacion-termica.htm
Sebastian Bassi
2011-04-21 17:32:49 UTC
Permalink
Post by Juan Carlos Ojeda
Post by Sebastian Bassi
33+(t-33)*(.474+.454*((v-.0454)*v)**.5)
-91.067948482542661
Me da cualquier cosa
Claro, algo parecido tenia yo...
:)
--
Post by Sebastian Bassi
t= 20
v = 20
33 + (t- 33)*(0.474 + 0.454 * math.sqrt((v))-0.0454*v)
12.24
Ya veo donde esta la diferencia. En la formula que segui (la del primer
post) yo no quedaba claro que abarcaba la raiz cuadrada y asumi que abarcaba
esto:

(v-.0454)*v

Cuando mirando esa pagina que citas (y la de wikipedia que cite yo) es solo
para v.
Post by Juan Carlos Ojeda
Post by Sebastian Bassi
33+(t-33)*(.474+.454*(v**.5)-.0454*v)
12.247453593592482
Juan Carlos Ojeda
2011-04-22 03:16:47 UTC
Permalink
Post by Sebastian Bassi
Post by Juan Carlos Ojeda
Post by Sebastian Bassi
33+(t-33)*(.474+.454*((v-.0454)*v)**.5)
-91.067948482542661
Me da cualquier cosa
Claro, algo parecido tenia yo...
:)
--
Post by Sebastian Bassi
t= 20
v = 20
33 + (t- 33)*(0.474 + 0.454 * math.sqrt((v))-0.0454*v)
12.24
Ya veo donde esta la diferencia. En la formula que segui (la del primer
post) yo no quedaba claro que abarcaba la raiz cuadrada y asumi que abarcaba
(v-.0454)*v
Cuando mirando esa pagina que citas (y la de wikipedia que cite yo) es solo
para v.
Post by Juan Carlos Ojeda
Post by Sebastian Bassi
33+(t-33)*(.474+.454*(v**.5)-.0454*v)
12.247453593592482
_______________________________________________
http://listas.python.org.ar/listinfo/pyar
PyAr - Python Argentina - Sitio web: http://www.python.org.ar/
Muchas Gracias, funciona perfecto ^‿^
--
.
Sebastian Bassi
2011-04-20 22:24:39 UTC
Permalink
Post by Martin Chikilian
Dado que los floats no son muy precisos en general, yo usaría algo como
NumPy para estos cálculos... pero si insistís con
La sensacion termica es algo que le importa solo a los humanos por lo que 2
cifras significativas es mas que suficiente, por ejemplo si decis que la
sensacion termica es de 12,322 no tiene mucho sentido, asi que la cantidad
de decimales de float alcanzan y sobran para cualquier calculo sobre
sensacion termica.
Loading...