www.mooseframework.org
LevelSetForcingFunctionSUPG.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 
9 #include "Function.h"
10 
11 template <>
12 InputParameters
14 {
15  InputParameters params = validParams<BodyForce>();
16  params.addClassDescription("The SUPG stablization term for a forcing function.");
17  params += validParams<LevelSetVelocityInterface<>>();
18  return params;
19 }
20 
22  : LevelSetVelocityInterface<BodyForce>(parameters)
23 {
24 }
25 
26 Real
28 {
30  Real tau = _current_elem->hmin() / (2 * _velocity.norm());
31  return -tau * _velocity * _grad_test[_i][_qp] * _function.value(_t, _q_point[_qp]);
32 }
33 
34 Real
36 {
38  Real tau = _current_elem->hmin() / (2 * _velocity.norm());
39  return -tau * _velocity * _grad_test[_i][_qp] * _function.value(_t, _q_point[_qp]);
40 }
RealVectorValue _velocity
Storage for velocity vector.
InputParameters validParams< LevelSetForcingFunctionSUPG >()
LevelSetForcingFunctionSUPG(const InputParameters &parameters)
A helper class for defining the velocity as coupled variables for the levelset equation.
void computeQpVelocity()
This method should be called when the velocity vector needs to be updated, this is not done automatic...