yaeos__models_solvers Module

models solvers

Set of different specialized solvers for different models

Description

This module holds specialized solvers for different kind of applications and models.

Volume solving

This module holds the routine volume_michelsen which is a solver for volume that takes advantage over a simple newton on the function of pressure by solving the function of pressure over the covolume instead, which solution is limited in the range [0, 1]. This solver requires that the EoS uses the method get_v0 to return the covolume.

Examples

 A basic code example

References


Uses

  • module~~yaeos__models_solvers~~UsesGraph module~yaeos__models_solvers yaeos__models_solvers module~yaeos__constants yaeos__constants module~yaeos__models_solvers->module~yaeos__constants module~yaeos__models_ar yaeos__models_ar module~yaeos__models_solvers->module~yaeos__models_ar iso_fortran_env iso_fortran_env module~yaeos__constants->iso_fortran_env module~yaeos__models_ar->module~yaeos__constants module~yaeos__models_base yaeos__models_base module~yaeos__models_ar->module~yaeos__models_base module~yaeos__substance yaeos__substance module~yaeos__models_base->module~yaeos__substance module~yaeos__substance->module~yaeos__constants

Used by

  • module~~yaeos__models_solvers~~UsedByGraph module~yaeos__models_solvers yaeos__models_solvers proc~volume~2 CubicEoS%volume proc~volume~2->module~yaeos__models_solvers

Subroutines

public subroutine solve_point(eos, n, P, T, V, Pcalc, ZETA, ZETMIN, ZETMAX, AT, iter)

Arguments

Type IntentOptional Attributes Name
class(ArModel), intent(in) :: eos
real(kind=pr), intent(in) :: n(:)
real(kind=pr), intent(in) :: P

Objective pressure [bar]

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

Temperature [K]

real(kind=pr), intent(out) :: V

Obtained volume [L]

real(kind=pr), intent(out) :: Pcalc

Calculated pressure at V [bar]

real(kind=pr), intent(inout) :: ZETA
real(kind=pr), intent(inout) :: ZETMIN
real(kind=pr), intent(inout) :: ZETMAX
real(kind=pr), intent(out) :: AT
integer, intent(out) :: iter

public subroutine volume_michelsen(eos, n, P, T, V, root_type, max_iters, V0)

Volume solver at a given pressure.

Read more…

Arguments

Type IntentOptional Attributes Name
class(ArModel), intent(in) :: eos
real(kind=pr), intent(in) :: n(:)

Mixture moles

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

Pressure [bar]

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

Temperature [K]

real(kind=pr), intent(out) :: V

Volume [L]

character(len=*), intent(in), optional :: root_type

Type of root [“vapor” | “liquid” | “stable”]

integer, intent(in), optional :: max_iters

Maxiumum number of iterations, defaults to 100

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

Specified initial volume