Line data Source code
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 : 10 : #include "ADComputeVariableIsotropicElasticityTensor.h" 11 : #include "Function.h" 12 : 13 : registerMooseObject("SolidMechanicsApp", ADComputeVariableIsotropicElasticityTensor); 14 : 15 : InputParameters 16 0 : ADComputeVariableIsotropicElasticityTensor::validParams() 17 : { 18 0 : InputParameters params = ADComputeElasticityTensorBase::validParams(); 19 0 : params.addClassDescription("Compute an isotropic elasticity tensor for elastic constants that " 20 : "change as a function of material properties"); 21 0 : params.addRequiredParam<MaterialPropertyName>( 22 : "youngs_modulus", "Name of material property defining the Young's Modulus"); 23 0 : params.addRequiredParam<MaterialPropertyName>( 24 : "poissons_ratio", "Name of material property defining the Poisson's Ratio"); 25 0 : return params; 26 0 : } 27 : 28 0 : ADComputeVariableIsotropicElasticityTensor::ADComputeVariableIsotropicElasticityTensor( 29 0 : const InputParameters & parameters) 30 : : ADComputeElasticityTensorBase(parameters), 31 0 : _youngs_modulus(getADMaterialProperty<Real>("youngs_modulus")), 32 0 : _poissons_ratio(getADMaterialProperty<Real>("poissons_ratio")) 33 : { 34 : // all tensors created by this class are always isotropic 35 0 : issueGuarantee(_elasticity_tensor_name, Guarantee::ISOTROPIC); 36 0 : } 37 : 38 : void 39 0 : ADComputeVariableIsotropicElasticityTensor::computeQpElasticityTensor() 40 : { 41 0 : _elasticity_tensor[_qp].fillSymmetricIsotropicEandNu(_youngs_modulus[_qp], _poissons_ratio[_qp]); 42 0 : }