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 : #pragma once 11 : 12 : #include "ComputeEigenstrainBase.h" 13 : 14 : /** 15 : * ComputeCrystalPlasticityEigenstrainBase is the base class for computing eigenstrain tensors in 16 : * crystal plasticity models 17 : */ 18 : class ComputeCrystalPlasticityEigenstrainBase : public ComputeEigenstrainBase 19 : { 20 : public: 21 : static InputParameters validParams(); 22 : 23 : ComputeCrystalPlasticityEigenstrainBase(const InputParameters & parameters); 24 : 25 : /// Sets the value of the global variable _qp for inheriting classes 26 : void setQp(const unsigned int & qp); 27 : 28 : /// Sets the value of the _substep_dt for inheriting classes 29 : void setSubstepDt(const Real & substep_dt); 30 : 31 : /// We need to set initial values for deforamtion gradients too 32 : virtual void initQpStatefulProperties() override; 33 : 34 : const RankTwoTensor getDeformationGradientInverse() const; 35 : const RankTwoTensor getDeformationGradient() const; 36 : 37 : ///@{ Retained as empty methods to avoid a warning from Material.C in framework. These methods are unused in all inheriting classes and should not be overwritten. 38 0 : virtual void resetQpProperties() final {} 39 67224 : virtual void resetProperties() final {} 40 : ///@} 41 : 42 : protected: 43 : /// Compute the deformation gradient and store in _deformation_gradient 44 : virtual void computeQpDeformationGradient() = 0; 45 : 46 : ///Compute the eigenstrain and store in _eigenstrain 47 : void computeQpEigenstrain() override; 48 : 49 : ///Material property name for the deformation gradient tensor 50 : std::string _deformation_gradient_name; 51 : 52 : ///Stores the deformation gradient 53 : MaterialProperty<RankTwoTensor> & _deformation_gradient; 54 : const MaterialProperty<RankTwoTensor> & _deformation_gradient_old; 55 : 56 : /// Substepping time step value used within the inheriting crystal plasticity eigenstrain calculations 57 : Real _substep_dt; 58 : 59 : /** 60 : * Crystal rotation in the original, or reference, configuration as defined by 61 : * Euler angle arguments in the ComputeElasticityTensor classes 62 : */ 63 : const MaterialProperty<RankTwoTensor> & _crysrot; 64 : };