www.mooseframework.org
NSEnergyWeakStagnationBC.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 /****************************************************************/
8 
9 // FluidProperties includes
11 
12 template <>
13 InputParameters
15 {
16  InputParameters params = validParams<NSWeakStagnationBaseBC>();
17  params.addClassDescription("The inviscid energy BC term with specified normal flow.");
18  return params;
19 }
20 
21 NSEnergyWeakStagnationBC::NSEnergyWeakStagnationBC(const InputParameters & parameters)
22  : NSWeakStagnationBaseBC(parameters)
23 {
24 }
25 
26 Real
28 {
29  // Compute stagnation values
30  Real T_s = 0.0, p_s = 0.0, rho_s = 0.0;
31  staticValues(T_s, p_s, rho_s);
32 
33  // And get velocity magnitude, squared
34  Real velmag2 = this->velmag2();
35 
36  // Compute static total energy, E_s
37  Real E_s = _fp.cv() * T_s + 0.5 * velmag2;
38 
39  // Compute the product rho_s * H_s (H_s = static enthalpy)
40  Real rhoH_s = rho_s * E_s + p_s;
41 
42  // rho_s * H_s * |u| * (s.n) * phi_i
43  return rhoH_s * std::sqrt(velmag2) * this->sdotn() * _test[_i][_qp];
44 }
45 
46 Real
48 {
49  // TODO
50  return 0.0;
51 }
52 
53 Real
55 {
56  // TODO
57  return 0.0;
58 }
InputParameters validParams< NSWeakStagnationBaseBC >()
virtual Real cv(Real v=0., Real u=0.) const override
Isochoric specific heat.
InputParameters validParams< NSEnergyWeakStagnationBC >()
virtual Real computeQpOffDiagJacobian(unsigned jvar)
const IdealGasFluidProperties & _fp
NSEnergyWeakStagnationBC(const InputParameters &parameters)
void staticValues(Real &T_s, Real &p_s, Real &rho_s)
This is the base class for "weakly-imposed" stagnation boundary conditions, that is the relevant boun...