Giter Site home page Giter Site logo

moistair.jl's Introduction

MoistAir - Thermodynamic properties of moist air

Build Status Build Status Codecov

This package provides a model, MoistAirModel to compute thermodynamic properties of moist air, using the ThermoState interface. The model uses real gas correlations as recommended by ASHRAE (see reference [5]).

This package also provides the underlying models used for moist air, namely, dry air (ASHRAEDryAir) and water vapor (ASHRAEWaterVapor). those models have the same interface as the moist air model.

This is a fork of Psychro.jl working with julia 1.5+.

Instalation

julia> ]
(v1.5) pkg> add MoistAir

User interface - Thermodynamic properties of moist air, dry air and saturated water vapor.

The models defined in this package accept the following ThermoState thermodynamic states:

  • ASHRAEDryAir: pressure,temperature
  • ASHRAEWaterVapor: pressure,temperature
  • MoistAirModel :
    • pressure, temperature, amounts (any of mol_fraction,mass_fraction,mol_number,mass_number)
    • pressure,temperature, humidity spec*

The models defined in this package support the following ThermoState functions:

  • mol_enthalpy, mass_enthalpy, total_enthalpy
  • mol_entropy, mass_entropy, total_entropy
  • mol_volume, mass_volume, total_volume
  • mol_enthalpy, mass_enthalpy
  • compressibility_factor

The package also provides its own functions, with ThermoState syntax, specific for moist air:

  • Dry properties: properties per 1 kg of dry air:

    • dry_volume,dry_enthalpy,dry_entropy
  • rel_hum : Relative humidity, defined as the fraction between the amount of water in the air and the amount of water of saturated air at the same temperature and pressure (between 0 and 1)

  • hum_massfrac : kg of water / kg of moist air

  • hum_molfrac : mol of water / mol of moist air

  • hum_wetbulb : wet-bulb temperature or adiabatic saturation temperature is the temperature a volume of air would have if cooled adiabatically to saturation by evaporation of water into it, always lower than the specified temperature (also known as dry-bulb temperature)

  • hum_ratio : Humidity ratio (kg of vapor / kg of dry air)

  • hum_dewpoint temperature to which moist air must be cooled to become saturated,always lower than the specified temperature.

Humidity Spec

As mentioned before, the MoistAirModel accepts thermodynamic states of the form pressure-temperature-humidity spec. you can use the same function names as keywords in the ThermoState.state function.

Usage

using ThermoState,Unitful,MoistAir
air = MoistAirModel() #Moist air model
λ = VariableSpec() #to create a variable model
st = state(hum_wetbulb = 25.0u"°C",t=λ,p=1u"atm")
dryh = dry_enthalpy(air,st(32u"°C")) #custom units
x = mol_fraction(air,st(300.15)) #molar fraction of the mixture air-water
xw = hum_molfrac(air,st(300.15)) #molar fraction of water
dew = hum_dewpoint(air,st(300.15)) #dew point of water
last(x) == xw #true

References

  • [1] Wexler, A. and Hyland, R. W., "Formulations for the thermodynamic properties of the saturated phases of H2O from 173.15 K to 473.15 K", ASHRAE Transactions, 1983.
  • [2] Wexler, A. and Hyland, R. W., "Formulations for the thermodynamic properties of dry air from 173.15 K to 473.15 K, and of saturated moist air from 173.15 K to 372.15 K at pressures to 5 MPa
  • [3] Himmelblaum D. M., "Solubilities of inert gases in water, 0oC to near the critical point of water", Journal of Chemical and Engineering Data, Vol. 5, No. 1, January 1960.
  • [4] Kell, George S., "Density, thermal expansivity, and compressibility of liquid water from 0oC to 150oC: correlations and tables for atmospheric pressure and saturation reviewed and expressed on 1968 temperature scale", Journal of Chemical and Engineering Data, Vol. 20, No. 1, 1975.
  • [5] ASHRAE, "Psychrometrics: Theory and Practice", ASHRAE, 1996.

moistair.jl's People

Contributors

longemen3000 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

midmoona

moistair.jl's Issues

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.