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

#include <TabulatedBicubicFluidPropertiesTest.h>

Inheritance diagram for TabulatedBicubicFluidPropertiesTest:
[legend]

Public Member Functions

 TabulatedBicubicFluidPropertiesTest ()
 

Protected Member Functions

void buildObjects ()
 
T & addObject (const std::string &type, const std::string &name, InputParameters &params)
 

Protected Attributes

const CO2FluidProperties_co2_fp
 
const IdealGasFluidProperties_idg_fp
 
const TabulatedBicubicFluidProperties_tab_pT_from_fp
 
const TabulatedBicubicFluidProperties_tab_ve_from_pT
 
const TabulatedBicubicFluidProperties_tab_gen_fp
 
const TabulatedBicubicFluidProperties_tab_ve_from_fp
 
const TabulatedBicubicFluidProperties_unordered_fp
 
const TabulatedBicubicFluidProperties_unequal_fp
 
const TabulatedBicubicFluidProperties_missing_col_fp
 
const TabulatedBicubicFluidProperties_unknown_col_fp
 
const TabulatedBicubicFluidProperties_missing_data_fp
 
std::unique_ptr< MooseMesh_mesh
 
std::shared_ptr< MooseApp_app
 
Factory_factory
 
std::shared_ptr< FEProblem_fe_problem
 

Detailed Description

Definition at line 17 of file TabulatedBicubicFluidPropertiesTest.h.

Constructor & Destructor Documentation

◆ TabulatedBicubicFluidPropertiesTest()

TabulatedBicubicFluidPropertiesTest::TabulatedBicubicFluidPropertiesTest ( )
inline

Definition at line 20 of file TabulatedBicubicFluidPropertiesTest.h.

20  : MooseObjectUnitTest("FluidPropertiesApp")
21  {
22  buildObjects();
23  }
MooseObjectUnitTest(const std::string &app_name)

Member Function Documentation

◆ buildObjects()

void TabulatedBicubicFluidPropertiesTest::buildObjects ( )
inlineprotected

Definition at line 26 of file TabulatedBicubicFluidPropertiesTest.h.

Referenced by TabulatedBicubicFluidPropertiesTest().

