https://mooseframework.inl.gov
ComputeCrystalPlasticityVolumetricEigenstrain.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 
12 registerMooseObject("SolidMechanicsApp", ComputeCrystalPlasticityVolumetricEigenstrain);
13 
16 {
18  params.addClassDescription("Computes the deformation gradient from the volumetric eigenstrain "
19  "due to spherical voids in a crystal plasticity simulation");
20  params.addRequiredParam<MaterialPropertyName>(
21  "spherical_void_number_density",
22  "The material property name of the number density of the spherical voids, in 1/mm^3.");
23  params.addRequiredParam<MaterialPropertyName>(
24  "mean_spherical_void_radius",
25  "The material property name for the mean radius value, in mm, for the spherical voids");
26 
27  return params;
28 }
29 
30 ComputeCrystalPlasticityVolumetricEigenstrain::ComputeCrystalPlasticityVolumetricEigenstrain(
31  const InputParameters & parameters)
33  _void_density(getMaterialProperty<Real>("spherical_void_number_density")),
34  _void_density_old(getMaterialPropertyOld<Real>("spherical_void_number_density")),
35  _void_radius(getMaterialProperty<Real>("mean_spherical_void_radius")),
36  _void_radius_old(getMaterialPropertyOld<Real>("mean_spherical_void_radius")),
37  _equivalent_linear_change(declareProperty<Real>("equivalent_linear_change"))
38 {
39 }
40 
41 void
42 ComputeCrystalPlasticityVolumetricEigenstrain::computeQpDeformationGradient()
43 {
44  // check that the values of the radius and the density are both positive
45  if (_void_radius[_qp] < 0.0)
46  mooseException("A negative mean spherical void radius value, ",
47  _void_radius[_qp],
48  ", has been provided; this value is "
49  "non-physical and violates the assumptions of this eigenstrain class");
50  if (_void_density[_qp] < 0.0)
51  mooseException(
52  "A negative, non-physical spherical void number density has been provided: ",
53  _void_density[_qp],
54  ". This value is non-physical and violates the assumptions of this eigenstrain class");
55 
56  // compute the linear commponent of the current and old volume due to the voids
57  _equivalent_linear_change[_qp] =
58  computeLinearComponentVolume(_void_radius[_qp], _void_density[_qp]);
59  Real previous_linear =
60  computeLinearComponentVolume(_void_radius_old[_qp], _void_density_old[_qp]);
61 
62  const Real linear_increment = _equivalent_linear_change[_qp] - previous_linear;
63 
64  // scale by the ratio of the substep to full time step for consistency
65  // in cases where substepping is used
66  RankTwoTensor eigenstrain = RankTwoTensor::Identity() * linear_increment * _substep_dt / _dt;
67 
68  // Rotate the eigenstrain for the crystal deformation gradient with Euler angles
69  RankTwoTensor residual_equivalent_volumetric_expansion_increment =
70  RankTwoTensor::Identity() - eigenstrain.rotated(_crysrot[_qp]);
71 
72  _deformation_gradient[_qp] =
73  residual_equivalent_volumetric_expansion_increment.inverse() * _deformation_gradient_old[_qp];
74 }
75 
76 Real
77 ComputeCrystalPlasticityVolumetricEigenstrain::computeLinearComponentVolume(const Real & radius,
78  const Real & density)
79 {
80  const Real cb_radius = Utility::pow<3>(radius);
81  const Real volume = 4.0 * (libMesh::pi)*cb_radius * density / 3.0;
82  const Real linear_component = std::cbrt(volume);
83 
84  return linear_component;
85 }
RankTwoTensorTempl< Real > inverse() const
const Real radius
ComputeCrystalPlasticityEigenstrainBase is the base class for computing eigenstrain tensors in crysta...
static const std::string density
Definition: NS.h:33
static RankTwoTensorTempl Identity()
void addRequiredParam(const std::string &name, const std::string &doc_string)
InputParameters validParams()
RankTwoTensorTempl< Real > rotated(const RankTwoTensorTempl< Real > &R) const
Real volume(const MeshBase &mesh, unsigned int dim=libMesh::invalid_uint)
registerMooseObject("SolidMechanicsApp", ComputeCrystalPlasticityVolumetricEigenstrain)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)
const Real pi