yaeos__consistency_gemodel Module

yaeos__consistency_gemodel

Consistency checks of Helmholtz free energy models (GeModel).

Description

This module contains tools to validate the analityc derivatives of implmented excess Gibbs free energy models (GeModel). Also, allows to evaluate the consistency tests described in Thermodynamic Models: Fundamentals & Computational Aspects 2 ed. by Michelsen and Mollerup Chapter 5 section 4.

Available tools:

  • numeric_ge_derivatives: From an instantiated GeModel evaluate all the excess Gibbs free energy derivatives from the central finite difference method.

  • ge_consistency: From an instantiated GeModel evaluate all the Michelsen and Mollerup consistency tests

References

  1. Michelsen, M. L., & Mollerup, J. M. (2007). Thermodynamic models: Fundamentals & computational aspects (2. ed). Tie-Line Publications.


Subroutines

public subroutine ge_consistency(model, n, t, eq58, eq59, eq60, eq61)

models consistency tests

Read more…

Arguments

Type IntentOptional Attributes Name
class(GeModel), intent(in) :: model

model

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

Moles number vector

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

Temperature [K]

real(kind=pr), intent(out), optional :: eq58

MM Eq. 58

real(kind=pr), intent(out), optional :: eq59(size(n))

MM Eq. 59

real(kind=pr), intent(out), optional :: eq60(size(n),size(n))

MM Eq. 60

real(kind=pr), intent(out), optional :: eq61(size(n))

MM Eq. 61

public subroutine numeric_ge_derivatives(model, n, t, d_n, d_t, Ge, GeT, Gen, GeT2, GeTn, Gen2)

Numeric model derivatives

Read more…

Arguments

Type IntentOptional Attributes Name
class(GeModel), intent(in) :: model

model

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

Moles number vector

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

Temperature [K]

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

Moles finite difference step

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

Temperature finite difference step

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

Residual Helmoltz energy

real(kind=pr), intent(out), optional :: GeT

real(kind=pr), intent(out), optional :: Gen(size(n))

real(kind=pr), intent(out), optional :: GeT2

real(kind=pr), intent(out), optional :: GeTn(size(n))

real(kind=pr), intent(out), optional :: Gen2(size(n),size(n))