https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
22
28{
29public:
31
37
38 virtual Real computeElemMatrixContribution() override;
39
40 virtual Real computeNeighborMatrixContribution() override;
41
42 virtual Real computeElemRightHandSideContribution() override;
43
44 virtual Real computeNeighborRightHandSideContribution() override;
45
46 virtual Real computeBoundaryMatrixContribution(const LinearFVBoundaryCondition & bc) override;
47
48 virtual Real computeBoundaryRHSContribution(const LinearFVBoundaryCondition & bc) override;
49
56 virtual void setupFaceData(const FaceInfo * face_info) override;
57
58protected:
62
66
70
74
78
83
88
93
95 const unsigned int _dim;
96
99
102
105
108
111
114
117
119 VectorValue<Real> _elem_grad_storage;
120 VectorValue<Real> _neighbor_grad_storage;
121
125
129
132
135
138 const unsigned int _index;
139
141 std::array<const MooseLinearVariableFVReal *, 3> _velocity_vars;
142
145
147 std::array<const LinearFVGradientReader *, 3> _velocity_gradient_fields;
148
151
153 const unsigned int _rz_radial_coord;
154
156 const MooseLinearVariableFVReal & velocityVar(unsigned int dir) const;
157
159 const LinearFVGradientReader & velocityGradientField(unsigned int dir) const;
160};
Kernel that implements the stress tensor and advection terms for the momentum equation.
const LinearFVGradientReader *const _advected_gradient_field
Gradient field used by advected interpolations that require gradients.
virtual void setupFaceData(const FaceInfo *face_info) override
Set the current FaceInfo object.
Real computeInternalStressMatrixContribution()
Computes the matrix contribution of the stress term on the current face when the face is an internal ...
virtual Real computeNeighborMatrixContribution() override
VectorValue< Real > _elem_grad_storage
Reusable gradient storage used when advected interpolation requires gradients.
const MooseLinearVariableFVReal & velocityVar(unsigned int dir) const
Helper to access the velocity variable for a given direction.
Real _face_mass_flux
Container for the mass flux on the face which will be reused in the advection term's matrix and right...
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.
Real computeInternalAdvectionElemMatrixContribution()
Computes the matrix contribution of the advective flux on the element side of current face when the f...
FVAdvectedInterpolationMethod::AdvectedSystemContribution _adv_interp_result
Current advected interpolation contribution on the face.
virtual Real computeNeighborRightHandSideContribution() override
const Moose::CoordinateSystemType _coord_type
Coordinate system of the blocks this kernel operates on.
virtual Real computeElemMatrixContribution() override
Real _stress_matrix_contribution
The cached matrix contribution.
const Moose::Functor< Real > & _mu
The functor for the dynamic viscosity.
virtual Real computeElemRightHandSideContribution() override
Real _boundary_normal_factor
Multiplier that ensures the normal of the boundary always points outwards, even in cases when the bou...
Real _stress_rhs_contribution
The cached right hand side contribution.
const LinearFVGradientReader & velocityGradientField(unsigned int dir) const
Helper to access the velocity gradient field for a given direction.
virtual Real computeBoundaryRHSContribution(const LinearFVBoundaryCondition &bc) override
const unsigned int _index
Index x|y|z, this is mainly to handle the deviatoric parts correctly in in the stress term.
Real computeAdvectionBoundaryMatrixContribution(const LinearFVAdvectionDiffusionBC *bc)
Computes the matrix contributions of the boundary conditions resulting from the advection term.
const bool _use_deviatoric_terms
Switch to enable/disable deviatoric parts in the stress term.
Real computeAdvectionBoundaryRHSContribution(const LinearFVAdvectionDiffusionBC *bc)
Computes the right hand side contributions of the boundary conditions resulting from the advection te...
Real computeInternalStressRHSContribution()
Computes the right hand side contribution of the stress term on the current face when the face is an ...
VectorValue< Real > _neighbor_grad_storage
std::array< const LinearFVGradientReader *, 3 > _velocity_gradient_fields
Gradient fields used for velocity variables in deviatoric stress terms.
Real computeInternalAdvectionNeighborMatrixContribution()
Computes the matrix contribution of the advective flux on the neighbor side of current face when the ...
std::array< const MooseLinearVariableFVReal *, 3 > _velocity_vars
Velocity variables for each coordinate direction.
const unsigned int _dim
The dimension of the mesh.
const bool _use_nonorthogonal_correction
Switch to enable/disable nonorthogonal correction in the stress term.
Real computeStressBoundaryMatrixContribution(const LinearFVAdvectionDiffusionBC *bc)
Computes the matrix contributions of the boundary conditions resulting from the stress tensor.
const RhieChowMassFlux & _mass_flux_provider
The Rhie-Chow user object that provides us with the face velocity.
const LinearFVGradientReader * _gradient_field
Gradient field used for the kernel variable nonorthogonal correction.
Real computeStressBoundaryRHSContribution(const LinearFVAdvectionDiffusionBC *bc)
Computes the right hand side contributions of the boundary conditions resulting from the stress tenso...
static InputParameters validParams()
virtual Real computeBoundaryMatrixContribution(const LinearFVBoundaryCondition &bc) override
User object responsible for determining the face fluxes using the Rhie-Chow interpolation in a segreg...
CoordinateSystemType