Line data Source code
1 : /****************************************************************/ 2 : /* DO NOT MODIFY THIS HEADER */ 3 : /* BlackBear */ 4 : /* */ 5 : /* (c) 2017 Battelle Energy Alliance, LLC */ 6 : /* ALL RIGHTS RESERVED */ 7 : /* */ 8 : /* Prepared by Battelle Energy Alliance, LLC */ 9 : /* Under Contract No. DE-AC07-05ID14517 */ 10 : /* With the U. S. Department of Energy */ 11 : /* */ 12 : /* See COPYRIGHT for full restrictions */ 13 : /****************************************************************/ 14 : 15 : #include "ComputeMultipleInelasticDamageStress.h" 16 : #include "StressUpdateBase.h" 17 : #include "DamagePlasticityStressUpdate.h" 18 : 19 : registerMooseObject("BlackBearApp", ComputeMultipleInelasticDamageStress); 20 : 21 : InputParameters 22 250 : ComputeMultipleInelasticDamageStress::validParams() 23 : { 24 250 : InputParameters params = ComputeMultipleInelasticStress::validParams(); 25 250 : params.addClassDescription("This ComputeMultipleInelasticStress is to be used with " 26 : "DamagePlasticityStressUpdate"); 27 250 : return params; 28 0 : } 29 : 30 192 : ComputeMultipleInelasticDamageStress::ComputeMultipleInelasticDamageStress( 31 192 : const InputParameters & parameters) 32 : : ComputeMultipleInelasticStress(parameters), 33 192 : _D(getMaterialProperty<Real>("damage_variable")), 34 576 : _D_old(getMaterialPropertyOld<Real>("damage_variable")) 35 : { 36 192 : } 37 : 38 : void 39 174 : ComputeMultipleInelasticDamageStress::initialSetup() 40 : { 41 174 : ComputeMultipleInelasticStress::initialSetup(); 42 174 : if (_models.size() != 1) 43 3 : paramError("ComputeMultipleInelasticDamageStress currently can only have one model specified " 44 : "in 'inelastic_models'"); 45 171 : if (!dynamic_cast<DamagePlasticityStressUpdate *>(_models[0])) 46 6 : paramError("Model " + _models[0]->name() + " is not a DamagePlasticityStressUpdate object"); 47 168 : } 48 : 49 : void 50 0 : ComputeMultipleInelasticDamageStress::computeQpJacobianMult() 51 : { 52 0 : ComputeMultipleInelasticStress::computeQpJacobianMult(); 53 0 : _Jacobian_mult[_qp] = (1.0 - _D_old[_qp]) * _Jacobian_mult[_qp]; 54 0 : } 55 : 56 : void 57 626440 : ComputeMultipleInelasticDamageStress::updateQpStateSingleModel( 58 : unsigned model_number, 59 : RankTwoTensor & elastic_strain_increment, 60 : RankTwoTensor & combined_inelastic_strain_increment) 61 : { 62 626440 : ComputeMultipleInelasticStress::updateQpStateSingleModel( 63 : model_number, elastic_strain_increment, combined_inelastic_strain_increment); 64 626440 : _Jacobian_mult[_qp] = (1.0 - _D_old[_qp]) * _Jacobian_mult[_qp]; 65 626440 : } 66 : 67 : void 68 626440 : ComputeMultipleInelasticDamageStress::computeAdmissibleState( 69 : unsigned model_number, 70 : RankTwoTensor & elastic_strain_increment, 71 : RankTwoTensor & inelastic_strain_increment, 72 : RankFourTensor & consistent_tangent_operator) 73 : { 74 626440 : _models[model_number]->updateState(elastic_strain_increment, 75 : inelastic_strain_increment, 76 626440 : _rotation_increment[_qp], 77 626440 : _stress[_qp], 78 1252880 : _stress_old[_qp] / (1.0 - _D_old[_qp]), 79 626440 : _elasticity_tensor[_qp], 80 626440 : _elastic_strain_old[_qp], 81 626440 : _tangent_operator_type == TangentOperatorEnum::nonlinear, 82 : consistent_tangent_operator); 83 626440 : _stress[_qp] *= (1.0 - _D_old[_qp]); 84 626440 : }