OGS
MaterialLib::Fluid::DimensionLessGibbsFreeEnergyRegion1 Struct Reference

Detailed Description

A class for dimensionless Gibbs free energy defined by

\[ \gamma=\sum_{i=1}^{34}\left[ n_i * (7.1-\pi)^{l_i}(\tau - 1.222)^{j_i} \right] \]

IF97-Rev

Coefficients \(n_i\), \(j_i\) and \(l_i\) are given in three static arrays in the cpp file.

Definition at line 31 of file DimensionLessGibbsFreeEnergyRegion1.h.

#include <DimensionLessGibbsFreeEnergyRegion1.h>

Public Member Functions

template<typename S, typename T>
promote< S, T > get_gamma (const S tau, const T pi)
template<typename S, typename T>
promote< S, T > get_dgamma_dtau (const S tau, const T pi)
template<typename S, typename T>
promote< S, T > get_dgamma_dtau_dtau (const S tau, const T pi)
template<typename S, typename T>
promote< S, T > get_dgamma_dpi (const S tau, const T pi)
template<typename S, typename T>
promote< S, T > get_dgamma_dpi_dpi (const S tau, const T pi)
template<typename S, typename T>
promote< S, T > get_dgamma_dtau_dpi (const S tau, const T pi)

Static Public Member Functions

template<typename S, typename T>
static boost::math::differentiation::promote< S, T > get_gamma (const S tau, const T pi)
template<typename S, typename T>
static boost::math::differentiation::promote< S, T > get_dgamma_dtau (const S tau, const T pi)
template<typename S, typename T>
static boost::math::differentiation::promote< S, T > get_dgamma_dtau_dtau (const S tau, const T pi)
template<typename S, typename T>
static boost::math::differentiation::promote< S, T > get_dgamma_dpi (const S tau, const T pi)
template<typename S, typename T>
static boost::math::differentiation::promote< S, T > get_dgamma_dpi_dpi (const S tau, const T pi)
template<typename S, typename T>
static boost::math::differentiation::promote< S, T > get_dgamma_dtau_dpi (const S tau, const T pi)

Member Function Documentation

◆ get_dgamma_dpi() [1/2]

template<typename S, typename T>
promote< S, T > MaterialLib::Fluid::DimensionLessGibbsFreeEnergyRegion1::get_dgamma_dpi ( const S tau,
const T pi )

Definition at line 78 of file DimensionLessGibbsFreeEnergyRegion1.cpp.

80{
81 promote<S, T> val = 0.;
82 for (int i = 0; i < 34; i++)
83 {
84 val = val - ni[i] * li[i] * pow(7.1 - pi, li[i] - 1.0) *
85 pow(tau - 1.222, ji[i]);
86 }
87
88 return val;
89}

References MaterialLib::Fluid::ji, MaterialLib::Fluid::li, and MaterialLib::Fluid::ni.

◆ get_dgamma_dpi() [2/2]

template<typename S, typename T>
boost::math::differentiation::promote< S, T > MaterialLib::Fluid::DimensionLessGibbsFreeEnergyRegion1::get_dgamma_dpi ( const S tau,
const T pi )
static

Get the 1st order partial derivative of the dimension less Gibbs free energy with respect to dimension less pressure, pi

Parameters
piDimension less temperature
tauDimension less pressure
Returns
The value

◆ get_dgamma_dpi_dpi() [1/2]

template<typename S, typename T>
promote< S, T > MaterialLib::Fluid::DimensionLessGibbsFreeEnergyRegion1::get_dgamma_dpi_dpi ( const S tau,
const T pi )

Definition at line 92 of file DimensionLessGibbsFreeEnergyRegion1.cpp.

94{
95 promote<S, T> val = 0.;
96 for (int i = 0; i < 34; i++)
97 {
98 val += ni[i] * li[i] * (li[i] - 1.0) * pow(7.1 - pi, li[i] - 2.0) *
99 pow(tau - 1.222, ji[i]);
100 }
101
102 return val;
103}

References MaterialLib::Fluid::ji, MaterialLib::Fluid::li, and MaterialLib::Fluid::ni.

◆ get_dgamma_dpi_dpi() [2/2]

template<typename S, typename T>
boost::math::differentiation::promote< S, T > MaterialLib::Fluid::DimensionLessGibbsFreeEnergyRegion1::get_dgamma_dpi_dpi ( const S tau,
const T pi )
static

Get the 2nd order partial derivative of the dimension less Gibbs free energy with respect to dimension less pressure, pi

Parameters
piDimension less temperature
tauDimension less pressure
Returns
The value

◆ get_dgamma_dtau() [1/2]

