yaeos__models_ar Module

Module that defines the basics of a residual Helmholtz energy.

All the residual properties that are calculated in this library are based on residual Helmholtz Equations of State. Following the book by Michelsen and Mollerup.

In this library up to second derivatives of residual Helmholtz energy are used. Because they’re the fundamentals for phase equilibria calculation.

Note

Later on, third derivative with respect to volume will be included since it’s importance on calculation of critical points.

Properties

Available properties:

  • pressure(n, V, T)
  • fugacity(n, V, T)
  • fugacity(n, P, T, root=[vapor, liquid, stable])
  • volume

Calculate thermodynamic properties using Helmholtz energy as a basis. All the routines in this module work with the logic:

call foo(x, V, T, [dfoodv, dfoodT, ...])

Where the user can call the routine of the desired property. And include as optional values the desired derivatives of said properties.


Uses

  • module~~yaeos__models_ar~~UsesGraph module~yaeos__models_ar yaeos__models_ar module~yaeos__constants yaeos__constants module~yaeos__models_ar->module~yaeos__constants module~yaeos__models_base yaeos__models_base module~yaeos__models_ar->module~yaeos__models_base iso_fortran_env iso_fortran_env module~yaeos__constants->iso_fortran_env module~yaeos__substance yaeos__substance module~yaeos__models_base->module~yaeos__substance module~yaeos__substance->module~yaeos__constants

