Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
dumux-repositories
dumux
Commits
f5387518
Commit
f5387518
authored
Feb 26, 2021
by
Timo Koch
Browse files
[simpleh2o] Improve code readability
parent
53d50dfd
Changes
1
Hide whitespace changes
Inline
Side-by-side
dumux/material/components/simpleh2o.hh
View file @
f5387518
...
...
@@ -157,9 +157,7 @@ public:
* \brief Specific internal energy of steam \f$\mathrm{[J/kg]}\f$.
*
* Definition of enthalpy: \f$h= u + pv = u + p / \rho\f$.
*
* Rearranging for internal energy yields: \f$u = h - pv\f$.
*
* Exploiting the Ideal Gas assumption (\f$pv = R_{\textnormal{specific}} T\f$)gives: \f$u = h - R / M T \f$.
*
* The universal gas constant can only be used in the case of molar formulations.
...
...
@@ -169,10 +167,10 @@ public:
static
const
Scalar
gasInternalEnergy
(
Scalar
temperature
,
Scalar
pressure
)
{
return
gasEnthalpy
(
temperature
,
pressure
)
-
1
/
molarMass
()
*
// conversion from [J/(mol K)] to [J/(kg K)]
IdealGas
::
R
*
temperature
;
// = pressure *spec. volume for an ideal gas
// 1/molarMass: conversion from [J/(mol K)] to [J/(kg K)]
// R*T/molarMass: pressure *spec. volume for an ideal gas
return
gasEnthalpy
(
temperature
,
pressure
)
-
1
/
molarMass
()
*
IdealGas
::
R
*
temperature
;
}
/*!
...
...
@@ -183,9 +181,10 @@ public:
*/
static
const
Scalar
liquidInternalEnergy
(
Scalar
temperature
,
Scalar
pressure
)
{
return
liquidEnthalpy
(
temperature
,
pressure
)
-
pressure
/
liquidDensity
(
temperature
,
pressure
);
}
{
return
liquidEnthalpy
(
temperature
,
pressure
)
-
pressure
/
liquidDensity
(
temperature
,
pressure
);
}
/*!
* \brief Returns true if the gas phase is assumed to be compressible
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment