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 
14 template <>
15 InputParameters
17 {
18  InputParameters params = validParams<Kernel>();
19  params.addClassDescription("Gradient energy for Allen-Cahn Kernel with constant Mobility and "
20  "Interfacial parameter for a coupled order parameter variable.");
21  params.addRequiredCoupledVar("v", "Coupled variable that the Laplacian is taken of");
22  params.addParam<MaterialPropertyName>("mob_name", "L", "The mobility used with the kernel");
23  params.addParam<MaterialPropertyName>("kappa_name", "kappa_op", "The kappa used with the kernel");
24  return params;
25 }
26 
27 SimpleCoupledACInterface::SimpleCoupledACInterface(const InputParameters & parameters)
28  : Kernel(parameters),
29  _L(getMaterialProperty<Real>("mob_name")),
30  _kappa(getMaterialProperty<Real>("kappa_name")),
31  _grad_v(coupledGradient("v")),
32  _v_var(coupled("v", 0))
33 {
34 }
35 
36 Real
38 {
39  return _grad_v[_qp] * _kappa[_qp] * _L[_qp] * _grad_test[_i][_qp];
40 }
41 
42 Real
44 {
45  if (jvar == _v_var)
46  return _grad_phi[_j][_qp] * _kappa[_qp] * _L[_qp] * _grad_test[_i][_qp];
47 
48  return 0.0;
49 }
SimpleCoupledACInterface::_v_var
unsigned int _v_var
Index of the coupled variable.
Definition: SimpleCoupledACInterface.h:38
SimpleCoupledACInterface::SimpleCoupledACInterface
SimpleCoupledACInterface(const InputParameters &parameters)
Definition: SimpleCoupledACInterface.C:27
SimpleCoupledACInterface::computeQpOffDiagJacobian
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
Definition: SimpleCoupledACInterface.C:43
SimpleCoupledACInterface::_kappa
const MaterialProperty< Real > & _kappa
Interfacial parameter.
Definition: SimpleCoupledACInterface.h:34
SimpleCoupledACInterface::_L
const MaterialProperty< Real > & _L
Mobility.
Definition: SimpleCoupledACInterface.h:32
SimpleCoupledACInterface::_grad_v
const VariableGradient & _grad_v
Gradient of the coupled variable.
Definition: SimpleCoupledACInterface.h:36
validParams< SimpleCoupledACInterface >
InputParameters validParams< SimpleCoupledACInterface >()
Definition: SimpleCoupledACInterface.C:16
SimpleCoupledACInterface.h
SimpleCoupledACInterface
Compute the Allen-Cahn interface term with constant Mobility and Interfacial parameter.
Definition: SimpleCoupledACInterface.h:22
registerMooseObject
registerMooseObject("PhaseFieldApp", SimpleCoupledACInterface)
SimpleCoupledACInterface::computeQpResidual
virtual Real computeQpResidual()
Definition: SimpleCoupledACInterface.C:37