12 #include "libmesh/utility.h" 16 TensorMechanicsPlasticMeanCapTC,
27 "Maximum iterations for custom MeanCapTC return map");
29 "use_custom_returnMap",
true,
"Whether to use the custom MeanCapTC returnMap algorithm.");
30 params.
addParam<
bool>(
"use_custom_cto",
32 "Whether to use the custom consistent tangent operator computations.");
34 "A SolidMechanicsHardening UserObject that defines " 35 "hardening of the mean-cap tensile strength (it will " 36 "typically be positive). Yield function = trace(stress) " 37 "- tensile_strength for trace(stress)>tensile_strength.");
39 "compressive_strength",
40 "A SolidMechanicsHardening UserObject that defines hardening of the " 41 "mean-cap compressive strength. This should always be less than " 42 "tensile_strength (it will typically be negative). Yield function = " 43 "- (trace(stress) - compressive_strength) for " 44 "trace(stress)<compressive_strength.");
46 "Associative mean-cap tensile and compressive plasticity with hardening/softening");
53 _max_iters(getParam<unsigned>(
"max_iterations")),
54 _use_custom_returnMap(getParam<bool>(
"use_custom_returnMap")),
55 _use_custom_cto(getParam<bool>(
"use_custom_cto")),
62 mooseError(
"MeanCapTC: tensile strength (which is usually positive) must not be less than " 63 "compressive strength (which is usually negative)");
107 1.0 / (t_str - c_str) * std::cos(
libMesh::pi * (tr - c_str) / (t_str - c_str)) *
108 ((tr - c_str) * dt - (tr - t_str) * dc);
123 return -std::cos(
libMesh::pi * (tr - c_str) / (t_str - c_str)) * stress.
dtrace();
165 Utility::pow<2>(t_str - c_str) * ((tr - t_str) * dc - (tr - c_str) * dt);
221 Utility::pow<2>(t_str - c_str) * ((tr - t_str) * dc - (tr - c_str) * dt);
253 std::vector<bool> & act,
256 act.assign(1,
false);
260 returned_stress = stress;
280 for (
unsigned i = 0; i < 3; ++i)
281 for (
unsigned j = 0;
j < 3; ++
j)
282 for (
unsigned k = 0;
k < 3; ++
k)
283 n(i,
j) += dirn * Eijkl(i,
j,
k,
k);
291 for (
unsigned i = 0; i < 3; ++i)
292 for (
unsigned j = 0;
j < 3; ++
j)
293 returned_stress(i,
j) = stress(i,
j) - gamma * n(i,
j);
302 Real ep_plastic_tolerance,
304 Real & returned_intnl,
305 std::vector<Real> & dpm,
307 std::vector<Real> & yf,
308 bool & trial_stress_inadmissible)
const 314 ep_plastic_tolerance,
320 trial_stress_inadmissible);
331 trial_stress_inadmissible =
false;
335 trial_stress_inadmissible =
true;
353 const Real dirn = (tensile_failure ? 1.0 : -1.0);
356 for (
unsigned i = 0; i < 3; ++i)
357 for (
unsigned j = 0;
j < 3; ++
j)
358 for (
unsigned k = 0;
k < 3; ++
k)
359 n(i,
j) += dirn * E_ijkl(i,
j,
k,
k);
372 unsigned int iter = 0;
377 residual = trial_trace -
tensile_strength(intnl_old + dpm[0]) - dpm[0] * n_trace;
385 dpm[0] += -residual / jac;
393 returned_intnl = intnl_old + dirn * dpm[0];
394 returned_stress = trial_stress - dpm[0] * n;
395 delta_dp = dpm[0] * dirn * returned_stress.
dtrace();
407 const std::vector<Real> & cumulative_pm)
const 411 trial_stress, intnl_old, stress, intnl, E_ijkl, cumulative_pm);
427 for (
unsigned int i = 0; i < 3; ++i)
428 for (
unsigned int j = 0;
j < 3; ++
j)
429 for (
unsigned int k = 0;
k < 3; ++
k)
430 elas(i,
j) += E_ijkl(i,
j,
k,
k);
RankFourTensorTempl< Real > outerProduct(const RankTwoTensorTempl< Real > &b) const
virtual void activeConstraints(const std::vector< Real > &f, const RankTwoTensor &stress, Real intnl, const RankFourTensor &Eijkl, std::vector< bool > &act, RankTwoTensor &returned_stress) const override
The active yield surfaces, given a vector of yield functions.
Real hardPotential(const RankTwoTensor &stress, Real intnl) const override
The hardening potential.
virtual Real dtensile_strength(const Real internal_param) const
d(tensile strength)/d(internal_param) as a function of residual value, rate, and internal_param ...
virtual bool useCustomCTO() const override
Returns false. You will want to override this in your derived class if you write a custom consistent ...
virtual Real dhardPotential_dintnl(const RankTwoTensor &stress, Real intnl) const override
The derivative of the hardening potential with respect to the internal parameter. ...
const SolidMechanicsHardeningModel & _c_strength
the compressive strength
virtual RankFourTensor consistentTangentOperator(const RankTwoTensor &trial_stress, Real intnl_old, const RankTwoTensor &stress, Real intnl, const RankFourTensor &E_ijkl, const std::vector< Real > &cumulative_pm) const
Calculates a custom consistent tangent operator.
virtual RankFourTensor consistentTangentOperator(const RankTwoTensor &trial_stress, Real intnl_old, const RankTwoTensor &stress, Real intnl, const RankFourTensor &E_ijkl, const std::vector< Real > &cumulative_pm) const override
Calculates a custom consistent tangent operator.
RankTwoTensorTempl< Real > dtrace() const
Real yieldFunction(const RankTwoTensor &stress, Real intnl) const override
The following functions are what you should override when building single-plasticity models...
virtual std::string modelName() const override
virtual Real value(Real intnl) const
RankFourTensor dflowPotential_dstress(const RankTwoTensor &stress, Real intnl) const override
The derivative of the flow potential with respect to stress.
virtual RankTwoTensor dhardPotential_dstress(const RankTwoTensor &stress, Real intnl) const override
The derivative of the hardening potential with respect to stress.
virtual Real tensile_strength(const Real internal_param) const
tensile strength as a function of residual value, rate, and internal_param
virtual Real dcompressive_strength(const Real internal_param) const
d(compressive strength)/d(internal_param) as a function of residual value, rate, and internal_param ...
static InputParameters validParams()
static InputParameters validParams()
const unsigned _max_iters
max iters for custom return map loop
Real dyieldFunction_dintnl(const RankTwoTensor &stress, Real intnl) const override
The derivative of yield function with respect to the internal parameter.
Real f(Real x)
Test function for Brents method.
registerMooseObject("SolidMechanicsApp", SolidMechanicsPlasticMeanCapTC)
virtual bool returnMap(const RankTwoTensor &trial_stress, Real intnl_old, const RankFourTensor &E_ijkl, Real ep_plastic_tolerance, RankTwoTensor &returned_stress, Real &returned_intnl, std::vector< Real > &dpm, RankTwoTensor &delta_dp, std::vector< Real > &yf, bool &trial_stress_inadmissible) const
Performs a custom return-map.
RankTwoTensor flowPotential(const RankTwoTensor &stress, Real intnl) const override
The flow potential.
SolidMechanicsPlasticMeanCapTC(const InputParameters ¶meters)
virtual bool useCustomReturnMap() const override
Returns false. You will want to override this in your derived class if you write a custom returnMap f...
const Real _f_tol
Tolerance on yield function.
RankTwoTensor dyieldFunction_dstress(const RankTwoTensor &stress, Real intnl) const override
The derivative of yield function with respect to stress.
virtual Real derivative(Real intnl) const
Hardening Model base class.
const bool _use_custom_cto
Whether to use the custom consistent tangent operator algorithm.
const bool _use_custom_returnMap
Whether to use the custom return-map algorithm.
RankTwoTensor df_dsig(const RankTwoTensor &stress, Real intnl) const
Derivative of the yield function with respect to stress.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
RankTwoTensor dflowPotential_dintnl(const RankTwoTensor &stress, Real intnl) const override
The derivative of the flow potential with respect to the internal parameter.
static const std::string alpha
virtual bool returnMap(const RankTwoTensor &trial_stress, Real intnl_old, const RankFourTensor &E_ijkl, Real ep_plastic_tolerance, RankTwoTensor &returned_stress, Real &returned_intnl, std::vector< Real > &dpm, RankTwoTensor &delta_dp, std::vector< Real > &yf, bool &trial_stress_inadmissible) const override
Performs a custom return-map.
void mooseError(Args &&... args) const
const SolidMechanicsHardeningModel & _strength
the tensile strength
registerMooseObjectRenamed("SolidMechanicsApp", TensorMechanicsPlasticMeanCapTC, "01/01/2025 00:00", SolidMechanicsPlasticMeanCapTC)
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
virtual Real compressive_strength(const Real internal_param) const
compressive strength as a function of residual value, rate, and internal_param
Plastic Model base class The virtual functions written below must be over-ridden in derived classes t...
Rate-independent associative mean-cap tensile AND compressive failure with hardening/softening of the...
static const std::string k