https://mooseframework.inl.gov
IdealGasMixtureFluidPropertiesTest.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 {
18 public:
20  {
21  buildObjects();
22  }
23 
24 protected:
25  void buildObjects()
26  {
27  const std::string fp_steam_name = "fp_steam";
28  const std::string fp_nitrogen_name = "fp_nitrogen";
29  const std::string fp_mix_name = "fp_mix";
30 
31  // steam; parameters correspond to T in range 298 K to 473 K
32  {
33  const std::string class_name = "IdealGasFluidProperties";
34  InputParameters params = _factory.getValidParams(class_name);
35  params.set<Real>("gamma") = 1.43;
36  params.set<Real>("molar_mass") = 0.01801488;
37  params.set<Real>("e_ref") = 2030e3;
38  params.set<Real>("mu") = 0.000013277592; // at 400 K and 1.e5 Pa
39  params.set<Real>("k") = 0.026824977826; // at 400 K and 1.e5 Pa
40  _fe_problem->addUserObject(class_name, fp_steam_name, params);
41  _fp_steam = &_fe_problem->getUserObject<IdealGasFluidProperties>(fp_steam_name);
42  }
43 
44  // nitrogen
45  {
46  const std::string class_name = "IdealGasFluidProperties";
47  InputParameters params = _factory.getValidParams(class_name);
48  params.set<Real>("gamma") = 1.4;
49  params.set<Real>("molar_mass") = 0.028012734746133888;
50  params.set<Real>("e_ref") = 1500e3;
51  params.set<Real>("mu") = 0.0000222084; // at 400 K and 1.e5 Pa
52  params.set<Real>("k") = 0.032806168; // at 400 K and 1.e5 Pa
53  _fe_problem->addUserObject(class_name, fp_nitrogen_name, params);
54  _fp_nitrogen = &_fe_problem->getUserObject<IdealGasFluidProperties>(fp_nitrogen_name);
55  }
56 
57  // mixture
58  {
59  const std::string class_name = "IdealGasMixtureFluidProperties";
60  InputParameters params = _factory.getValidParams(class_name);
61  params.set<std::vector<UserObjectName>>("component_fluid_properties") = {fp_steam_name, fp_nitrogen_name};
62  _fe_problem->addUserObject(class_name, fp_mix_name, params);
63  _fp_mix = &_fe_problem->getUserObject<IdealGasMixtureFluidProperties>(fp_mix_name);
64  }
65  }
66 
70 };
std::shared_ptr< FEProblem > _fe_problem
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
const IdealGasMixtureFluidProperties * _fp_mix
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Class for fluid properties of an ideal gas mixture.
Ideal gas fluid properties Default parameters are for air at atmospheric pressure and temperature...