https://mooseframework.inl.gov
Loading...
Searching...
No Matches
FluidPropertiesMaterialVE.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
12
14registerMooseObjectRenamed("FluidPropertiesApp",
15 FluidPropertiesMaterial,
16 "01/01/2023 00:00",
18
21{
23 params.addRequiredCoupledVar("e", "Specific internal energy");
24 params.addRequiredCoupledVar("v", "Specific volume");
25 params.addRequiredParam<UserObjectName>("fp", "The name of the user object for fluid properties");
27 "Computes fluid properties using (specific internal energy, specific volume) formulation");
28 return params;
29}
30
32 : Material(parameters),
33 _e(coupledValue("e")),
34 _v(coupledValue("v")),
35
36 _p(declareProperty<Real>("pressure")),
37 _T(declareProperty<Real>("temperature")),
38 _c(declareProperty<Real>("c")),
39 _cp(declareProperty<Real>("cp")),
40 _cv(declareProperty<Real>("cv")),
41 _mu(declareProperty<Real>("mu")),
42 _k(declareProperty<Real>("k")),
43 _s(declareProperty<Real>("s")),
44 _g(declareProperty<Real>("g")),
45
46 _fp(getUserObject<SinglePhaseFluidProperties>("fp"))
47{
48}
49
51
52void
54{
55 _p[_qp] = _fp.p_from_v_e(_v[_qp], _e[_qp]);
56 _T[_qp] = _fp.T_from_v_e(_v[_qp], _e[_qp]);
57 _c[_qp] = _fp.c_from_v_e(_v[_qp], _e[_qp]);
58 _cp[_qp] = _fp.cp_from_v_e(_v[_qp], _e[_qp]);
59 _cv[_qp] = _fp.cv_from_v_e(_v[_qp], _e[_qp]);
60 _mu[_qp] = _fp.mu_from_v_e(_v[_qp], _e[_qp]);
61 _k[_qp] = _fp.k_from_v_e(_v[_qp], _e[_qp]);
62 _s[_qp] = _fp.s_from_v_e(_v[_qp], _e[_qp]);
63 _g[_qp] = _fp.g_from_v_e(_v[_qp], _e[_qp]);
64}
registerMooseObject("FluidPropertiesApp", FluidPropertiesMaterialVE)
registerMooseObjectRenamed("FluidPropertiesApp", FluidPropertiesMaterial, "01/01/2023 00:00", FluidPropertiesMaterialVE)
Computes fluid properties using (specific energy, specific volume) formulation.
FluidPropertiesMaterialVE(const InputParameters &parameters)
MaterialProperty< Real > & _s
Specific entropy (J/kg/K)
MaterialProperty< Real > & _g
Gibbs free energy.
static InputParameters validParams()
MaterialProperty< Real > & _mu
Dynamic viscosity (Pa.s)
MaterialProperty< Real > & _p
Pressure (Pa)
const SinglePhaseFluidProperties & _fp
Fluid properties.
MaterialProperty< Real > & _c
Speed of sound (m/s)
MaterialProperty< Real > & _cv
Isochoric specific heat capacity (J/kg/K)
MaterialProperty< Real > & _k
Thermal conductivity (W/m/K)
const VariableValue & _e
Specific internal energy (J/kg)
MaterialProperty< Real > & _cp
Isobaric specific heat capacity (J/kg/K)
const VariableValue & _v
Specific volume (1/m^3)
MaterialProperty< Real > & _T
Temperature (K)
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
unsigned int _qp
static InputParameters validParams()
Common class for single phase fluid properties.