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

#include <ThermalFunctionSolidPropertiesTest.h>

Inheritance diagram for ThermalFunctionSolidPropertiesTest:
[legend]

Public Member Functions

 ThermalFunctionSolidPropertiesTest ()
 

Protected Member Functions

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

Protected Attributes

const ThermalFunctionSolidProperties_sp
 
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 ThermalFunctionSolidPropertiesTest.h.

Constructor & Destructor Documentation

◆ ThermalFunctionSolidPropertiesTest()

ThermalFunctionSolidPropertiesTest::ThermalFunctionSolidPropertiesTest ( )
inline

Definition at line 19 of file ThermalFunctionSolidPropertiesTest.h.

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

Member Function Documentation

◆ buildObjects()

void ThermalFunctionSolidPropertiesTest::buildObjects ( )
inlineprotected

Definition at line 25 of file ThermalFunctionSolidPropertiesTest.h.

Referenced by ThermalFunctionSolidPropertiesTest().

26  {
27  InputParameters rho_pars = _factory.getValidParams("ParsedFunction");
28  rho_pars.set<std::string>("value") = "100.0+t";
29  _fe_problem->addFunction("ParsedFunction", "rho", rho_pars);
30  Function & rho = _fe_problem->getFunction("rho");
31  rho.initialSetup();
32 
33  InputParameters cp_pars = _factory.getValidParams("PiecewiseLinear");
34  cp_pars.set<std::vector<Real>>("x") = {700.0, 900.0};
35  cp_pars.set<std::vector<Real>>("y") = {1000.0, 1400.0};
36  _fe_problem->addFunction("PiecewiseLinear", "cp", cp_pars);
37  Function & cp = _fe_problem->getFunction("cp");
38  cp.initialSetup();
39 
40  InputParameters k_pars = _factory.getValidParams("ParsedFunction");
41  k_pars.set<std::string>("value") = "12.1+1.e-6*t*t*t+2.0e-4*t*t-0.5*t";
42  _fe_problem->addFunction("ParsedFunction", "k", k_pars);
43  Function & k = _fe_problem->getFunction("k");
44  k.initialSetup();
45 
46  InputParameters uo_pars = _factory.getValidParams("ThermalFunctionSolidProperties");
47  uo_pars.set<FunctionName>("rho") = "rho";
48  uo_pars.set<FunctionName>("cp") = "cp";
49  uo_pars.set<FunctionName>("k") = "k";
50  _fe_problem->addUserObject("ThermalFunctionSolidProperties", "sp", uo_pars);
51  _sp = &_fe_problem->getUserObject<ThermalFunctionSolidProperties>("sp");
52  }
std::shared_ptr< FEProblem > _fe_problem
Thermal material properties as a function of temperature from function inputs.
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
static const std::string cp
Definition: NS.h:121
const ThermalFunctionSolidProperties * _sp
virtual void initialSetup()
static const std::string k
Definition: NS.h:130

Member Data Documentation

◆ _sp

const ThermalFunctionSolidProperties* ThermalFunctionSolidPropertiesTest::_sp
protected

Definition at line 54 of file ThermalFunctionSolidPropertiesTest.h.

Referenced by buildObjects().


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