https://mooseframework.inl.gov
Loading...
Searching...
No Matches
StagnationPressureAux.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
14
17{
19 params.addRequiredCoupledVar("e", "Specific internal energy");
20 params.addRequiredCoupledVar("v", "Specific volume");
21 params.addRequiredCoupledVar("vel", "Velocity");
22 params.addRequiredParam<UserObjectName>("fp", "The name of the user object for fluid properties");
24 "Computes stagnation pressure from specific volume, specific internal energy, and velocity");
25 return params;
26}
27
29 : AuxKernel(parameters),
30 _specific_volume(coupledValue("v")),
31 _specific_internal_energy(coupledValue("e")),
32 _velocity(coupledValue("vel")),
33 _fp(getUserObject<SinglePhaseFluidProperties>("fp"))
34{
35}
36
37Real
39{
40 // static properties
41 const Real v = _specific_volume[_qp];
42 const Real e = _specific_internal_energy[_qp];
43 const Real u = _velocity[_qp];
44 const Real p = _fp.p_from_v_e(v, e);
45
46 // static entropy is equal to stagnation entropy by definition of the stagnation state
47 const Real s = _fp.s_from_v_e(v, e);
48
49 // stagnation enthalpy
50 const Real h0 = e + p * v + 0.5 * u * u;
51
52 return _fp.p_from_h_s(h0, s);
53}
const Real p
const double v
registerMooseObject("FluidPropertiesApp", StagnationPressureAux)
static InputParameters validParams()
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)
Common class for single phase fluid properties.
Compute stagnation pressure from specific volume, specific internal energy, and velocity.
const VariableValue & _velocity
StagnationPressureAux(const InputParameters &parameters)
static InputParameters validParams()
const VariableValue & _specific_volume
virtual Real computeValue() override
const SinglePhaseFluidProperties & _fp
const VariableValue & _specific_internal_energy