INSADMaterial< compute_stage > Class Template Reference

#include <INSADMaterial.h>

Inheritance diagram for INSADMaterial< compute_stage >:
[legend]

## Protected Member Functions

virtual void computeQpProperties () override

viscosity More...

density More...

The strong residual of the mass continuity equation. More...

Strong residual corresponding to the momentum convective term. More...

Strong residual corresponding to the momentum transient term. More...

Strong residual corresponding to the momentum gravity term. More...

The strong residual of the momentum equation. More...

## Protected Attributes

velocity More...

const bool _transient_term
Whether we are performing a transient or steady simulation. More...

Time derivative of the velocity, e.g. the acceleration. More...

const bool _integrate_p_by_parts
Whether to integrate the pressure term in the momentum equations by parts. More...

const bool _include_viscous_term_in_strong_form
Whether to include the strong form of the viscous term in the momentum equation strong residual. More...

bool _gravity_set
Whether the user set a gravity vector. If none is set, we assume there is no gravity term in the simulation. More...

RealVectorValue _gravity
The gravity vector; should be in units of acceleration. More...

MaterialProperty< RealVectorValue > & _mms_function_strong_residual
Strong residual corresponding to the mms function term. More...

Function & _x_vel_fn
The x velocity mms forcing function. More...

Function & _y_vel_fn
The y velocity mms forcing function. More...

Function & _z_vel_fn
The z velocity mms forcing function. More...

usingMaterialMembers

## Detailed Description

### template<ComputeStage compute_stage> class INSADMaterial< compute_stage >

Definition at line 22 of file INSADMaterial.h.

## Constructor & Destructor Documentation

template<ComputeStage compute_stage>

Definition at line 41 of file INSADMaterial.C.

49  _velocity_dot(_transient_term ? &adCoupledVectorDot("velocity") : nullptr),
59  _x_vel_fn(getFunction("function_x")),
60  _y_vel_fn(getFunction("function_y")),
61  _z_vel_fn(getFunction("function_z"))
62 {
63  if (parameters.isParamSetByUser("gravity"))
64  {
65  _gravity_set = true;
67  }
68  else
69  _gravity_set = false;
71  mooseError("Sorry no TypeNTensor operations are currently implemented, so we cannot add the "
72  "strong form contribution of the viscous term. Note that for linear elements, this "
73  "introduces no error, and in general for bi-linear elements, the error is small");
74 }
Function & _y_vel_fn
The y velocity mms forcing function.
Time derivative of the velocity, e.g. the acceleration.
const bool _transient_term
Whether we are performing a transient or steady simulation.
MaterialProperty< RealVectorValue > & _mms_function_strong_residual
Strong residual corresponding to the mms function term.
const bool _integrate_p_by_parts
Whether to integrate the pressure term in the momentum equations by parts.
RealVectorValue _gravity
The gravity vector; should be in units of acceleration.
Function & _x_vel_fn
The x velocity mms forcing function.
Function & _z_vel_fn
The z velocity mms forcing function.
const bool _include_viscous_term_in_strong_form
Whether to include the strong form of the viscous term in the momentum equation strong residual...
velocity
bool _gravity_set
Whether the user set a gravity vector. If none is set, we assume there is no gravity term in the simu...

## Member Function Documentation

template<ComputeStage compute_stage>
protected

viscosity

template<ComputeStage compute_stage>
protected

density

template<ComputeStage compute_stage>
protected

The strong residual of the mass continuity equation.

template<ComputeStage compute_stage>
protected

Strong residual corresponding to the momentum convective term.

template<ComputeStage compute_stage>
protected

Strong residual corresponding to the momentum transient term.

template<ComputeStage compute_stage>
protected

Strong residual corresponding to the momentum gravity term.

template<ComputeStage compute_stage>
protected

The strong residual of the momentum equation.

## ◆ computeQpProperties()

template<ComputeStage compute_stage>
 void INSADMaterial< compute_stage >::computeQpProperties ( )
overrideprotectedvirtual

