solve_point Subroutine

public subroutine solve_point(eos, n, P, T, V, Pcalc, ZETA, ZETMIN, ZETMAX, AT, iter)

solve_point

Correct one pressure root in reduced-covolume coordinates.

Description

Updates with a bracketed Newton step, maintaining ZETMIN and ZETMAX as the current root bounds.

Arguments

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

EOS used for residual pressure evaluation.

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

Component mole amounts.

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

Objective pressure [bar]

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

Temperature [K]

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

Obtained volume [L]

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

Calculated pressure at V [bar]

real(kind=pr), intent(inout) :: ZETA

Current reduced covolume iterate, updated in place.

real(kind=pr), intent(inout) :: ZETMIN

Lower bound for the reduced covolume root.

real(kind=pr), intent(inout) :: ZETMAX

Upper bound for the reduced covolume root.

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

, a residual-Gibbs-like quantity used to select the stable root.

integer, intent(out) :: iter

Iterations used by the corrector.


Calls

proc~~solve_point~3~~CallsGraph proc~solve_point~3 solve_point get_v0 get_v0 proc~solve_point~3->get_v0 residual_helmholtz residual_helmholtz proc~solve_point~3->residual_helmholtz

Called by

proc~~solve_point~3~~CalledByGraph proc~solve_point~3 solve_point proc~volume_michelsen volume_michelsen proc~volume_michelsen->proc~solve_point~3 proc~volume CubicEoS%volume proc~volume->proc~volume_michelsen proc~volume~4 PCSAFT%volume proc~volume~4->proc~volume_michelsen proc~volume~3 Gerg2008%volume proc~volume~3->proc~volume

Variables

Type Visibility Attributes Name Initial
real(kind=pr), public :: Ar
real(kind=pr), public :: ArV
real(kind=pr), public :: ArV2

Second-order intermediate quantity used by this procedure.

real(kind=pr), public :: B
real(kind=pr), public :: del
real(kind=pr), public :: der
real(kind=pr), public :: totn

Total number of moles.