www.mooseframework.org
NSEnergyWeakStagnationBC.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 
11 
12 // FluidProperties includes
14 
16 
17 template <>
18 InputParameters
20 {
21  InputParameters params = validParams<NSWeakStagnationBaseBC>();
22  params.addClassDescription("The inviscid energy BC term with specified normal flow.");
23  return params;
24 }
25 
26 NSEnergyWeakStagnationBC::NSEnergyWeakStagnationBC(const InputParameters & parameters)
27  : NSWeakStagnationBaseBC(parameters)
28 {
29 }
30 
31 Real
33 {
34  // Compute stagnation values
35  Real T_s = 0.0, p_s = 0.0, rho_s = 0.0;
36  staticValues(T_s, p_s, rho_s);
37 
38  // And get velocity magnitude, squared
39  Real velmag2 = this->velmag2();
40 
41  // Compute static total energy, E_s
42  Real E_s = _fp.cv() * T_s + 0.5 * velmag2;
43 
44  // Compute the product rho_s * H_s (H_s = static enthalpy)
45  Real rhoH_s = rho_s * E_s + p_s;
46 
47  // rho_s * H_s * |u| * (s.n) * phi_i
48  return rhoH_s * std::sqrt(velmag2) * this->sdotn() * _test[_i][_qp];
49 }
50 
51 Real
53 {
54  // TODO
55  return 0.0;
56 }
57 
58 Real
60 {
61  // TODO
62  return 0.0;
63 }
NSEnergyWeakStagnationBC::computeQpOffDiagJacobian
virtual Real computeQpOffDiagJacobian(unsigned jvar)
Definition: NSEnergyWeakStagnationBC.C:59
validParams< NSEnergyWeakStagnationBC >
InputParameters validParams< NSEnergyWeakStagnationBC >()
Definition: NSEnergyWeakStagnationBC.C:19
IdealGasFluidProperties.h
NSEnergyWeakStagnationBC.h
NSEnergyWeakStagnationBC::NSEnergyWeakStagnationBC
NSEnergyWeakStagnationBC(const InputParameters &parameters)
Definition: NSEnergyWeakStagnationBC.C:26
NSWeakStagnationBaseBC
This is the base class for "weakly-imposed" stagnation boundary conditions, that is the relevant boun...
Definition: NSWeakStagnationBaseBC.h:27
NSEnergyWeakStagnationBC
The inviscid energy BC term with specified normal flow.
Definition: NSEnergyWeakStagnationBC.h:23
NSWeakStagnationBaseBC::staticValues
void staticValues(Real &T_s, Real &p_s, Real &rho_s)
Definition: NSWeakStagnationBaseBC.C:42
registerMooseObject
registerMooseObject("NavierStokesApp", NSEnergyWeakStagnationBC)
NSWeakStagnationBaseBC::sdotn
Real sdotn()
Definition: NSWeakStagnationBaseBC.C:73
NSEnergyWeakStagnationBC::computeQpResidual
virtual Real computeQpResidual()
Definition: NSEnergyWeakStagnationBC.C:32
NSEnergyWeakStagnationBC::computeQpJacobian
virtual Real computeQpJacobian()
Definition: NSEnergyWeakStagnationBC.C:52
IdealGasFluidProperties::cv
virtual Real cv() const
Definition: IdealGasFluidProperties.h:118
NSIntegratedBC::_fp
const IdealGasFluidProperties & _fp
Definition: NSIntegratedBC.h:62
NSWeakStagnationBaseBC::velmag2
Real velmag2()
Definition: NSWeakStagnationBaseBC.C:67
validParams< NSWeakStagnationBaseBC >
InputParameters validParams< NSWeakStagnationBaseBC >()
Definition: NSWeakStagnationBaseBC.C:18