Procedures

ProcedureLocationProcedure TypeDescription
abs hyperdual_mod Interface
absHyperDual hyperdual_mod Function
acos hyperdual_mod Interface
acosHyperDual hyperdual_mod Function
AddHyperDualHyperDual hyperdual_mod Function
AddHyperDualReal hyperdual_mod Function
AddRealHyperDual hyperdual_mod Function
ADMM_REBASE ADMM_TAPENADE_INTERFACE Interface
ADMM_REBASESHADOWED ADMM_TAPENADE_INTERFACE Interface
ADMM_REGISTER ADMM_TAPENADE_INTERFACE Interface
ADMM_REGISTERSHADOWED ADMM_TAPENADE_INTERFACE Interface
ADMM_UNREGISTER ADMM_TAPENADE_INTERFACE Interface
ADMM_UNREGISTERSHADOWED ADMM_TAPENADE_INTERFACE Interface
aijTder legacy_ar_models Subroutine
allclose auxiliar_functions Function
alpha yaeos__models_ar_cubic_alphas Subroutine

Soave function and it’s derivatives.

alpha_mc yaeos__models_ar_cubic_alphas Subroutine

MathiasCopeman alpha function definition

alpha_rkpr yaeos__models_ar_cubic_alphas Subroutine
ar_consistency yaeos__consistency_armodel Subroutine

models consistency tests.

Read more…
ar_rkpr legacy_ar_models Subroutine
ar_srkpr legacy_ar_models Subroutine

Wrapper subroutine to the SRK/PR Residula Helmholtz function to use the general interface

ArVnder legacy_ar_models Subroutine
asin hyperdual_mod Interface
asinHyperDual hyperdual_mod Function
assignment (=) hyperdual_mod Interface
atan hyperdual_mod Interface
atan2 hyperdual_mod Interface
atan2HyperDual hyperdual_mod Function
atanHyperDual hyperdual_mod Function
aTder legacy_ar_models Subroutine
betalimits yaeos__equilibria_rachford_rice Subroutine

Define beta limits to avoid overshooting when solving the Rachford-Rice equation.

Read more…
betato01 yaeos__equilibria_rachford_rice Subroutine

Modify K-factor values to assure that lies between (0,1)

Bmix yaeos__models_ar_cubic_quadratic_mixing Subroutine

Mixture repulsive parameter.

Read more…
bmix_linear yaeos__models_ar_cubic_mixing_base Subroutine
bmix_qmr yaeos__models_ar_cubic_mixing_base Subroutine
BmixHV yaeos__models_cubic_mixing_rules_huron_vidal Subroutine

Quadratinc mixing rule for the repulsive parameter.

Read more…
BmixMHV yaeos__models_cubic_mixing_rules_huron_vidal Subroutine

Quadratinc mixing rule for the repulsive parameter, using as a combining rule.

Read more…
Bnder legacy_ar_models Subroutine
calc_pt_envel yaeos__fitting Subroutine
check_consistency yaeos__models_ge_group_contribution_model_parameters Subroutine
continuation yaeos__math_continuation Function

Numerical continuation of a function.

Read more…
cos hyperdual_mod Interface
cosh hyperdual_mod Interface
coshHyperDual hyperdual_mod Function
cosHyperDual hyperdual_mod Function
Cp_residual_vt yaeos__models_ar Subroutine

Calculate residual heat capacity pressure constant given v and t.

cubic_roots yaeos__math_linalg Subroutine
cubic_roots_rosendo yaeos__math_linalg Subroutine
cubic_v0 legacy_ar_models Function
Cv_residual_vt yaeos__models_ar Subroutine

Calculate residual heat capacity volume constant given v and t.

D1mix_constant yaeos__models_ar_cubic_quadratic_mixing Subroutine

Constant parameter.

Read more…
d1mix_rkpr yaeos__models_ar_cubic_mixing_base Subroutine

RKPR parameter mixing rule.

Read more…
D1MixHV yaeos__models_cubic_mixing_rules_huron_vidal Subroutine
D1MixMHV yaeos__models_cubic_mixing_rules_huron_vidal Subroutine
DandTnder legacy_ar_models Subroutine
DELTAnder legacy_ar_models Subroutine
derivative_d2xk_dnidnj yaeos__math Function

Calculate the mole fraction second derivatives respect to mole numbers

Read more…
derivative_dxk_dni yaeos__math Function

Calculate the mole fraction first derivatives respect to mole numbers

