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 28 of file INSPressurePoisson.h.

Constructor & Destructor Documentation

◆ INSPressurePoisson()

INSPressurePoisson::INSPressurePoisson ( const InputParameters &  parameters)

Definition at line 35 of file INSPressurePoisson.C.

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

◆ ~INSPressurePoisson()

virtual INSPressurePoisson::~INSPressurePoisson ( )
inlinevirtual

Definition at line 33 of file INSPressurePoisson.h.

33 {}

Member Function Documentation

◆ computeQpJacobian()

Real INSPressurePoisson::computeQpJacobian ( )
protectedvirtual

Definition at line 68 of file INSPressurePoisson.C.

69 {
70  return _grad_phi[_j][_qp] * _grad_test[_i][_qp];
71 }

◆ computeQpOffDiagJacobian()

Real INSPressurePoisson::computeQpOffDiagJacobian ( unsigned  jvar)
protectedvirtual

Definition at line 74 of file INSPressurePoisson.C.

75 {
76  if (jvar == _a1_var_number)
77  return _rho[_qp] * _grad_phi[_j][_qp](0) * _test[_i][_qp];
78 
79  else if (jvar == _a2_var_number)
80  return _rho[_qp] * _grad_phi[_j][_qp](1) * _test[_i][_qp];
81 
82  else if (jvar == _a3_var_number)
83  return _rho[_qp] * _grad_phi[_j][_qp](2) * _test[_i][_qp];
84 
85  else
86  return 0;
87 }
const MaterialProperty< Real > & _rho

◆ computeQpResidual()

Real INSPressurePoisson::computeQpResidual ( )
protectedvirtual

Definition at line 54 of file INSPressurePoisson.C.

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

Member Data Documentation

◆ _a1_var_number

unsigned INSPressurePoisson::_a1_var_number
protected

Definition at line 46 of file INSPressurePoisson.h.

Referenced by computeQpOffDiagJacobian().

◆ _a2_var_number

unsigned INSPressurePoisson::_a2_var_number
protected

Definition at line 47 of file INSPressurePoisson.h.

Referenced by computeQpOffDiagJacobian().

◆ _a3_var_number

unsigned INSPressurePoisson::_a3_var_number
protected

Definition at line 48 of file INSPressurePoisson.h.

Referenced by computeQpOffDiagJacobian().

◆ _grad_a1

const VariableGradient& INSPressurePoisson::_grad_a1
protected

Definition at line 41 of file INSPressurePoisson.h.

Referenced by computeQpResidual().

◆ _grad_a2

const VariableGradient& INSPressurePoisson::_grad_a2
protected

Definition at line 42 of file INSPressurePoisson.h.

Referenced by computeQpResidual().

◆ _grad_a3

const VariableGradient& INSPressurePoisson::_grad_a3
protected

Definition at line 43 of file INSPressurePoisson.h.

Referenced by computeQpResidual().

◆ _rho

const MaterialProperty<Real>& INSPressurePoisson::_rho
protected

Definition at line 51 of file INSPressurePoisson.h.

Referenced by computeQpOffDiagJacobian(), and computeQpResidual().


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