https://mooseframework.inl.gov
thermal_hydraulics
unit
include
LinearFluidPropertiesTest.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
"
13
#include "
LinearFluidProperties.h
"
14
15
class
LinearFluidPropertiesTest
:
public
MooseObjectUnitTest
16
{
17
public
:
18
LinearFluidPropertiesTest
() :
MooseObjectUnitTest
(
"ThermalHydraulicsApp"
) {
buildObjects
(); }
19
20
protected
:
21
void
buildObjects
()
22
{
23
InputParameters
eos_pars =
_factory
.
getValidParams
(
"LinearFluidProperties"
);
24
eos_pars.
set
<
Real
>(
"p_0"
) = 1e5;
25
eos_pars.
set
<
Real
>(
"rho_0"
) = 1000;
26
eos_pars.
set
<
Real
>(
"a2"
) = 10;
27
eos_pars.
set
<
Real
>(
"beta"
) = 123;
28
eos_pars.
set
<
Real
>(
"cv"
) = 1000;
29
eos_pars.
set
<
Real
>(
"e_0"
) = 1e6;
30
eos_pars.
set
<
Real
>(
"T_0"
) = 300;
31
eos_pars.
set
<
Real
>(
"mu"
) = 0.3;
32
eos_pars.
set
<
Real
>(
"k"
) = 0.89;
33
eos_pars.
set
<
Real
>(
"Pr"
) = (1000 * 0.3) / 0.89;
34
_fe_problem
->addUserObject(
"LinearFluidProperties"
,
"fp"
, eos_pars);
35
_fp
= &
_fe_problem
->getUserObject<
LinearFluidProperties
>(
"fp"
);
36
}
37
38
const
LinearFluidProperties
*
_fp
;
39
};
MooseObjectUnitTest::_fe_problem
std::shared_ptr< FEProblem > _fe_problem
LinearFluidPropertiesTest::buildObjects
void buildObjects()
Definition:
LinearFluidPropertiesTest.h:21
MooseObjectUnitTest::_factory
Factory & _factory
InputParameters::set
T & set(const std::string &name, bool quiet_mode=false)
Factory::getValidParams
InputParameters getValidParams(const std::string &name) const
LinearFluidPropertiesTest
Definition:
LinearFluidPropertiesTest.h:15
InputParameters
MooseObjectUnitTest
LinearFluidProperties.h
LinearFluidPropertiesTest::LinearFluidPropertiesTest
LinearFluidPropertiesTest()
Definition:
LinearFluidPropertiesTest.h:18
LinearFluidProperties
Linear fluid properties.
Definition:
LinearFluidProperties.h:17
Real
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
LinearFluidPropertiesTest::_fp
const LinearFluidProperties * _fp
Definition:
LinearFluidPropertiesTest.h:38
MooseObjectUnitTest.h
Generated on Fri Jul 18 2025 13:44:05 for https://mooseframework.inl.gov by
1.8.14