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 26 of file INSChorinPressurePoisson.h.

Constructor & Destructor Documentation

◆ INSChorinPressurePoisson()

INSChorinPressurePoisson::INSChorinPressurePoisson ( const InputParameters &  parameters)

Definition at line 35 of file INSChorinPressurePoisson.C.

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

◆ ~INSChorinPressurePoisson()

virtual INSChorinPressurePoisson::~INSChorinPressurePoisson ( )
inlinevirtual

Definition at line 31 of file INSChorinPressurePoisson.h.

31 {}

Member Function Documentation

◆ computeQpJacobian()

Real INSChorinPressurePoisson::computeQpJacobian ( )
protectedvirtual

Definition at line 69 of file INSChorinPressurePoisson.C.

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

◆ computeQpOffDiagJacobian()

Real INSChorinPressurePoisson::computeQpOffDiagJacobian ( unsigned  jvar)
protectedvirtual

Definition at line 75 of file INSChorinPressurePoisson.C.

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

◆ computeQpResidual()

Real INSChorinPressurePoisson::computeQpResidual ( )
protectedvirtual

Definition at line 54 of file INSChorinPressurePoisson.C.

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

Member Data Documentation

◆ _grad_u_star

const VariableGradient& INSChorinPressurePoisson::_grad_u_star
protected

Definition at line 39 of file INSChorinPressurePoisson.h.

Referenced by computeQpResidual().

◆ _grad_v_star

const VariableGradient& INSChorinPressurePoisson::_grad_v_star
protected

Definition at line 40 of file INSChorinPressurePoisson.h.

Referenced by computeQpResidual().

◆ _grad_w_star

const VariableGradient& INSChorinPressurePoisson::_grad_w_star
protected

Definition at line 41 of file INSChorinPressurePoisson.h.

Referenced by computeQpResidual().

◆ _rho

const MaterialProperty<Real>& INSChorinPressurePoisson::_rho
protected

Definition at line 49 of file INSChorinPressurePoisson.h.

Referenced by computeQpOffDiagJacobian(), and computeQpResidual().

◆ _u_vel_star_var_number

unsigned INSChorinPressurePoisson::_u_vel_star_var_number
protected

Definition at line 44 of file INSChorinPressurePoisson.h.

Referenced by computeQpOffDiagJacobian().

◆ _v_vel_star_var_number

unsigned INSChorinPressurePoisson::_v_vel_star_var_number
protected

Definition at line 45 of file INSChorinPressurePoisson.h.

Referenced by computeQpOffDiagJacobian().

◆ _w_vel_star_var_number

unsigned INSChorinPressurePoisson::_w_vel_star_var_number
protected

Definition at line 46 of file INSChorinPressurePoisson.h.

Referenced by computeQpOffDiagJacobian().


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