www.mooseframework.org
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
NSMassBC Class Reference

This class corresponds to the "natural" boundary condition for the mass equation, i.e. More...

#include <NSMassBC.h>

Inheritance diagram for NSMassBC:
[legend]

Public Member Functions

 NSMassBC (const InputParameters &parameters)
 

Protected Member Functions

Real qpResidualHelper (Real rhoun)
 Compute the residual contribution for a given value of rho*(u.n). More...
 
Real qpJacobianHelper (unsigned var_number)
 Compute the Jacobian contribution due to variable number 'var_number'. More...
 
bool isNSVariable (unsigned var)
 
unsigned mapVarNumber (unsigned var)
 

Protected Attributes

const VariableValue & _u_vel
 
const VariableValue & _v_vel
 
const VariableValue & _w_vel
 
const VariableValue & _rho
 
const VariableValue & _rho_u
 
const VariableValue & _rho_v
 
const VariableValue & _rho_w
 
const VariableValue & _rho_E
 
const VariableGradient & _grad_rho
 
const VariableGradient & _grad_rho_u
 
const VariableGradient & _grad_rho_v
 
const VariableGradient & _grad_rho_w
 
const VariableGradient & _grad_rho_E
 
unsigned _rho_var_number
 
unsigned _rhou_var_number
 
unsigned _rhov_var_number
 
unsigned _rhow_var_number
 
unsigned _rhoE_var_number
 
const MaterialProperty< Real > & _dynamic_viscosity
 
const MaterialProperty< RealTensorValue > & _viscous_stress_tensor
 
const IdealGasFluidProperties_fp
 

Detailed Description

This class corresponds to the "natural" boundary condition for the mass equation, i.e.

what you get if you integrate the invsicid flux term by parts:

int_{Gamma} (rho*u.n) v

While this class implements the residual and jacobian values for this term, it does not itself implement any of the computeQp* functions. For that, use one of the derived classes: 1.) NSMassSpecifiedNormalFlowBC 2.) NSMassUnspecifiedNormalFlowBC

Definition at line 31 of file NSMassBC.h.

Constructor & Destructor Documentation

NSMassBC::NSMassBC ( const InputParameters &  parameters)

Definition at line 19 of file NSMassBC.C.

19 : NSIntegratedBC(parameters) {}
NSIntegratedBC(const InputParameters &parameters)

Member Function Documentation

bool NSIntegratedBC::isNSVariable ( unsigned  var)
protectedinherited
unsigned NSIntegratedBC::mapVarNumber ( unsigned  var)
protectedinherited

Definition at line 87 of file NSIntegratedBC.C.

Referenced by NSEnergyInviscidSpecifiedBC::computeQpOffDiagJacobian(), NSEnergyInviscidSpecifiedNormalFlowBC::computeQpOffDiagJacobian(), NSEnergyInviscidSpecifiedPressureBC::computeQpOffDiagJacobian(), NSEnergyInviscidUnspecifiedBC::computeQpOffDiagJacobian(), NSMomentumInviscidSpecifiedNormalFlowBC::computeQpOffDiagJacobian(), NSMassUnspecifiedNormalFlowBC::computeQpOffDiagJacobian(), NSMomentumInviscidNoPressureImplicitFlowBC::computeQpOffDiagJacobian(), NSMomentumInviscidSpecifiedPressureBC::computeQpOffDiagJacobian(), NSPressureNeumannBC::computeQpOffDiagJacobian(), NSMomentumViscousBC::computeQpOffDiagJacobian(), and NSEnergyViscousBC::computeQpOffDiagJacobian().

88 {
89  // Convert the Moose numbering to:
90  // 0 for rho
91  // 1 for rho*u
92  // 2 for rho*v
93  // 3 for rho*w
94  // 4 for rho*e
95  // regardless of the problem dimension, etc.
96  unsigned int mapped_var_number;
97 
98  if (var == _rho_var_number)
99  mapped_var_number = 0;
100  else if (var == _rhou_var_number)
101  mapped_var_number = 1;
102  else if (var == _rhov_var_number)
103  mapped_var_number = 2;
104  else if (var == _rhow_var_number)
105  mapped_var_number = 3;
106  else if (var == _rhoE_var_number)
107  mapped_var_number = 4;
108  else
109  mooseError("Invalid var!");
110 
111  return mapped_var_number;
112 }
unsigned _rhov_var_number
unsigned _rhou_var_number
unsigned _rhow_var_number
unsigned _rho_var_number
unsigned _rhoE_var_number
Real NSMassBC::qpJacobianHelper ( unsigned  var_number)
protected

