www.mooseframework.org
DoubleWellPotential.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 #include "DoubleWellPotential.h"
8 
9 template <>
10 InputParameters
12 {
13  InputParameters params = validParams<KernelValue>();
14  params.addClassDescription(
15  "Simple demonstration Allen-Cahn Kernel using an algebraic double-well potential");
16  params.addParam<MaterialPropertyName>("mob_name", "L", "The mobility used with the kernel");
17 
18  return params;
19 }
20 
21 DoubleWellPotential::DoubleWellPotential(const InputParameters & parameters)
22  : ACBulk<Real>(parameters)
23 {
24 }
25 
26 Real
28 {
29  switch (type)
30  {
31  case Residual:
32  return _u[_qp] * _u[_qp] * _u[_qp] - _u[_qp];
33 
34  case Jacobian:
35  return _phi[_j][_qp] * (3.0 * _u[_qp] * _u[_qp] - 1.0);
36  }
37 
38  mooseError("Invalid type passed in");
39 }
virtual Real computeDFDOP(PFFunctionType type)
This is the Allen-Cahn equation base class that implements the bulk or local energy term of the equat...
Definition: ACBulk.h:22
InputParameters validParams< DoubleWellPotential >()
DoubleWellPotential(const InputParameters &parameters)