www.mooseframework.org
NSPressureAux.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 
8 // Navier-Stokes inclues
9 #include "NSPressureAux.h"
10 #include "NS.h"
11 
12 // FluidProperties includes
14 
15 // MOOSE includes
16 #include "MooseMesh.h"
17 
18 template <>
19 InputParameters
21 {
22  InputParameters params = validParams<AuxKernel>();
23 
24  params.addClassDescription("Nodal auxiliary variable, for computing pressure at the nodes.");
25  // Mark variables as required
26  params.addRequiredCoupledVar(NS::specific_volume, "specific volume");
27  params.addRequiredCoupledVar(NS::internal_energy, "internal energy");
28  params.addRequiredParam<UserObjectName>("fluid_properties",
29  "The name of the user object for fluid properties");
30 
31  return params;
32 }
33 
34 NSPressureAux::NSPressureAux(const InputParameters & parameters)
35  : AuxKernel(parameters),
36  _specific_volume(coupledValue(NS::specific_volume)),
37  _internal_energy(coupledValue(NS::internal_energy)),
38  _fp(getUserObject<IdealGasFluidProperties>("fluid_properties"))
39 {
40 }
41 
42 Real
44 {
45  return _fp.pressure(_specific_volume[_qp], _internal_energy[_qp]);
46 }
Definition: NS.h:13
virtual Real computeValue()
Definition: NSPressureAux.C:43
const VariableValue & _specific_volume
Definition: NSPressureAux.h:32
NSPressureAux(const InputParameters &parameters)
Definition: NSPressureAux.C:34
const std::string specific_volume
Definition: NS.h:29
const IdealGasFluidProperties & _fp
Definition: NSPressureAux.h:36
const VariableValue & _internal_energy
Definition: NSPressureAux.h:33
const std::string internal_energy
Definition: NS.h:28
Ideal gas fluid properties.
virtual Real pressure(Real v, Real u) const override
Pressure as a function of specific internal energy and specific volume.
InputParameters validParams< NSPressureAux >()
Definition: NSPressureAux.C:20