www.mooseframework.org
FluidPropertiesMaterial.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 
10 
11 template <>
12 InputParameters
14 {
15  InputParameters params = validParams<Material>();
16  params.addRequiredCoupledVar("e", "Specific internal energy");
17  params.addRequiredCoupledVar("v", "Specific volume");
18  params.addRequiredParam<UserObjectName>("fp", "The name of the user object for fluid properties");
19  params.addClassDescription("Computes fluid properties using (u, v) formulation");
20  return params;
21 }
22 
23 FluidPropertiesMaterial::FluidPropertiesMaterial(const InputParameters & parameters)
24  : Material(parameters),
25  _e(coupledValue("e")),
26  _v(coupledValue("v")),
27 
28  _p(declareProperty<Real>("pressure")),
29  _T(declareProperty<Real>("temperature")),
30  _c(declareProperty<Real>("c")),
31  _cp(declareProperty<Real>("cp")),
32  _cv(declareProperty<Real>("cv")),
33  _mu(declareProperty<Real>("mu")),
34  _k(declareProperty<Real>("k")),
35  _g(declareProperty<Real>("g")),
36 
37  _fp(getUserObject<SinglePhaseFluidProperties>("fp"))
38 {
39 }
40 
42 
43 void
45 {
46  _p[_qp] = _fp.pressure(_v[_qp], _e[_qp]);
47  _T[_qp] = _fp.temperature(_v[_qp], _e[_qp]);
48  _c[_qp] = _fp.c(_v[_qp], _e[_qp]);
49  _cp[_qp] = _fp.cp(_v[_qp], _e[_qp]);
50  _cv[_qp] = _fp.cv(_v[_qp], _e[_qp]);
51  _mu[_qp] = _fp.mu(_v[_qp], _e[_qp]);
52  _k[_qp] = _fp.k(_v[_qp], _e[_qp]);
53  _g[_qp] = _fp.g(_v[_qp], _e[_qp]);
54 }
MaterialProperty< Real > & _mu
Dynamic viscosity.
MaterialProperty< Real > & _cp
Isobaric specific heat capacity.
virtual Real temperature(Real v, Real u) const =0
Temperature as a function of specific internal energy and specific volume.
MaterialProperty< Real > & _p
Pressure.
MaterialProperty< Real > & _k
Thermal conductivity.
InputParameters validParams< FluidPropertiesMaterial >()
virtual Real c(Real v, Real u) const =0
Sound speed.
const VariableValue & _v
Specific volume.
virtual Real cp(Real v, Real u) const =0
Specific heat.
MaterialProperty< Real > & _T
Temperature.
const SinglePhaseFluidProperties & _fp
Fluid properties.
FluidPropertiesMaterial(const InputParameters &parameters)
virtual Real k(Real v, Real u) const =0
Thermal conductivity [W / m K].
Common class for single phase fluid properties.
virtual Real mu(Real v, Real u) const =0
Dynamic viscosity [Pa s].
virtual Real cv(Real v, Real u) const =0
Isochoric specific heat.
MaterialProperty< Real > & _g
Gibbs free energy.
virtual Real g(Real v, Real e) const =0
Gibbs free energy.
MaterialProperty< Real > & _cv
Isochoric specific heat capacity.
virtual Real pressure(Real v, Real u) const =0
Pressure as a function of specific internal energy and specific volume.
const VariableValue & _e
Specific internal energy.
virtual void computeQpProperties() override
MaterialProperty< Real > & _c
Speed of sound.