public function critical_point(model, z0, zi, spec, S, max_iters, V0, T0, a0, P0)
proc~~critical_point~~UsesGraph
proc~critical_point
critical_point
module~yaeos__math
yaeos__math
proc~critical_point->module~yaeos__math
module~yaeos__constants
yaeos__constants
module~yaeos__math->module~yaeos__constants
module~yaeos__math_continuation
yaeos__math_continuation
module~yaeos__math->module~yaeos__math_continuation
module~yaeos__math_linalg
yaeos__math_linalg
module~yaeos__math->module~yaeos__math_linalg
iso_fortran_env
iso_fortran_env
module~yaeos__constants->iso_fortran_env
module~yaeos__math_continuation->module~yaeos__constants
module~yaeos__math_continuation->module~yaeos__math_linalg
module~yaeos__math_linalg->module~yaeos__constants
Nodes of different colours represent the following:
Graph Key
Module
Module
Submodule
Submodule
Subroutine
Subroutine
Function
Function
Program
Program
This Page's Entity
This Page's Entity
Solid arrows point from a submodule to the (sub)module which it is
descended from. Dashed arrows point from a module or program unit to
modules which it uses.
critical_point
Description
Calculates a single critical point of a mixture using a Newton-Raphson
method. It is possible to specify different variables to be fixed with
the spec argument, the spec_CP variable helps when selecting the
specified variable.
Examples
Default behaviour
cp = critical_point (&
model , z0 , zi , S = 0.5_pr , spec = spec_CP % a , max_iters = 1000 )
Specifiying another variable
The natural variables are a, lnV, lnT and lnP. So it is important to
specify the variable in logaritmic scale if that is the case.
cp = critical_point ( model , z0 , zi , S = log ( 20 0._pr ), spec = spec_CP % P , max_iters = 1000 )
Arguments
Type
Intent Optional Attributes
Name
class(ArModel ),
intent(in)
::
model
Equation of state model
real(kind=pr),
intent(in)
::
z0 (:)
Molar fractions of the first fluid
real(kind=pr),
intent(in)
::
zi (:)
Molar fractions of the second fluid
integer,
intent(in)
::
spec
Specification [1:"z", 2:"V", 3:"T", 4:"P"]
real(kind=pr),
intent(in)
::
S
Specification value
integer,
intent(in)
::
max_iters
Maxiumum number of iterations
real(kind=pr),
intent(in),
optional
::
V0
Initial volume [L/mol].
real(kind=pr),
intent(in),
optional
::
T0
Initial temperature [K].
real(kind=pr),
intent(in),
optional
::
a0
Initial value
real(kind=pr),
intent(in),
optional
::
P0
Initial Pressure [bar]
proc~~critical_point~~CallsGraph
proc~critical_point
critical_point
proc~df_critical
df_critical
proc~critical_point->proc~df_critical
proc~f_critical
F_critical
proc~critical_point->proc~f_critical
proc~get_a
get_a
proc~critical_point->proc~get_a
proc~lambda1
lambda1
proc~critical_point->proc~lambda1
proc~pressure
ArModel%pressure
proc~critical_point->proc~pressure
proc~set_a
set_a
proc~critical_point->proc~set_a
proc~solve_system
solve_system
proc~critical_point->proc~solve_system
proc~volume~3
ArModel%volume
proc~critical_point->proc~volume~3
proc~df_critical->proc~f_critical
proc~df_critical->proc~get_a
proc~f_critical->proc~get_a
proc~f_critical->proc~lambda1
proc~lambda1->proc~get_a
proc~eigen
eigen
proc~lambda1->proc~eigen
proc~lnfug_vt
ArModel%lnfug_vt
proc~lambda1->proc~lnfug_vt
residual_helmholtz
residual_helmholtz
proc~pressure->residual_helmholtz
none~dgesv
dgesv
proc~solve_system->none~dgesv
get_v0
get_v0
proc~volume~3->get_v0
interface~newton
newton
proc~volume~3->interface~newton
proc~newton_1d
newton_1d
interface~newton->proc~newton_1d
none~dsyev
dsyev
proc~eigen->none~dsyev
proc~lnfug_vt->residual_helmholtz
Nodes of different colours represent the following:
Graph Key
Subroutine
Subroutine
Function
Function
Interface
Interface
Type Bound Procedure
Type Bound Procedure
Unknown Procedure Type
Unknown Procedure Type
Program
Program
This Page's Entity
This Page's Entity
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
proc~~critical_point~~CalledByGraph
proc~critical_point
critical_point
proc~get_critical_constants
get_critical_constants
proc~get_critical_constants->proc~critical_point
proc~init_pcsaft
init_pcsaft
proc~init_pcsaft->proc~get_critical_constants
Nodes of different colours represent the following:
Graph Key
Subroutine
Subroutine
Function
Function
Interface
Interface
Type Bound Procedure
Type Bound Procedure
Unknown Procedure Type
Unknown Procedure Type
Program
Program
This Page's Entity
This Page's Entity
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Variables
Type
Visibility Attributes
Name
Initial
real(kind=pr),
private
::
F (4)
real(kind=pr),
private
::
Sin
real(kind=pr),
private
::
X (4)
real(kind=pr),
private
::
a
real(kind=pr),
private
::
dX (4)
real(kind=pr),
private
::
df (4,4)
integer,
private
::
i
real(kind=pr),
private
::
l
integer,
private
::
nc
integer,
private
::
ns
real(kind=pr),
private
::
u (size(z0))
real(kind=pr),
private
::
u_new (size(z0))
real(kind=pr),
private
::
z (size(z0))