https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ADExponentialEnergyBasedSoftening.C
Go to the documentation of this file.
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
11
12#include "MooseMesh.h"
13
15
18{
21 "Softening model with an exponential softening response upon cracking. This "
22 "class is intended to be used with ADComputeSmearedCrackingStress and relies on automatic "
23 "differentiation.");
24 params.addRangeCheckedParam<Real>(
25 "residual_stress",
26 0.0,
27 "residual_stress <= 1 & residual_stress >= 0",
28 "The fraction of the cracking stress allowed to be maintained following a crack.");
30 "fracture_toughness",
31 "fracture_toughness > 0",
32 "Fracture toughness used to calculate the softening slope. ");
33 return params;
34}
35
37 const InputParameters & parameters)
38 : ADSmearedCrackSofteningBase(parameters),
39 _residual_stress(getParam<Real>("residual_stress")),
40 _fracture_toughness(getParam<Real>("fracture_toughness"))
41{
42}
43
44void
46 ADReal & stiffness_ratio,
47 const ADReal & /*strain*/,
48 const ADReal & crack_initiation_strain,
49 const ADReal & crack_max_strain,
50 const ADReal & cracking_stress,
51 const ADReal & youngs_modulus,
52 const ADReal & poissons_ratio)
53{
54 mooseAssert(crack_max_strain >= crack_initiation_strain,
55 "crack_max_strain must be >= crack_initiation_strain");
56 using std::cbrt, std::sqrt, std::exp;
57
58 unsigned int dim = _current_elem->dim();
59
60 // Get estimate of element size
61 ADReal ele_len = 0.0;
62 if (dim == 3)
63 ele_len = cbrt(_current_elem->volume());
64 else
65 ele_len = sqrt(_current_elem->volume());
66
67 // Calculate initial slope of exponential curve
68 const ADReal energy_release_rate = (_fracture_toughness * _fracture_toughness) *
69 (1 - poissons_ratio * poissons_ratio) / youngs_modulus;
70 const ADReal frac_stress_sqr = cracking_stress * cracking_stress;
71 const ADReal l_max = 2 * energy_release_rate * youngs_modulus / frac_stress_sqr;
72
73 // Check against maximum allowed element size - avoid the divide by zero by capping at a large
74 // slope
75 ADReal initial_slope = -1e5 * youngs_modulus;
76 if (ele_len < l_max) // TODO: need to log if this isn't true
77 initial_slope =
78 -frac_stress_sqr / (energy_release_rate / ele_len - frac_stress_sqr / (2 * youngs_modulus));
79
80 // Compute stress that follows exponental curve
81 stress =
82 cracking_stress * (_residual_stress + (1.0 - _residual_stress) *
83 exp(initial_slope / cracking_stress *
84 (crack_max_strain - crack_initiation_strain)));
85 // Compute ratio of current stiffness to original stiffness
86 stiffness_ratio = stress * crack_initiation_strain / (crack_max_strain * cracking_stress);
87}
registerMooseObject("SolidMechanicsApp", ADExponentialEnergyBasedSoftening)
DualNumber< Real, DNDerivativeType, true > ADReal
unsigned int dim
ExponentialEnergyBasedSoftening is a smeared crack softening model that uses an exponential softening...
ADExponentialEnergyBasedSoftening(const InputParameters &parameters)
virtual void computeCrackingRelease(ADReal &stress, ADReal &stiffness_ratio, const ADReal &strain, const ADReal &crack_initiation_strain, const ADReal &crack_max_strain, const ADReal &cracking_stress, const ADReal &youngs_modulus, const ADReal &poissons_ratio) override
Compute the effect of the cracking release model on the stress and stiffness in the direction of a si...
const Real & _fracture_toughness
Fracture toughness.
const Real & _residual_stress
Residual stress after full softening.
ADSmearedCrackSofteningBase is the base class for a set of models that define the softening behavior ...
void addRequiredRangeCheckedParam(const std::string &name, const std::string &parsed_function, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
void addRangeCheckedParam(const std::string &name, const T &value, const std::string &parsed_function, const std::string &doc_string)
const Elem *const & _current_elem