https://mooseframework.inl.gov
Loading...
Searching...
No Matches
LinearFVDiffusion.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 LinearFVDiffusion(const InputParameters & params);
30
31 virtual void setupFaceData(const FaceInfo * face_info) override;
32
33 virtual void initialSetup() override;
34
35 virtual Real computeElemMatrixContribution() override;
36
37 virtual Real computeNeighborMatrixContribution() override;
38
39 virtual Real computeElemRightHandSideContribution() override;
40
41 virtual Real computeNeighborRightHandSideContribution() override;
42
43 virtual Real computeBoundaryMatrixContribution(const LinearFVBoundaryCondition & bc) override;
44
45 virtual Real computeBoundaryRHSContribution(const LinearFVBoundaryCondition & bc) override;
46
47protected:
55
63
67 Real faceDiffusivity() const;
68
71
74
77
80
83
86 mutable Real _face_diffusivity;
87};
Abstract base class for interpolation methods that produce a scalar face value from adjacent cell val...
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.
Base class for boundary conditions for linear FV systems.
Kernel that adds contributions from a diffusion term discretized using the finite volume method to a ...
const FVFaceInterpolationMethod * _coeff_interp_method
Optional interpolation method for the diffusion coefficient.
const bool _use_nonorthogonal_correction
Switch to enable/disable nonorthogonal correction.
virtual Real computeNeighborMatrixContribution() override
Computes the system matrix contribution from the neighbor side on an internal face.
static InputParameters validParams()
virtual Real computeElemRightHandSideContribution() override
Computes the right hand side contribution from the element side on an internal face.
Real computeFluxMatrixContribution()
Computes the matrix contribution from the diffusive face flux.
virtual Real computeBoundaryMatrixContribution(const LinearFVBoundaryCondition &bc) override
Computes the matrix contribution from a boundary face.
Real _flux_matrix_contribution
The cached matrix contribution.
bool _cached_face_diffusivity
Cache for interpolated diffusion coefficient.
virtual void setupFaceData(const FaceInfo *face_info) override
Set the current FaceInfo object.
Real computeFluxRHSContribution()
Computes the right hand side contribution from the diffusive face flux.
virtual Real computeBoundaryRHSContribution(const LinearFVBoundaryCondition &bc) override
Computes the right hand side contribution from a boundary face.
const Moose::Functor< Real > & _diffusion_coeff
The functor for the diffusion coefficient.
Real faceDiffusivity() const
Returns the diffusion coefficient interpolated to the current face.
Real _flux_rhs_contribution
The cached right hand side contribution.
virtual Real computeElemMatrixContribution() override
Computes the system matrix contribution from an element side on an internal face.
virtual Real computeNeighborRightHandSideContribution() override
Computes the right hand side contribution from the neighbor side on an internal face.
virtual void initialSetup() override
Gets called at the beginning of the simulation before this object is asked to do its job.
Finite volume kernel that contributes approximations of discretized face flux terms to the matrix and...
This is a wrapper that forwards calls to the implementation, which can be switched out at any time wi...