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

This class implements the "No BC" boundary condition based on the "traction" form of the viscous stress tensor. More...

#include <INSMomentumNoBCBCTractionForm.h>

Inheritance diagram for INSMomentumNoBCBCTractionForm:
[legend]

Public Member Functions

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

Protected Member Functions

virtual Real computeQpResidual ()
 
virtual Real computeQpJacobian ()
 
virtual Real computeQpOffDiagJacobian (unsigned jvar)
 

Protected Attributes

const VariableValue & _u_vel
 
const VariableValue & _v_vel
 
const VariableValue & _w_vel
 
const VariableValue & _p
 
const VariableGradient & _grad_u_vel
 
const VariableGradient & _grad_v_vel
 
const VariableGradient & _grad_w_vel
 
unsigned _u_vel_var_number
 
unsigned _v_vel_var_number
 
unsigned _w_vel_var_number
 
unsigned _p_var_number
 
RealVectorValue _gravity
 
unsigned _component
 
bool _integrate_p_by_parts
 
const MaterialProperty< Real > & _mu
 
const MaterialProperty< Real > & _rho
 

Detailed Description

This class implements the "No BC" boundary condition based on the "traction" form of the viscous stress tensor.

Definition at line 22 of file INSMomentumNoBCBCTractionForm.h.

Constructor & Destructor Documentation

INSMomentumNoBCBCTractionForm::INSMomentumNoBCBCTractionForm ( const InputParameters &  parameters)

Definition at line 22 of file INSMomentumNoBCBCTractionForm.C.

23  : INSMomentumNoBCBCBase(parameters)
24 {
25 }
INSMomentumNoBCBCBase(const InputParameters &parameters)
virtual INSMomentumNoBCBCTractionForm::~INSMomentumNoBCBCTractionForm ( )
inlinevirtual

Definition at line 27 of file INSMomentumNoBCBCTractionForm.h.

27 {}

Member Function Documentation

Real INSMomentumNoBCBCTractionForm::computeQpJacobian ( )
protectedvirtual

Definition at line 65 of file INSMomentumNoBCBCTractionForm.C.

Referenced by ~INSMomentumNoBCBCTractionForm().

66 {
67  // The extra contribution comes from the "2" on the diagonal of the viscous stress tensor
68  return -_mu[_qp] * (_grad_phi[_j][_qp] * _normals[_qp] +
69  _grad_phi[_j][_qp](_component) * _normals[_qp](_component)) *
70  _test[_i][_qp];
71 }
const MaterialProperty< Real > & _mu
Real INSMomentumNoBCBCTractionForm::computeQpOffDiagJacobian ( unsigned  jvar)
protectedvirtual

Definition at line 74 of file INSMomentumNoBCBCTractionForm.C.

Referenced by ~INSMomentumNoBCBCTractionForm().

75 {
76  if (jvar == _u_vel_var_number)
77  return -_mu[_qp] * _grad_phi[_j][_qp](_component) * _normals[_qp](0) * _test[_i][_qp];
78 
79  else if (jvar == _v_vel_var_number)
80  return -_mu[_qp] * _grad_phi[_j][_qp](_component) * _normals[_qp](1) * _test[_i][_qp];
81 
82  else if (jvar == _w_vel_var_number)
83  return -_mu[_qp] * _grad_phi[_j][_qp](_component) * _normals[_qp](2) * _test[_i][_qp];
84 
85  else if (jvar == _p_var_number)
86  {
88  return _phi[_j][_qp] * _normals[_qp](_component) * _test[_i][_qp];
89  else
90  return 0.;
91  }
92 
93  else
94  return 0.;
95 }
const MaterialProperty< Real > & _mu
Real INSMomentumNoBCBCTractionForm::computeQpResidual ( )
protectedvirtual

Definition at line 28 of file INSMomentumNoBCBCTractionForm.C.

Referenced by ~INSMomentumNoBCBCTractionForm().

