Function to solve the multiphase flash problem.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ArModel), | intent(in) | :: | model |
Model to use. |
||
real(kind=pr), | intent(in) | :: | z(:) |
Mixture global composition. |
||
integer, | intent(in) | :: | np |
Number of x phases. |
||
character(len=14), | intent(in) | :: | kinds_x(np) |
Kind of the x phases. |
||
character(len=14), | intent(in) | :: | kind_w |
Kind of the w phase. |
||
real(kind=pr), | intent(inout) | :: | X(:) |
Vector of variables. |
||
integer, | intent(in) | :: | ns1 |
Number of first specification. |
||
real(kind=pr), | intent(in) | :: | S1 |
First specification value. |
||
integer, | intent(in) | :: | ns2 |
Number of second specification. |
||
real(kind=pr), | intent(in) | :: | S2 |
Second specification value. |
||
integer, | intent(in) | :: | max_iters |
Maximum number of iterations. |
||
real(kind=pr), | intent(out) | :: | F(size(X)) |
Vector of functions valuated. |
||
real(kind=pr), | intent(out), | dimension(size(X), size(X)) | :: | df |
Jacobian matrix. |
|
integer, | intent(out) | :: | iters |
Number of iterations performed. |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real(kind=pr), | public, | dimension(size(X)) | :: | dX |
Newton step vector. |
||
integer, | public | :: | i | ||||
integer, | public | :: | iBetas(np+1) |
Index of the betas in the vector X |
|||
integer, | public | :: | nc |
Number of components |