www.mooseframework.org
NSMassUnspecifiedNormalFlowBC.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 template <>
10 InputParameters
12 {
13  InputParameters params = validParams<NSMassBC>();
14  params.addClassDescription("This class implements the mass equation boundary term with the "
15  "rho*(u.n) boundary integral computed implicitly.");
16  return params;
17 }
18 
20  : NSMassBC(parameters)
21 {
22 }
23 
24 Real
26 {
27  const RealVectorValue mom(_rho_u[_qp], _rho_v[_qp], _rho_w[_qp]);
28  return qpResidualHelper(mom * _normals[_qp]);
29 }
30 
31 Real
33 {
34  return qpJacobianHelper(/*on diagonal=*/0);
35 }
36 
37 Real
39 {
40  if (isNSVariable(jvar))
41  return qpJacobianHelper(mapVarNumber(jvar));
42  else
43  return 0.0;
44 }
bool isNSVariable(unsigned var)
Real qpResidualHelper(Real rhoun)
Compute the residual contribution for a given value of rho*(u.n).
Definition: NSMassBC.C:22
const VariableValue & _rho_w
InputParameters validParams< NSMassUnspecifiedNormalFlowBC >()
InputParameters validParams< NSMassBC >()
Definition: NSMassBC.C:11
NSMassUnspecifiedNormalFlowBC(const InputParameters &parameters)
virtual Real computeQpOffDiagJacobian(unsigned jvar)
unsigned mapVarNumber(unsigned var)
Real qpJacobianHelper(unsigned var_number)
Compute the Jacobian contribution due to variable number &#39;var_number&#39;.
Definition: NSMassBC.C:28
This class corresponds to the "natural" boundary condition for the mass equation, i...
Definition: NSMassBC.h:31
const VariableValue & _rho_u
const VariableValue & _rho_v