www.mooseframework.org
CNSFVEntropyProductionAux.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 
9 
10 template <>
11 InputParameters
13 {
14  InputParameters params = validParams<AuxKernel>();
15 
16  params.addClassDescription("An aux kernel for calculating entropy production.");
17 
18  params.addRequiredParam<UserObjectName>("fluid_properties",
19  "Name for fluid properties user object");
20 
21  params.addRequiredParam<Real>("infinity_density", "Infinity density");
22 
23  params.addRequiredParam<Real>("infinity_pressure", "Infinity pressure");
24 
25  return params;
26 }
27 
28 CNSFVEntropyProductionAux::CNSFVEntropyProductionAux(const InputParameters & parameters)
29  : AuxKernel(parameters),
30  _fp(getUserObject<SinglePhaseFluidProperties>("fluid_properties")),
31  _rho(getMaterialProperty<Real>("rho")),
32  _pres(getMaterialProperty<Real>("pressure")),
33  _gamma(getMaterialProperty<Real>("gamma")),
34  _inf_rho(getParam<Real>("infinity_density")),
35  _inf_pres(getParam<Real>("infinity_pressure"))
36 {
37 }
38 
39 Real
41 {
42  return (_pres[_qp] / _inf_pres) * std::pow(_inf_rho / _rho[_qp], _gamma[_qp]) - 1.;
43 }
CNSFVEntropyProductionAux(const InputParameters &parameters)
Common class for single phase fluid properties.
const MaterialProperty< Real > & _gamma
InputParameters validParams< CNSFVEntropyProductionAux >()
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const MaterialProperty< Real > & _rho
const MaterialProperty< Real > & _pres