www.mooseframework.org
ComputeConcentrationDependentElasticityTensor.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
8 #include "RotationTensor.h"
9 
10 template <>
11 InputParameters
13 {
14  InputParameters params = validParams<ComputeRotatedElasticityTensorBase>();
15  params.addClassDescription("Compute concentration dependent elasticity tensor.");
16  params.addRequiredParam<std::vector<Real>>("C0_ijkl",
17  "Stiffness tensor for zero concentration phase");
18  params.addRequiredParam<std::vector<Real>>("C1_ijkl",
19  "Stiffness tensor for phase having concentration 1.0");
20  params.addParam<MooseEnum>(
21  "fill_method0", RankFourTensor::fillMethodEnum() = "symmetric9", "The fill method");
22  params.addParam<MooseEnum>(
23  "fill_method1", RankFourTensor::fillMethodEnum() = "symmetric9", "The fill method");
24  params.addRequiredCoupledVar("c", "Concentration");
25  return params;
26 }
27 
29  const InputParameters & parameters)
31  _Cijkl0(getParam<std::vector<Real>>("C0_ijkl"),
32  (RankFourTensor::FillMethod)(int)getParam<MooseEnum>("fill_method0")),
33  _Cijkl1(getParam<std::vector<Real>>("C1_ijkl"),
34  (RankFourTensor::FillMethod)(int)getParam<MooseEnum>("fill_method1")),
35  _c(coupledValue("c")),
36  _c_name(getVar("c", 0)->name()),
37  _delasticity_tensor_dc(
38  declarePropertyDerivative<RankFourTensor>(_elasticity_tensor_name, _c_name))
39 {
40  // Define a rotation according to Euler angle parameters
41  RotationTensor R(_Euler_angles); // R type: RealTensorValue
42 
43  // Rotate tensors
44  _Cijkl0.rotate(R);
45  _Cijkl1.rotate(R);
46 }
47 
48 void
50 {
51  // Assign elasticity tensor at a given quad point
52  _elasticity_tensor[_qp] = _Cijkl0 + (_Cijkl1 - _Cijkl0) * _c[_qp];
53  // Define derivative of elasticity tensor with respect to concentration.
55 }
ComputeRotatedElasticityTensorBase is an intermediate base class that rotates an elasticity tensor ba...
InputParameters validParams< ComputeRotatedElasticityTensorBase >()
RankFourTensor _Cijkl1
Elasticity tensor for phase with concentration 1.
RankFourTensor _Cijkl0
Elasticity tensor for phase with zero concentration.
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...
MaterialProperty< RankFourTensor > & _elasticity_tensor
InputParameters validParams< ComputeConcentrationDependentElasticityTensor >()