www.mooseframework.org
SimpleACInterface.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 "SimpleACInterface.h"
11 
12 registerMooseObject("PhaseFieldApp", SimpleACInterface);
13 
16 {
18  params.addClassDescription(
19  "Gradient energy for Allen-Cahn Kernel with constant Mobility and Interfacial parameter");
20  params.addParam<MaterialPropertyName>("mob_name", "L", "The mobility used with the kernel");
21  params.addParam<MaterialPropertyName>("kappa_name", "kappa_op", "The kappa used with the kernel");
22  return params;
23 }
24 
26  : Kernel(parameters),
27  _L(getMaterialProperty<Real>("mob_name")),
28  _kappa(getMaterialProperty<Real>("kappa_name"))
29 {
30 }
31 
32 Real
34 {
35  return _grad_u[_qp] * _kappa[_qp] * _L[_qp] * _grad_test[_i][_qp];
36 }
37 
38 Real
40 {
41  return _grad_phi[_j][_qp] * _kappa[_qp] * _L[_qp] * _grad_test[_i][_qp];
42 }
const VariableGradient & _grad_u
static InputParameters validParams()
const MaterialProperty< Real > & _L
Mobility.
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
SimpleACInterface(const InputParameters &parameters)
const VariablePhiGradient & _grad_phi
registerMooseObject("PhaseFieldApp", SimpleACInterface)
virtual Real computeQpResidual()
unsigned int _i
Compute the Allen-Cahn interface term with constant Mobility and Interfacial parameter.
unsigned int _j
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual Real computeQpJacobian()
const VariableTestGradient & _grad_test
void addClassDescription(const std::string &doc_string)
static InputParameters validParams()
unsigned int _qp
const MaterialProperty< Real > & _kappa
Interfacial parameter.