helmholtz_excess Subroutine

private subroutine helmholtz_excess(eos, n, P, T, root_type, Ae)

Calculate excess Helmholtz energy given pressure and temperature.

Examples

eos = PengRobinson76(Tc, Pc, w)

n = [1.0_pr, 1.0_pr]
T = 300.0_pr
P = 1.0_pr

call eos%helmholtz_excess(n, P, T, root_type="stable", Ae=Ae)

Type Bound

ArModel

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]

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

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

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

Excess Helmholtz energy [bar L]


Calls

proc~~helmholtz_excess~~CallsGraph proc~helmholtz_excess ArModel%helmholtz_excess proc~ln_activity_coefficient ArModel%ln_activity_coefficient proc~helmholtz_excess->proc~ln_activity_coefficient proc~lnphi_pt ArModel%lnphi_pt proc~ln_activity_coefficient->proc~lnphi_pt proc~lnphi_vt ArModel%lnphi_vt proc~lnphi_pt->proc~lnphi_vt proc~volume~2 ArModel%volume proc~lnphi_pt->proc~volume~2 residual_helmholtz residual_helmholtz proc~lnphi_vt->residual_helmholtz get_v0 get_v0 proc~volume~2->get_v0 interface~newton newton proc~volume~2->interface~newton proc~newton_1d newton_1d interface~newton->proc~newton_1d

Variables

Type Visibility Attributes Name Initial
real(kind=pr), private :: dlngammadP(size(n))
real(kind=pr), private :: lngamma(size(n))