Function that should be equal to zero at a critical point is found.
The second criticality condition is calculated as a numerical
derivative with eps=1e-4
.
The vector of varibles is
Including internally the extra equation:
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ArModel), | intent(in) | :: | model |
Equation of state model |
||
real(kind=pr), | intent(in) | :: | X(4) |
Vector of variables |
||
integer, | intent(in) | :: | ns |
Position of the specification variable |
||
real(kind=pr), | intent(in) | :: | S |
Specification variable value |
||
real(kind=pr), | intent(in) | :: | z0(:) |
Molar fractions of the first fluid |
||
real(kind=pr), | intent(in) | :: | zi(:) |
Molar fractions of the second fluid |
||
real(kind=pr), | intent(inout) | :: | u(:) |
Eigen-vector |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real(kind=pr), | private | :: | F1(4) | ||||
real(kind=pr), | private | :: | F2(4) | ||||
real(kind=pr), | private | :: | P | ||||
real(kind=pr), | private | :: | T | ||||
real(kind=pr), | private | :: | V | ||||
real(kind=pr), | private | :: | a | ||||
real(kind=pr), | private | :: | dx(4) | ||||
real(kind=pr), | private, | parameter | :: | eps | = | 1e-4_pr | |
real(kind=pr), | private | :: | eps_df | ||||
integer, | private | :: | i | ||||
real(kind=pr), | private | :: | u_new(size(u)) | ||||
real(kind=pr), | private | :: | z(size(u)) |