https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ADFluidPropsTest.h
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10#pragma once
11
12#include "MooseObjectUnitTest.h"
15
17{
18public:
19 ADFluidPropsTest() : MooseObjectUnitTest("FluidPropertiesApp") { buildObj(); }
20
21protected:
22 const SinglePhaseFluidProperties & buildObj(const std::string name = "fp",
23 bool allow_imperfect_jac = false)
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);
31 return *_fp;
32 }
33
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 }
44
46};
const std::string name
Definition Setup.h:21
const SinglePhaseFluidProperties * _fp
const TwoPhaseFluidProperties & buildTwoPhaseFluidProperties()
const SinglePhaseFluidProperties & buildObj(const std::string name="fp", bool allow_imperfect_jac=false)
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
Common class for single phase fluid properties.
Base class for fluid properties used with two-phase flow.
const T & getUserObject(const std::string &param_name, bool is_dependency=true) const