Read more…
DivideHyperDualHyperDual hyperdual_mod Function
DivideHyperDualReal hyperdual_mod Function
DivideRealHyperDual hyperdual_mod Function
Dmix yaeos__models_ar_cubic_quadratic_mixing Subroutine

Attractive parameter mixing rule with quadratic mix.

Read more…
DmixHV yaeos__models_cubic_mixing_rules_huron_vidal Subroutine
DmixMHV yaeos__models_cubic_mixing_rules_huron_vidal Subroutine

Mixing rule at infinite pressure as defined in the book of Michelsen and Møllerup.

Read more…
dx_to_dn yaeos__math Function

Convert the mole fraction derivatives of a quantity (calculated so they do not sum to 1) to mole number derivatives (where the mole fractions do sum to one). Requires the derivatives and the mole fractions of the mixture. From https://chemicals.readthedocs.io/chemicals.utils.html?highlight=dxs_to_dns#chemicals.utils.dxs_to_dns

Read more…
enthalpy_residual_vt yaeos__models_ar Subroutine

Calculate residual enthalpy given volume and temperature.

entropy_residual_vt yaeos__models_ar Subroutine

Calculate residual entropy given volume and temperature.

eq_dd hyperdual_mod Function
eq_di hyperdual_mod Function
eq_dr hyperdual_mod Function
eq_id hyperdual_mod Function
eq_rd hyperdual_mod Function
EqualHyperDualHyperDual hyperdual_mod Subroutine
EqualHyperDualReal hyperdual_mod Subroutine
error_function yaeos__fitting Subroutine

Error function for phase-equilibria optimization. Using two-phase points and an error function of:

Read more…
EXCESS_GIBBS yaeos__models_ge_NRTL Subroutine
excess_gibbs yaeos__models_ge_uniquac Subroutine

Calculate the excess Gibbs free energy and its derivatives of the UNIQUAC model.

excess_gibbs yaeos__models_ge_group_contribution_unifac Subroutine

Calculate the Gibbs excess energy of the UNIFAC model

Read more…
excess_gibbs yaeos__tapenade_ge_api Subroutine

Excess Gibbs model generic interface

EXCESS_GIBBS_B yaeos__models_ge_NRTL Subroutine
EXCESS_GIBBS_D yaeos__models_ge_NRTL Subroutine
EXCESS_GIBBS_D_B yaeos__models_ge_NRTL Subroutine
EXCESS_GIBBS_D_D yaeos__models_ge_NRTL Subroutine
EXCESS_GIBBS_D_D_D yaeos__models_ge_NRTL Subroutine
exp hyperdual_mod Interface
expHyperDual hyperdual_mod Function
flash yaeos__equilibria_flash Function

Flash algorithm using sucessive substitutions.

Read more…
foo yaeos__equilibria_saturation_points Subroutine

Function that needs to be solved at each envelope point

foo_wrap yaeos__optimizers_powell_wrap Subroutine
foo_wrap yaeos__optimizers_nelder_mead Function

Wrapper function to use the objective function with the Nelder-Mead algorithm

fugacity_pt yaeos__models_ar Subroutine

Calculate logarithm of fugacity, given pressure and temperature.

Read more…
fugacity_vt yaeos__models_ar Subroutine

Calculate fugacity coefficent given volume and temperature.

Read more…
full_newton yaeos__math_continuation Subroutine

Subroutine to solve a point.

Read more…
Ge_combinatorial yaeos__models_ge_group_contribution_unifac Subroutine

Calculate the UNIFAC combinatorial term of Gibbs excess energy

Read more…
ge_consistency yaeos__consistency_gemodel Subroutine

models consistency tests

Read more…
ge_dd hyperdual_mod Function
ge_di hyperdual_mod Function
ge_dr hyperdual_mod Function
ge_id hyperdual_mod Function
ge_rd hyperdual_mod Function
Ge_residual yaeos__models_ge_group_contribution_unifac Subroutine

Evaluate the UNIFAC residual therm

Read more…
GenericCubic_Ar yaeos__models_ar_genericcubic Subroutine

Residual Helmholtz Energy for a generic Cubic Equation of State.

Read more…
get_maingroup_index yaeos__models_ge_group_contribution_model_parameters Function

Get index of the maingoup with id: maingoup_id

Read more…
get_maingroups_aij yaeos__models_ge_group_contribution_model_parameters Function

Get the interaction parameter

Read more…
get_maingroups_bij yaeos__models_ge_group_contribution_model_parameters Function

Get the interaction parameter