Used by

  • module~~yaeos__models_ar~~UsedByGraph module~yaeos__models_ar yaeos__models_ar module~yaeos__adiff_hyperdual_ar_api yaeos__adiff_hyperdual_ar_api module~yaeos__adiff_hyperdual_ar_api->module~yaeos__models_ar module~yaeos__consistency_armodel yaeos__consistency_armodel module~yaeos__consistency_armodel->module~yaeos__models_ar module~yaeos__equilibria_auxiliar yaeos__equilibria_auxiliar module~yaeos__equilibria_auxiliar->module~yaeos__models_ar module~yaeos__equilibria_binaries yaeos__equilibria_binaries module~yaeos__equilibria_binaries->module~yaeos__models_ar module~yaeos__equilibria_boundaries_generalized_isopleths yaeos__equilibria_boundaries_generalized_isopleths module~yaeos__equilibria_boundaries_generalized_isopleths->module~yaeos__models_ar module~yaeos__equilibria_stability yaeos__equilibria_stability module~yaeos__equilibria_boundaries_generalized_isopleths->module~yaeos__equilibria_stability module~yaeos__equilibria_boundaries_phase_envelopes_mp yaeos__equilibria_boundaries_phase_envelopes_mp module~yaeos__equilibria_boundaries_phase_envelopes_mp->module~yaeos__models_ar module~yaeos__equilibria_boundaries_phase_envelopes_mp_px yaeos__equilibria_boundaries_phase_envelopes_mp_px module~yaeos__equilibria_boundaries_phase_envelopes_mp_px->module~yaeos__models_ar module~yaeos__equilibria_boundaries_phase_envelopes_mp_tx yaeos__equilibria_boundaries_phase_envelopes_mp_tx module~yaeos__equilibria_boundaries_phase_envelopes_mp_tx->module~yaeos__models_ar module~yaeos__equilibria_boundaries_phase_envelopes_pt yaeos__equilibria_boundaries_phase_envelopes_pt module~yaeos__equilibria_boundaries_phase_envelopes_pt->module~yaeos__models_ar module~yaeos__equilibria_boundaries_phase_envelopes_pt->module~yaeos__equilibria_auxiliar module~yaeos__equilibria_boundaries_phase_envelopes_pt3 yaeos__equilibria_boundaries_phase_envelopes_pt3 module~yaeos__equilibria_boundaries_phase_envelopes_pt3->module~yaeos__models_ar module~yaeos__equilibria_boundaries_phase_envelopes_px yaeos__equilibria_boundaries_phase_envelopes_px module~yaeos__equilibria_boundaries_phase_envelopes_px->module~yaeos__models_ar module~yaeos__equilibria_boundaries_phase_envelopes_px3 yaeos__equilibria_boundaries_phase_envelopes_px3 module~yaeos__equilibria_boundaries_phase_envelopes_px3->module~yaeos__models_ar module~yaeos__equilibria_boundaries_phase_envelopes_tx yaeos__equilibria_boundaries_phase_envelopes_tx module~yaeos__equilibria_boundaries_phase_envelopes_tx->module~yaeos__models_ar module~yaeos__equilibria_boundaries_pure_saturation yaeos__equilibria_boundaries_pure_saturation module~yaeos__equilibria_boundaries_pure_saturation->module~yaeos__models_ar module~yaeos__equilibria_critical yaeos__equilibria_critical module~yaeos__equilibria_critical->module~yaeos__models_ar module~yaeos__equilibria_flash yaeos__equilibria_flash module~yaeos__equilibria_flash->module~yaeos__models_ar module~yaeos__equilibria_flash->module~yaeos__equilibria_auxiliar module~yaeos__solvers_pressure_equality yaeos__solvers_pressure_equality module~yaeos__equilibria_flash->module~yaeos__solvers_pressure_equality module~yaeos__equilibria_multiphase_flash yaeos__equilibria_multiphase_flash module~yaeos__equilibria_multiphase_flash->module~yaeos__models_ar module~yaeos__equilibria_saturation_points yaeos__equilibria_saturation_points module~yaeos__equilibria_saturation_points->module~yaeos__models_ar module~yaeos__equilibria_saturation_points->module~yaeos__equilibria_auxiliar module~yaeos__equilibria_stability->module~yaeos__models_ar module~yaeos__m_s_sp yaeos__m_s_sp module~yaeos__m_s_sp->module~yaeos__models_ar module~yaeos__models yaeos__models module~yaeos__models->module~yaeos__models_ar module~yaeos__models_ar_genericcubic yaeos__models_ar_genericcubic module~yaeos__models->module~yaeos__models_ar_genericcubic module~yaeos__models_ar_cubic_alphas yaeos__models_ar_cubic_alphas module~yaeos__models->module~yaeos__models_ar_cubic_alphas module~yaeos__models_ar_cubic_implementations yaeos__models_ar_cubic_implementations module~yaeos__models->module~yaeos__models_ar_cubic_implementations module~yaeos__models_ar_cubic_quadratic_mixing yaeos__models_ar_cubic_quadratic_mixing module~yaeos__models->module~yaeos__models_ar_cubic_quadratic_mixing module~yaeos__models_ar_gerg2008 yaeos__models_ar_gerg2008 module~yaeos__models->module~yaeos__models_ar_gerg2008 module~yaeos__models_ar_saft_pcsaft yaeos__models_ar_saft_pcsaft module~yaeos__models->module~yaeos__models_ar_saft_pcsaft module~yaeos__models_cubic_mixing_rules_huron_vidal yaeos__models_cubic_mixing_rules_huron_vidal module~yaeos__models->module~yaeos__models_cubic_mixing_rules_huron_vidal module~yaeos__models_ge_implementations yaeos__models_ge_implementations module~yaeos__models->module~yaeos__models_ge_implementations module~yaeos__models_ar_genericcubic->module~yaeos__models_ar module~yaeos__models_solvers yaeos__models_solvers module~yaeos__models_solvers->module~yaeos__models_ar module~yaeos__solvers_pressure_equality->module~yaeos__models_ar module~yaeos__tapenade_ar_api yaeos__tapenade_ar_api module~yaeos__tapenade_ar_api->module~yaeos__models_ar module~yaeos yaeos module~yaeos->module~yaeos__models module~yaeos__consistency yaeos__consistency module~yaeos->module~yaeos__consistency module~yaeos__equilibria yaeos__equilibria module~yaeos->module~yaeos__equilibria module~yaeos__autodiff yaeos__autodiff module~yaeos__autodiff->module~yaeos__adiff_hyperdual_ar_api module~yaeos__consistency->module~yaeos__consistency_armodel module~yaeos__equilibria->module~yaeos__equilibria_auxiliar module~yaeos__equilibria->module~yaeos__equilibria_binaries module~yaeos__equilibria->module~yaeos__equilibria_boundaries_generalized_isopleths module~yaeos__equilibria->module~yaeos__equilibria_boundaries_phase_envelopes_mp module~yaeos__equilibria->module~yaeos__equilibria_boundaries_phase_envelopes_mp_px module~yaeos__equilibria->module~yaeos__equilibria_boundaries_phase_envelopes_mp_tx module~yaeos__equilibria->module~yaeos__equilibria_boundaries_phase_envelopes_pt module~yaeos__equilibria->module~yaeos__equilibria_boundaries_phase_envelopes_pt3 module~yaeos__equilibria->module~yaeos__equilibria_boundaries_phase_envelopes_px module~yaeos__equilibria->module~yaeos__equilibria_boundaries_phase_envelopes_px3 module~yaeos__equilibria->module~yaeos__equilibria_boundaries_phase_envelopes_tx module~yaeos__equilibria->module~yaeos__equilibria_boundaries_pure_saturation module~yaeos__equilibria->module~yaeos__equilibria_critical module~yaeos__equilibria->module~yaeos__equilibria_flash module~yaeos__equilibria->module~yaeos__equilibria_multiphase_flash module~yaeos__equilibria->module~yaeos__equilibria_saturation_points module~yaeos__equilibria->module~yaeos__equilibria_stability module~yaeos__models_ar_cubic_alphas->module~yaeos__models_ar_genericcubic module~yaeos__models_ar_cubic_implementations->module~yaeos__models_ar_genericcubic module~yaeos__models_ar_cubic_quadratic_mixing->module~yaeos__models_ar_genericcubic module~yaeos__models_ar_gerg2008->module~yaeos__adiff_hyperdual_ar_api module~yaeos__models_ar_gerg2008->module~yaeos__models_ar_genericcubic module~yaeos__models_ar_gerg2008->module~yaeos__models_ar_cubic_implementations module~yaeos__models_ar_saft_pcsaft->module~yaeos__adiff_hyperdual_ar_api module~yaeos__models_cubic_mixing_rules_huron_vidal->module~yaeos__models_ar_genericcubic module~yaeos__models_cubic_mixing_rules_huron_vidal->module~yaeos__models_ar_cubic_quadratic_mixing module~yaeos__models_ge_nrtlhv yaeos__models_ge_nrtlhv module~yaeos__models_cubic_mixing_rules_huron_vidal->module~yaeos__models_ge_nrtlhv proc~init_pcsaft init_pcsaft proc~init_pcsaft->module~yaeos__equilibria_critical proc~pengrobinson76 PengRobinson76 proc~pengrobinson76->module~yaeos__models_ar_genericcubic proc~pengrobinson76->module~yaeos__models_ar_cubic_alphas proc~pengrobinson76->module~yaeos__models_ar_cubic_quadratic_mixing proc~pengrobinson78 PengRobinson78 proc~pengrobinson78->module~yaeos__models_ar_genericcubic proc~pengrobinson78->module~yaeos__models_ar_cubic_alphas proc~pengrobinson78->module~yaeos__models_ar_cubic_quadratic_mixing proc~psrk PSRK proc~psrk->module~yaeos__models_ar_genericcubic proc~psrk->module~yaeos__models_ar_cubic_alphas proc~psrk->module~yaeos__models_cubic_mixing_rules_huron_vidal proc~psrk->module~yaeos__models_ge_implementations proc~pt_mp_flash pt_mp_flash proc~pt_mp_flash->module~yaeos__equilibria_stability proc~refit_rkpr_k refit_rkpr_k proc~refit_rkpr_k->module~yaeos__equilibria_boundaries_pure_saturation proc~refit_rkpr_k->module~yaeos__models_ar_cubic_alphas proc~saturation_pressure saturation_pressure proc~saturation_pressure->module~yaeos__m_s_sp proc~saturation_temperature saturation_temperature proc~saturation_temperature->module~yaeos__m_s_sp proc~soaveredlichkwong SoaveRedlichKwong proc~soaveredlichkwong->module~yaeos__models_ar_genericcubic proc~soaveredlichkwong->module~yaeos__models_ar_cubic_alphas proc~soaveredlichkwong->module~yaeos__models_ar_cubic_quadratic_mixing proc~stability_check stability_check proc~stability_check->module~yaeos__equilibria_stability proc~volume~2 CubicEoS%volume proc~volume~2->module~yaeos__models_solvers module~yaeos__models_ge_nrtlhv->module~yaeos__autodiff proc~rkpr RKPR proc~rkpr->module~yaeos__models_ar_cubic_alphas proc~rkpr->module~yaeos__models_ar_cubic_quadratic_mixing module~yaeos__models_ge_implementations->module~yaeos__models_ge_nrtlhv proc~dmixhvnrtl HV_NRTL%DmixHVNRTL proc~dmixhvnrtl->module~yaeos__models_ge_nrtlhv proc~init_hvnrtl init_hvnrtl proc~init_hvnrtl->module~yaeos__models_ge_nrtlhv

