https://mooseframework.inl.gov
INSBase.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
12 #include "Kernel.h"
13 
18 class INSBase : public Kernel
19 {
20 public:
22 
24 
25  virtual ~INSBase() {}
26 
27 protected:
28  virtual Real computeQpResidual() = 0;
29  virtual Real computeQpJacobian() = 0;
30  virtual Real computeQpOffDiagJacobian(unsigned jvar) = 0;
31 
33  virtual RealVectorValue dConvecDUComp(unsigned comp);
34 
37  virtual RealVectorValue dStrongViscDUCompLaplace(unsigned comp);
38  virtual RealVectorValue dStrongViscDUCompTraction(unsigned comp);
39 
40  virtual RealVectorValue weakViscousTermLaplace(unsigned comp);
41  virtual RealVectorValue weakViscousTermTraction(unsigned comp);
44 
46  virtual Real weakPressureTerm();
48  virtual Real dWeakPressureDPressure();
49 
50  virtual RealVectorValue gravityTerm();
51 
53  virtual RealVectorValue dTimeDerivativeDUComp(unsigned comp);
54 
55  virtual Real tau();
56  virtual Real dTauDUComp(unsigned comp);
57 
59  virtual Real tauNodal();
60 
66 
71 
76  RealVectorValue dStrongViscDUCompLaplaceRZ(const unsigned int comp) const;
77 
82 
87  RealVectorValue dStrongViscDUCompTractionRZ(const unsigned int comp) const;
88 
91 
92  // Coupled variables
96  const VariableValue & _p;
97 
98  const bool _picard;
102 
103  // Gradients
108 
109  // Seconds
113 
114  // Time derivatives
118 
119  // Derivatives of time derivatives
123 
124  // Variable numberings
128  unsigned _p_var_number;
129 
131 
132  // Material properties
135 
136  const Real & _alpha;
137  bool _laplace;
140 
142  const bool _disps_provided;
149 
151  const unsigned int _rz_radial_coord;
152 };
virtual RealVectorValue strongViscousTermLaplace()
Definition: INSBase.C:170
const VariableValue & _p
Definition: INSBase.h:96
OutputTools< Real >::VariableGradient VariableGradient
RealVectorValue dStrongViscDUCompTractionRZ(const unsigned int comp) const
Computes the Jacobian for the additional RZ terms for the Traction form of the strong viscous term fo...
Definition: INSBase.C:415
const VariableValue *const _u_vel_previous_nl
Definition: INSBase.h:99
const VariablePhiSecond & _second_phi
second derivatives of the shape function
Definition: INSBase.h:90
virtual RealVectorValue dStrongViscDUCompTraction(unsigned comp)
Definition: INSBase.C:194
virtual Real tau()
Definition: INSBase.C:321
RealVectorValue dStrongViscDUCompLaplaceRZ(const unsigned int comp) const
Computes the Jacobian for the additional RZ terms for the Laplace form of the strong viscous term for...
Definition: INSBase.C:388
const MaterialProperty< Real > & _rho
Definition: INSBase.h:134
virtual Real tauNodal()
Provides tau which yields superconvergence for 1D advection-diffusion.
Definition: INSBase.C:332
This class computes strong and weak components of the INS governing equations.
Definition: INSBase.h:18
const VariableValue & _u_vel
Definition: INSBase.h:93
static InputParameters validParams()
Definition: INSBase.C:15
const VariableValue *const _w_vel_previous_nl
Definition: INSBase.h:101
RealVectorValue relativeVelocity() const
Compute the velocity.
Definition: INSBase.C:120
const MaterialProperty< Real > & _mu
Definition: INSBase.h:133
virtual RealVectorValue dWeakViscDUCompTraction()
Definition: INSBase.C:259
virtual Real dTauDUComp(unsigned comp)
Definition: INSBase.C:349
const VariableValue *const _v_vel_previous_nl
Definition: INSBase.h:100
const VariableGradient & _grad_v_vel
Definition: INSBase.h:105
const unsigned int _rz_radial_coord
The radial coordinate index for RZ coordinate systems.
Definition: INSBase.h:151
const VariableSecond & _second_u_vel
Definition: INSBase.h:110
const VariableValue & _w_vel_dot
Definition: INSBase.h:117
const VariableValue & _w_vel
Definition: INSBase.h:95
OutputTools< Real >::VariablePhiSecond VariablePhiSecond
const VariableValue & _disp_x_dot
Time derivative of the x-displacement, mesh velocity in the x-direction.
Definition: INSBase.h:144
unsigned _w_vel_var_number
Definition: INSBase.h:127
RealVectorValue strongViscousTermTractionRZ() const
Computes the additional RZ terms for the Traction form of the strong viscous term.
Definition: INSBase.C:400
const bool _picard
Definition: INSBase.h:98
virtual RealVectorValue dStrongPressureDPressure()
Definition: INSBase.C:277
const bool _disps_provided
Whether displacements are provided.
Definition: INSBase.h:142
virtual RealVectorValue timeDerivativeTerm()
Definition: INSBase.C:295
virtual RealVectorValue convectiveTerm()
Definition: INSBase.C:132
const VariableValue & _d_v_vel_dot_dv
Definition: INSBase.h:121
bool _convective_term
Definition: INSBase.h:138
virtual RealVectorValue weakViscousTermTraction(unsigned comp)
Definition: INSBase.C:225
const VariableGradient & _grad_u_vel
Definition: INSBase.h:104
const VariableSecond & _second_v_vel
Definition: INSBase.h:111
virtual RealVectorValue strongPressureTerm()
Definition: INSBase.C:265
virtual Real dWeakPressureDPressure()
Definition: INSBase.C:283
bool _transient_term
Definition: INSBase.h:139
virtual ~INSBase()
Definition: INSBase.h:25
virtual Real computeQpResidual()=0
const VariableValue & _disp_y_dot
Time derivative of the y-displacement, mesh velocity in the y-direction.
Definition: INSBase.h:146
const VariableValue & _u_vel_dot
Definition: INSBase.h:115
OutputTools< Real >::VariableValue VariableValue
virtual RealVectorValue dConvecDUComp(unsigned comp)
Definition: INSBase.C:143
unsigned _u_vel_var_number
Definition: INSBase.h:125
virtual Real computeQpOffDiagJacobian(unsigned jvar)=0
virtual RealVectorValue dStrongViscDUCompLaplace(unsigned comp)
Definition: INSBase.C:185
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const VariableValue & _d_w_vel_dot_dw
Definition: INSBase.h:122
const VariableGradient & _grad_w_vel
Definition: INSBase.h:106
const VariableSecond & _second_w_vel
Definition: INSBase.h:112
RealVectorValue strongViscousTermLaplaceRZ() const
Computes the additional RZ terms for the Laplace form of the strong viscous term. ...
Definition: INSBase.C:364
bool _laplace
Definition: INSBase.h:137
virtual RealVectorValue gravityTerm()
Definition: INSBase.C:289
INSBase(const InputParameters &parameters)
Definition: INSBase.C:52
virtual RealVectorValue strongViscousTermTraction()
Definition: INSBase.C:177
const VariableGradient & _grad_p
Definition: INSBase.h:107
virtual RealVectorValue dWeakViscDUCompLaplace()
Definition: INSBase.C:253
const InputParameters & parameters() const
OutputTools< Real >::VariableSecond VariableSecond
const VariableValue & _v_vel
Definition: INSBase.h:94
virtual RealVectorValue weakViscousTermLaplace(unsigned comp)
Definition: INSBase.C:206
virtual Real computeQpJacobian()=0
unsigned _v_vel_var_number
Definition: INSBase.h:126
RealVectorValue _gravity
Definition: INSBase.h:130
unsigned _p_var_number
Definition: INSBase.h:128
const VariableValue & _disp_z_dot
Time derivative of the z-displacement, mesh velocity in the z-direction.
Definition: INSBase.h:148
virtual Real weakPressureTerm()
Definition: INSBase.C:271
virtual RealVectorValue dTimeDerivativeDUComp(unsigned comp)
Definition: INSBase.C:301
const VariableValue & _d_u_vel_dot_du
Definition: INSBase.h:120
const VariableValue & _v_vel_dot
Definition: INSBase.h:116
const Real & _alpha
Definition: INSBase.h:136