https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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.addParam<MaterialPropertyName>("homogenization_gradient_name",
22 "homogenization_gradient",
23 "Name of the constant gradient field");
24 params.addRequiredCoupledVar("macro_gradient",
25 "Scalar field defining the "
26 "macro gradient");
27 return params;
28}
29
31 const InputParameters & parameters)
32 : HomogenizationInterface<Material>(parameters),
33 _base_name(isParamValid("base_name") ? getParam<std::string>("base_name") + "_" : ""),
34 _macro_gradient(coupledScalarValue("macro_gradient")),
35 _homogenization_contribution(
36 declareProperty<RankTwoTensor>(_base_name + "homogenization_gradient_name"))
37{
38}
39
40void
42{
44 unsigned int count = 0;
45 for (const auto & [indices, constraint] : cmap())
46 {
47 const auto [i, j] = indices;
49 }
50}
registerMooseObject("SolidMechanicsApp", ComputeHomogenizedLagrangianStrain)
unsigned int count
Calculate the tensor corresponding to homogenization gradient.
MaterialProperty< RankTwoTensor > & _homogenization_contribution
Unwrapped into a tensor.
const VariableValue & _macro_gradient
ScalarVariable with the field.
ComputeHomogenizedLagrangianStrain(const InputParameters &parameters)
Interface for objects that use the homogenization constraint.
static InputParameters validParams()
const Homogenization::ConstraintMap & cmap() const
Get the constraint map.
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
unsigned int _qp