fugacity_pt Subroutine

public subroutine fugacity_pt(eos, n, P, T, V, root_type, lnPhi, dlnPhidP, dlnPhidT, dlnPhidn, dPdV, dPdT, dPdn)

Calculate logarithm of fugacity, given pressure and temperature.

This routine will obtain the desired volume root at the specified pressure and calculate fugacity at that point.

Type Bound

ArModel

Arguments

Type IntentOptional Attributes Name
class(ArModel), intent(in) :: eos

Model

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

Mixture mole numbers

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

Pressure [bar]

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

Temperature [K]

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

Volume [L]

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

Type of root desired [“liquid”, “vapor”, “stable”]

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

vector

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

ln(phi) Presssure derivative

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

ln(phi) Temp derivative

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

ln(phi) compositional derivative

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

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

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


Variables

Type Visibility Attributes Name Initial
real(kind=pr), public :: P_in
real(kind=pr), public :: V_in