Skip to content

Fix calculation for GetTDryBulbFromEnthalpyAndHumRatio#110

Open
SimoneAragno wants to merge 1 commit into
psychrometrics:masterfrom
SimoneAragno:patch-1
Open

Fix calculation for GetTDryBulbFromEnthalpyAndHumRatio#110
SimoneAragno wants to merge 1 commit into
psychrometrics:masterfrom
SimoneAragno:patch-1

Conversation

@SimoneAragno

Copy link
Copy Markdown

Error in formula substitue division by multiplication

Error in formula substitue division by multiplication
@schnepe2

Copy link
Copy Markdown

As far as I can see (and calculate 😉 ) neither division nor multiplication is needed:
From the enthalpy formula[*]:
h = 1.006 * Tdb + W * (2501 + 1.86 * Tdb)[**]
...I get (by solving for Tdb)...
Tdb = (h - 2501.0 * W) / (1.006 + 1.86 * W).

So the code should be :
GetTDryBulbFromEnthalpyAndHumRatio = (MoistAirEnthalpy - 2501.0 * HumRatio) / (1.006 + 1.86 * HumRatio)

And by the way: The fix should be applied to all languages 😉

Hopefully I did not make even more mistakes - would be embarrassing 😊

[*] from here for example
[**] with units for h [kJ/kg], Tdb [°C] and W [kg/kg]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants