https://mooseframework.inl.gov
LinearTestFluidProperties.C
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 
11 
12 registerMooseObject("ThermalHydraulicsTestApp", LinearTestFluidProperties);
13 
16 {
18  return params;
19 }
20 
22  : SinglePhaseFluidProperties(parameters)
23 {
24 }
25 
26 Real
28 {
29  return 2. * p + 3. * T;
30 }
31 
32 void
34  Real p, Real T, Real & rho, Real & drho_dp, Real & drho_dT) const
35 {
36  rho = this->rho_from_p_T(p, T);
37  drho_dp = 2.;
38  drho_dT = 3.;
39 }
40 
41 Real
43 {
44  return 3. * p + 4. * rho;
45 }
46 
47 void
49  Real p, Real rho, Real & e, Real & de_dp, Real & de_drho) const
50 {
51  e = this->e_from_p_rho(p, rho);
52  de_dp = 3.;
53  de_drho = 4.;
54 }
55 
56 Real
58 {
59  return 2. * v + 3. * e;
60 }
61 
62 void
63 LinearTestFluidProperties::T_from_v_e(Real v, Real e, Real & T, Real & dT_dv, Real & dT_de) const
64 {
65  T = this->T_from_v_e(v, e);
66  dT_dv = 2.;
67  dT_de = 3.;
68 }
69 
70 Real
72 {
73  return 3.5 * v + 2.1 * e;
74 }
75 
76 void
77 LinearTestFluidProperties::p_from_v_e(Real v, Real e, Real & p, Real & dp_dv, Real & dp_de) const
78 {
79  p = this->p_from_v_e(v, e);
80  dp_dv = 3.5;
81  dp_de = 2.1;
82 }
83 
84 Real
86 {
87  return 0.6 * v + 1.3 * e;
88 }
89 
90 void
92  Real v, Real e, Real & mu, Real & dmu_dv, Real & dmu_de) const
93 {
94  mu = this->mu_from_v_e(v, e);
95  dmu_dv = 0.6;
96  dmu_de = 1.3;
97 }
static InputParameters validParams()
virtual Real rho_from_p_T(Real p, Real T) const override
virtual Real e_from_p_rho(Real p, Real rho) const override
virtual Real mu_from_v_e(Real v, Real e) const override
static const std::string mu
Definition: NS.h:123
Common class for single phase fluid properties.
LinearTestFluidProperties(const InputParameters &parameters)
static InputParameters validParams()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const std::string v
Definition: NS.h:84
virtual Real p_from_v_e(Real v, Real e) const override
registerMooseObject("ThermalHydraulicsTestApp", LinearTestFluidProperties)
single phase fluid properties class used for testing derivatives
virtual Real T_from_v_e(Real v, Real e) const override