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

#include <TemperaturePressureFunctionFluidPropertiesTest.h>

Inheritance diagram for TemperaturePressureFunctionFluidPropertiesTest:
[legend]

Public Member Functions

 TemperaturePressureFunctionFluidPropertiesTest ()
 

Protected Member Functions

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

Protected Attributes

TemperaturePressureFunctionFluidProperties_fp
 
TemperaturePressureFunctionFluidProperties_fp_cp
 
std::unique_ptr< MooseMesh_mesh
 
std::shared_ptr< MooseApp_app
 
Factory_factory
 
std::shared_ptr< FEProblem_fe_problem
 

Detailed Description

Definition at line 16 of file TemperaturePressureFunctionFluidPropertiesTest.h.

Constructor & Destructor Documentation

◆ TemperaturePressureFunctionFluidPropertiesTest()

TemperaturePressureFunctionFluidPropertiesTest::TemperaturePressureFunctionFluidPropertiesTest ( )
inline

Definition at line 19 of file TemperaturePressureFunctionFluidPropertiesTest.h.

19  : MooseObjectUnitTest("FluidPropertiesApp")
20  {
21  InputParameters params = _factory.getValidParams("ParsedFunction");
22  params.set<std::string>("_object_name") = "k_function";
23  params.set<FEProblem *>("_fe_problem") = _fe_problem.get();
24  params.set<FEProblemBase *>("_fe_problem_base") = _fe_problem.get();
25  params.set<SubProblem *>("_subproblem") = _fe_problem.get();
26  params.set<std::string>("expression") = "14 + 2e-2 * x + 3e-5 * y";
27  params.set<std::string>("_type") = "MooseParsedFunction";
28  _fe_problem->addFunction("ParsedFunction", "k_function", params);
29 
30  params.set<std::string>("expression") = "1400 + 2.5 * x + 32e-5 * y";
31  params.set<std::string>("_object_name") = "rho_function";
32  _fe_problem->addFunction("ParsedFunction", "rho_function", params);
33 
34  params.set<std::string>("expression") = "1e-3 + 1e-5 * x - 3e-9 * y";
35  params.set<std::string>("_object_name") = "mu_function";
36  _fe_problem->addFunction("ParsedFunction", "mu_function", params);
37 
38  params.set<std::string>("expression") = "3000. + 3*x + 5e-4*y";
39  params.set<std::string>("_object_name") = "cp_function";
40  _fe_problem->addFunction("ParsedFunction", "cp_function", params);
41 
42  _fe_problem->getFunction("k_function").initialSetup();
43  _fe_problem->getFunction("rho_function").initialSetup();
44  _fe_problem->getFunction("mu_function").initialSetup();
45  _fe_problem->getFunction("cp_function").initialSetup();
46 
47  buildObjects();
48  }
std::shared_ptr< FEProblem > _fe_problem
MooseObjectUnitTest(const std::string &app_name)
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const

Member Function Documentation

◆ buildObjects()

void TemperaturePressureFunctionFluidPropertiesTest::buildObjects ( )
inlineprotected

Definition at line 51 of file TemperaturePressureFunctionFluidPropertiesTest.h.

Referenced by TemperaturePressureFunctionFluidPropertiesTest().

52  {
53  InputParameters uo_params =
54  _factory.getValidParams("TemperaturePressureFunctionFluidProperties");
55  // Set the three functions and the specific isobaric heat capacity
56  uo_params.set<FunctionName>("k") = "k_function";
57  uo_params.set<FunctionName>("rho") = "rho_function";
58  uo_params.set<FunctionName>("mu") = "mu_function";
59  uo_params.set<Real>("cv") = 4186;
60 
61  _fe_problem->addUserObject("TemperaturePressureFunctionFluidProperties", "fp", uo_params);
63 
64  InputParameters uo_params2 =
65  _factory.getValidParams("TemperaturePressureFunctionFluidProperties");
66  // Set the three functions and the specific heat capacity
67  uo_params2.set<FunctionName>("k") = "k_function";
68  uo_params2.set<FunctionName>("rho") = "rho_function";
69  uo_params2.set<FunctionName>("mu") = "mu_function";
70  uo_params2.set<FunctionName>("cp") = "cp_function";
71  uo_params2.set<Real>("T_initial_guess") = 250;
72  uo_params2.set<Real>("p_initial_guess") = 1e7;
73  uo_params2.set<Real>("dT_integration_intervals") = 0.01;
74 
75  _fe_problem->addUserObject("TemperaturePressureFunctionFluidProperties", "fp_cp", uo_params2);
77  }
std::shared_ptr< FEProblem > _fe_problem
T & set(const std::string &name, bool quiet_mode=false)
Fluid properties provided as multiple-variable functions of temperature and pressure.
InputParameters getValidParams(const std::string &name) const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

Member Data Documentation

◆ _fp

TemperaturePressureFunctionFluidProperties* TemperaturePressureFunctionFluidPropertiesTest::_fp
protected

Definition at line 79 of file TemperaturePressureFunctionFluidPropertiesTest.h.

Referenced by buildObjects().

◆ _fp_cp

TemperaturePressureFunctionFluidProperties* TemperaturePressureFunctionFluidPropertiesTest::_fp_cp
protected

Definition at line 80 of file TemperaturePressureFunctionFluidPropertiesTest.h.

Referenced by buildObjects().


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