18 InputParameters params = validParams<InterfaceKernel>();
19 params.addRequiredParam<
unsigned int>(
"component",
20 "the component of the "
21 "displacement vector this kernel is working on:"
22 " component == 0, ==> X"
23 " component == 1, ==> Y"
24 " component == 2, ==> Z");
26 params.addRequiredCoupledVar(
"displacements",
"the string containing displacement variables");
28 params.addClassDescription(
"Interface kernel for use with cohesive zone models (CZMs) that "
29 "compute traction as a function of the displacement jump");
35 : InterfaceKernel(parameters),
36 _component(getParam<unsigned int>(
"component")),
37 _ndisp(coupledComponents(
"displacements")),
39 _disp_neighbor_var(_ndisp),
40 _traction_global(getMaterialPropertyByName<RealVectorValue>(
"traction_global")),
41 _traction_derivatives_global(
42 getMaterialPropertyByName<
RankTwoTensor>(
"traction_derivatives_global"))
44 if (getParam<bool>(
"use_displaced_mesh") ==
true)
45 mooseError(
"CZMInterfaceKernel cannot be used with use_displaced_mesh = true");
47 for (
unsigned int i = 0; i <
_ndisp; ++i)
49 _disp_var[i] = coupled(
"displacements", i);
67 r *= _test_neighbor[_i][_qp];
82 case Moose::ElementElement:
83 jac *= _test[_i][_qp] * _phi[_j][_qp];
85 case Moose::ElementNeighbor:
86 jac *= -_test[_i][_qp] * _phi_neighbor[_j][_qp];
88 case Moose::NeighborElement:
89 jac *= -_test_neighbor[_i][_qp] * _phi[_j][_qp];
91 case Moose::NeighborNeighbor:
92 jac *= _test_neighbor[_i][_qp] * _phi_neighbor[_j][_qp];
103 unsigned int off_diag_component;
104 for (off_diag_component = 0; off_diag_component <
_ndisp; off_diag_component++)
105 if (
_disp_var[off_diag_component] == jvar)
108 mooseAssert(off_diag_component <
_ndisp,
109 "CZMInterfaceKernel::computeQpOffDiagJacobian wrong offdiagonal variable");
115 case Moose::ElementElement:
116 jac *= _test[_i][_qp] * _phi[_j][_qp];
118 case Moose::ElementNeighbor:
119 jac *= -_test[_i][_qp] * _phi_neighbor[_j][_qp];
121 case Moose::NeighborElement:
122 jac *= -_test_neighbor[_i][_qp] * _phi[_j][_qp];
124 case Moose::NeighborNeighbor:
125 jac *= _test_neighbor[_i][_qp] * _phi_neighbor[_j][_qp];