https://mooseframework.inl.gov
ComputeHomogenizedLagrangianStrain.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 
13 
16 {
18  params.addClassDescription("Calculate eigenstrain-like contribution from the homogenization "
19  "strain used to satisfy the homogenization constraints.");
20  params.addParam<std::string>("base_name", "Material property base name");
21  params.addRequiredParam<UserObjectName>(
22  "homogenization_constraint", "The UserObject for defining the homogenization constraint");
23  params.addParam<MaterialPropertyName>("homogenization_gradient_name",
24  "homogenization_gradient",
25  "Name of the constant gradient field");
26  params.addRequiredCoupledVar("macro_gradient",
27  "Scalar field defining the "
28  "macro gradient");
29  return params;
30 }
31 
33  const InputParameters & parameters)
34  : Material(parameters),
35  _base_name(isParamValid("base_name") ? getParam<std::string>("base_name") + "_" : ""),
36  _constraint(getUserObject<HomogenizationConstraint>("homogenization_constraint")),
37  _cmap(_constraint.getConstraintMap()),
38  _macro_gradient(coupledScalarValue("macro_gradient")),
39  _homogenization_contribution(
40  declareProperty<RankTwoTensor>(_base_name + "homogenization_gradient_name"))
41 {
42 }
43 
44 void
46 {
48  unsigned int count = 0;
49  for (auto && indices : _cmap)
50  {
51  auto && [i, j] = indices.first;
53  }
54 }
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
MaterialProperty< RankTwoTensor > & _homogenization_contribution
Unwrapped into a tensor.
const VariableValue & _macro_gradient
ScalarVariable with the field.
void addRequiredParam(const std::string &name, const std::string &doc_string)
Computes ${V}(X_{ij}-{X}_{ij})dV$.
registerMooseObject("SolidMechanicsApp", ComputeHomogenizedLagrangianStrain)
unsigned int _qp
static InputParameters validParams()
const Homogenization::ConstraintMap & _cmap
Constraint map.
ComputeHomogenizedLagrangianStrain(const InputParameters &parameters)
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
Calculate the tensor corresponding to homogenization gradient.