27  {
28  InputParameters co2_uo_params = _factory.getValidParams("CO2FluidProperties");
29  _fe_problem->addUserObject("CO2FluidProperties", "co2_fp", co2_uo_params);
30  _co2_fp = &_fe_problem->getUserObject<CO2FluidProperties>("co2_fp");
31 
32  InputParameters idg_uo_params = _factory.getValidParams("IdealGasFluidProperties");
33  _fe_problem->addUserObject("IdealGasFluidProperties", "idg_fp", idg_uo_params);
34  _idg_fp = &_fe_problem->getUserObject<IdealGasFluidProperties>("idg_fp");
35 
36  InputParameters tab_uo_params = _factory.getValidParams("TabulatedBicubicFluidProperties");
37  tab_uo_params.set<UserObjectName>("fp") = "co2_fp";
38  _fe_problem->addUserObject("TabulatedBicubicFluidProperties", "tab_fp", tab_uo_params);
39  _tab_pT_from_fp = &_fe_problem->getUserObject<TabulatedBicubicFluidProperties>("tab_fp");
40 
41  InputParameters tab_uo_ve_params = _factory.getValidParams("TabulatedBicubicFluidProperties");
42  tab_uo_ve_params.set<bool>("construct_pT_from_ve") = true;
43  tab_uo_ve_params.set<bool>("construct_pT_from_vh") = true;
44  tab_uo_ve_params.set<FileName>("fluid_property_file") = "data/csv/fluid_props.csv";
45  tab_uo_ve_params.set<Real>("T_initial_guess") = 450;
46  tab_uo_ve_params.set<Real>("p_initial_guess") = 1.5e6;
47  MultiMooseEnum properties("density enthalpy internal_energy viscosity k cv cp entropy",
48  "density enthalpy internal_energy viscosity k cv cp entropy");
49  tab_uo_ve_params.set<MultiMooseEnum>("interpolated_properties") = properties;
50  _fe_problem->addUserObject("TabulatedBicubicFluidProperties", "tab_fp_ve", tab_uo_ve_params);
51  _tab_ve_from_pT = &_fe_problem->getUserObject<TabulatedBicubicFluidProperties>("tab_fp_ve");
52 
53  InputParameters tab_gen_uo_params = _factory.getValidParams("TabulatedBicubicFluidProperties");
54  tab_gen_uo_params.set<UserObjectName>("fp") = "co2_fp";
55  tab_gen_uo_params.set<Real>("temperature_min") = 400;
56  tab_gen_uo_params.set<Real>("temperature_max") = 500;
57  tab_gen_uo_params.set<Real>("pressure_min") = 1e6;
58  tab_gen_uo_params.set<Real>("pressure_max") = 2e6;
59  tab_gen_uo_params.set<unsigned int>("num_T") = 6;
60  tab_gen_uo_params.set<unsigned int>("num_p") = 6;
61  tab_gen_uo_params.set<MultiMooseEnum>("interpolated_properties") = properties;
62  _fe_problem->addUserObject("TabulatedBicubicFluidProperties", "tab_gen_fp", tab_gen_uo_params);
63  _tab_gen_fp = &_fe_problem->getUserObject<TabulatedBicubicFluidProperties>("tab_gen_fp");
64 
65  InputParameters tab_direct_ve_params =
66  _factory.getValidParams("TabulatedBicubicFluidProperties");
67  // We use ideal gas as it has more (v,e) support than co2
68  tab_direct_ve_params.set<UserObjectName>("fp") = "idg_fp";
69  tab_direct_ve_params.set<MooseEnum>("out_of_bounds_behavior") = "set_to_closest_bound";
70  tab_direct_ve_params.set<bool>("create_pT_interpolations") = false;
71  tab_direct_ve_params.set<bool>("create_ve_interpolations") = true;
72  tab_direct_ve_params.set<Real>("temperature_min") = 400;
73  tab_direct_ve_params.set<Real>("temperature_max") = 500;
74  tab_direct_ve_params.set<Real>("pressure_min") = 1e6;
75  tab_direct_ve_params.set<Real>("pressure_max") = 2e6;
76  MultiMooseEnum properties_ve(
77  "density enthalpy viscosity k c cv cp entropy pressure temperature",
78  "density enthalpy viscosity k c cv cp entropy pressure temperature");
79  tab_direct_ve_params.set<MultiMooseEnum>("interpolated_properties") = properties_ve;
80  _fe_problem->addUserObject(
81  "TabulatedBicubicFluidProperties", "tab_direct_ve", tab_direct_ve_params);
82  _tab_ve_from_fp = &_fe_problem->getUserObject<TabulatedBicubicFluidProperties>("tab_direct_ve");
83 
84  // To test errors
85  InputParameters unordered_uo_params =
86  _factory.getValidParams("TabulatedBicubicFluidProperties");
87  unordered_uo_params.set<FileName>("fluid_property_file") = "data/csv/unordered_fluid_props.csv";
88  _fe_problem->addUserObject(
89  "TabulatedBicubicFluidProperties", "unordered_fp", unordered_uo_params);
90  _unordered_fp = &_fe_problem->getUserObject<TabulatedBicubicFluidProperties>("unordered_fp");
91 
92  InputParameters unequal_uo_params = _factory.getValidParams("TabulatedBicubicFluidProperties");
93  unequal_uo_params.set<FileName>("fluid_property_file") = "data/csv/unequal_fluid_props.csv";
94  _fe_problem->addUserObject("TabulatedBicubicFluidProperties", "unequal_fp", unequal_uo_params);
95  _unequal_fp = &_fe_problem->getUserObject<TabulatedBicubicFluidProperties>("unequal_fp");
96 
97  InputParameters missing_col_uo_params =
98  _factory.getValidParams("TabulatedBicubicFluidProperties");
99  missing_col_uo_params.set<FileName>("fluid_property_file") =
100  "data/csv/missing_col_fluid_props.csv";
101  _fe_problem->addUserObject(
102  "TabulatedBicubicFluidProperties", "missing_col_fp", missing_col_uo_params);
104  &_fe_problem->getUserObject<TabulatedBicubicFluidProperties>("missing_col_fp");
105 
106  InputParameters unknown_col_uo_params =
107  _factory.getValidParams("TabulatedBicubicFluidProperties");
108  unknown_col_uo_params.set<FileName>("fluid_property_file") = "data/csv/unknown_fluid_props.csv";
109  _fe_problem->addUserObject(
110  "TabulatedBicubicFluidProperties", "unknown_col_fp", unknown_col_uo_params);
112  &_fe_problem->getUserObject<TabulatedBicubicFluidProperties>("unknown_col_fp");
113 
114  InputParameters missing_data_uo_params =
115  _factory.getValidParams("TabulatedBicubicFluidProperties");
116  missing_data_uo_params.set<FileName>("fluid_property_file") =
117  "data/csv/missing_data_fluid_props.csv";
118  _fe_problem->addUserObject(
119  "TabulatedBicubicFluidProperties", "missing_data_fp", missing_data_uo_params);
121  &_fe_problem->getUserObject<TabulatedBicubicFluidProperties>("missing_data_fp");
122  }
std::shared_ptr< FEProblem > _fe_problem
const TabulatedBicubicFluidProperties * _tab_ve_from_pT
const TabulatedBicubicFluidProperties * _unknown_col_fp
CO2 fluid properties Most thermophysical properties taken from: Span and Wagner, "A New Equation of S...
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
const TabulatedBicubicFluidProperties * _tab_pT_from_fp
const TabulatedBicubicFluidProperties * _tab_ve_from_fp
const TabulatedBicubicFluidProperties * _tab_gen_fp
const TabulatedBicubicFluidProperties * _unequal_fp
Class for fluid properties read from a file.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const TabulatedBicubicFluidProperties * _missing_col_fp
const TabulatedBicubicFluidProperties * _unordered_fp
Ideal gas fluid properties Default parameters are for air at atmospheric pressure and temperature...
const TabulatedBicubicFluidProperties * _missing_data_fp

