RKPR Function

public function RKPR(tc, pc, w, zc, kij, lij, delta_1, k) result(model)

Uses

  • proc~~rkpr~~UsesGraph proc~rkpr RKPR module~yaeos__models_ar_cubic_alphas yaeos__models_ar_cubic_alphas proc~rkpr->module~yaeos__models_ar_cubic_alphas module~yaeos__models_ar_cubic_quadratic_mixing yaeos__models_ar_cubic_quadratic_mixing proc~rkpr->module~yaeos__models_ar_cubic_quadratic_mixing module~yaeos__constants yaeos__constants module~yaeos__models_ar_cubic_alphas->module~yaeos__constants module~yaeos__models_ar_genericcubic yaeos__models_ar_genericcubic module~yaeos__models_ar_cubic_alphas->module~yaeos__models_ar_genericcubic module~yaeos__substance yaeos__substance module~yaeos__models_ar_cubic_alphas->module~yaeos__substance module~yaeos__models_ar_cubic_quadratic_mixing->module~yaeos__constants module~yaeos__models_ar_cubic_mixing_base yaeos__models_ar_cubic_mixing_base module~yaeos__models_ar_cubic_quadratic_mixing->module~yaeos__models_ar_cubic_mixing_base module~yaeos__models_ar_cubic_quadratic_mixing->module~yaeos__models_ar_genericcubic module~yaeos__models_ar_cubic_quadratic_mixing->module~yaeos__substance iso_fortran_env iso_fortran_env module~yaeos__constants->iso_fortran_env module~yaeos__models_ar_cubic_mixing_base->module~yaeos__constants module~yaeos__models_ar_genericcubic->module~yaeos__constants module~yaeos__models_ar_genericcubic->module~yaeos__substance module~yaeos__models_ar yaeos__models_ar module~yaeos__models_ar_genericcubic->module~yaeos__models_ar module~yaeos__substance->module~yaeos__constants module~yaeos__models_ar->module~yaeos__constants module~yaeos__models_base yaeos__models_base module~yaeos__models_ar->module~yaeos__models_base module~yaeos__models_base->module~yaeos__substance

RKPR

Description

RKPR Equation of State

The RKPR EoS extends the classical formulation of Cubic Equations of State by freeing the parameter . This extra degree provides extra ways of implementing the equation in comparison of other Cubic EoS (like PR and SRK) which are limited to definition of their critical constants.

Besides that extra parameter, the RKPR includes another function:

In this implementation we take the simplest form which correlates the extra parameter to the critical compressibility factor and the parameter of the function to and :

where . When delta_1 or k are given they replace the correlations. When k is not given, each component’s is afterwards refitted with refit_rkpr_k so that the model reproduces the acentric factor.

Arguments

Type IntentOptional Attributes Name
real(kind=pr), intent(in) :: tc(:)

Critical Temperature [K]

real(kind=pr), intent(in) :: pc(:)

Critical Pressure [bar]

real(kind=pr), intent(in) :: w(:)

Acentric Factor

real(kind=pr), intent(in) :: zc(:)

Critical compressibility

real(kind=pr), intent(in), optional :: kij(:,:)

matrix

real(kind=pr), intent(in), optional :: lij(:,:)

matrix

real(kind=pr), intent(in), optional :: delta_1(:)

Pure-component values (overrides the correlation)

real(kind=pr), intent(in), optional :: k(:)

Alpha-function values (overrides correlation and refit)

Return Value type(CubicEoS)


Calls

proc~~rkpr~~CallsGraph proc~rkpr RKPR proc~get_oma_omb get_OMa_OMb proc~rkpr->proc~get_oma_omb proc~refit_rkpr_k refit_rkpr_k proc~rkpr->proc~refit_rkpr_k proc~get_p PurePsat%get_P proc~refit_rkpr_k->proc~get_p proc~psat_pure ArModel%Psat_pure proc~refit_rkpr_k->proc~psat_pure proc~pure_saturation_line pure_saturation_line proc~refit_rkpr_k->proc~pure_saturation_line evaluate evaluate proc~get_p->evaluate proc~pressure ArModel%pressure proc~psat_pure->proc~pressure proc~solve_point_psat solve_point_psat proc~psat_pure->proc~solve_point_psat proc~volume~4 ArModel%volume proc~psat_pure->proc~volume~4 initialize initialize proc~pure_saturation_line->initialize proc~solve_point~2 solve_point proc~pure_saturation_line->proc~solve_point~2 proc~solve_system solve_system proc~pure_saturation_line->proc~solve_system proc~pure_saturation_line->proc~volume~4 residual_helmholtz residual_helmholtz proc~pressure->residual_helmholtz proc~solve_point_psat->proc~solve_system get_v0 get_v0 proc~solve_point_psat->get_v0 none~isofugacity~2 isofugacity proc~solve_point_psat->none~isofugacity~2 proc~solve_point~2->proc~solve_system proc~solve_point~2->get_v0 none~isofugacity isofugacity proc~solve_point~2->none~isofugacity none~dgesv dgesv proc~solve_system->none~dgesv proc~volume~4->get_v0 interface~newton newton proc~volume~4->interface~newton proc~newton_1d newton_1d interface~newton->proc~newton_1d proc~lnfug_vt ArModel%lnfug_vt none~isofugacity->proc~lnfug_vt none~isofugacity~2->proc~lnfug_vt proc~lnfug_vt->residual_helmholtz

Variables

Type Visibility Attributes Name Initial
real(kind=pr), private, parameter :: A0 = 0.0017
real(kind=pr), private, parameter :: A1 = -2.4407
real(kind=pr), private, parameter :: B0 = 1.9681
real(kind=pr), private, parameter :: B1 = 7.4513
real(kind=pr), private, parameter :: C0 = -2.6238
real(kind=pr), private, parameter :: C1 = 12.504
real(kind=pr), private :: OMa(size(pc))
real(kind=pr), private :: OMb(size(pc))
real(kind=pr), private :: Psat_i
real(kind=pr), private :: Zc_eos(size(pc))
type(AlphaRKPR), private :: alpha

RKPR alpha function

type(Substances), private :: composition
real(kind=pr), private, parameter :: d1 = 0.428364

Constant term in the RKPR delta-one correlation.

real(kind=pr), private, parameter :: d2 = 18.496215

Amplitude of the first compressibility-dependent term.

real(kind=pr), private, parameter :: d3 = 0.338426

Reference compressibility in both power-law terms.

real(kind=pr), private, parameter :: d4 = 0.66

Exponent of the first compressibility-dependent term.

real(kind=pr), private, parameter :: d5 = 789.723105

Amplitude of the second compressibility-dependent term.

real(kind=pr), private, parameter :: d6 = 2.512392

Exponent of the second compressibility-dependent term.

real(kind=pr), private :: diff
integer, private :: i

Loop/index variable.

type(QMR), private :: mixrule
integer, private :: nc

Number of components.