OGS
ProcessLib::TES Namespace Reference

Classes

struct  AssemblyParams
 
struct  FluidHeatConductivityH2O
 
struct  FluidHeatConductivityN2
 
struct  FluidViscosityH2O
 
struct  FluidViscosityN2
 
struct  ReactionRate
 
class  TESFEMReactionAdaptor
 
class  TESFEMReactionAdaptorAdsorption
 
class  TESFEMReactionAdaptorCaOH2
 
class  TESFEMReactionAdaptorInert
 
class  TESFEMReactionAdaptorSinusoidal
 
class  TESLocalAssembler
 
struct  TESLocalAssemblerData
 
class  TESLocalAssemblerInner
 
class  TESLocalAssemblerInterface
 
class  TESProcess
 

Functions

std::unique_ptr< ProcesscreateTESProcess (std::string const &name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, unsigned const integration_order, BaseLib::ConfigTree const &config)
 
double fluid_density (const double p, const double T, const double x)
 
template<int i>
double mypow (const double x)
 
template<>
double mypow< 0 > (const double)
 
double fluid_viscosity (const double p, const double T, const double x)
 
double fluid_heat_conductivity (const double p, const double T, const double x)
 

Variables

const unsigned NODAL_DOF = 3
 
const unsigned COMPONENT_ID_PRESSURE = 0
 
const unsigned COMPONENT_ID_TEMPERATURE = 1
 
const unsigned COMPONENT_ID_MASS_FRACTION = 2
 
const double M_N2 = 0.028013
 
const double M_H2O = 0.018016
 

Function Documentation

◆ createTESProcess()

std::unique_ptr< Process > ProcessLib::TES::createTESProcess ( std::string const & name,
MeshLib::Mesh & mesh,
std::unique_ptr< ProcessLib::AbstractJacobianAssembler > && jacobian_assembler,
std::vector< ProcessVariable > const & variables,
std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const & parameters,
unsigned const integration_order,
BaseLib::ConfigTree const & config )
Input File Parameter
prj__processes__process__type

Process Variables

Input File Parameter
prj__processes__process__TES__process_variables

Primary process variables as they appear in the global component vector:

Input File Parameter
prj__processes__process__TES__process_variables__fluid_pressure
Input File Parameter
prj__processes__process__TES__process_variables__temperature
Input File Parameter
prj__processes__process__TES__process_variables__vapour_mass_fraction

Definition at line 21 of file CreateTESProcess.cpp.

29{
31 config.checkConfigParameter("type", "TES");
32
33 DBUG("Create TESProcess.");
34
36
38 auto const pv_config = config.getConfigSubtree("process_variables");
39
41 auto per_process_variables = findProcessVariables(
42 variables, pv_config,
43 {
44 "fluid_pressure",
46 "temperature",
48 "vapour_mass_fraction"});
49 std::vector<std::vector<std::reference_wrapper<ProcessVariable>>>
50 process_variables;
51 process_variables.push_back(std::move(per_process_variables));
52
53 SecondaryVariableCollection secondary_variables;
54
55 ProcessLib::createSecondaryVariables(config, secondary_variables);
56
57 return std::make_unique<TESProcess>(
58 std::move(name), mesh, std::move(jacobian_assembler), parameters,
59 integration_order, std::move(process_variables),
60 std::move(secondary_variables), config);
61}
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:30
Handles configuration of several secondary variables from the project file.
std::vector< std::reference_wrapper< ProcessVariable > > findProcessVariables(std::vector< ProcessVariable > const &variables, BaseLib::ConfigTree const &pv_config, std::initializer_list< std::string > tags)
void createSecondaryVariables(BaseLib::ConfigTree const &config, SecondaryVariableCollection &secondary_variables)

References BaseLib::ConfigTree::checkConfigParameter(), ProcessLib::createSecondaryVariables(), DBUG(), ProcessLib::findProcessVariables(), and BaseLib::ConfigTree::getConfigSubtree().

Referenced by ProjectData::parseProcesses().

◆ fluid_density()

double ProcessLib::TES::fluid_density ( const double p,
const double T,
const double x )
inline

Definition at line 19 of file TESOGS5MaterialModels.h.

20{
21 // OGS-5 density model 26
22
25
26 const double xn = M0 * x / (M0 * x + M1 * (1.0 - x));
27
29 (M1 * xn + M0 * (1.0 - xn));
30 ;
31}

References MaterialLib::PhysicalConstant::IdealGasConstant, MaterialLib::PhysicalConstant::MolarMass::N2, and MaterialLib::PhysicalConstant::MolarMass::Water.

Referenced by ProcessLib::TES::TESLocalAssemblerInner< Traits >::preEachAssembleIntegrationPoint().

◆ fluid_heat_conductivity()

double ProcessLib::TES::fluid_heat_conductivity ( const double p,
const double T,
const double x )
inline

Definition at line 372 of file TESOGS5MaterialModels.h.

