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;
48  // TODO: add gradients once we have reconstruction.
50 
55  const ADReal & uOnUSub() const;
56 
60  const ADReal & uOnGhost() const;
61 
65  Moose::ElemArg elemArg(bool correct_skewness = false) const;
66 
70  Moose::ElemArg neighborArg(bool correct_skewness = false) const;
71 
74 
75  // This class will want to call computeQpResidual from here considering that
76  // it will directly use the boundary conditions to compute the flux.
77  friend class SideFVFluxBCIntegral;
78 };
void computeResidualAndJacobian(const FaceInfo &fi) override
Compute the residual and Jacobian on the supplied face.
Definition: FVFluxBC.C:91
FaceInfo::VarFaceNeighbors _face_type
The variable face type.
Definition: FVFluxBC.h:73
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:173
static InputParameters validParams()
Definition: FVFluxBC.C:17
const ADReal & uOnUSub() const
Definition: FVFluxBC.C:125
Base class for creating new types of boundary conditions.
const ADVariableValue & _u_neighbor
Definition: FVFluxBC.h:47
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:47
FVFluxBC(const InputParameters &parameters)
Definition: FVFluxBC.C:30
const unsigned int _qp
Definition: FVFluxBC.h:45
const ADVariableValue & _u
Definition: FVFluxBC.h:46
This data structure is used to store geometric and variable related metadata about each cell face in ...
Definition: FaceInfo.h:36
void updateCurrentFace(const FaceInfo &fi)
Update internal structures (normal, face type, etc) for the given face.
Definition: FVFluxBC.C:45
const ADReal & uOnGhost() const
Definition: FVFluxBC.C:146
VarFaceNeighbors
This enum is used to indicate which side(s) of a face a particular variable is defined on...
Definition: FaceInfo.h:48
ADRealVectorValue _normal
Definition: FVFluxBC.h:49
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.
const InputParameters & parameters() const
Get the parameters of the object.
Moose::ElemArg elemArg(bool correct_skewness=false) const
Definition: FVFluxBC.C:167
void computeJacobian(const FaceInfo &fi) override
Compute the jacobian on the supplied face.
Definition: FVFluxBC.C:97
virtual ADReal computeQpResidual()=0
void computeResidual(const FaceInfo &fi) override
Compute the residual on the supplied face.
Definition: FVFluxBC.C:63