update_specification Subroutine

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

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~3~~CallsGraph proc~update_specification~3 update_specification proc~solve_system solve_system proc~update_specification~3->proc~solve_system none~dgesv dgesv proc~solve_system->none~dgesv

Called by

proc~~update_specification~3~~CalledByGraph proc~update_specification~3 update_specification proc~pt_envelope pt_envelope proc~pt_envelope->proc~update_specification~3

Variables

Type Visibility Attributes Name Initial
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