yaeos__models_ar_volume_translated Module

Volume-translated residual Helmholtz models

Abstract adapter for volume translations independent of volume and pressure.

Description

With physical volume , base-model volume , and

, the translated residual energy is

Positive translations therefore reduce the physical volume at fixed pressure and temperature.


Uses

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

Used by

  • module~~yaeos__models_ar_volume_translated~~UsedByGraph module~yaeos__models_ar_volume_translated yaeos__models_ar_volume_translated module~yaeos__models yaeos__models module~yaeos__models->module~yaeos__models_ar_volume_translated module~yaeos__models_ar_volume_translations_constant yaeos__models_ar_volume_translations_constant module~yaeos__models->module~yaeos__models_ar_volume_translations_constant module~yaeos__models_ar_volume_translations_ji_lempe yaeos__models_ar_volume_translations_ji_lempe module~yaeos__models->module~yaeos__models_ar_volume_translations_ji_lempe module~yaeos__models_ar_volume_translations_linear yaeos__models_ar_volume_translations_linear module~yaeos__models->module~yaeos__models_ar_volume_translations_linear module~yaeos__models_ar_volume_translations_constant->module~yaeos__models_ar_volume_translated module~yaeos__models_ar_volume_translations_ji_lempe->module~yaeos__models_ar_volume_translated module~yaeos__models_ar_volume_translations_linear->module~yaeos__models_ar_volume_translated module~yaeos yaeos module~yaeos->module~yaeos__models module~yaeos__extra_fluids yaeos__extra_fluids module~yaeos__extra_fluids->module~yaeos__models proc~co2_h2o_isop co2_h2o_isop proc~co2_h2o_isop->module~yaeos__models

Abstract Interfaces

abstract interface

  • private subroutine translation_interface(self, n, T, C, CT, CT2, Cn, CTn, Cn2)

    translation_interface

    Volume shift and independent amount/temperature derivatives.

    Description

    C is always requested. Every other output is optional and must be computed when present, including when requested individually. Derivatives hold independent mole amounts fixed, not normalized mole fractions.

    Examples

    call model%translation(n, T, C, CT=CT)
    

    Arguments

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

    Translated model.

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

    Component mole amounts [mol].

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

    Temperature [K].

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

    Total volume translation [L].

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

    Temperature derivative [L/K].

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

    Second temperature derivative [L/K^2].

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

    Amount gradient [L/mol].

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

    Temperature/amount derivatives [L/(K mol)].

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

    Amount Hessian [L/mol^2].


Derived Types

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

Residual Helmholtz model with a configurable volume-translation law.

Read more…

Components

Type Visibility Attributes Name Initial
class(ArModel), public, allocatable :: base

Owned copy of the untranslated model, available to translation laws.

type(Substances), public :: components

Pure-component properties for the model’s component order.

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

Name of the model

Type-Bound Procedures

procedure, public :: Cp_residual_pt
procedure, public :: Cp_residual_vt
procedure, public :: Cv_residual_pt
procedure, public :: Cv_residual_vt
procedure, public :: Psat_pure
procedure, public :: enthalpy_excess
procedure, public :: enthalpy_residual_pt
procedure, public :: enthalpy_residual_vt
procedure, public :: entropy_excess
procedure, public :: entropy_residual_pt
procedure, public :: entropy_residual_vt
procedure, public :: get_v0 => translated_v0
procedure, public :: gibbs_excess
procedure, public :: gibbs_residual_pt
procedure, public :: gibbs_residual_vt
procedure, public :: helmholtz_excess
procedure, public :: helmholtz_residual_pt
procedure, public :: init
procedure, public :: internal_energy_excess
procedure, public :: internal_energy_residual_pt
procedure, public :: internal_energy_residual_vt
procedure, public :: ln_activity_coefficient
procedure, public :: lnfug_vt
procedure, public :: lnphi_pt
procedure, public :: lnphi_vt
procedure, public :: pressure
procedure, public :: residual_helmholtz => translated_helmholtz
procedure(translation_interface), public, deferred :: translation
procedure, public :: volume => translated_volume
procedure, public :: volume_excess

Functions

private function translated_v0(self, n, p, t) result(v0)

Translate the base model’s liquid-volume initializer.

Read more…

Arguments

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

Translated model.

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

Component mole amounts [mol].

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

Pressure [bar].

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

Temperature [K].

Return Value real(kind=pr)

Translated initial volume [L].


Subroutines

private subroutine init(self, base)

Store an owned copy of the base EOS and its component metadata.

Read more…

Arguments

Type IntentOptional Attributes Name
class(VolumeTranslatedModel), intent(inout) :: self

Model being initialized.

class(ArModel), intent(in) :: base

Untranslated model in the same component order.

private subroutine translated_helmholtz(self, n, V, T, Ar, ArV, ArT, ArTV, ArV2, ArT2, Arn, ArVn, ArTn, Arn2)

Transform the base residual Helmholtz energy and requested derivatives.

Read more…

Arguments

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

Translated model.

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

Component mole amounts [mol].

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

Physical total volume [L].

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

Temperature [K].

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

Residual Helmholtz energy [bar L].

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

Volume derivative [bar].

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

Temperature derivative [bar L/K].

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

Temperature/volume derivative [bar/K].

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

Second volume derivative [bar/L].

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

Second temperature derivative [bar L/K^2].

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

Amount gradient [bar L/mol].

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

Volume/amount derivatives [bar/mol].

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

Temperature/amount derivatives [bar L/(K mol)].

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

Amount Hessian [bar L/mol^2].

private subroutine translated_volume(eos, n, P, T, V, root_type)

Preserve the base model’s volume solver and translate its result.

Read more…

Arguments

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

Translated model.

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

Component mole amounts [mol].

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

Pressure [bar].

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

Temperature [K].

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

Physical total volume [L].

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

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