calculation_types

Description

This thermodynamic module contains a series of wrappers to handle the inputs and outputs of these functions.

The calc module contains the thermodynamic calculations. Calculation of pressure, fugacity_coefficient, and maximum allowed density are handled by an Eos object so that these functions can be used with any EOS. None of the functions in this folder need to be handled directly, as a function factory is included in our __init__.py file. Add “from thermodynamics import thermo” and use thermo(“calc_type”,Eos,input_dict)` to get started.

Functions

activity_coefficient(Eos, **sys_dict)

Calculate the activity coefficient with a variety of methods.

bubble_pressure(Eos, **sys_dict)

Calculates pressure and vapor compositions given liquid mole fractions and temperature.

dew_pressure(Eos, **sys_dict)

Calculate pressure and liquid composition given vapor mole fractions, yi, and temperature.

flash(Eos, **sys_dict)

Flash calculation of vapor and liquid mole fractions.

liquid_properties(Eos, **sys_dict)

Computes the liquid density and fugacity coefficient given a temperature, pressure, and liquid mole fractions.

saturation_properties(Eos, **sys_dict)

Computes the saturated pressure, liquid, and gas density a one component phase at a temperature.

solubility_parameter(Eos, **sys_dict)

Calculate the Hildebrand solubility parameter based on temperature and composition.

vapor_properties(Eos, **sys_dict)

Computes the vapor density and fugacity coefficient given a temperature, pressure, and vapor mole fractions.

verify_eos(Eos, **sys_dict)

The following consistency checks are performed to ensure the calculated fugacity coefficients are thermodynamically consistent.