https://mooseframework.inl.gov
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
FlowModelGasMixUtilsTest Class Reference

Tests FlowModelGasMixUtils. More...

#include <FlowModelGasMixUtilsTest.h>

Inheritance diagram for FlowModelGasMixUtilsTest:
[legend]

Public Member Functions

 FlowModelGasMixUtilsTest ()
 

Protected Member Functions

void addFluidProperties ()
 Adds fluid properties objects needed for testing. More...
 
void buildObjects ()
 
T & addObject (const std::string &type, const std::string &name, InputParameters &params)
 

Protected Attributes

const IdealGasMixtureFluidProperties_fp_mix
 Fluid properties user object. More...
 
std::unique_ptr< MooseMesh_mesh
 
std::shared_ptr< MooseApp_app
 
Factory_factory
 
std::shared_ptr< FEProblem_fe_problem
 

Detailed Description

Tests FlowModelGasMixUtils.

Definition at line 19 of file FlowModelGasMixUtilsTest.h.

Constructor & Destructor Documentation

◆ FlowModelGasMixUtilsTest()

FlowModelGasMixUtilsTest::FlowModelGasMixUtilsTest ( )

Definition at line 19 of file FlowModelGasMixUtilsTest.C.

19  : MooseObjectUnitTest("ThermalHydraulicsApp")
20 {
22 }
MooseObjectUnitTest(const std::string &app_name)
void addFluidProperties()
Adds fluid properties objects needed for testing.

Member Function Documentation

◆ addFluidProperties()

void FlowModelGasMixUtilsTest::addFluidProperties ( )
protected

Adds fluid properties objects needed for testing.

Definition at line 25 of file FlowModelGasMixUtilsTest.C.

Referenced by FlowModelGasMixUtilsTest().

26 {
27  const std::string fp_steam_name = "fp_steam";
28  const std::string fp_nitrogen_name = "fp_nitrogen";
29  const std::string fp_mix_name = "fp_mix";
30 
31  // steam fluid properties; parameters correspond to T in range 298 K to 473 K
32  {
33  const std::string class_name = "IdealGasFluidProperties";
34  InputParameters params = _factory.getValidParams(class_name);
35  params.set<Real>("gamma") = 1.43;
36  params.set<Real>("molar_mass") = 0.01801488;
37  params.set<Real>("mu") = 0.000013277592; // at 400 K and 1.e5 Pa
38  params.set<Real>("k") = 0.026824977826; // at 400 K and 1.e5 Pa
39  _fe_problem->addUserObject(class_name, fp_steam_name, params);
40  }
41 
42  // nitrogen fluid properties
43  {
44  const std::string class_name = "IdealGasFluidProperties";
45  InputParameters params = _factory.getValidParams(class_name);
46  params.set<Real>("gamma") = 1.4;
47  params.set<Real>("molar_mass") = 0.028012734746133888;
48  params.set<Real>("mu") = 0.0000222084; // at 400 K and 1.e5 Pa
49  params.set<Real>("k") = 0.032806168; // at 400 K and 1.e5 Pa
50  _fe_problem->addUserObject(class_name, fp_nitrogen_name, params);
51  }
52 
53  // mixture fluid properties
54  {
55  const std::string class_name = "IdealGasMixtureFluidProperties";
56  InputParameters params = _factory.getValidParams(class_name);
57  params.set<std::vector<UserObjectName>>("component_fluid_properties") = {fp_steam_name,
58  fp_nitrogen_name};
59  _fe_problem->addUserObject(class_name, fp_mix_name, params);
60  _fp_mix = &_fe_problem->getUserObject<IdealGasMixtureFluidProperties>(fp_mix_name);
61  }
62 }
std::shared_ptr< FEProblem > _fe_problem
T & set(const std::string &name, bool quiet_mode=false)
const IdealGasMixtureFluidProperties * _fp_mix
Fluid properties user object.
InputParameters getValidParams(const std::string &name) const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Class for fluid properties of an ideal gas mixture.

Member Data Documentation

◆ _fp_mix

const IdealGasMixtureFluidProperties* FlowModelGasMixUtilsTest::_fp_mix
protected

Fluid properties user object.

Definition at line 31 of file FlowModelGasMixUtilsTest.h.

Referenced by addFluidProperties().


The documentation for this class was generated from the following files: