www.mooseframework.org
LevelSetForcingFunctionSUPG.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 #include "Function.h"
12 
14 
17  ADKernelGrad,
18  params.addClassDescription("The SUPG stablization term for a forcing function.");
19  params.addParam<FunctionName>("function", "1", "A function that describes the body force");
20  params += validParams<LevelSetVelocityInterface<>>(););
21 
22 template <ComputeStage compute_stage>
24  const InputParameters & parameters)
25  : LevelSetVelocityInterface<ADKernelGrad<compute_stage>>(parameters),
26  _function(getFunction("function"))
27 {
28 }
29 
30 template <ComputeStage compute_stage>
31 ADRealVectorValue
33 {
34  computeQpVelocity();
35  ADReal tau = _current_elem->hmin() / (2 * _velocity.norm());
36  return -tau * _velocity * _function.value(_t, _q_point[_qp]);
37 }
LevelSetVelocityInterface
A helper class for defining the velocity as coupled variables for the levelset equation.
Definition: LevelSetVelocityInterface.h:18
registerADMooseObject
registerADMooseObject("LevelSetApp", LevelSetForcingFunctionSUPG)
defineADValidParams
defineADValidParams(LevelSetForcingFunctionSUPG, ADKernelGrad, params.addClassDescription("The SUPG stablization term for a forcing function.");params.addParam< FunctionName >("function", "1", "A function that describes the body force");params+=validParams< LevelSetVelocityInterface<>>();)
LevelSetForcingFunctionSUPG::LevelSetForcingFunctionSUPG
LevelSetForcingFunctionSUPG(const InputParameters &parameters)
Definition: LevelSetForcingFunctionSUPG.C:23
LevelSetForcingFunctionSUPG::precomputeQpResidual
virtual ADRealVectorValue precomputeQpResidual() override
Definition: LevelSetForcingFunctionSUPG.C:32
LevelSetForcingFunctionSUPG.h
LevelSetForcingFunctionSUPG
SUPG stabilization term for a forcing function.
Definition: LevelSetForcingFunctionSUPG.h:18