Interfaces

public interface size

  • private pure function size_ar_model(eos)

    Get the size of the model.

    Arguments

    Type IntentOptional Attributes Name
    class(ArModel), intent(in) :: eos

    Return Value integer


Abstract Interfaces

abstract interface

  • private subroutine abs_residual_helmholtz(self, n, v, t, Ar, ArV, ArT, ArTV, ArV2, ArT2, Arn, ArVn, ArTn, Arn2)

    Residual Helmholtz model generic interface.

    This interface represents how an Ar model should be implemented. By our standard, a Resiudal Helmholtz model takes as input:

    • The mixture’s number of moles vector.
    • Volume, by default in liters.
    • Temperature, by default in Kelvin.

    All the output arguments are optional. While this keeps a long signature for the implementation, this is done this way to take advantage of any inner optimizations to calculate derivatives inside the procedure.

    Once the model is implemented, the signature can be short like model%residual_helmholtz(n, v, t, ArT2=dArdT2)

    Arguments

    Type IntentOptional Attributes Name
    class(ArModel), intent(in) :: self

    ArModel

    real(kind=pr), intent(in) :: n(:)

    Moles vector

    real(kind=pr), intent(in) :: v

    Volume [L]

    real(kind=pr), intent(in) :: t

    Temperature [K]

    real(kind=pr), intent(out), optional :: Ar

    Residual Helmoltz energy

    real(kind=pr), intent(out), optional :: ArV

    real(kind=pr), intent(out), optional :: ArT

    real(kind=pr), intent(out), optional :: ArTV

    real(kind=pr), intent(out), optional :: ArV2

    real(kind=pr), intent(out), optional :: ArT2

    real(kind=pr), intent(out), optional :: Arn(size(n))

    real(kind=pr), intent(out), optional :: ArVn(size(n))

    real(kind=pr), intent(out), optional :: ArTn(size(n))

    real(kind=pr), intent(out), optional :: Arn2(size(n),size(n))

