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