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

This class computes the pressure Poisson solve which is part of the "split" scheme used for solving the incompressible Navier-Stokes equations. More...

#include <INSPressurePoisson.h>

Inheritance diagram for INSPressurePoisson:
[legend]

Public Member Functions

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

Protected Member Functions

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

Protected Attributes

const VariableGradient & _grad_a1
 
const VariableGradient & _grad_a2
 
const VariableGradient & _grad_a3
 
unsigned _a1_var_number
 
unsigned _a2_var_number
 
unsigned _a3_var_number
 
const MaterialProperty< Real > & _rho
 

Detailed Description

This class computes the pressure Poisson solve which is part of the "split" scheme used for solving the incompressible Navier-Stokes equations.

Do not use, USE INSChorinPressurePoisson and related classes instead.

Definition at line 25 of file INSPressurePoisson.h.

Constructor & Destructor Documentation

INSPressurePoisson::INSPressurePoisson ( const InputParameters &  parameters)

Definition at line 31 of file INSPressurePoisson.C.

32  : Kernel(parameters),
33 
34  // Gradients
35  _grad_a1(coupledGradient("a1")),
36  _grad_a2(_mesh.dimension() >= 2 ? coupledGradient("a2") : _grad_zero),
37  _grad_a3(_mesh.dimension() == 3 ? coupledGradient("a3") : _grad_zero),
38 
39  // Variable numberings
40  _a1_var_number(coupled("a1")),
41  _a2_var_number(_mesh.dimension() >= 2 ? coupled("a2") : libMesh::invalid_uint),
42  _a3_var_number(_mesh.dimension() == 3 ? coupled("a3") : libMesh::invalid_uint),
43 
44  // Material Properties
45  _rho(getMaterialProperty<Real>("rho_name"))
46 {
47 }
const VariableGradient & _grad_a3
const VariableGradient & _grad_a2
const MaterialProperty< Real > & _rho
const VariableGradient & _grad_a1
virtual INSPressurePoisson::~INSPressurePoisson ( )
inlinevirtual

Definition at line 30 of file INSPressurePoisson.h.

30 {}

Member Function Documentation

Real INSPressurePoisson::computeQpJacobian ( )
protectedvirtual

Definition at line 64 of file INSPressurePoisson.C.

Referenced by ~INSPressurePoisson().

65 {
66  return _grad_phi[_j][_qp] * _grad_test[_i][_qp];
67 }
Real INSPressurePoisson::computeQpOffDiagJacobian ( unsigned  jvar)
protectedvirtual

Definition at line 70 of file INSPressurePoisson.C.

Referenced by ~INSPressurePoisson().

71 {
72  if (jvar == _a1_var_number)
73  return _rho[_qp] * _grad_phi[_j][_qp](0) * _test[_i][_qp];
74 
75  else if (jvar == _a2_var_number)
76  return _rho[_qp] * _grad_phi[_j][_qp](1) * _test[_i][_qp];
77 
78  else if (jvar == _a3_var_number)
79  return _rho[_qp] * _grad_phi[_j][_qp](2) * _test[_i][_qp];
80 
81  else
82  return 0;
83 }
const MaterialProperty< Real > & _rho
Real INSPressurePoisson::computeQpResidual ( )
protectedvirtual

Definition at line 50 of file INSPressurePoisson.C.

Referenced by ~INSPressurePoisson().

51 {
52  // Laplacian part
53  Real laplacian_part = _grad_u[_qp] * _grad_test[_i][_qp];
54 
55  // Divergence part
56  Real div_part =
57  _rho[_qp] * (_grad_a1[_qp](0) + _grad_a2[_qp](1) + _grad_a3[_qp](2)) * _test[_i][_qp];
58 
59  // Return the result
60  return laplacian_part + div_part;
61 }
const VariableGradient & _grad_a3
const VariableGradient & _grad_a2
const MaterialProperty< Real > & _rho
const VariableGradient & _grad_a1

Member Data Documentation

unsigned INSPressurePoisson::_a1_var_number
protected

Definition at line 43 of file INSPressurePoisson.h.

Referenced by computeQpOffDiagJacobian().

unsigned INSPressurePoisson::_a2_var_number
protected

Definition at line 44 of file INSPressurePoisson.h.

Referenced by computeQpOffDiagJacobian().

unsigned INSPressurePoisson::_a3_var_number
protected

Definition at line 45 of file INSPressurePoisson.h.

Referenced by computeQpOffDiagJacobian().

const VariableGradient& INSPressurePoisson::_grad_a1
protected

Definition at line 38 of file INSPressurePoisson.h.

Referenced by computeQpResidual().

const VariableGradient& INSPressurePoisson::_grad_a2
protected

Definition at line 39 of file INSPressurePoisson.h.

Referenced by computeQpResidual().

const VariableGradient& INSPressurePoisson::_grad_a3
protected

Definition at line 40 of file INSPressurePoisson.h.

Referenced by computeQpResidual().

const MaterialProperty<Real>& INSPressurePoisson::_rho
protected

Definition at line 48 of file INSPressurePoisson.h.

Referenced by computeQpOffDiagJacobian(), and computeQpResidual().


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