www.mooseframework.org
ComputeConcentrationDependentElasticityTensor.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 "RotationTensor.h"
12 
14 
17 {
19  params.addClassDescription("Compute concentration dependent elasticity tensor.");
20  params.addRequiredParam<std::vector<Real>>("C0_ijkl",
21  "Stiffness tensor for zero concentration phase");
22  params.addRequiredParam<std::vector<Real>>("C1_ijkl",
23  "Stiffness tensor for phase having concentration 1.0");
24  params.addParam<MooseEnum>(
25  "fill_method0", RankFourTensor::fillMethodEnum() = "symmetric9", "The fill method");
26  params.addParam<MooseEnum>(
27  "fill_method1", RankFourTensor::fillMethodEnum() = "symmetric9", "The fill method");
28  params.addRequiredCoupledVar("c", "Concentration");
29  return params;
30 }
31 
33  const InputParameters & parameters)
35  _Cijkl0(getParam<std::vector<Real>>("C0_ijkl"),
36  (RankFourTensor::FillMethod)(int)getParam<MooseEnum>("fill_method0")),
37  _Cijkl1(getParam<std::vector<Real>>("C1_ijkl"),
38  (RankFourTensor::FillMethod)(int)getParam<MooseEnum>("fill_method1")),
39  _c(coupledValue("c")),
40  _c_name(coupledName("c", 0)),
41  _delasticity_tensor_dc(isCoupledConstant("c") ? nullptr
42  : &declarePropertyDerivative<RankFourTensor>(
43  _elasticity_tensor_name, _c_name))
44 {
45  // Define a rotation according to Euler angle parameters
46  RotationTensor R(_Euler_angles); // R type: RealTensorValue
47 
48  // Rotate tensors
49  _Cijkl0.rotate(R);
50  _Cijkl1.rotate(R);
51 }
52 
53 void
55 {
56  // Assign elasticity tensor at a given quad point
58  // Define derivative of elasticity tensor with respect to concentration.
60  (*_delasticity_tensor_dc)[_qp] = (_Cijkl1 - _Cijkl0);
61 }
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
ComputeElasticityTensor defines an elasticity tensor material object as a function of concentration f...
registerMooseObject("SolidMechanicsApp", ComputeConcentrationDependentElasticityTensor)
GenericMaterialProperty< RankFourTensor, is_ad > & _elasticity_tensor
ComputeRotatedElasticityTensorBase is an intermediate base class that rotates an elasticity tensor ba...
void addRequiredParam(const std::string &name, const std::string &doc_string)
RankFourTensor _Cijkl1
Elasticity tensor for phase with concentration 1.
RankFourTensor _Cijkl0
Elasticity tensor for phase with zero concentration.
void rotate(const TypeTensor< T > &R)
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
MaterialProperty< RankFourTensor > * _delasticity_tensor_dc
Derivative of elasticity tensor with respect to concentration.
This is a RealTensor version of a rotation matrix It is instantiated with the Euler angles...
static const std::string R
Definition: NS.h:147
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)
static MooseEnum fillMethodEnum()
void ErrorVector unsigned int