volume_michelsen Subroutine

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

Uses

  • proc~~volume_michelsen~~UsesGraph proc~volume_michelsen volume_michelsen iso_fortran_env iso_fortran_env proc~volume_michelsen->iso_fortran_env module~yaeos__auxiliar yaeos__auxiliar proc~volume_michelsen->module~yaeos__auxiliar module~yaeos__constants yaeos__constants module~yaeos__auxiliar->module~yaeos__constants module~yaeos__constants->iso_fortran_env

Volume solver at a given pressure.

Obtain the volume using the method described by Michelsen and Mollerup. While can be obtained with a simple Newton method, a better approach is solving where is the EoS covolume. This method is easier to solve because: and

At chapter 3 page 94 of Michelsen and Møllerup’s book a more complete explanation can be seen

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


Calls

proc~~volume_michelsen~~CallsGraph proc~volume_michelsen volume_michelsen get_v0 get_v0 proc~volume_michelsen->get_v0 interface~optval optval proc~volume_michelsen->interface~optval proc~solve_point~3 solve_point proc~volume_michelsen->proc~solve_point~3 proc~optval_character optval_character interface~optval->proc~optval_character proc~optval_integer optval_integer interface~optval->proc~optval_integer proc~optval_real optval_real interface~optval->proc~optval_real proc~solve_point~3->get_v0 residual_helmholtz residual_helmholtz proc~solve_point~3->residual_helmholtz

Called by

proc~~volume_michelsen~~CalledByGraph proc~volume_michelsen volume_michelsen proc~volume~2 CubicEoS%volume proc~volume~2->proc~volume_michelsen proc~volume Gerg2008%volume proc~volume->proc~volume~2

Variables

Type Visibility Attributes Name Initial
real(kind=pr), public :: AT
real(kind=pr), public :: AVAP
real(kind=pr), public :: B

Covolume

real(kind=pr), public :: VVAP
real(kind=pr), public :: ZETA
real(kind=pr), public :: ZETMAX
real(kind=pr), public :: ZETMIN
integer, public :: iter
integer, public :: maximum_iterations
real(kind=pr), public :: pcalc
character(len=10), public :: root
real(kind=pr), public :: totn