Definition at line 78 of file INSADMaterial.C.

79 {
81  _convective_strong_residual[_qp] = _rho[_qp] * _grad_velocity[_qp] * _velocity[_qp];
82  _td_strong_residual[_qp] =
83  _transient_term ? _rho[_qp] * (*_velocity_dot)[_qp] : ADRealVectorValue(0);
84  _gravity_strong_residual[_qp] = _gravity_set ? -_rho[_qp] * _gravity : ADRealVectorValue(0);
85  _mms_function_strong_residual[_qp] = -RealVectorValue(_x_vel_fn.value(_t, _q_point[_qp]),
86  _y_vel_fn.value(_t, _q_point[_qp]),
87  _z_vel_fn.value(_t, _q_point[_qp]));
88  _momentum_strong_residual[_qp] =
89  _gravity_strong_residual[_qp] + _mms_function_strong_residual[_qp] +
90  _convective_strong_residual[_qp] + _td_strong_residual[_qp] + _grad_p[_qp];
91 }
Function & _y_vel_fn
The y velocity mms forcing function.
const bool _transient_term
Whether we are performing a transient or steady simulation.
MaterialProperty< RealVectorValue > & _mms_function_strong_residual
Strong residual corresponding to the mms function term.
RealVectorValue _gravity
The gravity vector; should be in units of acceleration.
Function & _x_vel_fn
The x velocity mms forcing function.
Function & _z_vel_fn
The z velocity mms forcing function.
velocity
bool _gravity_set
Whether the user set a gravity vector. If none is set, we assume there is no gravity term in the simu...

## Member Data Documentation

template<ComputeStage compute_stage>
protected

Definition at line 42 of file INSADMaterial.h.

template<ComputeStage compute_stage>
protected

Definition at line 39 of file INSADMaterial.h.

## ◆ _gravity

template<ComputeStage compute_stage>
protected

The gravity vector; should be in units of acceleration.

Definition at line 68 of file INSADMaterial.h.

## ◆ _gravity_set

template<ComputeStage compute_stage>
protected

Whether the user set a gravity vector. If none is set, we assume there is no gravity term in the simulation.

Definition at line 65 of file INSADMaterial.h.

## ◆ _include_viscous_term_in_strong_form

template<ComputeStage compute_stage>
protected

Whether to include the strong form of the viscous term in the momentum equation strong residual.

The method is more consistent if set to true, but it incurs quite a bit more computational expense. Note that at present we don't actually support the true value of this member!

Definition at line 62 of file INSADMaterial.h.

## ◆ _integrate_p_by_parts

template<ComputeStage compute_stage>
protected

Whether to integrate the pressure term in the momentum equations by parts.

Definition at line 57 of file INSADMaterial.h.

## ◆ _mms_function_strong_residual

template<ComputeStage compute_stage>
protected

Strong residual corresponding to the mms function term.

Definition at line 83 of file INSADMaterial.h.

## ◆ _transient_term

template<ComputeStage compute_stage>
protected

Whether we are performing a transient or steady simulation.

Definition at line 51 of file INSADMaterial.h.

## ◆ _velocity

template<ComputeStage compute_stage>
protected

velocity

Definition at line 36 of file INSADMaterial.h.

## ◆ _velocity_dot

template<ComputeStage compute_stage>
protected

Time derivative of the velocity, e.g. the acceleration.

Definition at line 54 of file INSADMaterial.h.

## ◆ _x_vel_fn

template<ComputeStage compute_stage>
protected

The x velocity mms forcing function.

Definition at line 89 of file INSADMaterial.h.

## ◆ _y_vel_fn

template<ComputeStage compute_stage>
protected

The y velocity mms forcing function.

Definition at line 92 of file INSADMaterial.h.

## ◆ _z_vel_fn

template<ComputeStage compute_stage>
protected

The z velocity mms forcing function.

Definition at line 95 of file INSADMaterial.h.

## ◆ usingMaterialMembers

template<ComputeStage compute_stage>