www.mooseframework.org
SimpleCoupledACInterface.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 
11 
13 
16 {
18  params.addClassDescription("Gradient energy for Allen-Cahn Kernel with constant Mobility and "
19  "Interfacial parameter for a coupled order parameter variable.");
20  params.addRequiredCoupledVar("v", "Coupled variable that the Laplacian is taken of");
21  params.addParam<MaterialPropertyName>("mob_name", "L", "The mobility used with the kernel");
22  params.addParam<MaterialPropertyName>("kappa_name", "kappa_op", "The kappa used with the kernel");
23  return params;
24 }
25 
27  : Kernel(parameters),
28  _L(getMaterialProperty<Real>("mob_name")),
29  _kappa(getMaterialProperty<Real>("kappa_name")),
30  _grad_v(coupledGradient("v")),
31  _v_var(coupled("v", 0))
32 {
33 }
34 
35 Real
37 {
38  return _grad_v[_qp] * _kappa[_qp] * _L[_qp] * _grad_test[_i][_qp];
39 }
40 
41 Real
43 {
44  if (jvar == _v_var)
45  return _grad_phi[_j][_qp] * _kappa[_qp] * _L[_qp] * _grad_test[_i][_qp];
46 
47  return 0.0;
48 }
static InputParameters validParams()
registerMooseObject("PhaseFieldApp", SimpleCoupledACInterface)
static InputParameters validParams()
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
const VariablePhiGradient & _grad_phi
const MaterialProperty< Real > & _L
Mobility.
const VariableGradient & _grad_v
Gradient of the coupled variable.
Compute the Allen-Cahn interface term with constant Mobility and Interfacial parameter.
unsigned int _i
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
unsigned int _j
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const VariableTestGradient & _grad_test
const MaterialProperty< Real > & _kappa
Interfacial parameter.
void addClassDescription(const std::string &doc_string)
SimpleCoupledACInterface(const InputParameters &parameters)
unsigned int _v_var
Index of the coupled variable.
unsigned int _qp