https://mooseframework.inl.gov
FVFluxBC.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 "FVBoundaryCondition.h"
15 #include "MathFVUtils.h"
16 #include "FVFaceResidualObject.h"
17 #include "SideFVFluxBCIntegral.h"
18 
27 {
28 public:
30 
32 
33  void computeResidual(const FaceInfo & fi) override;
34  void computeJacobian(const FaceInfo & fi) override;
35  void computeResidualAndJacobian(const FaceInfo & fi) override;
36 
38  void updateCurrentFace(const FaceInfo & fi);
39 
40 protected:
41  virtual ADReal computeQpResidual() = 0;
42 
43  const ADRealVectorValue & normal() const { return _normal; }
44 
45  const unsigned int _qp = 0;
46  // TODO: add gradients once we have reconstruction.
48 
52  Moose::ElemArg elemArg(bool correct_skewness = false) const;
53 
57  Moose::ElemArg neighborArg(bool correct_skewness = false) const;
58 
61 
62  // This class will want to call computeQpResidual from here considering that
63  // it will directly use the boundary conditions to compute the flux.
64  friend class SideFVFluxBCIntegral;
65 };
void computeResidualAndJacobian(const FaceInfo &fi) override
Compute the residual and Jacobian on the supplied face.
Definition: FVFluxBC.C:89
FaceInfo::VarFaceNeighbors _face_type
The variable face type.
Definition: FVFluxBC.h:60
Intermediate base class that ties together all the interfaces for getting MooseVariables with the Moo...
Moose::ElemArg neighborArg(bool correct_skewness=false) const
Definition: FVFluxBC.C:129
static InputParameters validParams()
Definition: FVFluxBC.C:17
Base class for creating new types of boundary conditions.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
Interface class for a finite volume residual object whose residuals are based on faces.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
DualNumber< Real, DNDerivativeType, true > ADReal
Definition: ADRealForward.h:42
FVFluxBC(const InputParameters &parameters)
Definition: FVFluxBC.C:30
const unsigned int _qp
Definition: FVFluxBC.h:45
This data structure is used to store geometric and variable related metadata about each cell face in ...
Definition: FaceInfo.h:37
void updateCurrentFace(const FaceInfo &fi)
Update internal structures (normal, face type, etc) for the given face.
Definition: FVFluxBC.C:43
VarFaceNeighbors
This enum is used to indicate which side(s) of a face a particular variable is defined on...
Definition: FaceInfo.h:52
ADRealVectorValue _normal
Definition: FVFluxBC.h:47
Provides an interface for computing residual contributions from finite volume numerical fluxes comput...
Definition: FVFluxBC.h:23
A structure that is used to evaluate Moose functors logically at an element/cell center.
This postprocessor computes the side integral of different finite volume flux boundary conditions...
const ADRealVectorValue & normal() const
Definition: FVFluxBC.h:43
This interface is designed for DGKernel, InternalSideUserObject, InterfaceUserObject, where material properties on a side of both its primary side (face) and its secondary side (neighbor) all required.
Moose::ElemArg elemArg(bool correct_skewness=false) const
Definition: FVFluxBC.C:123
void computeJacobian(const FaceInfo &fi) override
Compute the jacobian on the supplied face.
Definition: FVFluxBC.C:95
virtual ADReal computeQpResidual()=0
void computeResidual(const FaceInfo &fi) override
Compute the residual on the supplied face.
Definition: FVFluxBC.C:61