OGS
MaterialPropertyLib::IAPWSIF97Region1 Namespace Reference

Functions

void checkStateInRange (double const pressure, double const temperature, std::string_view const quantity)

Variables

constexpr double maximum_pressure = 100e6
 Pa.
constexpr double maximum_temperature = 623.15
 K.

Function Documentation

◆ checkStateInRange()

void MaterialPropertyLib::IAPWSIF97Region1::checkStateInRange ( double const pressure,
double const temperature,
std::string_view const quantity )
inline

Aborts the assembly if the state lies outside the region 1 range, that is outside the compressed liquid the region 1 correlations describe. Like the region 4 correlations, they are extrapolated beyond their range without saying so, and a caller that reaches this check has already established that no saturation state exists at this pressure, so there is nothing left to fall back on.

The state follows the solution iterate, so an AssemblyException lets the time stepper repeat the step with a smaller step size. A section that is genuinely at such a state is not one this process can describe: it has no region 2 or region 3 properties.

Parameters
pressurethe pressure to check, in Pa.
temperaturethe temperature to check, in K.
quantitywhat is being evaluated, named in the message.

Definition at line 37 of file WaterStateIAPWSIF97Region1.h.

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 {}.",
47 quantity));
48 }
49}

References maximum_pressure, maximum_temperature, and MaterialPropertyLib::temperature.

Referenced by ProcessLib::WellboreCompensateNeumannBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim >::assemble(), and ProcessLib::WellboreSimulator::WellboreSimulatorFEM< ShapeFunction, GlobalDim >::assemble().

Variable Documentation

◆ maximum_pressure

double MaterialPropertyLib::IAPWSIF97Region1::maximum_pressure = 100e6
constexpr

Pa.

Upper bound of the pressure range of region 1, see http://www.iapws.org/relguide/IF97-Rev.pdf p.5, section 4.

Definition at line 16 of file WaterStateIAPWSIF97Region1.h.

Referenced by checkStateInRange().

◆ maximum_temperature

double MaterialPropertyLib::IAPWSIF97Region1::maximum_temperature = 623.15
constexpr

K.

Upper bound of the temperature range of region 1. Above it the formulation describes region 3 rather than the compressed liquid, see http://www.iapws.org/relguide/IF97-Rev.pdf p.5, section 4.

Definition at line 21 of file WaterStateIAPWSIF97Region1.h.

Referenced by checkStateInRange().