Skip to content

Add functions to convert to dry bulb temperature or humidity ratio from enthalpy#23

Merged
dmey merged 20 commits intomasterfrom
GetTDryBulbFromEnthalpy
Mar 4, 2019
Merged

Add functions to convert to dry bulb temperature or humidity ratio from enthalpy#23
dmey merged 20 commits intomasterfrom
GetTDryBulbFromEnthalpy

Conversation

@dmey
Copy link
Contributor

@dmey dmey commented Feb 23, 2019

This PR adds 2 function in each to calculate dry bulb temperature or humidity ration from enthalpy as detailed in #10 (named GetTDryBulbFromEnthalpyAndHumRatio and GetTDryBulbFromEnthalpyAndHumRatio).

In this PR I have also added the source code for the excel tests under tests/vba/test_psychrolib_ip.bas and tests/vba/test_psychrolib_si.bas as it will make it easier to edit them.

Manual excel artefacts updated with updated PsychroLib and tests. All tests (including manual VBA passs).

@didierthevenard can you please review this and let me know for any issues -- I will send you a sperate PR for tightening the checks but please approve this first.

@dmey dmey added this to the 2.1.0 milestone Feb 23, 2019
@dmey dmey self-assigned this Feb 23, 2019
@dmey dmey requested a review from didierthevenard February 23, 2019 16:33
Copy link
Contributor Author

@dmey dmey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the typos 'rearranged for humidity ratio' or 'rearranged for temperature' have been fixed in all languages. The BoundedHumRatio variable and the comments about it have been removed as this are added by #24. The tests for GetTDryBulbFromEnthalpyAndHumRatio have been changed from relative to absolute. Note that the threshold has been set to 0.001 for the SI versions and 0.05 for IP (see below). Let me know if you are happy to leave it like that.

>       assert psy.GetTDryBulbFromEnthalpyAndHumRatio(42.6168, 0.02) == pytest.approx(86, abs = 0.001)
E       assert 85.97235615557699 == 86 ± 1.0e-03
E         -85.97235615557699
E         +86 ± 1.0e-03

@dmey dmey requested a review from didierthevenard February 24, 2019 15:18
Copy link
Contributor

@didierthevenard didierthevenard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found.

@dmey dmey merged commit e552f12 into master Mar 4, 2019
@dmey dmey deleted the GetTDryBulbFromEnthalpy branch March 4, 2019 08:10
hongyuanjia pushed a commit to hongyuanjia/psychrolib that referenced this pull request Feb 14, 2020
# |<----  Using a Maximum Of 50 Characters  ---->|


# Explain why this change is being made
# |<----   Try To Limit Each Line to a Maximum Of 72 Characters   ---->|

# Provide links or keys to any relevant tickets, articles or other resources
# Example: Github issue psychrometrics#23

# --- COMMIT END ---
# Type can be 
#    feat (new feature)
#    fix (bug fix)
#    docs (changes to documentation)
#    style (formatting, missing semi colons, etc; no code change)
#    refactor (refactoring production code)
#    test (adding missing tests, refactoring tests; no production code change)
#    chore (updating grunt tasks etc; no production code change)
# --------------------
# Remember to
#    Separate subject from body with a blank line
#    Limit the subject line to 50 characters
#    Capitalize the subject line
#    Do not end the subject line with a period
#    Use the imperative mood in the subject line
#    Wrap the body at 72 characters
#    Use the body to explain what and why vs. how
#    Can use multiple lines with "-" for bullet points in body
# --------------------
# For more information about this template, check out
# https://gist.github.com/adeekshith/cd4c95a064977cdc6c50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants