arfun Function

public function arfun(self, n, v, t) result(arval)

arfun

Evaluate the GERG2008 mixture residual Helmholtz energy.

Description

Forms mixture reducing functions, computes reduced density and temperature, then sums composition-weighted pure-fluid contributions and binary departure terms. Hyperdual arithmetic supplies derivatives.

Type Bound

Gerg2008

Arguments

Type IntentOptional Attributes Name
class(Gerg2008) :: self

Model with component and binary parameter data.

type(hyperdual), intent(in) :: n(:)

Component mole amounts [mol].

type(hyperdual), intent(in) :: v

Total volume [L].

type(hyperdual), intent(in) :: t

Temperature [K].

Return Value type(hyperdual)

Mixture residual Helmholtz energy [bar L].


Calls

proc~~arfun~~CallsGraph proc~arfun Gerg2008%arfun proc~ar_ij ar_ij proc~arfun->proc~ar_ij proc~ar_pure ar_pure proc~arfun->proc~ar_pure proc~reducing_functions reducing_functions proc~arfun->proc~reducing_functions

Variables

Type Visibility Attributes Name Initial
real(kind=pr), public :: Fij(size(n),size(n))
type(hyperdual), public :: Tr
type(hyperdual), public :: Vr
type(hyperdual), public :: X(size(n))

Mole fractions.

type(hyperdual), public :: aij
type(hyperdual), public :: ar_pures(size(n))
type(Gerg2008Binary), public :: binary
type(hyperdual), public :: delta

Reduced density.

integer, public :: i

Loop index i.

integer, public :: j

Loop index j.

integer, public :: nc

Number of components.

type(Gerg2008Pure), public :: pures(size(n))
real(kind=pr), public :: rho_c(size(n))
type(hyperdual), public :: rho_r

Mixture reducing density [mol/L].

type(hyperdual), public :: tau

Reduced inverse temperature.