https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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 ()
 
TaddObject (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_pT_from_fp_idg
 
const TabulatedBicubicFluidProperties_tab_ve_from_pT
 
const TabulatedBicubicFluidProperties_tab_pT_from_fp_gen
 
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

Member Function Documentation

◆ buildObjects()

void TabulatedBicubicFluidPropertiesTest::buildObjects ( )
inlineprotected

Definition at line 26 of file TabulatedBicubicFluidPropertiesTest.h.

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

Referenced by TabulatedBicubicFluidPropertiesTest().

Member Data Documentation

◆ _co2_fp

const CO2FluidProperties* TabulatedBicubicFluidPropertiesTest::_co2_fp
protected

Definition at line 148 of file TabulatedBicubicFluidPropertiesTest.h.

Referenced by buildObjects().

◆ _idg_fp

const IdealGasFluidProperties* TabulatedBicubicFluidPropertiesTest::_idg_fp
protected

Definition at line 149 of file TabulatedBicubicFluidPropertiesTest.h.

Referenced by buildObjects().

◆ _missing_col_fp

const TabulatedBicubicFluidProperties* TabulatedBicubicFluidPropertiesTest::_missing_col_fp
protected

Definition at line 161 of file TabulatedBicubicFluidPropertiesTest.h.

Referenced by buildObjects().

◆ _missing_data_fp

const TabulatedBicubicFluidProperties* TabulatedBicubicFluidPropertiesTest::_missing_data_fp
protected

Definition at line 163 of file TabulatedBicubicFluidPropertiesTest.h.

Referenced by buildObjects().

◆ _tab_pT_from_fp

const TabulatedBicubicFluidProperties* TabulatedBicubicFluidPropertiesTest::_tab_pT_from_fp
protected

Definition at line 152 of file TabulatedBicubicFluidPropertiesTest.h.

Referenced by buildObjects().

◆ _tab_pT_from_fp_gen

const TabulatedBicubicFluidProperties* TabulatedBicubicFluidPropertiesTest::_tab_pT_from_fp_gen
protected

Definition at line 155 of file TabulatedBicubicFluidPropertiesTest.h.

Referenced by buildObjects().

◆ _tab_pT_from_fp_idg

const TabulatedBicubicFluidProperties* TabulatedBicubicFluidPropertiesTest::_tab_pT_from_fp_idg
protected

Definition at line 153 of file TabulatedBicubicFluidPropertiesTest.h.

Referenced by buildObjects().

◆ _tab_ve_from_fp

const TabulatedBicubicFluidProperties* TabulatedBicubicFluidPropertiesTest::_tab_ve_from_fp
protected

Definition at line 156 of file TabulatedBicubicFluidPropertiesTest.h.

Referenced by buildObjects().

◆ _tab_ve_from_pT

const TabulatedBicubicFluidProperties* TabulatedBicubicFluidPropertiesTest::_tab_ve_from_pT
protected

Definition at line 154 of file TabulatedBicubicFluidPropertiesTest.h.

Referenced by buildObjects().

◆ _unequal_fp

const TabulatedBicubicFluidProperties* TabulatedBicubicFluidPropertiesTest::_unequal_fp
protected

Definition at line 160 of file TabulatedBicubicFluidPropertiesTest.h.

Referenced by buildObjects().

◆ _unknown_col_fp

const TabulatedBicubicFluidProperties* TabulatedBicubicFluidPropertiesTest::_unknown_col_fp
protected

Definition at line 162 of file TabulatedBicubicFluidPropertiesTest.h.

Referenced by buildObjects().

◆ _unordered_fp

const TabulatedBicubicFluidProperties* TabulatedBicubicFluidPropertiesTest::_unordered_fp
protected

Definition at line 159 of file TabulatedBicubicFluidPropertiesTest.h.

Referenced by buildObjects().


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