https://mooseframework.inl.gov
Loading...
Searching...
No Matches
SimpleCoupledACInterface.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
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
35Real
40
41Real
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}
registerMooseObject("PhaseFieldApp", SimpleCoupledACInterface)
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
unsigned int _qp
unsigned int _j
unsigned int _i
static InputParameters validParams()
const VariablePhiGradient & _grad_phi
const VariableTestGradient & _grad_test
Compute the Allen-Cahn interface term with constant Mobility and Interfacial parameter.
static InputParameters validParams()
const VariableGradient & _grad_v
Gradient of the coupled variable.
const MaterialProperty< Real > & _L
Mobility.
SimpleCoupledACInterface(const InputParameters &parameters)
unsigned int _v_var
Index of the coupled variable.
const MaterialProperty< Real > & _kappa
Interfacial parameter.
virtual Real computeQpOffDiagJacobian(unsigned int jvar)