entropy_residual_pt Subroutine

private subroutine entropy_residual_pt(eos, n, P, T, root_type, Sr, SrP, SrT, Srn)

Calculate residual entropy 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%entropy_residual_pt(&
   n, P, T, root_type="stable", Sr=Sr, SrP=SrP, SrT=SrT, Srn=Srn &
   )

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), optional :: Sr

Residual entropy [bar L K^-1]

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

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

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


Calls

proc~~entropy_residual_pt~~CallsGraph proc~entropy_residual_pt ArModel%entropy_residual_pt proc~entropy_residual_vt ArModel%entropy_residual_vt proc~entropy_residual_pt->proc~entropy_residual_vt proc~pressure ArModel%pressure proc~entropy_residual_pt->proc~pressure proc~volume~2 ArModel%volume proc~entropy_residual_pt->proc~volume~2 residual_helmholtz residual_helmholtz proc~entropy_residual_vt->residual_helmholtz proc~pressure->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 :: P_dummy
real(kind=pr), private :: SrT_v
real(kind=pr), private :: SrV_v
real(kind=pr), private :: Sr_v
real(kind=pr), private :: Srn_v(size(n))
real(kind=pr), private :: V
real(kind=pr), private :: Z
real(kind=pr), private :: dPdT
real(kind=pr), private :: dPdV
real(kind=pr), private :: dPdn(size(n))
real(kind=pr), private :: dVdP
real(kind=pr), private :: dVdT
real(kind=pr), private :: dVdn(size(n))
logical, private :: derivs_present
logical, private :: dn
logical, private :: dp
logical, private :: dt
real(kind=pr), private :: nt