internal_energy_excess Subroutine

private subroutine internal_energy_excess(eos, n, P, T, root_type, Ue)

Calculate excess internal 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%internal_energy_excess(n, P, T, root_type="stable", Ue=Ue)

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

Excess internal energy [bar L]


Calls

proc~~internal_energy_excess~~CallsGraph proc~internal_energy_excess ArModel%internal_energy_excess proc~ln_activity_coefficient ArModel%ln_activity_coefficient proc~internal_energy_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 :: dlngammadT(size(n))