https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ComputeConcentrationDependentElasticityTensor.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#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
51}
52
53void
55{
56 // Assign elasticity tensor at a given quad point
57 _elasticity_tensor[_qp] = _Cijkl0 + (_Cijkl1 - _Cijkl0) * _c[_qp];
58 // Define derivative of elasticity tensor with respect to concentration.
60 (*_delasticity_tensor_dc)[_qp] = (_Cijkl1 - _Cijkl0);
61}
registerMooseObject("SolidMechanicsApp", ComputeConcentrationDependentElasticityTensor)
const double R
void ErrorVector unsigned int
ComputeElasticityTensor defines an elasticity tensor material object as a function of concentration f...
RankFourTensor _Cijkl1
Elasticity tensor for phase with concentration 1.
MaterialProperty< RankFourTensor > * _delasticity_tensor_dc
Derivative of elasticity tensor with respect to concentration.
RankFourTensor _Cijkl0
Elasticity tensor for phase with zero concentration.
GenericMaterialProperty< T, is_ad > & _elasticity_tensor
ComputeRotatedElasticityTensorBase is an intermediate base class that rotates an elasticity tensor ba...
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
void addRequiredParam(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)
void rotate(const TypeTensor< T > &R)
static MooseEnum fillMethodEnum()
This is a RealTensor version of a rotation matrix It is instantiated with the Euler angles,...