Calculates a single critical point of a mixture using a Newton-Raphson
method. It is possible to specify different variables to be fixed with
the spec
argument, the spec_CP
variable helps when selecting the
specified variable.
cp = critical_point(&
model, z0, zi, S=0.5_pr, spec=spec_CP%a, max_iters=1000)
The natural variables are a, lnV, lnT and lnP. So it is important to specify the variable in logaritmic scale if that is the case.
cp = critical_point(model, z0, zi, S=log(200._pr), spec=spec_CP%P, max_iters=1000)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ArModel), | intent(in) | :: | model |
Equation of state model |
||
real(kind=pr), | intent(in) | :: | z0(:) |
Molar fractions of the first fluid |
||
real(kind=pr), | intent(in) | :: | zi(:) |
Molar fractions of the second fluid |
||
integer, | intent(in) | :: | spec |
Specification |
||
real(kind=pr), | intent(in) | :: | S |
Specification value |
||
integer, | intent(in) | :: | max_iters |
Maxiumum number of iterations |
||
real(kind=pr), | intent(in), | optional | :: | u0(:) |
Initial eigen-vector |
|
real(kind=pr), | intent(in), | optional | :: | V0 |
Initial volume [L/mol]. |
|
real(kind=pr), | intent(in), | optional | :: | T0 |
Initial temperature [K]. |
|
real(kind=pr), | intent(in), | optional | :: | a0 |
Initial value |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real(kind=pr), | public | :: | F(4) | ||||
real(kind=pr), | public | :: | X(4) | ||||
real(kind=pr), | public | :: | dX(4) | ||||
real(kind=pr), | public | :: | df(4,4) | ||||
integer, | public | :: | i | ||||
real(kind=pr), | public | :: | l | ||||
integer, | public | :: | ns | ||||
real(kind=pr), | public | :: | u(size(z0)) | ||||
real(kind=pr), | public | :: | u_new(size(z0)) | ||||
real(kind=pr), | public | :: | z(size(z0)) |