www.mooseframework.org
NSEnergyInviscidSpecifiedDensityAndVelocityBC.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 includes
9 // This was experimental code and did not really work out, do not use!
11 #include "NS.h"
12 
13 template <>
14 InputParameters
16 {
17  InputParameters params = validParams<NSEnergyInviscidBC>();
18 
19  // Coupled variables
20  params.addRequiredCoupledVar(NS::pressure, "pressure");
21 
22  // Required parameters
23  params.addRequiredParam<Real>("specified_density", "The specified density for this boundary");
24  params.addRequiredParam<Real>("specified_u",
25  "The x-component of the specified velocity for this boundary");
26  params.addRequiredParam<Real>("specified_v",
27  "The y-component of the specified velocity for this boundary");
28  params.addParam<Real>(
29  "specified_w",
30  0.0,
31  "The z-component of the specified velocity for this boundary"); // only required in 3D
32 
33  return params;
34 }
35 
37  const InputParameters & parameters)
38  : NSEnergyInviscidBC(parameters),
39  _pressure(coupledValue(NS::pressure)),
40  _specified_density(getParam<Real>("specified_density")),
41  _specified_u(getParam<Real>("specified_u")),
42  _specified_v(getParam<Real>("specified_v")),
43  _specified_w(getParam<Real>("specified_w"))
44 {
45 }
46 
47 Real
49 {
51  RealVectorValue(_specified_u, _specified_v, _specified_w),
52  _pressure[_qp]);
53 }
54 
55 Real
57 {
58  // TODO
59  // return computeJacobianHelper(/*on-diagonal variable is energy=*/4);
60  return 0.;
61 }
62 
63 Real
65 {
66  // TODO
67  // return computeJacobianHelper(mapVarNumber(jvar));
68  return 0.;
69 }
Definition: NS.h:13
InputParameters validParams< NSEnergyInviscidSpecifiedDensityAndVelocityBC >()
Real qpResidualHelper(Real pressure, Real un)
This class corresponds to the inviscid part of the "natural" boundary condition for the energy equati...
InputParameters validParams< NSEnergyInviscidBC >()
const std::string pressure
Definition: NS.h:24