GenericCubic_Ar Subroutine

public subroutine GenericCubic_Ar(n, v, t, B, dBi, dBij, D, dDi, dDij, dDidT, dDdT, dDdT2, D1, dD1i, dD1ij, ar, arv, ArT, artv, arv2, ArT2, Arn, ArVn, ArTn, Arn2)

Uses

  • proc~~genericcubic_ar~2~~UsesGraph proc~genericcubic_ar~2 GenericCubic_Ar module~yaeos__constants yaeos__constants proc~genericcubic_ar~2->module~yaeos__constants iso_fortran_env iso_fortran_env module~yaeos__constants->iso_fortran_env

Residual Helmholtz Energy for a generic Cubic Equation of State.

Calculates the residual Helmholtz Energy for a generic Cubic EoS as defined by Michelsen and Møllerup:

This routine assumes that the is not a constant parameter (as it uses to be in classical Cubic EoS) to be compatible with the three parameter EoS RKPR where is not a constant and has its own mixing rule.

Arguments

Type IntentOptional Attributes Name
real(kind=pr), intent(in) :: n(:)

Number of moles

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

Volume [L]

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

Temperature [K]

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

Mixture covolume [L]

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

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

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

Mixture attractive parameter [bar L^2]

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

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

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

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

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

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

parameter

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

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

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

Residual Helmholtz energy [bar L]

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))


Variables

Type Visibility Attributes Name Initial
real(kind=pr), public :: AUX
real(kind=pr), public :: FFB
real(kind=pr), public :: FFBB
real(kind=pr), public :: FFBV
real(kind=pr), public :: auxD2

Second-order intermediate quantity used by this procedure.

real(kind=pr), public :: d2
real(kind=pr), public :: f
real(kind=pr), public :: fB
real(kind=pr), public :: fBD1
real(kind=pr), public :: fD1
real(kind=pr), public :: fD1D1
real(kind=pr), public :: fVD1
real(kind=pr), public :: fv
real(kind=pr), public :: fv2
real(kind=pr), public :: g
real(kind=pr), public :: gv
real(kind=pr), public :: gv2
integer, public :: i

Loop index i.

integer, public :: j

Loop index j.

integer, public :: nc

Number of components.

real(kind=pr), public :: totn

Total number of moles.