https://mooseframework.inl.gov
ADPhaseFieldAdvectionSUPG.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.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 {
18  params.addClassDescription(
19  "SUPG stablization term for the advection portion of the level set equation.");
20  params.addRequiredCoupledVar("velocity", "Velocity vector variable.");
21  return params;
22 }
23 
25  : ADKernelGrad(parameters), _velocity(adCoupledVectorValue("velocity"))
26 {
27 }
28 
31 {
32  ADReal tau =
33  _current_elem->hmin() /
35  return (tau * _velocity[_qp]) * (_velocity[_qp] * _grad_u[_qp]);
36 }
static InputParameters validParams()
static constexpr Real TOLERANCE
static InputParameters validParams()
registerMooseObject("PhaseFieldApp", ADPhaseFieldAdvectionSUPG)
const ADVectorVariableValue & _velocity
Velocity vector variable.
SUPG stabilization for the advection portion of the level set equation.
auto norm(const T &a) -> decltype(std::abs(a))
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
const ADTemplateVariableGradient< T > & _grad_u
virtual ADRealVectorValue precomputeQpResidual() override
void addClassDescription(const std::string &doc_string)
const Elem *const & _current_elem
ADPhaseFieldAdvectionSUPG(const InputParameters &parameters)
unsigned int _qp