Multiphase T envelope.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real(kind=pr), | public, | allocatable | :: | Tc(:) |
Critical temperatures [K] |
||
real(kind=pr), | public, | allocatable | :: | ac(:) |
Critical alphas. |
||
real(kind=pr), | public, | allocatable | :: | alpha(:) |
Array of values for each point in the envelope. |
||
character(len=14), | public, | allocatable | :: | kind_w(:) |
Kind of the reference phase |
||
character(len=14), | public, | allocatable | :: | kinds_x(:) |
Kinds of the main phases |
||
type(MPPoint), | public, | allocatable | :: | points(:) |
Array of converged points. |
||
real(kind=pr), | public, | allocatable | :: | z0(:) |
Initial mixture composition. |
||
real(kind=pr), | public, | allocatable | :: | zi(:) |
Second mixture composition. |
Extract the values of the variables from the vector X.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=pr), | intent(in) | :: | X(:) |
Vector of variables. |
||
integer, | intent(in) | :: | np |
Number of main phases. |
||
real(kind=pr), | intent(in) | :: | z0(:) |
Initial mixture composition. |
||
real(kind=pr), | intent(in) | :: | zi(:) |
Second mixture composition. |
||
real(kind=pr), | intent(in) | :: | beta_w |
Reference phase beta. |
||
real(kind=pr), | intent(out) | :: | x_l(np,size(z0)) |
Mole fractions of the main phases. |
||
real(kind=pr), | intent(out) | :: | w(size(z0)) |
Mole fractions of the incipient phase. |
||
real(kind=pr), | intent(out) | :: | betas(np) |
Fractions of the main phases. |
||
real(kind=pr), | intent(out) | :: | T |
Pressure [bar]. |
||
real(kind=pr), | intent(out) | :: | alpha |
. |
Solve a point in the multiphase envelope.
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. |
Write the multiphase envelope to a file.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(TXEnvelMP), | intent(in) | :: | env |
Envelope to write. |
||
integer, | intent(in) | :: | unit |
Unit to write the envelope to. |