https://mooseframework.inl.gov
Loading...
Searching...
No Matches
FVConstantScalarOutflowBC.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
11
13
16{
19 "Constant velocity scalar advection boundary conditions for finite volume method.");
20 params.addRequiredParam<RealVectorValue>("velocity", "Constant advection velocity");
21 return params;
22}
23
25 : FVFluxBC(parameters), _velocity(getParam<RealVectorValue>("velocity"))
26{
27}
28
31{
32 mooseAssert(_normal * _velocity >= 0,
33 "This boundary condition is for outflow but the flow is in the opposite direction of "
34 "the boundary normal");
35
36 const auto boundary_face = singleSidedFaceArg();
37 const auto state = determineState();
38
39 // This will either be second or first order accurate depending on whether the user has asked
40 // for a two term expansion in their input file
41 return _normal * _velocity * _var(boundary_face, state);
42}
DualNumber< Real, DNDerivativeType, true > ADReal
registerMooseObject("MooseApp", FVConstantScalarOutflowBC)
MooseVariableFV< Real > & _var
Moose::FaceArg singleSidedFaceArg(const FaceInfo *fi=nullptr, Moose::FV::LimiterType limiter_type=Moose::FV::LimiterType::CentralDifference, bool correct_skewness=false, const Moose::StateArg *state_limiter=nullptr) const
Determine the single sided face argument when evaluating a functor on a face.
Constant velocity scalar advection boundary conditions.
virtual ADReal computeQpResidual() override
const ADRealVectorValue _velocity
static InputParameters validParams()
FVConstantScalarOutflowBC(const InputParameters &parameters)
Provides an interface for computing residual contributions from finite volume numerical fluxes comput...
Definition FVFluxBC.h:27
ADRealVectorValue _normal
Definition FVFluxBC.h:47
static InputParameters validParams()
Definition FVFluxBC.C:17
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
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...
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.
Moose::StateArg determineState() const
Create a functor state argument that corresponds to the implicit state of this object.