375{
376 // OGS 5 fluid heat conductivity model 11
377
381
382 // TODO [CL] max() is redundant if the fraction is guaranteed to be between
383 // 0 and 1.
384 // reactive component
385 const double x0 = std::max(M0 * x / (M0 * x + M1 * (1.0 - x)),
386 0.); // convert mass to mole fraction
387 const double k0 = FluidHeatConductivityH2O::get(M1 * p / (R * T), T);
388 // inert component
389 const double x1 = 1.0 - x0;
390 const double k1 = FluidHeatConductivityN2::get(M0 * p / (R * T), T);
391
392 const double M1_over_M2 = M1 / M0; // reactive over inert
393 const double V1_over_V2 = FluidViscosityH2O::get(M1 * p / (R * T), T) /
394 FluidViscosityN2::get(M0 * p / (R * T), T);
395 const double L1_over_L2 = V1_over_V2 / M1_over_M2;
396
397 const double M12_pow_mquarter = std::pow(M1_over_M2, -0.25);
398 const double phi_12 = (1.0 + std::sqrt(L1_over_L2) * M12_pow_mquarter) *
399 (1.0 + std::sqrt(V1_over_V2) * M12_pow_mquarter) /
400 std::sqrt(8.0 * (1.0 + M1_over_M2));
401 const double phi_21 = phi_12 * M1_over_M2 / V1_over_V2;
402
403 return k0 * x0 / (x0 + x1 * phi_12) + k1 * x1 / (x1 + x0 * phi_21);
404}

References ProcessLib::TES::FluidViscosityN2::get(), ProcessLib::TES::FluidViscosityH2O::get(), ProcessLib::TES::FluidHeatConductivityN2::get(), ProcessLib::TES::FluidHeatConductivityH2O::get(), MaterialLib::PhysicalConstant::IdealGasConstant, MaterialLib::PhysicalConstant::MolarMass::N2, and MaterialLib::PhysicalConstant::MolarMass::Water.

Referenced by ProcessLib::TES::TESLocalAssemblerInner< Traits >::getLaplaceCoeffMatrix().

◆ fluid_viscosity()

double ProcessLib::TES::fluid_viscosity ( const double p,
const double T,
const double x )
inline

Definition at line 184 of file TESOGS5MaterialModels.h.

185{
186 // OGS 5 viscosity model 26
187
191
192 // reactive component
193 const double x0 =
194 M0 * x / (M0 * x + M1 * (1.0 - x)); // mass in mole fraction
195 const double V0 = FluidViscosityH2O::get(M1 * p / (R * T), T);
196 // inert component
197 const double x1 = 1.0 - x0;
198 const double V1 = FluidViscosityN2::get(M0 * p / (R * T), T);
199
200 const double M0_over_M1(M1 / M0); // reactive over inert
201 const double V0_over_V1(V0 / V1);
202
203 const double phi_12 = mypow<2>(1.0 + std::sqrt(V0_over_V1) *
204 std::pow(1.0 / M0_over_M1, 0.25)) /
205 std::sqrt(8.0 * (1.0 + M0_over_M1));
206
207 const double phi_21 = phi_12 * M0_over_M1 / V0_over_V1;
208
209 return V0 * x0 / (x0 + x1 * phi_12) + V1 * x1 / (x1 + x0 * phi_21);
210}

References ProcessLib::TES::FluidViscosityN2::get(), ProcessLib::TES::FluidViscosityH2O::get(), MaterialLib::PhysicalConstant::IdealGasConstant, MaterialLib::PhysicalConstant::MolarMass::N2, and MaterialLib::PhysicalConstant::MolarMass::Water.

Referenced by ProcessLib::TES::TESLocalAssembler< ShapeFunction_, GlobalDim >::getIntPtDarcyVelocity(), and ProcessLib::TES::TESLocalAssemblerInner< Traits >::getLaplaceCoeffMatrix().

◆ mypow()

template<int i>
double ProcessLib::TES::mypow ( const double x)

Definition at line 34 of file TESOGS5MaterialModels.h.

35{
36 if (i < 0)
37 {
38 return 1.0 / mypow<-i>(x);
39 }
40
41 const double p = mypow<(i >> 1)>(x);
42 return (i & 1) ? p * p * x : p * p;
43}
double mypow(const double x)

References mypow().

Referenced by ProcessLib::TES::FluidHeatConductivityN2::loop1_term(), ProcessLib::TES::FluidViscosityN2::loop2_term(), and mypow().

◆ mypow< 0 >()

template<>
double ProcessLib::TES::mypow< 0 > ( const double )
inline

Definition at line 46 of file TESOGS5MaterialModels.h.

47{
48 return 1.0;
49}

Referenced by ProcessLib::TES::FluidViscosityH2O::get(), and ProcessLib::TES::FluidViscosityH2O::inner_loop().

Variable Documentation

◆ COMPONENT_ID_MASS_FRACTION

◆ COMPONENT_ID_PRESSURE

◆ COMPONENT_ID_TEMPERATURE

const unsigned ProcessLib::TES::COMPONENT_ID_TEMPERATURE = 1

◆ M_H2O

const double ProcessLib::TES::M_H2O = 0.018016

Definition at line 30 of file TESAssemblyParams.h.

◆ M_N2

const double ProcessLib::TES::M_N2 = 0.028013

Definition at line 29 of file TESAssemblyParams.h.

◆ NODAL_DOF