abstract interface

  • private function abs_volume_initializer(self, n, p, t)

    Function that provides an initializer value for the liquid-root of newton solver of volume. In the case the model will use the volume_michelsen routine this value should provide the co-volume of the model.

    Arguments

    Type IntentOptional Attributes Name
    class(ArModel), intent(in) :: self

    Ar Model

    real(kind=pr), intent(in) :: n(:)

    Moles vector

    real(kind=pr), intent(in) :: p

    Pressure [bar]

    real(kind=pr), intent(in) :: t

    Temperature [K]

    Return Value real(kind=pr)

    Initial volume [L]


Derived Types

type, public, abstract, extends(BaseModel) ::  ArModel

Abstract residual Helmholtz model.

Read more…

Components

Type Visibility Attributes Name Initial
type(Substances), public :: components

Substances contained in the module

character(len=:), public, allocatable :: name

Name of the model

Type-Bound Procedures

procedure, public :: Cp_residual_vt
procedure, public :: Cv_residual_vt
procedure, public :: Psat_pure
procedure, public :: enthalpy_residual_vt
procedure, public :: entropy_residual_vt
procedure(abs_volume_initializer), public, deferred :: get_v0
procedure, public :: gibbs_residual_vt
procedure, public :: internal_energy_residual_vt
procedure, public :: lnfug_vt
procedure, public :: lnphi_pt
procedure, public :: lnphi_vt
procedure, public :: pressure
procedure(abs_residual_helmholtz), public, deferred :: residual_helmholtz
procedure, public :: volume

Functions

private function Psat_pure(eos, ncomp, T)

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

Arguments

Type IntentOptional Attributes Name
class(ArModel), intent(in) :: eos

Model that will be used

integer, intent(in) :: ncomp

Number of component in the mixture from which the saturation pressure will be calculated

real(kind=pr), intent(in) :: T

Temperature [K]

Return Value real(kind=pr)

private pure function size_ar_model(eos)

Get the size of the model.

Arguments

Type IntentOptional Attributes Name
class(ArModel), intent(in) :: eos

Return Value integer


Subroutines

public subroutine volume(eos, n, P, T, V, root_type)

Volume solver routine for residual Helmholtz models.

Read more…

Arguments

Type IntentOptional Attributes Name
class(ArModel), intent(in) :: eos

Model

real(kind=pr), intent(in) :: n(:)

Moles number vector

