https://mooseframework.inl.gov
LinearFVDivergence.C
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 #include "LinearFVDivergence.h"
11 
12 registerMooseObject("NavierStokesApp", LinearFVDivergence);
13 
16 {
18  params.addClassDescription("Represents a divergence term. Note, this term does not contribute to "
19  "the system matrix, only takes the divergence of a face flux field "
20  "and adds it to the right hand side of the linear system.");
21  params.addRequiredParam<MooseFunctorName>("face_flux", "Functor for the face flux.");
22  return params;
23 }
24 
26  : LinearFVFluxKernel(params), _face_flux(getFunctor<Real>("face_flux"))
27 
28 {
29 }
30 
31 Real
33 {
34  return 0;
35 }
36 
37 Real
39 {
40  return 0;
41 }
42 
43 Real
45 {
46  return computeFaceFlux();
47 }
48 
49 Real
51 {
52  return -computeFaceFlux();
53 }
54 
55 Real
57 {
58  return 0.0;
59 }
60 
61 Real
63 {
64  return computeFaceFlux();
65 }
66 
67 Real
69 {
70  const auto face_arg = makeCDFace(*_current_face_info);
71  const auto state_arg = determineState();
72 
74  {
76  _flux_rhs_contribution = _face_flux(face_arg, state_arg) * _current_face_area;
77  }
78 
80 }
Kernel that adds contributions from an advection term discretized using the finite volume method to a...
Moose::StateArg determineState() const
virtual Real computeNeighborMatrixContribution() override
void addRequiredParam(const std::string &name, const std::string &doc_string)
static InputParameters validParams()
const FaceInfo * _current_face_info
const Moose::Functor< Real > & _face_flux
The functor for the face flux.
virtual Real computeBoundaryMatrixContribution(const LinearFVBoundaryCondition &bc) override
static InputParameters validParams()
virtual Real computeBoundaryRHSContribution(const LinearFVBoundaryCondition &bc) override
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Real _flux_rhs_contribution
The cached right hand side contribution.
LinearFVDivergence(const InputParameters &params)
Class constructor.
void addClassDescription(const std::string &doc_string)
virtual Real computeNeighborRightHandSideContribution() override
Moose::FaceArg makeCDFace(const FaceInfo &fi, const bool correct_skewness=false) const
virtual Real computeElemMatrixContribution() override
registerMooseObject("NavierStokesApp", LinearFVDivergence)
virtual Real computeElemRightHandSideContribution() override