https://mooseframework.inl.gov
Loading...
Searching...
No Matches
LinearFVAdvection.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
21{
22public:
24
29 LinearFVAdvection(const InputParameters & params);
30
31 virtual void setupFaceData(const FaceInfo * face_info) override;
32 virtual void initialSetup() override;
33
34 virtual Real computeElemMatrixContribution() override;
35
36 virtual Real computeNeighborMatrixContribution() override;
37
38 virtual Real computeElemRightHandSideContribution() override;
39
40 virtual Real computeNeighborRightHandSideContribution() override;
41
42 virtual Real computeBoundaryMatrixContribution(const LinearFVBoundaryCondition & bc) override;
43
44 virtual Real computeBoundaryRHSContribution(const LinearFVBoundaryCondition & bc) override;
45
46protected:
48 const RealVectorValue _velocity;
49
52
55
57 VectorValue<Real> _elem_grad_storage;
58 VectorValue<Real> _neighbor_grad_storage;
59
60 // Cache for the advected face flux
61 Real _adv_face_flux = 0.0;
62};
Interface for interpolation methods that provide matrix and RHS contributions for advected face value...
Helper interface for objects that need access to FVInterpolationMethod instances.
This data structure is used to store geometric and variable related metadata about each cell face in ...
Definition FaceInfo.h:38
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
Kernel that adds contributions from an advection term discretized using the finite volume method to a...
VectorValue< Real > _neighbor_grad_storage
virtual Real computeBoundaryRHSContribution(const LinearFVBoundaryCondition &bc) override
Computes the right hand side contribution from a boundary face.
virtual Real computeElemMatrixContribution() override
Computes the system matrix contribution from an element side on an internal face.
VectorValue< Real > _elem_grad_storage
Reusable gradient storage used when advected interpolation requires gradients.
virtual Real computeElemRightHandSideContribution() override
Computes the right hand side contribution from the element side on an internal face.
virtual Real computeNeighborMatrixContribution() override
Computes the system matrix contribution from the neighbor side on an internal face.
const RealVectorValue _velocity
Constant advecting velocity vector.
virtual void initialSetup() override
Gets called at the beginning of the simulation before this object is asked to do its job.
FVAdvectedInterpolationMethod::AdvectedSystemContribution _adv_interp_result
Cached weights/correction for the current face (refreshed in setupFaceData)
virtual Real computeNeighborRightHandSideContribution() override
Computes the right hand side contribution from the neighbor side on an internal face.
virtual void setupFaceData(const FaceInfo *face_info) override
Set the current FaceInfo object.
static InputParameters validParams()
virtual Real computeBoundaryMatrixContribution(const LinearFVBoundaryCondition &bc) override
Computes the matrix contribution from a boundary face.
const FVAdvectedInterpolationMethod & _adv_interp_method
The interpolation method to use for the advected quantity.
Base class for boundary conditions for linear FV systems.
Finite volume kernel that contributes approximations of discretized face flux terms to the matrix and...
Matrix/RHS contribution for an advected face interpolation.