https://mooseframework.inl.gov
LinearWCNSFVMomentumFlux.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 "LinearFVFluxKernel.h"
15 
16 #include <array>
17 
18 class RhieChowMassFlux;
21 
27 {
28 public:
30 
36 
37  virtual Real computeElemMatrixContribution() override;
38 
39  virtual Real computeNeighborMatrixContribution() override;
40 
41  virtual Real computeElemRightHandSideContribution() override;
42 
44 
46 
48 
55  virtual void setupFaceData(const FaceInfo * face_info) override;
56 
57 protected:
61 
65 
69 
73 
77 
82 
87 
92 
94  const unsigned int _dim;
95 
98 
101 
104 
107 
110 
113 
117 
121 
125 
128 
131 
134  const unsigned int _index;
135 
137  std::array<const MooseLinearVariableFVReal *, 3> _velocity_vars;
138 
141 
143  const unsigned int _rz_radial_coord;
144 
146  const MooseLinearVariableFVReal & velocityVar(unsigned int dir) const;
147 };
virtual Real computeBoundaryMatrixContribution(const LinearFVBoundaryCondition &bc) override
Real computeInternalAdvectionNeighborMatrixContribution()
Computes the matrix contribution of the advective flux on the neighbor side of current face when the ...
const unsigned int _index
Index x|y|z, this is mainly to handle the deviatoric parts correctly in in the stress term...
User object responsible for determining the face fluxes using the Rhie-Chow interpolation in a segreg...
Real computeInternalAdvectionElemMatrixContribution()
Computes the matrix contribution of the advective flux on the element side of current face when the f...
virtual Real computeNeighborRightHandSideContribution() override
Real computeStressBoundaryRHSContribution(const LinearFVAdvectionDiffusionBC *bc)
Computes the right hand side contributions of the boundary conditions resulting from the stress tenso...
Real computeInternalStressMatrixContribution()
Computes the matrix contribution of the stress term on the current face when the face is an internal ...
const bool _use_nonorthogonal_correction
Switch to enable/disable nonorthogonal correction in the stress term.
const RhieChowMassFlux & _mass_flux_provider
The Rhie-Chow user object that provides us with the face velocity.
std::array< const MooseLinearVariableFVReal *, 3 > _velocity_vars
Velocity variables for each coordinate direction.
const unsigned int _rz_radial_coord
Axisymmetric radial coordinate index (only used when in RZ)
const FVAdvectedInterpolationMethod & _adv_interp_method
The interpolation method to use for the advected quantity.
const Moose::CoordinateSystemType _coord_type
Coordinate system of the blocks this kernel operates on.
VectorValue< Real > _neighbor_grad_storage
Real _boundary_normal_factor
Multiplier that ensures the normal of the boundary always points outwards, even in cases when the bou...
const Moose::Functor< Real > & _mu
The functor for the dynamic viscosity.
static InputParameters validParams()
const MooseLinearVariableFVReal & velocityVar(unsigned int dir) const
Helper to access the velocity variable for a given direction.
FVAdvectedInterpolationMethod::AdvectedSystemContribution _adv_interp_result
Current advected interpolation contribution on the face.
virtual void setupFaceData(const FaceInfo *face_info) override
Set the current FaceInfo object.
Real computeAdvectionBoundaryMatrixContribution(const LinearFVAdvectionDiffusionBC *bc)
Computes the matrix contributions of the boundary conditions resulting from the advection term...
Kernel that implements the stress tensor and advection terms for the momentum equation.
Real computeAdvectionBoundaryRHSContribution(const LinearFVAdvectionDiffusionBC *bc)
Computes the right hand side contributions of the boundary conditions resulting from the advection te...
Real _stress_rhs_contribution
The cached right hand side contribution.
virtual Real computeElemRightHandSideContribution() override
const unsigned int _dim
The dimension of the mesh.
Real _stress_matrix_contribution
The cached matrix contribution.
Real computeStressBoundaryMatrixContribution(const LinearFVAdvectionDiffusionBC *bc)
Computes the matrix contributions of the boundary conditions resulting from the stress tensor...
virtual Real computeNeighborMatrixContribution() override
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
CoordinateSystemType
Real _face_mass_flux
Container for the mass flux on the face which will be reused in the advection term&#39;s matrix and right...
virtual Real computeElemMatrixContribution() override
LinearWCNSFVMomentumFlux(const InputParameters &params)
Class constructor.
Real computeInternalStressRHSContribution()
Computes the right hand side contribution of the stress term on the current face when the face is an ...
VectorValue< Real > _elem_grad_storage
Reusable gradient storage used when advected interpolation requires gradients.
const bool _use_deviatoric_terms
Switch to enable/disable deviatoric parts in the stress term.
virtual Real computeBoundaryRHSContribution(const LinearFVBoundaryCondition &bc) override