solve_point Subroutine

private subroutine solve_point(model, z0, zi, np, P, beta_w, kinds_x, kind_w, X, ns, S, dXdS, F, df, iters, max_iterations)

Uses

  • proc~~solve_point~7~~UsesGraph proc~solve_point~7 TXEnvelMP%solve_point iso_fortran_env iso_fortran_env proc~solve_point~7->iso_fortran_env module~yaeos__math yaeos__math proc~solve_point~7->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 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

solve_point

Solve a point in the multiphase envelope.

Description

This subroutine solves a point of the system of equations for a multiphase isobaric line. It uses the Newton-Raphson method,.

Type Bound

TXEnvelMP

Arguments

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

Model to use for the calculations.

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

Initial mixture composition.

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

Second mixture composition.

integer, intent(in) :: np

Number of main phases.

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

Presure [bar].

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

Fraction of the reference (incipient) phase

character(len=14), intent(in) :: kinds_x(np)

Kinds of the main phases

character(len=14), intent(in) :: kind_w

Kind of the reference phase

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

Vector of variables

integer, intent(in) :: ns

Number of specification

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

Specification value

real(kind=pr), intent(in) :: dXdS(size(X))
real(kind=pr), intent(out) :: F(size(X))

Vector of functions valuated

real(kind=pr), intent(out) :: df(size(X),size(X))

Jacobian matrix

integer, intent(out) :: iters

Number of iterations needed to converge the point.

integer, intent(in) :: max_iterations

Maximum number of iterations to solve the point.


Calls

proc~~solve_point~7~~CallsGraph proc~solve_point~7 TXEnvelMP%solve_point proc~solve_system solve_system proc~solve_point~7->proc~solve_system proc~tx_f_np tx_F_NP proc~solve_point~7->proc~tx_f_np none~dgesv dgesv proc~solve_system->none~dgesv proc~get_z get_z proc~tx_f_np->proc~get_z proc~lnphi_pt ArModel%lnphi_pt proc~tx_f_np->proc~lnphi_pt proc~lnphi_vt ArModel%lnphi_vt proc~lnphi_pt->proc~lnphi_vt proc~volume~3 ArModel%volume proc~lnphi_pt->proc~volume~3 residual_helmholtz residual_helmholtz proc~lnphi_vt->residual_helmholtz 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

Called by

proc~~solve_point~7~~CalledByGraph proc~solve_point~7 TXEnvelMP%solve_point proc~tx_envelope tx_envelope proc~tx_envelope->proc~solve_point~7

Variables

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

Index of the temperature variable in the vector X

integer, private :: ia

Index of the variable in the vector X

integer, private :: nc

Number of components in the mixture.