https://mooseframework.inl.gov
FVCoupledForce.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 "FVCoupledForce.h"
11 
13 
16 {
18 
19  params.addClassDescription("Implements a source term proportional to the value of a coupled "
20  "variable.");
21  params.addRequiredParam<MooseFunctorName>("v", "The coupled functor which provides the force");
22  params.addParam<Real>("coef", 1.0, "Coefficent multiplier for the coupled force term.");
23 
24  return params;
25 }
26 
28  : FVElementalKernel(parameters), _v(getFunctor<ADReal>("v")), _coef(getParam<Real>("coef"))
29 {
30 }
31 
32 ADReal
34 {
36 }
Moose::StateArg determineState() const
Create a functor state argument that corresponds to the implicit state of this object.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
DualNumber< Real, DNDerivativeType, true > ADReal
Definition: ADRealForward.h:46
ADReal computeQpResidual() override
This is the primary function that must be implemented for flux kernel terms.
const Moose::Functor< ADReal > & _v
The coupled functor applying the force.
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...
Moose::ElemArg makeElemArg(const Elem *elem, bool correct_skewnewss=false) const
Helper method to create an elemental argument for a functor that includes whether to perform skewness...
FVElemental is used for calculating residual contributions from volume integral terms of a PDE where ...
static InputParameters validParams()
const Elem *const & _current_elem
static InputParameters validParams()
Simple class to demonstrate off diagonal Jacobian contributions.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const Real _coef
An optional coefficient multiplying the coupled force.
registerMooseObject("MooseApp", FVCoupledForce)
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...
FVCoupledForce(const InputParameters &parameters)