OGS
SteamDryness.cpp
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2
// SPDX-License-Identifier: BSD-3-Clause
3
4
#include "
SteamDryness.h
"
5
6
#include "
BaseLib/Logging.h
"
7
8
namespace
MaterialPropertyLib
9
{
10
double
steamDryness
(
double
const
enthalpy
,
double
const
h_sat_liquid,
11
double
const
h_sat_vapour)
12
{
13
double
const
dryness =
14
(
enthalpy
- h_sat_liquid) / (h_sat_vapour - h_sat_liquid);
15
16
if
(dryness > 1)
17
{
18
WARN
(
19
"Specific enthalpy {:g} J/kg exceeds the saturation enthalpy of "
20
"the vapour phase, {:g} J/kg. The steam is superheated, which the "
21
"saturated mixture cannot represent: the section is evaluated at "
22
"the saturation temperature and with the saturation vapour "
23
"density."
,
24
enthalpy
, h_sat_vapour);
25
return
1.;
26
}
27
if
(dryness < 0)
28
{
29
return
0.;
30
}
31
return
dryness;
32
}
33
}
// namespace MaterialPropertyLib
Logging.h
WARN
void WARN(fmt::format_string< Args... > fmt, Args &&... args)
Definition
Logging.h:34
SteamDryness.h
MaterialPropertyLib
Definition
ChemicalSolverInterface.h:98
MaterialPropertyLib::steamDryness
double steamDryness(double const enthalpy, double const h_sat_liquid, double const h_sat_vapour)
Definition
SteamDryness.cpp:10
MaterialPropertyLib::enthalpy
@ enthalpy
Definition
PropertyType.h:43
MaterialLib
MPL
Utils
SteamDryness.cpp
Generated by
1.14.0