OGS
WaterStateIAPWSIF97Region1.h
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
#pragma once
5
6
#include <spdlog/fmt/fmt.h>
7
8
#include <string_view>
9
10
#include "
NumLib/Exceptions.h
"
11
12
namespace
MaterialPropertyLib::IAPWSIF97Region1
13
{
16
constexpr
double
maximum_pressure
= 100e6;
17
21
constexpr
double
maximum_temperature
= 623.15;
22
37
inline
void
checkStateInRange
(
double
const
pressure,
double
const
temperature
,
38
std::string_view
const
quantity)
39
{
40
if
((pressure >
maximum_pressure
) || (
temperature
>
maximum_temperature
))
41
{
42
throw
NumLib::AssemblyException
(fmt::format(
43
"Pressure {:g} Pa and temperature {:g} K are out of the range of "
44
"the IAPWS-IF97 region 1 correlations, p <= {:g} Pa and T <= {:g} "
45
"K, for {}."
,
46
pressure,
temperature
,
maximum_pressure
,
maximum_temperature
,
47
quantity));
48
}
49
}
50
}
// namespace MaterialPropertyLib::IAPWSIF97Region1
Exceptions.h
MaterialPropertyLib::IAPWSIF97Region1
Definition
WaterStateIAPWSIF97Region1.h:13
MaterialPropertyLib::IAPWSIF97Region1::checkStateInRange
void checkStateInRange(double const pressure, double const temperature, std::string_view const quantity)
Definition
WaterStateIAPWSIF97Region1.h:37
MaterialPropertyLib::IAPWSIF97Region1::maximum_pressure
constexpr double maximum_pressure
Pa.
Definition
WaterStateIAPWSIF97Region1.h:16
MaterialPropertyLib::IAPWSIF97Region1::maximum_temperature
constexpr double maximum_temperature
K.
Definition
WaterStateIAPWSIF97Region1.h:21
MaterialPropertyLib::temperature
@ temperature
Definition
PropertyType.h:90
NumLib::AssemblyException
Definition
Exceptions.h:32
MaterialLib
MPL
Properties
WaterStateIAPWSIF97Region1.h
Generated by
1.14.0