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

#include <ADFluidPropsTest.h>

Inheritance diagram for ADFluidPropsTest:
[legend]

Public Member Functions

 ADFluidPropsTest ()
 

Protected Member Functions

const SinglePhaseFluidPropertiesbuildObj (const std::string name="fp", bool allow_imperfect_jac=false)
 
const TwoPhaseFluidPropertiesbuildTwoPhaseFluidProperties ()
 
void buildObjects ()
 
T & addObject (const std::string &type, const std::string &name, InputParameters &params)
 

Protected Attributes

const SinglePhaseFluidProperties_fp
 
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 ADFluidPropsTest.h.

Constructor & Destructor Documentation

◆ ADFluidPropsTest()

ADFluidPropsTest::ADFluidPropsTest ( )
inline

Definition at line 19 of file ADFluidPropsTest.h.

19 : MooseObjectUnitTest("FluidPropertiesApp") { buildObj(); }
MooseObjectUnitTest(const std::string &app_name)
const SinglePhaseFluidProperties & buildObj(const std::string name="fp", bool allow_imperfect_jac=false)

Member Function Documentation

◆ buildObj()

const SinglePhaseFluidProperties& ADFluidPropsTest::buildObj ( const std::string  name = "fp",
bool  allow_imperfect_jac = false 
)
inlineprotected

Definition at line 22 of file ADFluidPropsTest.h.

Referenced by ADFluidPropsTest().

24  {
25  InputParameters uo_pars = _factory.getValidParams("IdealGasFluidProperties");
26  uo_pars.set<Real>("molar_mass") = 0.028966206103678928;
27  uo_pars.set<Real>("gamma") = 1.41;
28  uo_pars.set<bool>("allow_imperfect_jacobians") = allow_imperfect_jac;
29  _fe_problem->addUserObject("IdealGasFluidProperties", name, uo_pars);
30  _fp = &_fe_problem->getUserObject<IdealGasFluidProperties>(name);
31  return *_fp;
32  }
std::shared_ptr< FEProblem > _fe_problem
const SinglePhaseFluidProperties * _fp
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
const std::string name
Definition: Setup.h:20
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Ideal gas fluid properties Default parameters are for air at atmospheric pressure and temperature...

◆ buildTwoPhaseFluidProperties()

const TwoPhaseFluidProperties& ADFluidPropsTest::buildTwoPhaseFluidProperties ( )
inlineprotected

Definition at line 34 of file ADFluidPropsTest.h.

35  {
36  {
37  const std::string class_name = "StiffenedGasTwoPhaseFluidProperties";
38  const UserObjectName fp_2phase_name = "fp_2phase";
39  InputParameters params = _factory.getValidParams(class_name);
40  _fe_problem->addUserObject(class_name, fp_2phase_name, params);
41  return _fe_problem->getUserObject<TwoPhaseFluidProperties>(fp_2phase_name);
42  }
43  }
std::shared_ptr< FEProblem > _fe_problem
InputParameters getValidParams(const std::string &name) const
Base class for fluid properties used with two-phase flow.

Member Data Documentation

◆ _fp

const SinglePhaseFluidProperties* ADFluidPropsTest::_fp
protected

Definition at line 45 of file ADFluidPropsTest.h.

Referenced by buildObj().


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