pressure Subroutine

public subroutine pressure(eos, n, v, t, p, dPdV, dPdT, dPdn)

Pressure calculation.

Calculate pressure using residual helmholtz models.

Examples

class(ArModel), allocatable :: eos
real(pr) :: n(2), t, v, p, dPdV, dPdT, dPdn(2)
eos = PengRobinson(Tc, Pc, w)
n = [1.0_pr, 1.0_pr]
t = 300.0_pr
v = 1.0_pr
call eos%pressure(n, V, T, P, dPdV=dPdV, dPdT=dPdT, dPdn=dPdn)

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

Volume [L]

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

Temperature [K]

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

Pressure [bar]

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

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

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


Variables

Type Visibility Attributes Name Initial
real(kind=pr), public :: Ar
real(kind=pr), public :: ArTV
real(kind=pr), public :: ArV
real(kind=pr), public :: ArV2
real(kind=pr), public :: ArVn(size(eos))
logical, public :: dn
integer, public :: nc
real(kind=pr), public :: totn