www.mooseframework.org
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
INSChorinPressurePoisson 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 <INSChorinPressurePoisson.h>

Inheritance diagram for INSChorinPressurePoisson:
[legend]

Public Member Functions

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

Protected Member Functions

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

Protected Attributes

const VariableGradient & _grad_u_star
 
const VariableGradient & _grad_v_star
 
const VariableGradient & _grad_w_star
 
unsigned _u_vel_star_var_number
 
unsigned _v_vel_star_var_number
 
unsigned _w_vel_star_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.

Definition at line 23 of file INSChorinPressurePoisson.h.

Constructor & Destructor Documentation

INSChorinPressurePoisson::INSChorinPressurePoisson ( const InputParameters &  parameters)

Definition at line 31 of file INSChorinPressurePoisson.C.

32  : Kernel(parameters),
33 
34  // Gradients
35  _grad_u_star(coupledGradient("u_star")),
36  _grad_v_star(_mesh.dimension() >= 2 ? coupledGradient("v_star") : _grad_zero),
37  _grad_w_star(_mesh.dimension() == 3 ? coupledGradient("w_star") : _grad_zero),
38 
39  // Variable numberings
40  _u_vel_star_var_number(coupled("u_star")),
41  _v_vel_star_var_number(_mesh.dimension() >= 2 ? coupled("v_star") : libMesh::invalid_uint),
42  _w_vel_star_var_number(_mesh.dimension() == 3 ? coupled("w_star") : libMesh::invalid_uint),
43 
44  // Material properties
45  _rho(getMaterialProperty<Real>("rho_name"))
46 {
47 }
const VariableGradient & _grad_v_star
const MaterialProperty< Real > & _rho
const VariableGradient & _grad_u_star
const VariableGradient & _grad_w_star
virtual INSChorinPressurePoisson::~INSChorinPressurePoisson ( )
inlinevirtual

Definition at line 28 of file INSChorinPressurePoisson.h.

28 {}

Member Function Documentation

Real INSChorinPressurePoisson::computeQpJacobian ( )
protectedvirtual

Definition at line 65 of file INSChorinPressurePoisson.C.

Referenced by ~INSChorinPressurePoisson().

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

Definition at line 71 of file INSChorinPressurePoisson.C.

Referenced by ~INSChorinPressurePoisson().

72 {
73  if (jvar == _u_vel_star_var_number)
74  return (_rho[_qp] / _dt) * _grad_phi[_j][_qp](0) * _test[_i][_qp];
75 
76  else if (jvar == _v_vel_star_var_number)
77  return (_rho[_qp] / _dt) * _grad_phi[_j][_qp](1) * _test[_i][_qp];
78 
79  else if (jvar == _w_vel_star_var_number)
80  return (_rho[_qp] / _dt) * _grad_phi[_j][_qp](2) * _test[_i][_qp];
81 
82  else
83  return 0;
84 }
const MaterialProperty< Real > & _rho
Real INSChorinPressurePoisson::computeQpResidual ( )
protectedvirtual

Definition at line 50 of file INSChorinPressurePoisson.C.

Referenced by ~INSChorinPressurePoisson().

51 {
52  // Laplacian part
53  Real laplacian_part = _grad_u[_qp] * _grad_test[_i][_qp];
54 
55  // Divergence part, don't forget to *divide* by _dt
56  Real div_part = (_rho[_qp] / _dt) *
57  (_grad_u_star[_qp](0) + _grad_v_star[_qp](1) + _grad_w_star[_qp](2)) *
58  _test[_i][_qp];
59 
60  // Return the result
61  return laplacian_part + div_part;
62 }
const VariableGradient & _grad_v_star
const MaterialProperty< Real > & _rho
const VariableGradient & _grad_u_star
const VariableGradient & _grad_w_star

Member Data Documentation

const VariableGradient& INSChorinPressurePoisson::_grad_u_star
protected

Definition at line 36 of file INSChorinPressurePoisson.h.

Referenced by computeQpResidual().

const VariableGradient& INSChorinPressurePoisson::_grad_v_star
protected

Definition at line 37 of file INSChorinPressurePoisson.h.

Referenced by computeQpResidual().

const VariableGradient& INSChorinPressurePoisson::_grad_w_star
protected

Definition at line 38 of file INSChorinPressurePoisson.h.

Referenced by computeQpResidual().

const MaterialProperty<Real>& INSChorinPressurePoisson::_rho
protected

Definition at line 46 of file INSChorinPressurePoisson.h.

Referenced by computeQpOffDiagJacobian(), and computeQpResidual().

unsigned INSChorinPressurePoisson::_u_vel_star_var_number
protected

Definition at line 41 of file INSChorinPressurePoisson.h.

Referenced by computeQpOffDiagJacobian().

unsigned INSChorinPressurePoisson::_v_vel_star_var_number
protected

Definition at line 42 of file INSChorinPressurePoisson.h.

Referenced by computeQpOffDiagJacobian().

unsigned INSChorinPressurePoisson::_w_vel_star_var_number
protected

Definition at line 43 of file INSChorinPressurePoisson.h.

Referenced by computeQpOffDiagJacobian().


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