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



Subroutines

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