HP49-50G: Water boiling temperature = f(altitude + temp); Water density +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Software Libraries (/forum-10.html) +--- Forum: General Software Library (/forum-13.html) +--- Thread: HP49-50G: Water boiling temperature = f(altitude + temp); Water density (/thread-17353.html) |
HP49-50G: Water boiling temperature = f(altitude + temp); Water density - Gil - 08-13-2021 03:38 PM HP49-50G : Water boiling temperature = f(altitude + temp.air ) Water density (already published, but now included in the directory WATER) Water boiling temperature = f(altitude + temp.air ) Here two programs are given: - one when you have the altitude [in m] AND the air temperature at that altitude [in degrees C] as inputs ; - another, using a different formulae, to be used only with altitude [in m] as single argument (without the air temperature). Code 1 'MT—>BOIL.H²O' \<< "2 Arg: . alt [m] . temp.air [\^oC at alt] " DROP 273.15 + 100. 273.15 + 9.80665 28.9647 18.0153 2257000. \-> h Tair T0 g \Gmair \GmH\178O q12 \<< "At " h + "m/" + Tair 273.15 - + "\^oC" + 'T0*Tair*q12*\GmH\178O/(q12*\GmH\178O*Tair+\Gmair*g*h*T0)' \->NUM 273.15 - "\^oC H\178O boiling" \->TAG \>> \>> Code 2 'M—>BOIL.H²O' \<< "1 Arg only: . alt [m] " DROP DUP .3048 / \-> alt.m ft \<< "At " alt.m + "m" + '29.921*(1.-.0000068753*ft)^5.2559' EVAL \-> HG \<< '(49.161*LN(HG)+44.932-32.)/1.8' EVAL \->NUM "\^oC H\178O boiling" \->TAG \>> \>> \>> Code for density of water: '—>DENS.H²O' \<< "3 Arg: \[] temp [\^oC] \[] pressure [PA] \[] 1/0 [1 for tap water] [0 for pure water] According to Tanaka 0 < t.C < 40 \^oC " DROP ROT DTAG ROT DTAG ROT \-> t.C p.PA tap.wat \<< t.C "t.C" \->TAG p.PA "p.PA" \->TAG -3.983035 301.797 522528.9 69.34881 tap.wat 1 == 999.972 999.97495 IFTE 5.074E-10 -3.26E-12 4.16E-15 \-> a1 a2 a3 a4 a5 c1 c2 c3 'a5*(1.-(t.C+a1)^2.*(t.C+a2)/(a3*(t.C+a4)))*(1.+(c1+c2*t.C+c3*t.C^2.)*(p.PA-101325.))' EVAL tap.wat 1 == IF THEN "Tap H\178O" ELSE "Pure H\178O" END ", w/o air" + \->TAG DUP '-.004612+.000106*t.C' + EVAL tap.wat 1 == "Tap H\178O" "Pure H\178O" IFTE ", 100% air" + \->TAG \>> \>> Example Boiling temperature at Everest, 8848 m, and local temperature - 20 degrees Celsius : 68.842 degrees Celsius. And using the program without giving the local/unknown temperature returns 68.048 degrees Celsius. Just download the Directory-file Water in your HP49-50G and use one of the 3 files given above. Regards, Gil RE: HP49-50G : Water 1) boiling temp = f(altitude + temp.air ) 2) density - Gil - 08-20-2021 04:26 AM HP49-50G New version 3b Used the SI units. Tried to have in the several programs the same names. Added boiling temperature of water = f(pressure). The latter is derived from boiling temperature of water = g(altitude). So that g(altitude) gives a temperature, a pressure p_alt and boil.temp1. Now f(pressure p_alt) will give a boil.temp2 = boil.temp1. Unfortunately, I could not get these formulae to give the same boiling temperature when you have as argument both altitude and local temperature. Changing the the constants did not help. Example 1 MT—>(2000 m, 2 degrees C) = 93.059 degrees C But M—>(2000) = 93.215 degrees C Example 2 MT—>(5077 m, -18 degrees C) = 82.641 degrees C But M—>(5077) = 81.595 degrees C Question Is there a way to have both approches to be compatible with the final results ? Thanks in advance for your insight. 'MT\->BOIL.H\178O' \<< "2 Arg: . alt [m] . temp.air [\^oC at alt] " DROP 273.15 + 100 273.15 + 9.80665 28.9644 18.015257 2256400 \-> h Tair T0 g \Gmair \GmH\178O q12.\GDHvap \<< "At " h + "m/" + Tair 273.15 - + "\^oC" + 'T0*Tair*q12.\GDHvap*\GmH\178O/(q12.\GDHvap*\GmH\178O*Tair+\Gmair*g*h*T0)' \->NUM 273.15 - "\^oC H\178O boiling" \->TAG \>> \>> [/b] 'P\->BOIL.H\178O' \<< "1 Arg only: P [Pressure, Pa] " DROP 101325 .0289644 9.80665 .0065 8.31446261815 40650 "Or 40650" DROP \-> P P0 M g a R \GDHvap \<< "At " P + "Pa" + '(1/(100+273.15)-R*LN(P/P0)/\GDHvap)^-1-273.15' \->NUM "\^oC H\178O boiling" \->TAG \>> \>> [b]'M\->BOIL.H\178O' \<< "1 Arg only: alt [m] " DROP .0289644 9.80665 .0065 8.31446261815 40650 "Or 40660" DROP \-> alt M g a R \GDHvap \<< "At " alt + "m:" + 15 a alt * - 1 RND "\^oC / " + '101325*(1-a*alt/(15+273.15))^(M*g/(R*a))' \->NUM 101325 \-> P P0 \<< P 0 RND + "Pa" + '(1/(100+273.15)-R*LN(P/P0)/\GDHvap)^-1-273.15' \->NUM "\^oC H\178O boiling" \->TAG \>> \>> \>> '\->DENS.H\178O' \<< "3 Arg: \[] temp [\^oC] \[] pressure [PA] \[] 1/0 [1 for tap water] [0 for pure water] According to Tanaka 0 < t.C < 40 \^oC " DROP ROT DTAG ROT DTAG ROT \-> t.C p.PA tap.wat \<< t.C "t.C" \->TAG p.PA "p.PA" \->TAG -3.983035 301.797 522528.9 69.34881 tap.wat 1 == 999.972 999.97495 IFTE 5.074E-10 -3.26E-12 4.16E-15 \-> a1 a2 a3 a4 a5 c1 c2 c3 'a5*(1.-(t.C+a1)^2.*(t.C+a2)/(a3*(t.C+a4)))*(1.+(c1+c2*t.C+c3*t.C^2.)*(p.PA-101325.))' EVAL tap.wat 1 == IF THEN "Tap H\178O" ELSE "Pure H\178O" END ", w/o air" + \->TAG DUP '-.004612+.000106*t.C' + EVAL tap.wat 1 == "Tap H\178O" "Pure H\178O" IFTE ", 100% air" + \->TAG \>> \>> Regards, Gil RE: HP49-50G : Boiling temperature of water = f(pressure)//Density of water - Gil - 08-31-2021 04:12 PM Completely new versions, following questions of Albert CHAN. My thanks to him. The 3 old ones, with inconsistent results between themselves, are named now with ...BOIL.OLD (with capital letters & OLD-suffix); they are to be found at the end of the directory WATER; the best would be to delete them. The 1st new program 'MT—>Boil.H²O' means: - Give in stack level 1 the altitude (M stands for meters); - Or give in stack level1, in {}, the altitude & the local air temperature (T stands fort Temperature, that is to be entered in degrees Celsius), to get the corresponding boiling temperature of water. Its code is: \<< "1 stack Arg: . Alt . or {Alt T.Air} with {} Alt in [m] T.air in [\^oC] " DROP STD DUP TYPE 5 == IF THEN OBJ\-> DROP NEG 15 + OVER / ELSE .0065 END .0289644 9.80665 8.31446261815 \-> a M g R \<< 'Alt.m' STO "At " Alt.m + "m:" + 15 a Alt.m * - 1 RND "Air [\^oC]" \->TAG DUP 'T.Air' STO '101325*(1-a*Alt.m/(15+273.15))^(M*g/(R*a))' \->NUM P\->Boil.H\178O \>> \>> The 2nd program 'P—>Boil.H²O' is to be used directly (without using 'MT—>Boil.H²O') when already knowing the local pressure (independently of altitude and temperature). - Give the pressure in Pascals, to get the corresponding boiling temperature of water. Its code is: \<< "1 Arg: . Pressure in [Pa] " DROP STD "P [Pa]" \->TAG DUP 'P' STO "GOFF.GRATCH 1984\->" 'LOG(P/100)=-(7.90298*(373.15/(T1+273.15)-1))+5.02808*LOG(373.15/(T1+273.15))-.00000013816*(10^(11.344*(1-(T1+273.15)/373.15))-1)+.0081328*(10^(-3.49149*(373.15/(T1+273.15)-1))-1)+LOG(1013.246)' 'T1' 100 ROOT "Boil.\^oC H\178O" \->TAG "ARDEN BUCK 1996\->" 'P=611.21*e^((18.678-T2/234.5)*(T2/(257.14+T2)))' 'T2' 100 ROOT "Boil.\^oC H\178O" \->TAG 3 FIX \>> The references are under the program REFER. The two used formulae used here for boiling temperature of water =f(pressure) are: - Arden Buck equation, 1996; - Goff-Gratch equation, 1984. Both formulae give quite similar boiling temperatures to 0.03 degrees Celsius. Example Everest, altitude 8848 meters. 1)Type 8848 2)ENTER 3)Press MT—>Boil.H²O Result "At 8848m:" :Air [°C]: -42.500 :P [Pa]: 31444.626 "GOFF.GRATCH 1984—>" :Boil.°C H²O: 70.205 "ARDEN BUCK 1996—>" :Boil.°C H²O: 70.180 Suppose you will travel in summer to Everest. You could check that average temperature is then equal to -19 degrees Celsius, and not -42.5. Then 1) Write {8848 -19} (don't forget the {}) 2)ENTER 3)Press MT—>Boil.H²O The new results are: "At 8848m:" :Air [°C]: -19.000 :P [Pa]: 33184.930 "GOFF.GRATCH 1984—>" :Boil.°C H²O: 71.457 "ARDEN BUCK 1996—>" :Boil.°C H²O: 71.432 Of course, in both cases the calculated pressure is an approximation. It seems that, at Everest, the mean pressure in July is about 253 torrs. 101325 PA —> 760 torrs. 253 torrs = 101325/760 torrs×253=33731. In that case we should use directly the program Press P—>Boil.H²O. 1)Write 33731 2)ENTER 3)Press P—>Boil.H²O The corresponding results are then: :P [Pa]: 33731 "GOFF.GRATCH 1984—>" :Boil.°C H²O: 71.839 "ARDEN BUCK 1996—>" :Boil.°C H²O: 71.814 For the time being, I let g as a constant, but it should diminish with the altitude: g=go×(Re/Re+h)². Regards and enjoy! Gil RE: HP49-50G: Water boiling temperature = f(altitude + temp); Water density - Gil - 10-03-2021 02:47 AM HP49-50G New version 5 As always, 3 programs - MTBoil.H²O P - Boil.H²O - DENS.H²O regarding 2 distinct topics on water: - water boiling temperature = f(altitude + temp); - water density=w[/align](pressure, temperature, water pureness[not from tap / from tap] ). New calculation here: Added the classical Clausius-Clapeyron equation relative to boiling temperature. Example result: P [Pa]: 150000 "CLAUSIUS-CLAPEYRON" :Boil.°C H²O: 111.518 "GOFF.GRATCH 1984" :Boil.°C H²O: 111.374 "ARDEN BUCK 1996" :Boil.°C H²O: 111.420 Conclusion GOFF.GRATCH 1984& " & "ARDEN BUCK 1996" give very similar results, meanwhile Clausius-Clapeyron output differ somewhat more from Goff-Gratch & "ARDEN BUCK" New code for : P—>Boil.H2O \<< "1 Arg: . Pressure in [Pa] " DROP STD "P [Pa]" \->TAG DUP 'P' STO "CLAUSIUS-CLAPEYRON\->" 8.31446261815 40650 \-> R \GDHvap \<< 'LN(P/101325)=-(\GDHvap/R*(1/(T1+273.15)-1/(100+273.15)))' 'T1' 100 ROOT \>> "Boil.\^oC H\178O" \->TAG "GOFF.GRATCH 1984\->" 'LOG(P/100)=-(7.90298*(373.15/(T2+273.15)-1))+5.02808*LOG(373.15/(T2+273.15))-.00000013816*(10^(11.344*(1-(T2+273.15)/373.15))-1)+.0081328*(10^(-3.49149*(373.15/(T2+273.15)-1))-1)+LOG(1013.246)' 'T2' 100 ROOT "Boil.\^oC H\178O" \->TAG "ARDEN BUCK 1996\->" 'P=611.21*e^((18.678-T3/234.5)*(T3/(257.14+T3)))' 'T3' 100 ROOT "Boil.\^oC H\178O" \->TAG 3 FIX \>> Regards, Gil |