Compute the Jacobian contribution due to variable number 'var_number'.

Note: if this is a specified normal flow boundary, the Jacobian will be zero.

Definition at line 28 of file NSMassBC.C.

Referenced by NSMassUnspecifiedNormalFlowBC::computeQpJacobian(), and NSMassUnspecifiedNormalFlowBC::computeQpOffDiagJacobian().

29 {
30  switch (var_number)
31  {
32  case 0: // density
33  case 4: // energy
34  return 0.0;
35 
36  case 1:
37  case 2:
38  case 3: // momentums
39  // If one of the momentums, the derivative is a mass
40  // matrix times that normal component...
41  return _phi[_j][_qp] * _test[_i][_qp] * _normals[_qp](var_number - 1);
42 
43  default:
44  mooseError("Should not get here!");
45  break;
46  }
47 }
Real NSMassBC::qpResidualHelper ( Real  rhoun)
protected

Compute the residual contribution for a given value of rho*(u.n).

This value may come from the current nonlinear solution or be specified, depending on the derived class.

Definition at line 22 of file NSMassBC.C.

Referenced by NSMassUnspecifiedNormalFlowBC::computeQpResidual(), and NSMassSpecifiedNormalFlowBC::computeQpResidual().

23 {
24  return rhoun * _test[_i][_qp];
25 }

Member Data Documentation

const MaterialProperty<Real>& NSIntegratedBC::_dynamic_viscosity
protectedinherited

Definition at line 56 of file NSIntegratedBC.h.

const IdealGasFluidProperties& NSIntegratedBC::_fp
protectedinherited
const VariableGradient& NSIntegratedBC::_grad_rho
protectedinherited

Definition at line 43 of file NSIntegratedBC.h.

Referenced by NSEnergyViscousBC::NSEnergyViscousBC().

const VariableGradient& NSIntegratedBC::_grad_rho_E
protectedinherited

Definition at line 47 of file NSIntegratedBC.h.

Referenced by NSEnergyViscousBC::NSEnergyViscousBC().

const VariableGradient& NSIntegratedBC::_grad_rho_u
protectedinherited

Definition at line 44 of file NSIntegratedBC.h.

Referenced by NSEnergyViscousBC::NSEnergyViscousBC().

const VariableGradient& NSIntegratedBC::_grad_rho_v
protectedinherited

Definition at line 45 of file NSIntegratedBC.h.

Referenced by NSEnergyViscousBC::NSEnergyViscousBC().

const VariableGradient& NSIntegratedBC::_grad_rho_w
protectedinherited

Definition at line 46 of file NSIntegratedBC.h.

Referenced by NSEnergyViscousBC::NSEnergyViscousBC().

const VariableValue& NSIntegratedBC::_rho
protectedinherited
const VariableValue& NSIntegratedBC::_rho_E
protectedinherited
const VariableValue& NSIntegratedBC::_rho_u
protectedinherited
const VariableValue& NSIntegratedBC::_rho_v
protectedinherited
unsigned NSIntegratedBC::_rho_var_number
protectedinherited

Definition at line 49 of file NSIntegratedBC.h.

Referenced by NSIntegratedBC::isNSVariable(), and NSIntegratedBC::mapVarNumber().

const VariableValue& NSIntegratedBC::_rho_w
protectedinherited
unsigned NSIntegratedBC::_rhoE_var_number
protectedinherited

Definition at line 53 of file NSIntegratedBC.h.

Referenced by NSIntegratedBC::isNSVariable(), and NSIntegratedBC::mapVarNumber().

unsigned NSIntegratedBC::_rhou_var_number
protectedinherited

Definition at line 50 of file NSIntegratedBC.h.

Referenced by NSIntegratedBC::isNSVariable(), and NSIntegratedBC::mapVarNumber().

unsigned NSIntegratedBC::_rhov_var_number
protectedinherited

Definition at line 51 of file NSIntegratedBC.h.

Referenced by NSIntegratedBC::isNSVariable(), and NSIntegratedBC::mapVarNumber().

unsigned NSIntegratedBC::_rhow_var_number
protectedinherited

Definition at line 52 of file NSIntegratedBC.h.

Referenced by NSIntegratedBC::isNSVariable(), and NSIntegratedBC::mapVarNumber().

const VariableValue& NSIntegratedBC::_u_vel
protectedinherited
const VariableValue& NSIntegratedBC::_v_vel
protectedinherited
const MaterialProperty<RealTensorValue>& NSIntegratedBC::_viscous_stress_tensor
protectedinherited
const VariableValue& NSIntegratedBC::_w_vel
protectedinherited

The documentation for this class was generated from the following files: