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

This kernel is appropriate for use with a "zero normal flow" boundary condition in the context of the Euler equations. More...

#include <NSPressureNeumannBC.h>

Inheritance diagram for NSPressureNeumannBC:
[legend]

Public Member Functions

 NSPressureNeumannBC (const InputParameters &parameters)
 
virtual ~NSPressureNeumannBC ()
 

Protected Member Functions

virtual Real computeQpResidual ()
 
virtual Real computeQpJacobian ()
 
virtual Real computeQpOffDiagJacobian (unsigned jvar)
 
bool isNSVariable (unsigned var)
 
unsigned mapVarNumber (unsigned var)
 

Protected Attributes

const VariableValue & _pressure
 
unsigned _component
 
NSPressureDerivs< NSPressureNeumannBC_pressure_derivs
 
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
 

Private Member Functions

Real computeJacobianHelper (unsigned m)
 

Friends

template<class U >
class NSPressureDerivs
 

Detailed Description

This kernel is appropriate for use with a "zero normal flow" boundary condition in the context of the Euler equations.

In this situation, the convective term is integrated by parts and the (rho*u)(u.n) term is zero since u.n=0. Thus all we are left with is the pressure times the normal.

For the Navier-Stokes equations, a no-slip boundary condition is probably what you want instead of this... for that use NSImposedVelocityBC instead.

Definition at line 31 of file NSPressureNeumannBC.h.

Constructor & Destructor Documentation

NSPressureNeumannBC::NSPressureNeumannBC ( const InputParameters &  parameters)

Definition at line 27 of file NSPressureNeumannBC.C.

28  : NSIntegratedBC(parameters),
29  _pressure(coupledValue(NS::pressure)),
30  _component(getParam<unsigned>("component")),
31  _pressure_derivs(*this)
32 {
33 }
NSIntegratedBC(const InputParameters &parameters)
const VariableValue & _pressure
const std::string pressure
Definition: NS.h:24
NSPressureDerivs< NSPressureNeumannBC > _pressure_derivs
virtual NSPressureNeumannBC::~NSPressureNeumannBC ( )
inlinevirtual

Definition at line 36 of file NSPressureNeumannBC.h.

36 {}

Member Function Documentation

Real NSPressureNeumannBC::computeJacobianHelper ( unsigned  m)
private

Definition at line 58 of file NSPressureNeumannBC.C.

Referenced by computeQpJacobian(), and computeQpOffDiagJacobian().

59 {
60  return _normals[_qp](_component) * _pressure_derivs.get_grad(m) * _phi[_j][_qp] * _test[_i][_qp];
61 }
Real get_grad(unsigned i)
The primary interfaces for computing pressure derivatives.
NSPressureDerivs< NSPressureNeumannBC > _pressure_derivs
Real NSPressureNeumannBC::computeQpJacobian ( )
protectedvirtual

Definition at line 42 of file NSPressureNeumannBC.C.

Referenced by ~NSPressureNeumannBC().

43 {
45  1); // <-- the on-diagonal variable number is _component+1
46 }
Real computeJacobianHelper(unsigned m)
Real NSPressureNeumannBC::computeQpOffDiagJacobian ( unsigned  jvar)
protectedvirtual

Definition at line 49 of file NSPressureNeumannBC.C.

Referenced by ~NSPressureNeumannBC().

50 {
51  if (isNSVariable(jvar))
52  return computeJacobianHelper(mapVarNumber(jvar));
53  else
54  return 0.0;
55 }
bool isNSVariable(unsigned var)
unsigned mapVarNumber(unsigned var)
Real computeJacobianHelper(unsigned m)
Real NSPressureNeumannBC::computeQpResidual ( )
protectedvirtual

Definition at line 36 of file NSPressureNeumannBC.C.

Referenced by ~NSPressureNeumannBC().

37 {
38  return _pressure[_qp] * _normals[_qp](_component) * _test[_i][_qp];
39 }
const VariableValue & _pressure
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(), 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

Friends And Related Function Documentation

template<class U >
friend class NSPressureDerivs
friend

Definition at line 55 of file NSPressureNeumannBC.h.

Member Data Documentation

unsigned NSPressureNeumannBC::_component
protected
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& NSPressureNeumannBC::_pressure
protected

Definition at line 44 of file NSPressureNeumannBC.h.

Referenced by computeQpResidual().

NSPressureDerivs<NSPressureNeumannBC> NSPressureNeumannBC::_pressure_derivs
protected

Definition at line 51 of file NSPressureNeumannBC.h.

Referenced by computeJacobianHelper().

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: