solve_point Subroutine

public subroutine solve_point(model, z, ns, S, X, F, dF, its, maxits)

solve_point

Description

Correct one point on the three-phase envelope with Newton iteration. Returns the residual, Jacobian, and iteration count at the corrected state; reaching maxits signals that the continuation step failed.

Arguments

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

Thermodynamic model.

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

Overall feed composition.

integer, intent(in) :: ns

Index of the specified unknown.

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

Value imposed on unknown ns.

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

Initial unknown vector; corrected in place.

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

Three-phase equilibrium residuals.

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

Jacobian of the residual system.

integer, intent(inout) :: its

Iteration count/status from the point solver.

integer, intent(in) :: maxits

Maximum Newton iterations.


Calls

proc~~solve_point~5~~CallsGraph proc~solve_point~5 solve_point proc~pt_f_three_phases pt_F_three_phases proc~solve_point~5->proc~pt_f_three_phases proc~solve_system solve_system proc~solve_point~5->proc~solve_system proc~lnphi_pt ArModel%lnphi_pt proc~pt_f_three_phases->proc~lnphi_pt none~dgesv dgesv proc~solve_system->none~dgesv proc~lnphi_vt ArModel%lnphi_vt proc~lnphi_pt->proc~lnphi_vt proc~volume~2 ArModel%volume proc~lnphi_pt->proc~volume~2 residual_helmholtz residual_helmholtz proc~lnphi_vt->residual_helmholtz get_v0 get_v0 proc~volume~2->get_v0 interface~newton newton proc~volume~2->interface~newton proc~newton_1d newton_1d interface~newton->proc~newton_1d

Called by

proc~~solve_point~5~~CalledByGraph proc~solve_point~5 solve_point proc~pt_envelope_3ph pt_envelope_3ph proc~pt_envelope_3ph->proc~solve_point~5

Variables

Type Visibility Attributes Name Initial
real(kind=pr), private :: dX(size(X))
integer, private :: i

Loop/index variable.

integer, private :: nc

Number of components.