Solve a point in the multiphase envelope.
This subroutine solves a point of the system of equations for a multiphase isobaric line. It uses the Newton-Raphson method,.
Type | Intent | Optional | 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. |
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. |