template<typename S, typename T>
promote< S, T > MaterialLib::Fluid::DimensionLessGibbsFreeEnergyRegion1::get_dgamma_dtau ( const S tau,
const T pi )

Definition at line 50 of file DimensionLessGibbsFreeEnergyRegion1.cpp.

52{
53 promote<S, T> val = 0.;
54 for (int i = 0; i < 34; i++)
55 {
56 val += ni[i] * ji[i] * pow(7.1 - pi, li[i]) *
57 pow(tau - 1.222, ji[i] - 1.0);
58 }
59
60 return val;
61}

References MaterialLib::Fluid::ji, MaterialLib::Fluid::li, and MaterialLib::Fluid::ni.

◆ get_dgamma_dtau() [2/2]

template<typename S, typename T>
boost::math::differentiation::promote< S, T > MaterialLib::Fluid::DimensionLessGibbsFreeEnergyRegion1::get_dgamma_dtau ( const S tau,
const T pi )
static

Get the 1st order partial derivative of the dimension less Gibbs free energy with respect to dimension less temperature, tau

Parameters
piDimension less temperature
tauDimension less pressure
Returns
The value

◆ get_dgamma_dtau_dpi() [1/2]

template<typename S, typename T>
promote< S, T > MaterialLib::Fluid::DimensionLessGibbsFreeEnergyRegion1::get_dgamma_dtau_dpi ( const S tau,
const T pi )

Definition at line 106 of file DimensionLessGibbsFreeEnergyRegion1.cpp.

108{
109 promote<S, T> val = 0.;
110 for (int i = 0; i < 34; i++)
111 {
112 val = val - ni[i] * ji[i] * li[i] * pow(7.1 - pi, li[i] - 1.0) *
113 pow(tau - 1.222, ji[i] - 1.0);
114 }
115
116 return val;
117}

References MaterialLib::Fluid::ji, MaterialLib::Fluid::li, and MaterialLib::Fluid::ni.

◆ get_dgamma_dtau_dpi() [2/2]

template<typename S, typename T>
boost::math::differentiation::promote< S, T > MaterialLib::Fluid::DimensionLessGibbsFreeEnergyRegion1::get_dgamma_dtau_dpi ( const S tau,
const T pi )
static

Get the 2nd order partial derivative of the dimension less Gibbs free energy with respect to dimension less temperature, tau, and dimension less pressure, pi

Parameters
piDimension less temperature
tauDimension less pressure
Returns
The value

◆ get_dgamma_dtau_dtau() [1/2]

template<typename S, typename T>
promote< S, T > MaterialLib::Fluid::DimensionLessGibbsFreeEnergyRegion1::get_dgamma_dtau_dtau ( const S tau,
const T pi )

Definition at line 64 of file DimensionLessGibbsFreeEnergyRegion1.cpp.

66{
67 promote<S, T> val = 0.;
68 for (int i = 0; i < 34; i++)
69 {
70 val += ni[i] * ji[i] * (ji[i] - 1.0) * pow(7.1 - pi, li[i]) *
71 pow(tau - 1.222, ji[i] - 2.0);
72 }
73
74 return val;
75}

References MaterialLib::Fluid::ji, MaterialLib::Fluid::li, and MaterialLib::Fluid::ni.

◆ get_dgamma_dtau_dtau() [2/2]

template<typename S, typename T>
boost::math::differentiation::promote< S, T > MaterialLib::Fluid::DimensionLessGibbsFreeEnergyRegion1::get_dgamma_dtau_dtau ( const S tau,
const T pi )
static

Get the 2nd order partial derivative of the dimension less Gibbs free energy with respect to dimension less temperature, tau

Parameters
piDimension less temperature
tauDimension less pressure
Returns
The value

◆ get_gamma() [1/2]

template<typename S, typename T>
promote< S, T > MaterialLib::Fluid::DimensionLessGibbsFreeEnergyRegion1::get_gamma ( const S tau,
const T pi )

Definition at line 37 of file DimensionLessGibbsFreeEnergyRegion1.cpp.

39{
40 promote<S, T> val = 0.;
41 for (int i = 0; i < 34; i++)
42 {
43 val += ni[i] * pow(7.1 - pi, li[i]) * pow(tau - 1.222, ji[i]);
44 }
45
46 return val;
47}

References MaterialLib::Fluid::ji, MaterialLib::Fluid::li, and MaterialLib::Fluid::ni.

◆ get_gamma() [2/2]

template<typename S, typename T>
boost::math::differentiation::promote< S, T > MaterialLib::Fluid::DimensionLessGibbsFreeEnergyRegion1::get_gamma ( const S tau,
const T pi )
static

Get the value

Parameters
piDimension less temperature
tauDimension less pressure
Returns
The value

The documentation for this struct was generated from the following files: