VCALC Subroutine

public recursive subroutine VCALC(ITYP, nc, ntemp, rn, T, P, V)

VCALC

Description

ROUTINE FOR CALCULATION OF VOLUME, GIVEN PRESSURE

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: ITYP

TYPE OF ROOT DESIRED (-1 vapor, 1 liquid, 0 lower Gibbs energy phase)

integer, intent(in) :: nc

NO. OF COMPONENTS

integer, intent(in) :: ntemp

1 if T-derivatives are required

real(kind=pr), intent(in) :: rn(nc)

FEED MOELS

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

TEMPERATURE

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

PRESURE

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

VOLUME


Calls

proc~~vcalc~~CallsGraph proc~vcalc VCALC proc~arvnder ArVnder proc~vcalc->proc~arvnder

Called by

proc~~vcalc~~CalledByGraph proc~vcalc VCALC proc~termo TERMO proc~termo->proc~vcalc

Variables

Type Visibility Attributes Name Initial
real(kind=pr), public :: AT
real(kind=pr), public :: AVAP
real(kind=pr), public :: Ar

Residual Helmholtz energy.

real(kind=pr), public :: ArTV

Mixed temperature/volume derivative of residual Helmholtz energy.

real(kind=pr), public :: ArTn(nc)

Mixed temperature/mole-number derivative of residual Helmholtz energy.

real(kind=pr), public :: ArV

Volume derivative of residual Helmholtz energy.

real(kind=pr), public :: ArV2

Second volume derivative of residual Helmholtz energy.

real(kind=pr), public :: ArVn(nc)

Mixed volume/mole-number derivative of residual Helmholtz energy.

real(kind=pr), public :: Arn(nc)

Mole-number gradient of residual Helmholtz energy.

real(kind=pr), public :: Arn2(nc,nc)

Mole-number Hessian of residual Helmholtz energy.

real(kind=pr), public :: B
real(kind=pr), public :: CPV
logical, public :: FIRST_RUN
real(kind=pr), public :: S3R
real(kind=pr), public :: VVAP
real(kind=pr), public :: ZETA

Reduced density used as the volume-solver variable.

real(kind=pr), public :: ZETMAX
real(kind=pr), public :: ZETMIN
real(kind=pr), public :: del
real(kind=pr), public :: der
integer, public :: iter

Iteration count.

integer, public :: nder
real(kind=pr), public :: pcalc
real(kind=pr), public :: totn

Total number of moles.