www.mooseframework.org
CZMMaterialBase.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 "Assembly.h"
11 #include "CZMMaterialBase.h"
12 #include "RotationMatrix.h"
13 
14 template <>
15 InputParameters
17 {
18  InputParameters params = validParams<InterfaceMaterial>();
19 
20  params.addClassDescription("Base class for cohesive zone mateirla models");
21  params.addRequiredCoupledVar("displacements",
22  "The string of displacements suitable for the problem statement");
23  return params;
24 }
25 
26 CZMMaterialBase::CZMMaterialBase(const InputParameters & parameters)
27  : InterfaceMaterial(parameters),
28  _normals(_assembly.normals()),
29  _ndisp(coupledComponents("displacements")),
30  _disp(_ndisp),
31  _disp_neighbor(_ndisp),
32  _displacement_jump_global(declareProperty<RealVectorValue>("displacement_jump_global")),
33  _displacement_jump(declareProperty<RealVectorValue>("displacement_jump")),
34  _traction_global(declareProperty<RealVectorValue>("traction_global")),
35  _traction(declareProperty<RealVectorValue>("traction")),
36  _traction_derivatives_global(declareProperty<RankTwoTensor>("traction_derivatives_global")),
37  _traction_derivatives(declareProperty<RankTwoTensor>("traction_derivatives"))
38 {
39  if (_ndisp > 3 || _ndisp < 1)
40  mooseError("the CZM material requires 1, 2 or 3 displacement variables");
41 
42  if (getParam<bool>("use_displaced_mesh") == true)
43  mooseError("This material cannot be used with use_displaced_mesh = true");
44 
45  // initializing the displacement vectors
46  for (unsigned int i = 0; i < _ndisp; ++i)
47  {
48  _disp[i] = &coupledValue("displacements", i);
49  _disp_neighbor[i] = &coupledNeighborValue("displacements", i);
50  }
51 }
52 
53 void
55 {
56 
57  RealTensorValue RotationGlobalToLocal =
58  RotationMatrix::rotVec1ToVec2(_normals[_qp], RealVectorValue(1, 0, 0));
59 
60  // computing the displacement jump
61  for (unsigned int i = 0; i < _ndisp; i++)
62  _displacement_jump_global[_qp](i) = (*_disp_neighbor[i])[_qp] - (*_disp[i])[_qp];
63  for (unsigned int i = _ndisp; i < 3; i++)
64  _displacement_jump_global[_qp](i) = 0;
65 
66  // rotate the displacement jump to the local coordiante system
67  _displacement_jump[_qp] = RotationGlobalToLocal * _displacement_jump_global[_qp];
68 
69  // compute local traction
70  _traction[_qp] = computeTraction();
71 
72  // compute local traction derivatives wrt the displacement jump
74 
75  // rotate local traction and derivatives to the global coordinate system
76  _traction_global[_qp] = RotationGlobalToLocal.transpose() * _traction[_qp];
78  _traction_derivatives_global[_qp].rotate(RotationGlobalToLocal.transpose());
79 }
CZMMaterialBase::_disp
std::vector< const VariableValue * > _disp
the coupled displacement and neighbor displacement values
Definition: CZMMaterialBase.h:45
CZMMaterialBase.h
CZMMaterialBase::_traction
MaterialProperty< RealVectorValue > & _traction
Definition: CZMMaterialBase.h:64
CZMMaterialBase::computeQpProperties
virtual void computeQpProperties() override
Definition: CZMMaterialBase.C:54
CZMMaterialBase::_ndisp
const unsigned int _ndisp
number of displacement components
Definition: CZMMaterialBase.h:41
CZMMaterialBase::_disp_neighbor
std::vector< const VariableValue * > _disp_neighbor
Definition: CZMMaterialBase.h:46
CZMMaterialBase::_normals
const MooseArray< Point > & _normals
normal to the interface
Definition: CZMMaterialBase.h:38
validParams< CZMMaterialBase >
InputParameters validParams< CZMMaterialBase >()
Definition: CZMMaterialBase.C:16
CZMMaterialBase::computeTractionDerivatives
virtual RankTwoTensor computeTractionDerivatives()=0
method returning the traction derivitaves wrt local displacement jump.
CZMMaterialBase::_traction_global
MaterialProperty< RealVectorValue > & _traction_global
the value of the traction in global and local coordinates
Definition: CZMMaterialBase.h:63
CZMMaterialBase::CZMMaterialBase
CZMMaterialBase(const InputParameters &parameters)
Definition: CZMMaterialBase.C:26
CZMMaterialBase::_traction_derivatives_global
MaterialProperty< RankTwoTensor > & _traction_derivatives_global
the traction's derivatives wrt the displacement jump in global and local coordinates
Definition: CZMMaterialBase.h:69
CZMMaterialBase::_displacement_jump
MaterialProperty< RealVectorValue > & _displacement_jump
Definition: CZMMaterialBase.h:58
CZMMaterialBase::_traction_derivatives
MaterialProperty< RankTwoTensor > & _traction_derivatives
Definition: CZMMaterialBase.h:70
RankTwoTensorTempl< Real >
CZMMaterialBase::_displacement_jump_global
MaterialProperty< RealVectorValue > & _displacement_jump_global
the displacement jump in global and local coordiante
Definition: CZMMaterialBase.h:57
CZMMaterialBase::computeTraction
virtual RealVectorValue computeTraction()=0
method returning the traction in the interface coordinate system.