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 "PowerLawSoftening.h" 11 : 12 : #include "MooseMesh.h" 13 : 14 : registerMooseObject("SolidMechanicsApp", PowerLawSoftening); 15 : 16 : InputParameters 17 48 : PowerLawSoftening::validParams() 18 : { 19 48 : InputParameters params = SmearedCrackSofteningBase::validParams(); 20 48 : params.addClassDescription("Softening model with an abrupt stress release upon cracking. This " 21 : "class is intended to be used with ComputeSmearedCrackingStress."); 22 96 : params.addRequiredRangeCheckedParam<Real>( 23 : "stiffness_reduction", 24 : "stiffness_reduction <= 1 & stiffness_reduction >= 0", 25 : "Factor multiplied by the current stiffness each time a new crack forms"); 26 48 : return params; 27 0 : } 28 : 29 36 : PowerLawSoftening::PowerLawSoftening(const InputParameters & parameters) 30 : : SmearedCrackSofteningBase(parameters), 31 72 : _stiffness_reduction(getParam<Real>("stiffness_reduction")) 32 : { 33 36 : } 34 : 35 : void 36 24832 : PowerLawSoftening::computeCrackingRelease(Real & stress, 37 : Real & stiffness_ratio, 38 : const Real strain, 39 : const Real /*crack_initiation_strain*/, 40 : const Real /*crack_max_strain*/, 41 : const Real cracking_stress, 42 : const Real youngs_modulus) 43 : { 44 24832 : if (stress > cracking_stress) 45 : { 46 : // This is equivalent to k = k_0 * (stiffness_reduction)^n, where n is the number of cracks 47 384 : stiffness_ratio *= _stiffness_reduction; 48 384 : stress = stiffness_ratio * youngs_modulus * strain; 49 : } 50 24832 : }