// void AbaqusCreepMaterial::modifyStrain(const unsigned int qp, // const Real /*scale_factor*/, // SymmTensor & strain_increment, // SymmTensor & /*dstrain_increment_dT*/) void AbaqusCreepMaterial::computeStress() { // Recover "old" state variables for (unsigned int i=0; i<_num_state_vars; i++) _STATEV[i]=_state_var_old[_qp][i]; // Initialize DECRA and DESWA arrays for (unsigned int i=0; i<5; i++) { _DECRA[i] = 0.0; _DESWA[i] = 0.0; } // Calculate stress array components _stress_component[0] = (_elasticity_tensor[0]*_strain_increment.component(0)) + (_elasticity_tensor[1]*_strain_increment.component(1)) + (_elasticity_tensor[1]*_strain_increment.component(2)); _stress_component[1] = (_elasticity_tensor[1]*_strain_increment.component(0)) + (_elasticity_tensor[0]*_strain_increment.component(1)) + (_elasticity_tensor[1]*_strain_increment.component(2)); _stress_component[2] = (_elasticity_tensor[1]*_strain_increment.component(0)) + (_elasticity_tensor[1]*_strain_increment.component(1)) + (_elasticity_tensor[0]*_strain_increment.component(2)); _stress_component[3] = (_elasticity_tensor[2]*_strain_increment.component(3)); _stress_component[4] = (_elasticity_tensor[2]*_strain_increment.component(4)); _stress_component[5] = (_elasticity_tensor[2]*_strain_increment.component(5)); // Calculate trial stress and deviatoric trial stress SymmTensor trial_stress(_stress_component[0], _stress_component[1], _stress_component[2], _stress_component[3], _stress_component[4], _stress_component[5]); _trial_stress[_qp] = trial_stress; _trial_stress[_qp] += _stress_old[_qp]; _dev_trial_stress[_qp] = _trial_stress[_qp]; _dev_trial_stress[_qp].addDiag(-_trial_stress[_qp].trace()/3.0); // Calculate effective trial stress (_ets) Real dts_squared = _dev_trial_stress[_qp].doubleContraction(_dev_trial_stress[_qp]); if (dts_squared >= 0.) _ets[_qp] = std::sqrt(1.5 * dts_squared); else mooseError("Attempted to take square root of a negative number!\n"); // Calculate gradient of dev stress potential (grad_dts) // grad_dts = d(qtild)/d(dev_trial_stress) SymmTensor delta_dts = _dev_trial_stress[_qp] - _dev_trial_stress_old[_qp]; Real delta_ets = _ets[_qp] - _ets_old[_qp]; Real grad_dts_potential[6]; for (unsigned int i=0; i<6; i++) { if (delta_dts.component(i) == 0.0) grad_dts_potential[i] = 0.0; else grad_dts_potential[i] = delta_ets / delta_dts.component(i); } SymmTensor grad_dts(grad_dts_potential[0], grad_dts_potential[1], grad_dts_potential[2], grad_dts_potential[3], grad_dts_potential[4], grad_dts_potential[5]); // Pass variables in for information _KSTEP = _t_step; //Step number _TIME[0] = _dt; //Value of step time at the end of the increment - Check _TIME[1] = _t; //Value of total time at the end of the increment - Check _DTIME = _dt; //Time increment _EC[0] = _total_creep_old[_qp]; //Metal and Drucker-Prager creep at the start of the increment _EC[1] = _total_creep[_qp]; //Metal and Drucker-Prager creep at the end of the increment _ESW[0] = _total_swell_old[_qp]; //Metal swell at the start of the increment _ESW[1] = _total_swell[_qp]; //Metal swell at the end of the increment _QTILD = _ets[_qp]; //Von mises equivalent stress _P = -_trial_stress[_qp].trace(); //Equivalent pressure stress // Connection to extern statement _creep(_DECRA, _DESWA, _STATEV, &_SERD, _EC, _ESW, &_P, &_QTILD, &_TEMP, &_DTEMP, _PREDEF, _DPRED, _TIME, &_DTIME, &_CMNAME, &_LEXIMP, &_LEND, _COORDS, &_NSTATV, &_NOEL, &_NPT, &_LAYER, &_KSPT, &_KSTEP, &_KINC); // Update state variables for (unsigned int i=0; i<_num_state_vars; i++) _state_var[_qp][i] = _STATEV[i]; // Solve for Incremental creep (creep_inc_used) and/or Incremental Swell (swell_inc_used) based on definition // NOTE: Below are equations for metal creep and/or time-dependent volumetric swelling materials only // Drucker-Prager, Capped Drucker-Prager, and Gasket materials have not been included _creep_inc[_qp] = _DECRA[0]; _total_creep[_qp] = _creep_inc[_qp]; _total_creep[_qp] += _total_creep_old[_qp]; _swell_inc[_qp] = _DESWA[0]; _total_swell[_qp] = _swell_inc[_qp]; _total_swell[_qp] += _total_swell_old[_qp]; Real p = -_trial_stress[_qp].trace(); Real pold = -_trial_stress_old[_qp].trace(); Real creep_inc_used=0.0; Real swell_inc_used=0.0; if (_integration_flag == 0 && _solve_definition == 1) { creep_inc_used = _DECRA[0]; swell_inc_used = _DESWA[0]; } else if (_integration_flag == 1 && _solve_definition == 2) { creep_inc_used = (_DECRA[1]*(_total_creep[_qp]-_total_creep_old[_qp]))+_creep_inc_old[_qp]; swell_inc_used = (_DESWA[1]*(_total_creep[_qp]-_total_creep_old[_qp]))+_swell_inc_old[_qp]; } else if (_integration_flag == 1 && _solve_definition == 3) { creep_inc_used = (_DECRA[2]*(_total_swell[_qp]-_total_swell_old[_qp]))+_creep_inc_old[_qp]; swell_inc_used = (_DESWA[2]*(_total_swell[_qp]-_total_swell_old[_qp]))+_swell_inc_old[_qp]; } else if (_integration_flag == 1 && _solve_definition == 4) { creep_inc_used = (_DECRA[3]*(p - pold))+_creep_inc_old[_qp]; swell_inc_used = (_DESWA[3]*(p - pold))+_swell_inc_old[_qp]; } else if (_integration_flag == 1 && _solve_definition == 5) { creep_inc_used = (_DECRA[4]*(_ets[_qp]-_ets_old[_qp]))+_creep_inc_old[_qp]; swell_inc_used = (_DESWA[4]*(_ets[_qp]-_ets_old[_qp]))+_swell_inc_old[_qp]; } // Calculate Incremental Creep Strain (total_effects) // Incremental creep strain = ((1/3)*(swell_inc_used)*R) + (creep_inc_used*grad_dts) // R = The matrix with the anisotropic swelling ratios in the diagonal if anisotropic swelling is defined; Otherwise R = Identity SymmTensor R(1.,1.,1.,0.,0.,0.); SymmTensor total_effects = (R*(swell_inc_used/3.)) + (grad_dts*(creep_inc_used)); // Modify strain increment _strain_increment += total_effects; _stress_component[0] = (_elasticity_tensor[0]*_strain_increment.component(0)) + (_elasticity_tensor[1]*_strain_increment.component(1)) + (_elasticity_tensor[1]*_strain_increment.component(2)); _stress_component[1] = (_elasticity_tensor[1]*_strain_increment.component(0)) + (_elasticity_tensor[0]*_strain_increment.component(1)) + (_elasticity_tensor[1]*_strain_increment.component(2)); _stress_component[2] = (_elasticity_tensor[1]*_strain_increment.component(0)) + (_elasticity_tensor[1]*_strain_increment.component(1)) + (_elasticity_tensor[0]*_strain_increment.component(2)); _stress_component[3] = (_elasticity_tensor[2]*_strain_increment.component(3)); _stress_component[4] = (_elasticity_tensor[2]*_strain_increment.component(4)); _stress_component[5] = (_elasticity_tensor[2]*_strain_increment.component(5)); // Update Stress SymmTensor stressnew(_stress_component[0], _stress_component[1], _stress_component[2], _stress_component[3], _stress_component[4], _stress_component[5]); _stress[_qp] = stressnew; _stress[_qp] += _stress_old[_qp]; }
void AbaqusUmatMaterial::computeStress() { //Calculate deformation gradient - modeled from "solid_mechanics/src/materials/Nonlinear3D.C" // Fbar = 1 + grad(u(k)) ColumnMajorMatrix Fbar; Fbar(0,0) = _grad_disp_x[_qp](0); Fbar(0,1) = _grad_disp_x[_qp](1); Fbar(0,2) = _grad_disp_x[_qp](2); Fbar(1,0) = _grad_disp_y[_qp](0); Fbar(1,1) = _grad_disp_y[_qp](1); Fbar(1,2) = _grad_disp_y[_qp](2); Fbar(2,0) = _grad_disp_z[_qp](0); Fbar(2,1) = _grad_disp_z[_qp](1); Fbar(2,2) = _grad_disp_z[_qp](2); Fbar.addDiag(1); _Fbar[_qp] = Fbar; Real myDFGRD0[9] = {_Fbar_old[_qp](0,0), _Fbar_old[_qp](1,0), _Fbar_old[_qp](2,0), _Fbar_old[_qp](0,1), _Fbar_old[_qp](1,1), _Fbar_old[_qp](2,1), _Fbar_old[_qp](0,2), _Fbar_old[_qp](1,2), _Fbar_old[_qp](2,2)}; Real myDFGRD1[9] = {_Fbar[_qp](0,0), _Fbar[_qp](1,0), _Fbar[_qp](2,0), _Fbar[_qp](0,1), _Fbar[_qp](1,1), _Fbar[_qp](2,1), _Fbar[_qp](0,2), _Fbar[_qp](1,2), _Fbar[_qp](2,2)}; for (unsigned int i=0; i<9; ++i) { _DFGRD0[i] = myDFGRD0[i]; _DFGRD1[i] = myDFGRD1[i]; } //Recover "old" state variables for (unsigned int i=0; i<_num_state_vars; ++i) _STATEV[i]=_state_var_old[_qp][i]; //Pass through updated stress, total strain, and strain increment arrays for (int i=0; i<_NTENS; ++i) { _STRESS[i] = _stress_old.component(i); _STRAN[i] = _total_strain[_qp].component(i); _DSTRAN[i] = _strain_increment.component(i); } //Pass through step , time, and coordinate system information _KSTEP = _t_step; //Step number _TIME[0] = _t; //Value of step time at the beginning of the current increment - Check _TIME[1] = _t-_dt; //Value of total time at the beginning of the current increment - Check _DTIME = _dt; //Time increment for (unsigned int i=0; i<3; ++i) //Loop current coordinates in UMAT COORDS _COORDS[i] = _coord[i]; //Connection to extern statement _umat(_STRESS, _STATEV, _DDSDDE, &_SSE, &_SPD, &_SCD, &_RPL, _DDSDDT, _DRPLDE, &_DRPLDT, _STRAN, _DSTRAN, _TIME, &_DTIME, &_TEMP, &_DTEMP, _PREDEF, _DPRED, &_CMNAME, &_NDI, &_NSHR, &_NTENS, &_NSTATV, _PROPS, &_NPROPS, _COORDS, _DROT, &_PNEWDT, &_CELENT, _DFGRD0, _DFGRD1, &_NOEL, &_NPT, &_LAYER, &_KSPT, &_KSTEP, &_KINC); //Energy outputs _elastic_strain_energy[_qp] = _SSE; _plastic_dissipation[_qp] = _SPD; _creep_dissipation[_qp] = _SCD; //Update state variables for (unsigned int i=0; i<_num_state_vars; ++i) _state_var[_qp][i]=_STATEV[i]; //Get new stress tensor - UMAT should update stress SymmTensor stressnew(_STRESS[0], _STRESS[1], _STRESS[2], _STRESS[3], _STRESS[4], _STRESS[5]); _stress[_qp] = stressnew; }