solve_point Subroutine

public subroutine solve_point(model, ncomp, nc, X, ns, S, F, dF, dFdS, its)

Solve point

Solve a saturation point for a pure component.

Description

The set of equations to solve is:

Where is an specification function defined as:

The vector of variables is equal to .

Arguments

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

Thermodynamic model

integer, intent(in) :: ncomp

Component index

integer, intent(in) :: nc

Total number of components

real(kind=pr), intent(inout) :: X(4)

Variables

integer, intent(in) :: ns

Variable index to solve. If the

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

Variable value specified to solve

real(kind=pr), intent(out) :: F(4)

Function

real(kind=pr), intent(out) :: dF(4,4)

Jacobian

real(kind=pr), intent(out) :: dFdS(4)

Derivative of the function with respect to S

integer, intent(out) :: its

Number of iterations


Variables

Type Visibility Attributes Name Initial
real(kind=pr), public :: B
real(kind=pr), public :: Py
real(kind=pr), public :: Pz
real(kind=pr), public :: T
real(kind=pr), public :: Vy
real(kind=pr), public :: Vz
real(kind=pr), public :: Xnew(4)
real(kind=pr), public :: dPdTy
real(kind=pr), public :: dPdTz
real(kind=pr), public :: dPdVy
real(kind=pr), public :: dPdVz
real(kind=pr), public :: dX(4)
real(kind=pr), public :: dlnfdt_y(nc)
real(kind=pr), public :: dlnfdt_z(nc)
real(kind=pr), public :: dlnfdv_y(nc)
real(kind=pr), public :: dlnfdv_z(nc)
integer, public :: i
real(kind=pr), public :: lnfug_y(nc)
real(kind=pr), public :: lnfug_z(nc)
real(kind=pr), public :: z(nc)

Subroutines

subroutine isofugacity(X, F, dF, dFdS)

Arguments

Type IntentOptional Attributes Name
real(kind=pr), intent(inout) :: X(4)
real(kind=pr), intent(out) :: F(4)
real(kind=pr), intent(out) :: dF(4,4)
real(kind=pr), intent(out) :: dFdS(4)