Read more…
get_maingroups_cij yaeos__models_ge_group_contribution_model_parameters Function

Get the interaction parameter

Read more…
get_OMa_OMb yaeos__models_ar_cubic_implementations Subroutine
get_subgroup_index yaeos__models_ge_group_contribution_model_parameters Function

Get index of the subgroup with id: subgroup_id

Read more…
get_subgroup_maingroup yaeos__models_ge_group_contribution_model_parameters Function

Get the subgroup’s maingroup

Read more…
get_subgroup_Q yaeos__models_ge_group_contribution_model_parameters Function

Get the subgroup’s value

Read more…
get_subgroup_R yaeos__models_ge_group_contribution_model_parameters Function

Get the subgroup’s value

Read more…
get_subgroups_aij yaeos__models_ge_group_contribution_model_parameters Function

Get the interaction parameter

Read more…
get_subgroups_bij yaeos__models_ge_group_contribution_model_parameters Function

Get the interaction parameter

Read more…
get_subgroups_cij yaeos__models_ge_group_contribution_model_parameters Function

Get the interaction parameter

Read more…
get_v0 yaeos__tapenade_ar_api Function
get_z yaeos__equilibria_boundaries_phase_envelopes_px Subroutine

Calculate the fluid composition based on an amount of addition of second fluid.

Read more…
get_Zc_OMa_OMb legacy_ar_models Subroutine

Calculate Zc, OMa and OMb from the delta_1 parameter.

gibbs_residual_VT yaeos__models_ar Subroutine

Calculate residual Gibbs energy given volume and temperature.

gt_dd hyperdual_mod Function
gt_di hyperdual_mod Function
gt_dr hyperdual_mod Function
gt_id hyperdual_mod Function
gt_rd hyperdual_mod Function
HelmRKPR legacy_ar_models Subroutine

Calculate the reduced residual Helmholtz Energy and it’s derivatives with the RKPR EOS

HelmSRKPR legacy_ar_models Subroutine
init yaeos__models_ge_NRTL Function
init_mhv yaeos__models_cubic_mixing_rules_huron_vidal Function
int hyperdual_mod Interface
interpol yaeos__math Function

Linear interpolation.

Read more…
intHyperDual hyperdual_mod Function
k_wilson yaeos__equilibria_auxiliar Function

K-factors regressión done by Wilson, used for initialization.

kij_constant yaeos__models_ar_cubic_quadratic_mixing Subroutine

Combining rule that uses constant values.

Read more…
kij_exp_tdep yaeos__models_ar_cubic_quadratic_mixing Subroutine

Combining rule that uses temperature dependant values. With the following expression:

Read more…
lamdba_hv yaeos__models_ar_cubic_mixing_base Subroutine

Infinite pressure limit parameter

Read more…
le_dd hyperdual_mod Function
le_di hyperdual_mod Function
le_dr hyperdual_mod Function
le_id hyperdual_mod Function
le_rd hyperdual_mod Function
ln_activity_coefficient yaeos__models_ge Subroutine
log hyperdual_mod Interface
log10 hyperdual_mod Interface
log10HyperDual hyperdual_mod Function
logHyperDual hyperdual_mod Function
lt_dd hyperdual_mod Function
lt_di hyperdual_mod Function
lt_dr hyperdual_mod Function
lt_id hyperdual_mod Function
lt_rd hyperdual_mod Function
max hyperdual_mod Interface
max_dd hyperdual_mod Function
max_ddd hyperdual_mod Function
max_dr hyperdual_mod Function
max_rd hyperdual_mod Function
MHV yaeos__models_cubic_mixing_rules_huron_vidal Interface
min hyperdual_mod Interface
min_dd hyperdual_mod Function
min_dr hyperdual_mod Function
min_rd hyperdual_mod Function
min_tpd yaeos__phase_equilibria_stability Subroutine
min_tpd_to_optimize yaeos__phase_equilibria_stability Subroutine
MinusHyperDualHyperDual hyperdual_mod Function
model_from_X yaeos__fitting_fit_kij_lij Subroutine
model_from_X yaeos__fitting_fit_nrtl_mhv Subroutine
MultiplyHyperDualHyperDual hyperdual_mod Function
MultiplyHyperDualInt hyperdual_mod Function
MultiplyHyperDualReal hyperdual_mod Function
MultiplyIntHyperDual hyperdual_mod Function
MultiplyRealHyperDual hyperdual_mod Function
ne_dd hyperdual_mod Function
ne_di hyperdual_mod Function
ne_dr hyperdual_mod Function
ne_id hyperdual_mod Function
ne_rd hyperdual_mod Function
nelmin yaeos__optimizers_nelder_mead Subroutine
newton yaeos__math Interface
newton_1d yaeos__math Subroutine
nint hyperdual_mod Interface
nintHyperDual hyperdual_mod Function
NRTL yaeos__models_ge_NRTL Interface
numeric_ar_derivatives yaeos__consistency_armodel Subroutine

