update_specification Subroutine

private subroutine update_specification(its, nc, np, X, dF, dXdS, ns, S, dS, Vl, Vw)

Uses

  • proc~~update_specification~4~~UsesGraph proc~update_specification~4 update_specification module~yaeos__equilibria_boundaries_auxiliar yaeos__equilibria_boundaries_auxiliar proc~update_specification~4->module~yaeos__equilibria_boundaries_auxiliar module~yaeos__constants yaeos__constants module~yaeos__equilibria_boundaries_auxiliar->module~yaeos__constants module~yaeos__math yaeos__math module~yaeos__equilibria_boundaries_auxiliar->module~yaeos__math iso_fortran_env iso_fortran_env module~yaeos__constants->iso_fortran_env 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 module~yaeos__math_continuation->module~yaeos__constants module~yaeos__math_continuation->module~yaeos__math_linalg module~yaeos__math_linalg->module~yaeos__constants

update_specification

Change the specified variable for the next step.

Description

Using the information of a converged point and the Jacobian matrix of the function. It is possible to determine the sensitivity of the variables with respect to the specification. This information is used to update the specification for the next point. Choosing the variable with the highest sensitivity. This can be done by solving the system of equations:

for the vector. The variable with the highest value of is chosen as the new specification.

References

Arguments

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

Iterations to solve the current point.

integer, intent(in) :: nc

Number of components in the mixture.

integer, intent(in) :: np

Number of main phases.

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

Vector of variables.

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

Jacobian matrix.

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

Sensitivity of the variables wrt the specification.

integer, intent(inout) :: ns

Number of the specified variable.

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

Specified value.

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

Step size of the specification for the next point.

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

Molar volumes of the main phases [L/mol].

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

Molar volume of the reference phase [L/mol].


Calls

proc~~update_specification~4~~CallsGraph proc~update_specification~4 update_specification proc~near_critical near_critical proc~update_specification~4->proc~near_critical proc~solve_system solve_system proc~update_specification~4->proc~solve_system none~dgesv dgesv proc~solve_system->none~dgesv

Called by

proc~~update_specification~4~~CalledByGraph proc~update_specification~4 update_specification proc~pt_envelope pt_envelope proc~pt_envelope->proc~update_specification~4 proc~pt_envelope_2ph pt_envelope_2ph proc~pt_envelope_2ph->proc~pt_envelope proc~find_hpl find_hpl proc~find_hpl->proc~pt_envelope_2ph

Variables

Type Visibility Attributes Name Initial
real(kind=pr), private :: cf

Critical factor, defined by Lingfei Xu & Huazhou Li*

real(kind=pr), private :: dFdS(size(X))

Sensitivity of the functions wrt the specification.

real(kind=pr), private :: dP
real(kind=pr), private :: dT
integer, private :: i
integer, private :: iBetas(np)
integer, private :: iP
integer, private :: iT
integer, private :: l

Phase index

integer, private :: lb

Lower bound of each phase

integer, private :: ub

Upper bound of each phase