real(kind=pr), intent(in) :: P

Pressure [bar]

real(kind=pr), intent(in) :: T

Temperature [K]

real(kind=pr), intent(out) :: V

Volume [L]

character(len=*), intent(in) :: root_type

Desired root-type to solve. Options are: ["liquid", "vapor", "stable"]

private subroutine Cp_residual_vt(eos, n, V, T, Cp)

Calculate residual heat capacity pressure constant given V and T.

Read more…

Arguments

Type IntentOptional Attributes Name
class(ArModel), intent(in) :: eos

Model

real(kind=pr), intent(in) :: n(:)

Moles number vector

real(kind=pr), intent(in) :: V

Volume [L]

real(kind=pr), intent(in) :: T

Temperature [K]

real(kind=pr), intent(out) :: Cp

heat capacity P constant [bar L / K]

private subroutine Cv_residual_vt(eos, n, V, T, Cv)

Calculate residual heat capacity volume constant given V and T.

Read more…

Arguments

Type IntentOptional Attributes Name
class(ArModel), intent(in) :: eos

Model

real(kind=pr), intent(in) :: n(:)

Moles number vector

real(kind=pr), intent(in) :: V

Volume [L]

real(kind=pr), intent(in) :: T

Temperature [K]

real(kind=pr), intent(out) :: Cv

heat capacity V constant [bar L / K]

private subroutine enthalpy_residual_vt(eos, n, V, T, Hr, HrV, HrT, Hrn)

Calculate residual enthalpy given volume and temperature.

Read more…

Arguments

Type IntentOptional Attributes Name
class(ArModel), intent(in) :: eos

Model

real(kind=pr), intent(in) :: n(:)

Moles number vector

real(kind=pr), intent(in) :: V

Volume [L]

real(kind=pr), intent(in) :: T

Temperature [K]

real(kind=pr), intent(out), optional :: Hr

Residual enthalpy [bar L]

real(kind=pr), intent(out), optional :: HrV

real(kind=pr), intent(out), optional :: HrT

real(kind=pr), intent(out), optional :: Hrn(size(n))

private subroutine entropy_residual_vt(eos, n, V, T, Sr, SrV, SrT, Srn)

Calculate residual entropy given volume and temperature.

Read more…

Arguments

Type IntentOptional Attributes Name
class(ArModel), intent(in) :: eos

Model

real(kind=pr), intent(in) :: n(:)

Moles number vector

real(kind=pr), intent(in) :: V

Volume [L]

real(kind=pr), intent(in) :: T

Temperature [K]

real(kind=pr), intent(out), optional :: Sr

Entropy [bar L / K]

real(kind=pr), intent(out), optional :: SrV

real(kind=pr), intent(out), optional :: SrT

real(kind=pr), intent(out), optional :: Srn(size(n))

private subroutine gibbs_residual_vt(eos, n, V, T, Gr, GrV, GrT, Grn)

Calculate residual Gibbs energy given volume and temperature.

Read more…

Arguments

Type IntentOptional Attributes Name
class(ArModel), intent(in) :: eos

Model

real(kind=pr), intent(in) :: n(:)

Moles number vector

real(kind=pr), intent(in) :: V

Volume [L]

real(kind=pr), intent(in) :: T

Temperature [K]

real(kind=pr), intent(out), optional :: Gr

Gibbs energy [bar L]

real(kind=pr), intent(out), optional :: GrV

real(kind=pr), intent(out), optional :: GrT

real(kind=pr), intent(out), optional :: Grn(size(n))

private subroutine internal_energy_residual_vt(eos, n, V, T, Ur, UrV, UrT, Urn)

Calculate residual internal energy given volume and temperature.

Read more…

Arguments

Type IntentOptional Attributes Name
class(ArModel), intent(in) :: eos

Model

real(kind=pr), intent(in) :: n(:)

Moles number vector

real(kind=pr), intent(in) :: V

Volume [L]

real(kind=pr), intent(in) :: T

Temperature [K]

real(kind=pr), intent(out), optional :: Ur

Internal energy [bar L]

real(kind=pr), intent(out), optional :: UrV

real(kind=pr), intent(out), optional :: UrT

real(kind=pr), intent(out), optional :: Urn(size(n))

private subroutine lnfug_vt(eos, n, V, T, P, lnf, dlnfdV, dlnfdT, dlnfdn, dPdV, dPdT, dPdn)

