Non-associating perturbed-chain statistical associating fluid model.
Stores segment parameters and implements the residual Helmholtz energy through Tapenade-generated derivatives. The constructor calculates the critical properties needed by inherited EOS methods.
model = init_pcsaft(m, sigma, epsilon_k, kij)
call model%pressure(n, V, T, P)
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(Substances), | public | :: | components |
Pure-component properties for the model’s component order. |
|||
| real(kind=pr), | public, | ALLOCATABLE | :: | epsilon_k(:) |
Energy / k_B [K] |
||
| real(kind=pr), | public, | ALLOCATABLE | :: | kij(:,:) |
Binary interaction parameters (optional) |
||
| real(kind=pr), | public, | ALLOCATABLE | :: | m(:) |
Number of segments |
||
| character(len=:), | public, | allocatable | :: | name |
Name of the model |
||
| real(kind=pr), | public, | ALLOCATABLE | :: | sigma(:) |
Segment diameter [Angstrom] |
Calculate residual heat capacity at constant pressure given pressure and temperature.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ArModel), | intent(in) | :: | eos |
Model |
||
| real(kind=pr), | intent(in) | :: | n(:) |
Moles number vector |
||
| real(kind=pr), | intent(in) | :: | P |
Pressure [bar] |
||
| real(kind=pr), | intent(in) | :: | T |
Temperature [K] |
||
| character(len=*), | intent(in) | :: | root_type |
Desired root-type to solve. Options are:
|
||
| real(kind=pr), | intent(out) | :: | Cp |
Residual heat capacity at constant pressure [bar L K^-1] |
Calculate residual heat capacity pressure constant given V and T.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ArModel), | intent(in) | :: | eos |
Model |
||
| real(kind=pr), | intent(in) | :: | n(:) |
Moles number vector |
||
| real(kind=pr), | intent(in) | :: | V |
Volume [L] |
||
| real(kind=pr), | intent(in) | :: | T |
Temperature [K] |
||
| real(kind=pr), | intent(out) | :: | Cp |
heat capacity P constant [bar L / K] |
Calculate residual heat capacity at constant volume given pressure and temperature.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ArModel), | intent(in) | :: | eos |
Model |
||
| real(kind=pr), | intent(in) | :: | n(:) |
Moles number vector |
||
| real(kind=pr), | intent(in) | :: | P |
Pressure [bar] |
||
| real(kind=pr), | intent(in) | :: | T |
Temperature [K] |
||
| character(len=*), | intent(in) | :: | root_type |
Desired root-type to solve. Options are:
|
||
| real(kind=pr), | intent(out) | :: | Cv |
Residual heat capacity at constant volume [bar L K^-1] |
Calculate residual heat capacity volume constant given V and T.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ArModel), | intent(in) | :: | eos |
Model |
||
| real(kind=pr), | intent(in) | :: | n(:) |
Moles number vector |
||
| real(kind=pr), | intent(in) | :: | V |
Volume [L] |
||
| real(kind=pr), | intent(in) | :: | T |
Temperature [K] |
||
| real(kind=pr), | intent(out) | :: | Cv |
heat capacity V constant [bar L / K] |
Calculation of saturation pressure of a pure component. Liquid and
vapor volumes are initialized at 100 bar and 0.001 bar, then
solve_point_psat applies Newton iterations at fixed temperature.
The returned value is the pressure evaluated at the converged liquid
volume [bar].
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ArModel), | intent(in) | :: | eos |
Model that will be used |
||
| integer, | intent(in) | :: | ncomp |
Number of component in the mixture from which the saturation pressure will be calculated |
||
| real(kind=pr), | intent(in) | :: | T |
Temperature [K] |
||
| real(kind=pr), | intent(out) | :: | Vl |
Liquid volume [L] |
||
| real(kind=pr), | intent(out) | :: | Vv |
Vapor volume [L] |
||
| logical, | intent(out), | optional | :: | converged |
The calculation converged |
Evaluate the primal PC-SAFT residual Helmholtz energy.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(PCSAFT), | intent(in) | :: | model |
Model supplying segment parameters. |
||
| real(kind=pr), | intent(in) | :: | n(:) |
Component mole amounts [mol]. |
||
| real(kind=pr), | intent(in) | :: | v |
Total volume [L]. |
||
| real(kind=pr), | intent(in) | :: | t |
Temperature [K]. |
||
| real(kind=pr), | intent(out) | :: | arval |
Residual Helmholtz energy in library units. |
Evaluate the primal PC-SAFT energy and reverse-mode sensitivities.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(PCSAFT), | intent(in) | :: | model |
Model supplying PC-SAFT segment parameters. |
||
| real(kind=pr), | intent(in) | :: | n(:) |
Component mole amounts [mol]. |
||
| real(kind=pr) | :: | nb(:) |
Adjoint value for component mole amounts. |
|||
| real(kind=pr), | intent(in) | :: | v |
Total volume [L]. |
||
| real(kind=pr) | :: | vb |
Adjoint value for volume. |
|||
| real(kind=pr), | intent(in) | :: | t |
Temperature [K]. |
||
| real(kind=pr) | :: | tb |
Adjoint value for temperature. |
|||
| real(kind=pr) | :: | arval |
Primal residual Helmholtz energy. |
|||
| real(kind=pr) | :: | arvalb |
Incoming adjoint seed for the energy output. |
Evaluate the PC-SAFT primal residual Helmholtz energy and one tangent.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(PCSAFT), | intent(in) | :: | model |
Model supplying PC-SAFT segment parameters. |
||
| real(kind=pr), | intent(in) | :: | n(:) |
Component mole amounts [mol]. |
||
| real(kind=pr), | intent(in) | :: | nd(:) |
Tangent seed for component mole amounts (nd). |
||
| real(kind=pr), | intent(in) | :: | v |
Total volume [L]. |
||
| real(kind=pr), | intent(in) | :: | vd |
Tangent seed for volume (vd). |
||
| real(kind=pr), | intent(in) | :: | t |
Temperature [K]. |
||
| real(kind=pr), | intent(in) | :: | td |
Tangent seed for temperature (td). |
||
| real(kind=pr), | intent(out) | :: | arval |
Primal residual Helmholtz energy. |
||
| real(kind=pr), | intent(out) | :: | arvald |
Directional derivative of |
Evaluate mixed tangent-adjoint derivatives for PC-SAFT.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(PCSAFT), | intent(in) | :: | model |
Model supplying PC-SAFT segment parameters. |
||
| real(kind=pr), | intent(in) | :: | n(:) |
Component mole amounts [mol]. |
||
| real(kind=pr) | :: | nb(:) |
Adjoint value for component mole amounts. |
|||
| real(kind=pr), | intent(in) | :: | nd(:) |
Tangent seed for component mole amounts (nd). |
||
| real(kind=pr) | :: | ndb(:) |
Mixed tangent-adjoint value for component mole amounts. |
|||
| real(kind=pr), | intent(in) | :: | v |
Total volume [L]. |
||
| real(kind=pr) | :: | vb |
Adjoint value for volume. |
|||
| real(kind=pr), | intent(in) | :: | vd |
Tangent seed for volume (vd). |
||
| real(kind=pr) | :: | vdb |
Mixed tangent-adjoint value for volume. |
|||
| real(kind=pr), | intent(in) | :: | t |
Temperature [K]. |
||
| real(kind=pr) | :: | tb |
Adjoint value for temperature. |
|||
| real(kind=pr), | intent(in) | :: | td |
Tangent seed for temperature (td). |
||
| real(kind=pr) | :: | tdb |
Mixed tangent-adjoint value for temperature. |
|||
| real(kind=pr) | :: | arval | ||||
| real(kind=pr) | :: | arvalb | ||||
| real(kind=pr) | :: | arvald | ||||
| real(kind=pr) | :: | arvaldb |
Evaluate the primal energy, two first tangents, and their mixed second tangent.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(PCSAFT), | intent(in) | :: | model |
Model supplying PC-SAFT segment parameters. |
||
| real(kind=pr), | intent(in) | :: | n(:) |
Component mole amounts [mol]. |
||
| real(kind=pr), | intent(in) | :: | nd(:) |
Tangent seed for component mole amounts (nd). |
||
| real(kind=pr), | intent(in) | :: | v |
Total volume [L]. |
||
| real(kind=pr), | intent(in) | :: | vd0 |
Tangent seed for volume (vd0). |
||
| real(kind=pr), | intent(in) | :: | vd |
Tangent seed for volume (vd). |
||
| real(kind=pr), | intent(in) | :: | t |
Temperature [K]. |
||
| real(kind=pr), | intent(in) | :: | td0 |
Tangent seed for temperature (td0). |
||
| real(kind=pr), | intent(in) | :: | td |
Tangent seed for temperature (td). |
||
| real(kind=pr), | intent(out) | :: | arval |
Primal residual Helmholtz energy. |
||
| real(kind=pr), | intent(out) | :: | arvald0 |
Tangent of |
||
| real(kind=pr), | intent(out) | :: | arvald |
Tangent of |
||
| real(kind=pr), | intent(out) | :: | arvaldd |
Mixed second directional derivative. |
Calculate excess enthalpy given pressure and temperature.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ArModel), | intent(in) | :: | eos |
Model |
||
| real(kind=pr), | intent(in) | :: | n(:) |
Moles number vector |
||
| real(kind=pr), | intent(in) | :: | P |
Pressure [bar] |
||
| real(kind=pr), | intent(in) | :: | T |
Temperature [K] |
||
| character(len=*), | intent(in) | :: | root_type |
Desired root-type to solve. Options are:
|
||
| real(kind=pr), | intent(out) | :: | He |
Excess enthalpy [bar L] |
Calculate residual enthalpy given pressure and temperature.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ArModel), | intent(in) | :: | eos |
Model |
||
| real(kind=pr), | intent(in) | :: | n(:) |
Moles number vector |
||
| real(kind=pr), | intent(in) | :: | P |
Pressure [bar] |
||
| real(kind=pr), | intent(in) | :: | T |
Temperature [K] |
||
| character(len=*), | intent(in) | :: | root_type |
Desired root-type to solve. Options are:
|
||
| real(kind=pr), | intent(out), | optional | :: | Hr |
Residual enthalpy [bar L] |
|
| real(kind=pr), | intent(out), | optional | :: | HrP |
|
|
| real(kind=pr), | intent(out), | optional | :: | HrT |
|
|
| real(kind=pr), | intent(out), | optional | :: | Hrn(size(n)) |
|
Calculate residual enthalpy given volume and temperature.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ArModel), | intent(in) | :: | eos |
Model |
||
| real(kind=pr), | intent(in) | :: | n(:) |
Moles number vector |
||
| real(kind=pr), | intent(in) | :: | V |
Volume [L] |
||
| real(kind=pr), | intent(in) | :: | T |
Temperature [K] |
||
| real(kind=pr), | intent(out), | optional | :: | Hr |
Residual enthalpy [bar L] |
|
| real(kind=pr), | intent(out), | optional | :: | HrV |
|
|
| real(kind=pr), | intent(out), | optional | :: | HrT |
|
|
| real(kind=pr), | intent(out), | optional | :: | Hrn(size(n)) |
|
Calculate excess entropy given pressure and temperature.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ArModel), | intent(in) | :: | eos |
Model |
||
| real(kind=pr), | intent(in) | :: | n(:) |
Moles number vector |
||
| real(kind=pr), | intent(in) | :: | P |
Pressure [bar] |
||
| real(kind=pr), | intent(in) | :: | T |
Temperature [K] |
||
| character(len=*), | intent(in) | :: | root_type |
Desired root-type to solve. Options are:
|
||
| real(kind=pr), | intent(out) | :: | Se |
Excess entropy [bar L K^-1] |
Calculate residual entropy given pressure and temperature.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ArModel), | intent(in) | :: | eos |
Model |
||
| real(kind=pr), | intent(in) | :: | n(:) |
Moles number vector |
||
| real(kind=pr), | intent(in) | :: | P |
Pressure [bar] |
||
| real(kind=pr), | intent(in) | :: | T |
Temperature [K] |
||
| character(len=*), | intent(in) | :: | root_type |
Desired root-type to solve. Options are:
|
||
| real(kind=pr), | intent(out), | optional | :: | Sr |
Residual entropy [bar L K^-1] |
|
| real(kind=pr), | intent(out), | optional | :: | SrP |
|
|
| real(kind=pr), | intent(out), | optional | :: | SrT |
|
|
| real(kind=pr), | intent(out), | optional | :: | Srn(size(n)) |
|
Calculate residual entropy given volume and temperature.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ArModel), | intent(in) | :: | eos |
Model |
||
| real(kind=pr), | intent(in) | :: | n(:) |
Moles number vector |
||
| real(kind=pr), | intent(in) | :: | V |
Volume [L] |
||
| real(kind=pr), | intent(in) | :: | T |
Temperature [K] |
||
| real(kind=pr), | intent(out), | optional | :: | Sr |
Entropy [bar L / K] |
|
| real(kind=pr), | intent(out), | optional | :: | SrV |
|
|
| real(kind=pr), | intent(out), | optional | :: | SrT |
|
|
| real(kind=pr), | intent(out), | optional | :: | Srn(size(n)) |
|
Return the close-packed segment volume used to initialize a volume solve.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(PCSAFT), | intent(in) | :: | self |
PC-SAFT model and segment data. |
||
| real(kind=pr), | intent(in) | :: | n(:) |
Component mole amounts [mol]. |
||
| real(kind=pr), | intent(in) | :: | P |
Pressure [bar]; unused in the close-packed initializer. |
||
| real(kind=pr), | intent(in) | :: | T |
Temperature [K]; unused in the close-packed initializer. |
Calculate excess Gibbs energy and its derivatives given pressure and temperature.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ArModel), | intent(in) | :: | eos |
Model |
||
| real(kind=pr), | intent(in) | :: | n(:) |
Moles number vector |
||
| real(kind=pr), | intent(in) | :: | P |
Pressure [bar] |
||
| real(kind=pr), | intent(in) | :: | T |
Temperature [K] |
||
| character(len=*), | intent(in) | :: | root_type |
Desired root-type to solve. Options are:
|
||
| real(kind=pr), | intent(out), | optional | :: | Ge |
Excess Gibbs energy [bar L] |
|
| real(kind=pr), | intent(out), | optional | :: | GeP |
|
|
| real(kind=pr), | intent(out), | optional | :: | GeT |
|
|
| real(kind=pr), | intent(out), | optional | :: | Gen(size(n)) |
|
Calculate residual Gibbs energy given pressure and temperature.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ArModel), | intent(in) | :: | eos |
Model |
||
| real(kind=pr), | intent(in) | :: | n(:) |
Moles number vector |
||
| real(kind=pr), | intent(in) | :: | P |
Pressure [bar] |
||
| real(kind=pr), | intent(in) | :: | T |
Temperature [K] |
||
| character(len=*), | intent(in) | :: | root_type |
Desired root-type to solve. Options are:
|
||
| real(kind=pr), | intent(out), | optional | :: | Gr |
Residual Gibbs energy [bar L] |
|
| real(kind=pr), | intent(out), | optional | :: | GrP |
|
|
| real(kind=pr), | intent(out), | optional | :: | GrT |
|
|
| real(kind=pr), | intent(out), | optional | :: | Grn(size(n)) |
|
Calculate residual Gibbs energy given volume and temperature.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ArModel), | intent(in) | :: | eos |
Model |
||
| real(kind=pr), | intent(in) | :: | n(:) |
Moles number vector |
||
| real(kind=pr), | intent(in) | :: | V |
Volume [L] |
||
| real(kind=pr), | intent(in) | :: | T |
Temperature [K] |
||
| real(kind=pr), | intent(out), | optional | :: | Gr |
Gibbs energy [bar L] |
|
| real(kind=pr), | intent(out), | optional | :: | GrV |
|
|
| real(kind=pr), | intent(out), | optional | :: | GrT |
|
|
| real(kind=pr), | intent(out), | optional | :: | Grn(size(n)) |
|
Calculate excess Helmholtz energy given pressure and temperature.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ArModel), | intent(in) | :: | eos |
Model |
||
| real(kind=pr), | intent(in) | :: | n(:) |
Moles number vector |
||
| real(kind=pr), | intent(in) | :: | P |
Pressure [bar] |
||
| real(kind=pr), | intent(in) | :: | T |
Temperature [K] |
||
| character(len=*), | intent(in) | :: | root_type |
Desired root-type to solve. Options are:
|
||
| real(kind=pr), | intent(out) | :: | Ae |
Excess Helmholtz energy [bar L] |
Calculate residual Helmholtz energy given pressure and temperature.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ArModel), | intent(in) | :: | eos |
Model |
||
| real(kind=pr), | intent(in) | :: | n(:) |
Moles number vector |
||
| real(kind=pr), | intent(in) | :: | P |
Pressure [bar] |
||
| real(kind=pr), | intent(in) | :: | T |
Temperature [K] |
||
| character(len=*), | intent(in) | :: | root_type |
Desired root-type to solve. Options are:
|
||
| real(kind=pr), | intent(out), | optional | :: | Ar |
Residual Helmholtz energy [bar L] |
|
| real(kind=pr), | intent(out), | optional | :: | ArP |
|
|
| real(kind=pr), | intent(out), | optional | :: | ArT |
|
|
| real(kind=pr), | intent(out), | optional | :: | Arn(size(n)) |
|
Calculate excess internal energy given pressure and temperature.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ArModel), | intent(in) | :: | eos |
Model |
||
| real(kind=pr), | intent(in) | :: | n(:) |
Moles number vector |
||
| real(kind=pr), | intent(in) | :: | P |
Pressure [bar] |
||
| real(kind=pr), | intent(in) | :: | T |
Temperature [K] |
||
| character(len=*), | intent(in) | :: | root_type |
Desired root-type to solve. Options are:
|
||
| real(kind=pr), | intent(out) | :: | Ue |
Excess internal energy [bar L] |
Calculate residual internal energy given pressure and temperature.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ArModel), | intent(in) | :: | eos |
Model |
||
| real(kind=pr), | intent(in) | :: | n(:) |
Moles number vector |
||
| real(kind=pr), | intent(in) | :: | P |
Pressure [bar] |
||
| real(kind=pr), | intent(in) | :: | T |
Temperature [K] |
||
| character(len=*), | intent(in) | :: | root_type |
Desired root-type to solve. Options are:
|
||
| real(kind=pr), | intent(out), | optional | :: | Ur |
Residual internal energy [bar L] |
|
| real(kind=pr), | intent(out), | optional | :: | UrP |
|
|
| real(kind=pr), | intent(out), | optional | :: | UrT |
|
|
| real(kind=pr), | intent(out), | optional | :: | Urn(size(n)) |
|
Calculate residual internal energy given volume and temperature.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ArModel), | intent(in) | :: | eos |
Model |
||
| real(kind=pr), | intent(in) | :: | n(:) |
Moles number vector |
||
| real(kind=pr), | intent(in) | :: | V |
Volume [L] |
||
| real(kind=pr), | intent(in) | :: | T |
Temperature [K] |
||
| real(kind=pr), | intent(out), | optional | :: | Ur |
Internal energy [bar L] |
|
| real(kind=pr), | intent(out), | optional | :: | UrV |
|
|
| real(kind=pr), | intent(out), | optional | :: | UrT |
|
|
| real(kind=pr), | intent(out), | optional | :: | Urn(size(n)) |
|
Calculate natural logarithm of activity coefficients and its derivatives given pressure and temperature.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ArModel), | intent(in) | :: | eos |
Model |
||
| real(kind=pr), | intent(in) | :: | n(:) |
Moles number vector |
||
| real(kind=pr), | intent(in) | :: | P |
Pressure [bar] |
||
| real(kind=pr), | intent(in) | :: | T |
Temperature [K] |
||
| character(len=*), | intent(in) | :: | root_type |
Desired root-type to solve. Options are:
|
||
| real(kind=pr), | intent(out), | optional | :: | lngamma(size(n)) |
Natural logarithm of activity coefficient |
|
| real(kind=pr), | intent(out), | optional | :: | dlngammadP(size(n)) |
|
|
| real(kind=pr), | intent(out), | optional | :: | dlngammadT(size(n)) |
|
|
| real(kind=pr), | intent(out), | optional | :: | dlngammadn(size(n),size(n)) |
|
Calculate natural logarithm of fugacity given volume and temperature.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ArModel) | :: | eos |
Model |
|||
| real(kind=pr), | intent(in) | :: | n(:) |
Mixture mole numbers |
||
| real(kind=pr), | intent(in) | :: | V |
Volume [L] |
||
| real(kind=pr), | intent(in) | :: | T |
Temperature [K] |
||
| real(kind=pr), | intent(out), | optional | :: | P |
Pressure [bar] |
|
| real(kind=pr), | intent(out), | optional | :: | lnf(size(n)) |
vector |
|
| real(kind=pr), | intent(out), | optional | :: | dlnfdV(size(n)) |
Volume derivative |
|
| real(kind=pr), | intent(out), | optional | :: | dlnfdT(size(n)) |
Temp derivative |
|
| real(kind=pr), | intent(out), | optional | :: | dlnfdn(size(n),size(n)) |
compositional derivative |
|
| real(kind=pr), | intent(out), | optional | :: | dPdV |
|
|
| real(kind=pr), | intent(out), | optional | :: | dPdT |
|
|
| real(kind=pr), | intent(out), | optional | :: | dPdn(:) |
|
Calculate natural logarithm of fugacity given pressure and temperature.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ArModel), | intent(in) | :: | eos |
Model |
||
| real(kind=pr), | intent(in) | :: | n(:) |
Mixture mole numbers |
||
| real(kind=pr), | intent(in) | :: | P |
Pressure [bar] |
||
| real(kind=pr), | intent(in) | :: | T |
Temperature [K] |
||
| real(kind=pr), | intent(out), | optional | :: | V |
Volume [L] |
|
| character(len=*), | intent(in) | :: | root_type |
Type of root desired [“liquid”, “vapor”, “stable”] |
||
| real(kind=pr), | intent(out), | optional | :: | lnPhi(size(n)) |
vector |
|
| real(kind=pr), | intent(out), | optional | :: | dlnPhidP(size(n)) |
[1/bar] |
|
| real(kind=pr), | intent(out), | optional | :: | dlnPhidT(size(n)) |
[1/K] |
|
| real(kind=pr), | intent(out), | optional | :: | dlnPhidn(size(n),size(n)) |
|
|
| real(kind=pr), | intent(out), | optional | :: | dPdV |
|
|
| real(kind=pr), | intent(out), | optional | :: | dPdT |
|
|
| real(kind=pr), | intent(out), | optional | :: | dPdn(size(n)) |
|
|
| real(kind=pr), | intent(out), | optional | :: | lnPhiP(:) |
. It is useful to calculate fugacity coefficients at negatives pressures. |
Calculate natural logarithm of fugacity coefficent.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ArModel) | :: | eos |
Model |
|||
| real(kind=pr), | intent(in) | :: | n(:) |
Mixture mole numbers |
||
| real(kind=pr), | intent(in) | :: | V |
Volume [L] |
||
| real(kind=pr), | intent(in) | :: | T |
Temperature [K] |
||
| real(kind=pr), | intent(out), | optional | :: | P |
Pressure [bar] |
|
| real(kind=pr), | intent(out), | optional | :: | lnPhi(size(n)) |
vector |
|
| real(kind=pr), | intent(out), | optional | :: | dlnPhidP(size(n)) |
Pressure derivative |
|
| real(kind=pr), | intent(out), | optional | :: | dlnPhidT(size(n)) |
Temp derivative |
|
| real(kind=pr), | intent(out), | optional | :: | dlnPhidn(size(n),size(n)) |
compositional derivative |
|
| real(kind=pr), | intent(out), | optional | :: | dPdV |
|
|
| real(kind=pr), | intent(out), | optional | :: | dPdT |
|
|
| real(kind=pr), | intent(out), | optional | :: | dPdn(:) |
|
|
| real(kind=pr), | intent(out), | optional | :: | lnPhiP(:) |
. It is useful to calculate fugacity coefficients at negatives pressures. |
Calculate pressure.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ArModel), | intent(in) | :: | eos |
Model |
||
| real(kind=pr), | intent(in) | :: | n(:) |
Moles number vector |
||
| real(kind=pr), | intent(in) | :: | V |
Volume [L] |
||
| real(kind=pr), | intent(in) | :: | T |
Temperature [K] |
||
| real(kind=pr), | intent(out) | :: | P |
Pressure [bar] |
||
| real(kind=pr), | intent(out), | optional | :: | dPdV |
|
|
| real(kind=pr), | intent(out), | optional | :: | dPdT |
|
|
| real(kind=pr), | intent(out), | optional | :: | dPdn(:) |
|
Residual Helmholtz model generic interface
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ArModelTapenade), | intent(in) | :: | self |
Model instance. |
||
| real(kind=pr), | intent(in) | :: | n(:) |
Component mole amounts [mol]. |
||
| real(kind=pr), | intent(in) | :: | v |
Total volume [L]. |
||
| real(kind=pr), | intent(in) | :: | t |
Temperature [K]. |
||
| real(kind=pr), | intent(out), | optional | :: | Ar |
Residual Helmholtz energy [bar L]. |
|
| real(kind=pr), | intent(out), | optional | :: | ArV |
[bar]. |
|
| real(kind=pr), | intent(out), | optional | :: | ArT |
[bar L/K]. |
|
| real(kind=pr), | intent(out), | optional | :: | ArTV |
[bar/K]. |
|
| real(kind=pr), | intent(out), | optional | :: | ArV2 |
[bar/L]. |
|
| real(kind=pr), | intent(out), | optional | :: | ArT2 |
[bar L/K^2]. |
|
| real(kind=pr), | intent(out), | optional, | dimension(size(n)) | :: | Arn |
[bar L/mol]. |
| real(kind=pr), | intent(out), | optional, | dimension(size(n)) | :: | ArVn |
[bar/mol]. |
| real(kind=pr), | intent(out), | optional, | dimension(size(n)) | :: | ArTn |
[bar L/(K mol)]. |
| real(kind=pr), | intent(out), | optional | :: | Arn2(size(n),size(n)) |
[bar L/mol^2]. |
Find a PC-SAFT volume root at specified pressure and temperature.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(PCSAFT), | intent(in) | :: | eos |
PC-SAFT equation-of-state model. |
||
| real(kind=pr), | intent(in) | :: | n(:) |
Component mole amounts [mol]. |
||
| real(kind=pr), | intent(in) | :: | P |
Pressure [bar]. |
||
| real(kind=pr), | intent(in) | :: | T |
Temperature [K]. |
||
| real(kind=pr), | intent(out) | :: | V |
Selected total volume [L]. |
||
| character(len=*), | intent(in) | :: | root_type |
Root selector: |
Calculate excess volume given pressure and temperature.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ArModel), | intent(in) | :: | eos |
Model |
||
| real(kind=pr), | intent(in) | :: | n(:) |
Moles number vector |
||
| real(kind=pr), | intent(in) | :: | P |
Pressure [bar] |
||
| real(kind=pr), | intent(in) | :: | T |
Temperature [K] |
||
| character(len=*), | intent(in) | :: | root_type |
Desired root-type to solve. Options are:
|
||
| real(kind=pr), | intent(out) | :: | Ve |
Excess volume [L] |