Member Data Documentation

◆ _co2_fp

const CO2FluidProperties* TabulatedBicubicFluidPropertiesTest::_co2_fp
protected

Definition at line 125 of file TabulatedBicubicFluidPropertiesTest.h.

Referenced by buildObjects().

◆ _idg_fp

const IdealGasFluidProperties* TabulatedBicubicFluidPropertiesTest::_idg_fp
protected

Definition at line 126 of file TabulatedBicubicFluidPropertiesTest.h.

Referenced by buildObjects().

◆ _missing_col_fp

const TabulatedBicubicFluidProperties* TabulatedBicubicFluidPropertiesTest::_missing_col_fp
protected

Definition at line 137 of file TabulatedBicubicFluidPropertiesTest.h.

Referenced by buildObjects().

◆ _missing_data_fp

const TabulatedBicubicFluidProperties* TabulatedBicubicFluidPropertiesTest::_missing_data_fp
protected

Definition at line 139 of file TabulatedBicubicFluidPropertiesTest.h.

Referenced by buildObjects().

◆ _tab_gen_fp

const TabulatedBicubicFluidProperties* TabulatedBicubicFluidPropertiesTest::_tab_gen_fp
protected

Definition at line 131 of file TabulatedBicubicFluidPropertiesTest.h.

Referenced by buildObjects().

◆ _tab_pT_from_fp

const TabulatedBicubicFluidProperties* TabulatedBicubicFluidPropertiesTest::_tab_pT_from_fp
protected

Definition at line 129 of file TabulatedBicubicFluidPropertiesTest.h.

Referenced by buildObjects().

◆ _tab_ve_from_fp

const TabulatedBicubicFluidProperties* TabulatedBicubicFluidPropertiesTest::_tab_ve_from_fp
protected

Definition at line 132 of file TabulatedBicubicFluidPropertiesTest.h.

Referenced by buildObjects().

◆ _tab_ve_from_pT

const TabulatedBicubicFluidProperties* TabulatedBicubicFluidPropertiesTest::_tab_ve_from_pT
protected

Definition at line 130 of file TabulatedBicubicFluidPropertiesTest.h.

Referenced by buildObjects().

◆ _unequal_fp

const TabulatedBicubicFluidProperties* TabulatedBicubicFluidPropertiesTest::_unequal_fp
protected

Definition at line 136 of file TabulatedBicubicFluidPropertiesTest.h.

Referenced by buildObjects().

◆ _unknown_col_fp

const TabulatedBicubicFluidProperties* TabulatedBicubicFluidPropertiesTest::_unknown_col_fp
protected

Definition at line 138 of file TabulatedBicubicFluidPropertiesTest.h.

Referenced by buildObjects().

◆ _unordered_fp

const TabulatedBicubicFluidProperties* TabulatedBicubicFluidPropertiesTest::_unordered_fp
protected

Definition at line 135 of file TabulatedBicubicFluidPropertiesTest.h.

Referenced by buildObjects().


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