https://mooseframework.inl.gov
FVFunctionNeumannBC.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 "FVFunctionNeumannBC.h"
11 #include "Function.h"
12 
14 
17 {
19  params.addClassDescription("Neumann boundary condition for finite volume method.");
20  params.addParam<Real>("factor",
21  1.,
22  "A factor for multiplying the function. This could be useful for flipping "
23  "the sign of the function for example based off the normal");
24  params.addRequiredParam<FunctionName>("function", "The value of the flux crossing the boundary.");
25  return params;
26 }
27 
29  : FVFluxBC(parameters), _function(getFunction("function")), _factor(getParam<Real>("factor"))
30 {
31 }
32 
33 ADReal
35 {
37 }
const FaceInfo * _face_info
Holds information for the face we are currently examining.
const Function & _function
static InputParameters validParams()
Definition: FVFluxBC.C:17
registerMooseObject("MooseApp", FVFunctionNeumannBC)
FVFunctionNeumannBC(const InputParameters &parameters)
const Point & faceCentroid() const
Returns the coordinates of the face centroid.
Definition: FaceInfo.h:71
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
DualNumber< Real, DNDerivativeType, true > ADReal
Definition: ADRealForward.h:46
static InputParameters validParams()
void addRequiredParam(const std::string &name, const std::string &doc_string)
This method adds a parameter and documentation string to the InputParameters object that will be extr...
Neumann boundary (== fixed inflow) condition for finite volume scheme.
Provides an interface for computing residual contributions from finite volume numerical fluxes comput...
Definition: FVFluxBC.h:23
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual ADReal computeQpResidual() override
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump...
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an optional parameter and a documentation string to the InputParameters object...
virtual Real value(Real t, const Point &p) const
Override this to evaluate the scalar function at point (t,x,y,z), by default this returns zero...
Definition: Function.C:44