Skip to content

Initial guess of bisection loop of GetTWetBulbFromHumRatio leading to an error for high dry bulb temperatures and high humidity ratios #96

@hsallandt-arup

Description

@hsallandt-arup

Describe the bug
Dry bulb temperature returned by GetTWetBulbFromHumRatio for high dry bulb temperatures and high humidity ratios.

To Reproduce
Steps to reproduce the behavior:
psychrolib.GetTWetBulbFromHumRatio(150, 1,101325)
returns 149.9995190883829

Expected behavior
The wet bulb temperature should not exceed 100°C at standard sea level pressure.

Additional context
The issue is created by the lines and following code. The bisection loop starts with the maximum theoretical wet bulb temperature (WBT) and minimum theoretical WBT as initial bounds.
Min WBT --> dew point
Max WBT --> dry bulb temperature
The latter is not correct (for dry bulb temperatures >100°C at this pressure), as at standard sea level pressure, the WBT cannot exceed ~100°C. The code then takes the average of the min and max WBT and starts the iteration. If the average of dew point and dry bulb temperature is higher than the maximum possible WBT at this pressure, this line returns 0 and therefore the error occurs:
error

A solution would be to set initially the max WBT to the minimum of the dry bulb temperature and the boiling temperature of water at the given pressure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions