https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
12registerMooseObject("SolidMechanicsApp", ComputeCrystalPlasticityVolumetricEigenstrain);
13
15ComputeCrystalPlasticityVolumetricEigenstrain::validParams()
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
30ComputeCrystalPlasticityVolumetricEigenstrain::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
41void
42ComputeCrystalPlasticityVolumetricEigenstrain::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
76Real
77ComputeCrystalPlasticityVolumetricEigenstrain::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}
registerMooseObject("SolidMechanicsApp", ComputeCrystalPlasticityVolumetricEigenstrain)
ComputeCrystalPlasticityEigenstrainBase is the base class for computing eigenstrain tensors in crysta...
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
RankTwoTensorTempl< T > inverse() const
RankTwoTensorTempl< T > rotated(const RankTwoTensorTempl< T > &R) const
static RankTwoTensorTempl Identity()
Real volume(const MeshBase &mesh, unsigned int dim=libMesh::invalid_uint)
const Real pi
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real