29 {
30  // Compute n . sigma . v, where n is unit normal and v is the test function.
31  RealTensorValue sigma;
32 
33  // First row
34  sigma(0, 0) = 2. * _mu[_qp] * _grad_u_vel[_qp](0);
35  sigma(0, 1) = _mu[_qp] * (_grad_u_vel[_qp](1) + _grad_v_vel[_qp](0));
36  sigma(0, 2) = _mu[_qp] * (_grad_u_vel[_qp](2) + _grad_w_vel[_qp](0));
37 
38  // Second row
39  sigma(1, 0) = _mu[_qp] * (_grad_v_vel[_qp](0) + _grad_u_vel[_qp](1));
40  sigma(1, 1) = 2. * _mu[_qp] * _grad_v_vel[_qp](1);
41  sigma(1, 2) = _mu[_qp] * (_grad_v_vel[_qp](2) + _grad_w_vel[_qp](1));
42 
43  // Third row
44  sigma(2, 0) = _mu[_qp] * (_grad_w_vel[_qp](0) + _grad_u_vel[_qp](2));
45  sigma(2, 1) = _mu[_qp] * (_grad_w_vel[_qp](1) + _grad_v_vel[_qp](2));
46  sigma(2, 2) = 2. * _mu[_qp] * _grad_w_vel[_qp](2);
47 
48  // If the pressure term is integrated by parts, it is part of the
49  // no-BC-BC, otherwise, it is not.
51  {
52  sigma(0, 0) -= _p[_qp];
53  sigma(1, 1) -= _p[_qp];
54  sigma(2, 2) -= _p[_qp];
55  }
56 
57  // Set up test function
58  RealVectorValue test;
59  test(_component) = _test[_i][_qp];
60 
61  return -_normals[_qp] * (sigma * test);
62 }
const VariableGradient & _grad_v_vel
const VariableGradient & _grad_w_vel
const MaterialProperty< Real > & _mu
const VariableValue & _p
const VariableGradient & _grad_u_vel

Member Data Documentation

unsigned INSMomentumNoBCBCBase::_component
protectedinherited
const VariableGradient& INSMomentumNoBCBCBase::_grad_u_vel
protectedinherited

Definition at line 43 of file INSMomentumNoBCBCBase.h.

Referenced by computeQpResidual().

const VariableGradient& INSMomentumNoBCBCBase::_grad_v_vel
protectedinherited

Definition at line 44 of file INSMomentumNoBCBCBase.h.

Referenced by computeQpResidual().

const VariableGradient& INSMomentumNoBCBCBase::_grad_w_vel
protectedinherited

Definition at line 45 of file INSMomentumNoBCBCBase.h.

Referenced by computeQpResidual().

RealVectorValue INSMomentumNoBCBCBase::_gravity
protectedinherited

Definition at line 53 of file INSMomentumNoBCBCBase.h.

bool INSMomentumNoBCBCBase::_integrate_p_by_parts
protectedinherited
const MaterialProperty<Real>& INSMomentumNoBCBCBase::_mu
protectedinherited
const VariableValue& INSMomentumNoBCBCBase::_p
protectedinherited
unsigned INSMomentumNoBCBCBase::_p_var_number
protectedinherited
const MaterialProperty<Real>& INSMomentumNoBCBCBase::_rho
protectedinherited

Definition at line 58 of file INSMomentumNoBCBCBase.h.

const VariableValue& INSMomentumNoBCBCBase::_u_vel
protectedinherited

Definition at line 37 of file INSMomentumNoBCBCBase.h.

unsigned INSMomentumNoBCBCBase::_u_vel_var_number
protectedinherited

Definition at line 48 of file INSMomentumNoBCBCBase.h.

Referenced by computeQpOffDiagJacobian().

const VariableValue& INSMomentumNoBCBCBase::_v_vel
protectedinherited

Definition at line 38 of file INSMomentumNoBCBCBase.h.

unsigned INSMomentumNoBCBCBase::_v_vel_var_number
protectedinherited

Definition at line 49 of file INSMomentumNoBCBCBase.h.

Referenced by computeQpOffDiagJacobian().

const VariableValue& INSMomentumNoBCBCBase::_w_vel
protectedinherited

Definition at line 39 of file INSMomentumNoBCBCBase.h.

unsigned INSMomentumNoBCBCBase::_w_vel_var_number
protectedinherited

Definition at line 50 of file INSMomentumNoBCBCBase.h.

Referenced by computeQpOffDiagJacobian().


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