Evaluate the Helmholtz derivatives with central finite difference.

Read more…
numeric_ge_derivatives yaeos__consistency_gemodel Subroutine

Numeric model derivatives

Read more…
operator (*) hyperdual_mod Interface
operator (**) hyperdual_mod Interface
operator (+) hyperdual_mod Interface
operator (+) hyperdual_mod Interface
operator (-) hyperdual_mod Interface
operator (-) hyperdual_mod Interface
operator (.eq.) hyperdual_mod Interface
operator (.ge.) hyperdual_mod Interface
operator (.gt.) hyperdual_mod Interface
operator (.le.) hyperdual_mod Interface
operator (.lt.) hyperdual_mod Interface
operator (.ne.) hyperdual_mod Interface
operator (/) hyperdual_mod Interface
optimize yaeos__fitting Function
optimize yaeos__optimizers_nelder_mead Subroutine

Optimize the input function

optval yaeos__auxiliar Interface
optval_integer yaeos__auxiliar Function

Set a value to a default if it is not defined

optval_real yaeos__auxiliar Function

Set a value to a default if it is not defined

P_wilson yaeos__equilibria_auxiliar Function
PengRobinson76 yaeos__models_ar_cubic_implementations Function

PengRobinson76.

Read more…
PengRobinson78 yaeos__models_ar_cubic_implementations Function

PengRobinson78.

Read more…
PlusHyperDualHyperDual hyperdual_mod Function
popinteger4 yaeos__tapenade_interfaces Interface
POPPOINTER8 ADMM_TAPENADE_INTERFACE Interface
POPREAL8 yaeos__tapenade_interfaces Interface
POPREAL8ARRAY yaeos__tapenade_interfaces Interface
powell_optimize yaeos__optimizers_powell_wrap Subroutine
PowerHyperDualHyperDual hyperdual_mod Function
PowerHyperDualInt hyperdual_mod Function
PowerHyperDualReal hyperdual_mod Function
PR76_factory legacy_ar_models Subroutine

PengRobinson 76 factory

Read more…
PR78_factory legacy_ar_models Subroutine

PengRobinson 78 factory

Read more…
pressure yaeos__models_ar Subroutine

Pressure calculation.

Read more…
pressure_equality_V_beta_xy yaeos__solvers_pressure_equality Subroutine

Solve pressure equality between two phases at a given temperature, total volume, vapor molar fractions and compositions.

Psat yaeos__equilibria_pure_psat Function

Calculation of saturation pressure of a pure component using the secant method.

PSRK yaeos__models_ar_cubic_implementations Function
PSRKParameters yaeos__models_ge_group_contribution_psrk_parameters Function
pt_envelope_2ph yaeos__equilibria_boundaries_phase_envelopes_pt Function

PT two-phase envelope calculation procedure.

Read more…
PUREFUG_CALC legacy_thermo_properties Subroutine

Fugacity of a pure component

pushinteger4 yaeos__tapenade_interfaces Interface
PUSHPOINTER8 ADMM_TAPENADE_INTERFACE Interface
pushreal8 yaeos__tapenade_interfaces Interface
pushreal8array yaeos__tapenade_interfaces Interface
px_envelope_2ph yaeos__equilibria_boundaries_phase_envelopes_px Function

PX two-phase envelope calculation procedure.

Read more…
Quadratic_temperature_dependence yaeos__models_ge_gc_td Subroutine Read more…
rachford_rice yaeos__equilibria_rachford_rice Subroutine

Rachford-Rice equation for a two phase system

real hyperdual_mod Interface
realHyperDual hyperdual_mod Function
rel_error auxiliar_functions Function
residual_helmholtz yaeos__tapenade_ar_api Subroutine

Residual Helmholtz model generic interface

residual_helmholtz yaeos__adiff_hyperdual_ar_api Subroutine
RKPR yaeos__models_ar_cubic_implementations Function

RKPR Equation of State

Read more…
RKPR_D1mix yaeos__models_ar_cubic_quadratic_mixing Subroutine

RKPR parameter mixing rule.

Read more…
saturation_F yaeos__m_s_sp Subroutine
saturation_pressure yaeos__equilibria_saturation_points Function

Saturation pressure calculation function.

Read more…
saturation_temperature yaeos__equilibria_saturation_points Function

Saturation temperature calculation function.

Read more…
set_delta1 yaeos__models_ar_genericcubic Subroutine
set_mixrule yaeos__models_ar_genericcubic Subroutine
setup legacy_ar_models Subroutine

Setup the basics variables that describe the model.

setup_psrk yaeos__models_ge_group_contribution_psrk Function
setup_unifac yaeos__models_ge_group_contribution_unifac Function

Instantiate a UNIFAC model

Read more…
setup_uniquac yaeos__models_ge_uniquac Function

Instantiate a UNIQUAC model.

Read more…
sign hyperdual_mod Interface
sign_dd hyperdual_mod Function
sign_dr hyperdual_mod Function
sign_rd hyperdual_mod Function
sin hyperdual_mod Interface
sinh hyperdual_mod Interface
sinhHyperDual hyperdual_mod Function
sinHyperDual hyperdual_mod Function
size yaeos__models_ar Interface
size_ar_model yaeos__models_ar Function

Get the size of the model.

SoaveRedlichKwong yaeos__models_ar_cubic_implementations Function

SoaveRedlichKwong.

Read more…
solve_rr yaeos__equilibria_rachford_rice Subroutine

Solve the Rachford-Rice Equation.

solve_system yaeos__math_linalg Function

Solve a linear sytem AX = b

sort yaeos__auxiliar Subroutine

Sort an array and return the indexes

sq_error yaeos__math Function

Read more…
sqrt hyperdual_mod Interface
sqrtHyperDual hyperdual_mod Function
SRK_factory legacy_ar_models Subroutine

SoaveRedlichKwong factory

Read more…
SubtractHyperDualHyperDual hyperdual_mod Function
SubtractHyperDualReal hyperdual_mod Function
SubtractRealHyperDual hyperdual_mod Function
sum hyperdual_mod Interface
SumHyperDual hyperdual_mod Function
SumHyperDual2 hyperdual_mod Function
tan hyperdual_mod Interface
tanh hyperdual_mod Interface
tanhHyperDual hyperdual_mod Function
tanHyperDual hyperdual_mod Function
taus yaeos__models_ge_uniquac Subroutine

Calculate the temperature dependence term of the UNIQUAC model.

TERMO legacy_thermo_properties Subroutine
thetas_i yaeos__models_ge_group_contribution_unifac Function

Calculate the area fraciton of each froup on each molecule.

Read more…
tm yaeos__phase_equilibria_stability Function

Michelsen’s modified function, .

Read more…
UNIFAC_temperature_dependence yaeos__models_ge_gc_td Subroutine

Implementation of the function of the UNIFAC model.

Read more…
UNIFACParameters yaeos__models_ge_group_contribution_unifac_parameters Function

UNIFAC parameters

Read more…
v0 yaeos__models_ar_genericcubic Function

Cubic EoS volume initializer. For a Cubic Equation of State, the covolume calculated with the mixing rule is a good estimate for the initial volume solver on the liquid region.

VCALC legacy_thermo_properties Subroutine

ROUTINE FOR CALCULATION OF VOLUME, GIVEN PRESSURE

volume yaeos__models_ar Subroutine

Solves volume roots using newton method. Given pressure and temperature.

Read more…
volume yaeos__models_ar_genericcubic Subroutine

Volume solver optimized for Cubic Equations of State.

Read more…
volume_michelsen yaeos__models_solvers Subroutine

Volume solver at a given pressure.

Read more…
write_EquilibriumState yaeos__equilibria_equilibrium_state Subroutine
write_PTEnvel2 yaeos__equilibria_boundaries_phase_envelopes_pt Subroutine
zTVTERMO legacy_thermo_properties Subroutine

Calculation of lnphiP and derivatives rn mixture mole numbers (input) t temperature (k) (input) v volume (L) (input) p pressure (bar) (output) PHILOG vector of ln(phi(i)P) (output) 0 < INDIC < 5 DLPHIT t-derivative of ln(phi(i)) (const P, n) (output) 0 < INDIC = 2 or 4 DLPHIP P-derivative of ln(phi(i)) (const T, n) (output) 0 < INDIC < 5 FUGN comp-derivative of ln(phi(i)) (const t & P)(output) 2 < INDIC

Read more…