Detect if the system is close to a critical point.
When the system is close to a critical point, the values are close to zero, since the composition of the incipient phase and the phase are similar (equal in the critical point). This can be used to detect if the system is close to a critical point and force a jump above it.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nc |
Number of components in the mixture. |
||
integer, | intent(in) | :: | np |
Number of main phases. |
||
integer, | intent(in) | :: | point |
Point number in the phase boundary. |
||
character(len=14), | intent(inout) | :: | kinds_x(np) |
Kinds of the main phases. |
||
character(len=14), | intent(inout) | :: | kind_w |
Kind of the incipient phase. |
||
logical, | intent(in) | :: | binary_stop |
If true, stop at the critical point if its a binary system. |
||
real(kind=pr), | intent(in) | :: | Xold(:) |
Old vector of variables. |
||
real(kind=pr), | intent(inout) | :: | X(:) |
Vector of variables. |
||
real(kind=pr), | intent(inout) | :: | dXdS(:) |
Sensitivity of the variables wrt the specification. |
||
integer, | intent(inout) | :: | ns |
Number of the specified variable. |
||
real(kind=pr), | intent(inout) | :: | dS |
Step size of the specification for the next point. |
||
real(kind=pr), | intent(inout) | :: | S |
Specification value. |
||
logical, | intent(out) | :: | found_critical |
If true, a critical point was found. |
||
real(kind=pr) | :: | Xc(size(X)) |
Vector of variables at the critical point. |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real(kind=pr), | public | :: | Xnew(size(X)) | ||||
real(kind=pr), | public | :: | a | ||||
integer, | public | :: | i | ||||
character(len=14), | public | :: | incipient_kind | ||||
integer, | public | :: | lb | ||||
real(kind=pr), | public | :: | lnK(nc) | ||||
real(kind=pr), | public | :: | lnKold(nc) | ||||
integer, | public | :: | ncomp | ||||
integer, | public | :: | ub |