www.mooseframework.org
ParametricMaterialBasePD.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 #include "ElasticityTensorTools.h"
12 
13 #include "libmesh/quadrature.h"
14 
15 template <>
16 InputParameters
18 {
19  InputParameters params = validParams<MechanicsMaterialBasePD>();
20  params.addClassDescription("Base class for peridynamic models based on derived micro moduli");
21 
22  params.addParam<bool>("plane_stress", false, "Plane stress problem or not");
23  params.addCoupledVar("scalar_out_of_plane_strain",
24  "Scalar variable for strain in the out-of-plane direction");
25  params.addParam<Real>("stress_free_temperature", "Stress free temperature");
26  params.addParam<Real>("thermal_expansion_coeff",
27  "Value of material thermal expansion coefficient");
28 
29  return params;
30 }
31 
32 ParametricMaterialBasePD::ParametricMaterialBasePD(const InputParameters & parameters)
33  : MechanicsMaterialBasePD(parameters),
34  _plane_stress(getParam<bool>("plane_stress")),
35  _scalar_out_of_plane_strain_coupled(isCoupledScalar("scalar_out_of_plane_strain")),
36  _scalar_out_of_plane_strain(_scalar_out_of_plane_strain_coupled
37  ? coupledScalarValue("scalar_out_of_plane_strain")
38  : _zero),
39  _temp(2),
40  _temp_ref(_has_temp ? getParam<Real>("stress_free_temperature") : 0.0),
41  _tec(_has_temp ? getParam<Real>("thermal_expansion_coeff") : 0.0),
42  _bond_force_ij(declareProperty<Real>("bond_force_ij")),
43  _bond_dfdU_ij(declareProperty<Real>("bond_dfdU_ij")),
44  _bond_dfdT_ij(declareProperty<Real>("bond_dfdT_ij")),
45  _bond_dfdE_ij(declareProperty<Real>("bond_dfdE_ij")),
46  _thermal_expansion_coeff(declareProperty<Real>("thermal_expansion_coeff")),
47  _Cijkl(getMaterialProperty<RankFourTensor>("elasticity_tensor"))
48 {
50  mooseError("scalar strain can ONLY be specified for 2D analysis!");
51 
53  mooseError("Scalar strain can ONLY be specified for generalized plane strain case!");
54 }
55 
56 void
58 {
59  setupMeshRelatedData(); // function from base class
60  computeBondCurrentLength(); // current length of a bond from base class
61 
62  _temp[0] = _has_temp ? _temp_var->getNodalValue(*_current_elem->node_ptr(0)) : 0.0;
63  _temp[1] = _has_temp ? _temp_var->getNodalValue(*_current_elem->node_ptr(1)) : 0.0;
64 
67 
68  for (_qp = 0; _qp < _nnodes; ++_qp)
69  {
72  }
73 }
74 
75 void
77 {
82  if (_dim == 3 || _scalar_out_of_plane_strain_coupled) // general 3D and generalized plane strain
83  _bulk_modulus = _youngs_modulus / 3.0 / (1.0 - 2.0 * _poissons_ratio);
84  else if (_plane_stress) // plane stress case
86  else // plane strain case
87  _bulk_modulus = _youngs_modulus / 2.0 / (1.0 + _poissons_ratio) / (1.0 - 2.0 * _poissons_ratio);
88 
89  if (_dim == 2 && !_plane_stress && !_scalar_out_of_plane_strain_coupled) // plane strain case
90  _alpha = _tec * (1.0 + _poissons_ratio);
91  else
92  _alpha = _tec;
93 }
94 
95 void
97 {
99 
101  _mechanical_stretch[_qp] =
102  _total_stretch[_qp] - _alpha * (0.5 * (_temp[0] + _temp[1]) - _temp_ref);
103 }
PeridynamicsMaterialBase::_origin_length
Real _origin_length
Definition: PeridynamicsMaterialBase.h:43
PeridynamicsMaterialBase::_nnodes
const unsigned int _nnodes
Definition: PeridynamicsMaterialBase.h:37
ParametricMaterialBasePD::computePeridynamicsParams
virtual void computePeridynamicsParams()=0
Function to compute the micro-moduli for bond-based and ordinary state-based models.
ParametricMaterialBasePD::ParametricMaterialBasePD
ParametricMaterialBasePD(const InputParameters &parameters)
Definition: ParametricMaterialBasePD.C:32
MechanicsMaterialBasePD::_mechanical_stretch
MaterialProperty< Real > & _mechanical_stretch
Definition: MechanicsMaterialBasePD.h:48
ParametricMaterialBasePD::_tec
Real _tec
Thermal expension coefficient.
Definition: ParametricMaterialBasePD.h:63
PeridynamicsMaterialBase::setupMeshRelatedData
void setupMeshRelatedData()
Function to setup mesh related data to be used in this class.
Definition: PeridynamicsMaterialBase.C:34
MechanicsMaterialBasePD::_temp_var
MooseVariable * _temp_var
Definition: MechanicsMaterialBasePD.h:40
ParametricMaterialBasePD.h
ParametricMaterialBasePD::_temp_ref
const Real _temp_ref
Reference temperature.
Definition: ParametricMaterialBasePD.h:60
ParametricMaterialBasePD::_plane_stress
const bool _plane_stress
Plane stress problem or not.
Definition: ParametricMaterialBasePD.h:49
ParametricMaterialBasePD::_Cijkl
const MaterialProperty< RankFourTensor > & _Cijkl
Material properties to fetch.
Definition: ParametricMaterialBasePD.h:76
ParametricMaterialBasePD::_poissons_ratio
Real _poissons_ratio
Definition: ParametricMaterialBasePD.h:79
ElasticityTensorTools::getIsotropicPoissonsRatio
T getIsotropicPoissonsRatio(const RankFourTensorTempl< T > &elasticity_tensor)
Get the Poisson's modulus for an isotropic elasticity tensor param elasticity_tensor the tensor (must...
Definition: ElasticityTensorTools.h:115
PeridynamicsMaterialBase::_dim
const unsigned int _dim
Definition: PeridynamicsMaterialBase.h:36
ParametricMaterialBasePD::_scalar_out_of_plane_strain_coupled
const bool _scalar_out_of_plane_strain_coupled
Scalar out-of-plane component of strain tensor for generalized plane strain.
Definition: ParametricMaterialBasePD.h:52
MechanicsMaterialBasePD::_total_stretch
MaterialProperty< Real > & _total_stretch
Material properties to store.
Definition: MechanicsMaterialBasePD.h:47
ParametricMaterialBasePD::_youngs_modulus
Real _youngs_modulus
Definition: ParametricMaterialBasePD.h:78
MechanicsMaterialBasePD::_current_length
Real _current_length
Length of current bond.
Definition: MechanicsMaterialBasePD.h:55
ElasticityTensorTools::getIsotropicYoungsModulus
T getIsotropicYoungsModulus(const RankFourTensorTempl< T > &elasticity_tensor)
Get the Young's modulus for an isotropic elasticity tensor param elasticity_tensor the tensor (must b...
Definition: ElasticityTensorTools.h:98
ParametricMaterialBasePD::computeProperties
virtual void computeProperties() override
Definition: ParametricMaterialBasePD.C:57
ParametricMaterialBasePD::_bulk_modulus
Real _bulk_modulus
Definition: ParametricMaterialBasePD.h:81
ElasticityTensorTools.h
MechanicsMaterialBasePD::computeBondCurrentLength
void computeBondCurrentLength()
Function to compute the current bond length.
Definition: MechanicsMaterialBasePD.C:42
RankFourTensorTempl
Definition: ACGrGrElasticDrivingForce.h:20
ParametricMaterialBasePD::computeBondStretch
virtual void computeBondStretch() override
Function to compute current bond stretch: one dimensional strain.
Definition: ParametricMaterialBasePD.C:96
validParams< MechanicsMaterialBasePD >
InputParameters validParams< MechanicsMaterialBasePD >()
Definition: MechanicsMaterialBasePD.C:15
MechanicsMaterialBasePD::_has_temp
const bool _has_temp
Temperature variables.
Definition: MechanicsMaterialBasePD.h:39
ParametricMaterialBasePD::computeMaterialConstants
void computeMaterialConstants()
Function to compute material constants from elasticity tensor.
Definition: ParametricMaterialBasePD.C:76
ParametricMaterialBasePD::_thermal_expansion_coeff
MaterialProperty< Real > & _thermal_expansion_coeff
Definition: ParametricMaterialBasePD.h:72
ParametricMaterialBasePD::_alpha
Real _alpha
Definition: ParametricMaterialBasePD.h:64
ParametricMaterialBasePD::_shear_modulus
Real _shear_modulus
Definition: ParametricMaterialBasePD.h:80
validParams< ParametricMaterialBasePD >
InputParameters validParams< ParametricMaterialBasePD >()
Definition: ParametricMaterialBasePD.C:17
ParametricMaterialBasePD::_temp
std::vector< Real > _temp
Temperature variable.
Definition: ParametricMaterialBasePD.h:57
MechanicsMaterialBasePD
Base material class for peridynamic solid mechanics models.
Definition: MechanicsMaterialBasePD.h:22
ParametricMaterialBasePD::computeBondForce
virtual void computeBondForce()=0
Function to compute force of a bond.