Calculate natural logarithm of fugacity given volume and temperature.

Read more…

Arguments

Type IntentOptional Attributes Name
class(ArModel) :: eos

Model

real(kind=pr), intent(in) :: n(:)

Mixture mole numbers

real(kind=pr), intent(in) :: V

Volume [L]

real(kind=pr), intent(in) :: T

Temperature [K]

real(kind=pr), intent(out), optional :: P

Pressure [bar]

real(kind=pr), intent(out), optional :: lnf(size(n))

vector

real(kind=pr), intent(out), optional :: dlnfdV(size(n))

Volume derivative

real(kind=pr), intent(out), optional :: dlnfdT(size(n))

Temp derivative

real(kind=pr), intent(out), optional :: dlnfdn(size(n),size(n))

compositional derivative

real(kind=pr), intent(out), optional :: dPdV

real(kind=pr), intent(out), optional :: dPdT

real(kind=pr), intent(out), optional :: dPdn(:)

private subroutine lnphi_pt(eos, n, P, T, V, root_type, lnPhi, dlnPhidP, dlnPhidT, dlnPhidn, dPdV, dPdT, dPdn, lnPhiP)

Calculate natural logarithm of fugacity given pressure and temperature.

Read more…

Arguments

Type IntentOptional Attributes Name
class(ArModel), intent(in) :: eos

Model

real(kind=pr), intent(in) :: n(:)

Mixture mole numbers

real(kind=pr), intent(in) :: P

Pressure [bar]

real(kind=pr), intent(in) :: T

Temperature [K]

real(kind=pr), intent(out), optional :: V

Volume [L]

character(len=*), intent(in) :: root_type

Type of root desired [“liquid”, “vapor”, “stable”]

real(kind=pr), intent(out), optional :: lnPhi(size(n))

vector

real(kind=pr), intent(out), optional :: dlnPhidP(size(n))

ln(phi) Presssure derivative

real(kind=pr), intent(out), optional :: dlnPhidT(size(n))

ln(phi) Temperature derivative

real(kind=pr), intent(out), optional :: dlnPhidn(size(n),size(n))

ln(phi) compositional derivative

real(kind=pr), intent(out), optional :: dPdV

real(kind=pr), intent(out), optional :: dPdT

real(kind=pr), intent(out), optional :: dPdn(size(n))

real(kind=pr), intent(out), optional :: lnPhiP(:)

. It is useful to calculate fugacity coefficients at negatives pressures.

private subroutine lnphi_vt(eos, n, V, T, P, lnPhi, dlnPhidP, dlnPhidT, dlnPhidn, dPdV, dPdT, dPdn, lnPhiP)

Calculate natural logarithm of fugacity coefficent.

Read more…

Arguments

Type IntentOptional Attributes Name
class(ArModel) :: eos

Model

real(kind=pr), intent(in) :: n(:)

Mixture mole numbers

real(kind=pr), intent(in) :: V

Volume [L]

real(kind=pr), intent(in) :: T

Temperature [K]

real(kind=pr), intent(out), optional :: P

Pressure [bar]

real(kind=pr), intent(out), optional :: lnPhi(size(n))

vector

real(kind=pr), intent(out), optional :: dlnPhidP(size(n))

Presssure derivative

real(kind=pr), intent(out), optional :: dlnPhidT(size(n))

Temp derivative

real(kind=pr), intent(out), optional :: dlnPhidn(size(n),size(n))

compositional derivative

real(kind=pr), intent(out), optional :: dPdV

real(kind=pr), intent(out), optional :: dPdT

real(kind=pr), intent(out), optional :: dPdn(:)

real(kind=pr), intent(out), optional :: lnPhiP(:)

. It is useful to calculate fugacity coefficients at negatives pressures.

private subroutine pressure(eos, n, V, T, P, dPdV, dPdT, dPdn)

Calculate pressure.

Read more…

Arguments

Type IntentOptional Attributes Name
class(ArModel), intent(in) :: eos

Model

real(kind=pr), intent(in) :: n(:)

Moles number vector

real(kind=pr), intent(in) :: V

Volume [L]

real(kind=pr), intent(in) :: T

Temperature [K]

real(kind=pr), intent(out) :: P

Pressure [bar]

real(kind=pr), intent(out), optional :: dPdV

real(kind=pr), intent(out), optional :: dPdT

real(kind=pr), intent(out), optional :: dPdn(:)