Line data Source code
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 "LevelSetTimeDerivativeSUPG.h" 11 : 12 : registerMooseObject("LevelSetApp", LevelSetTimeDerivativeSUPG); 13 : 14 : InputParameters 15 168 : LevelSetTimeDerivativeSUPG::validParams() 16 : { 17 168 : InputParameters params = ADTimeKernelGrad::validParams(); 18 168 : params.addClassDescription( 19 : "SUPG stablization terms for the time derivative of the level set equation."); 20 336 : params.addRequiredCoupledVar("velocity", "Velocity vector variable."); 21 168 : return params; 22 0 : } 23 : 24 96 : LevelSetTimeDerivativeSUPG::LevelSetTimeDerivativeSUPG(const InputParameters & parameters) 25 96 : : ADTimeKernelGrad(parameters), _velocity(adCoupledVectorValue("velocity")) 26 : { 27 96 : } 28 : 29 : ADRealVectorValue 30 21172608 : LevelSetTimeDerivativeSUPG::precomputeQpResidual() 31 : { 32 : ADReal tau = 33 42345216 : _current_elem->hmin() / 34 42345216 : (2 * (_velocity[_qp] + RealVectorValue(libMesh::TOLERANCE * libMesh::TOLERANCE)).norm()); 35 42345216 : return tau * _velocity[_qp] * _u_dot[_qp]; 36 : }