https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
DualNumber< Real, DNDerivativeType, true > ADReal
registerMooseObject("MooseApp", FVCoupledForce)
Simple class to demonstrate off diagonal Jacobian contributions.
ADReal computeQpResidual() override
This is the primary function that must be implemented for flux kernel terms.
static InputParameters validParams()
const Real _coef
An optional coefficient multiplying the coupled force.
FVCoupledForce(const InputParameters &parameters)
const Moose::Functor< ADReal > & _v
The coupled functor applying the force.
FVElemental is used for calculating residual contributions from volume integral terms of a PDE where ...
static InputParameters validParams()
const Elem *const & _current_elem
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...
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
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.
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.