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)");
69 const Real tr = stress.
trace();
95 const Real tr = stress.
trace();
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);
114 const Real tr = stress.
trace();
123 return -std::cos(
libMesh::pi * (tr - c_str) / (t_str - c_str)) * stress.
dtrace();
136 const Real tr = stress.
trace();
153 const Real tr = stress.
trace();
165 Utility::pow<2>(t_str - c_str) * ((tr - t_str) * dc - (tr - c_str) * dt);
172 const Real tr = stress.
trace();
192 const Real tr = stress.
trace();
209 const Real tr = stress.
trace();
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;
264 const Real tr = stress.
trace();
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);
289 Real gamma = (stress.
trace() - str) / n.
trace();
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);
360 const Real n_trace = n.
trace();
368 Real trial_trace = trial_stress.
trace();
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);
432 const Real hw = -df_dq + alpha * elas.
trace();
Real f(Real x)
Test function for Brents method.
registerMooseObject("SolidMechanicsApp", SolidMechanicsPlasticMeanCapTC)
registerMooseObjectRenamed("SolidMechanicsApp", TensorMechanicsPlasticMeanCapTC, "01/01/2025 00:00", SolidMechanicsPlasticMeanCapTC)
void mooseError(Args &&... args) const
RankFourTensorTempl< T > outerProduct(const RankTwoTensorTempl< T > &b) const
RankTwoTensorTempl< T > dtrace() const
Hardening Model base class.
virtual Real derivative(Real intnl) const
virtual Real value(Real intnl) const
Rate-independent associative mean-cap tensile AND compressive failure with hardening/softening of the...
const bool _use_custom_returnMap
Whether to use the custom return-map algorithm.
RankFourTensor dflowPotential_dstress(const RankTwoTensor &stress, Real intnl) const override
The derivative of the flow potential with respect to stress.
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.
virtual Real compressive_strength(const Real internal_param) const
compressive strength 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 bool useCustomReturnMap() const override
Returns false. You will want to override this in your derived class if you write a custom returnMap f...
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.
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
Real hardPotential(const RankTwoTensor &stress, Real intnl) const override
The hardening potential.
const SolidMechanicsHardeningModel & _c_strength
the compressive strength
Real yieldFunction(const RankTwoTensor &stress, Real intnl) const override
The following functions are what you should override when building single-plasticity models.
RankTwoTensor flowPotential(const RankTwoTensor &stress, Real intnl) const override
The flow potential.
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
RankTwoTensor dyieldFunction_dstress(const RankTwoTensor &stress, Real intnl) const override
The derivative of yield function with respect to stress.
const bool _use_custom_cto
Whether to use the custom consistent tangent operator algorithm.
virtual Real dhardPotential_dintnl(const RankTwoTensor &stress, Real intnl) const override
The derivative of the hardening potential with respect to the internal parameter.
virtual RankTwoTensor dhardPotential_dstress(const RankTwoTensor &stress, Real intnl) const override
The derivative of the hardening potential with respect to stress.
SolidMechanicsPlasticMeanCapTC(const InputParameters ¶meters)
const SolidMechanicsHardeningModel & _strength
the tensile strength
static InputParameters validParams()
virtual std::string modelName() const override
const unsigned _max_iters
max iters for custom return map loop
RankTwoTensor dflowPotential_dintnl(const RankTwoTensor &stress, Real intnl) const override
The derivative of the flow potential with respect to the internal parameter.
virtual Real tensile_strength(const Real internal_param) const
tensile strength as a function of residual value, rate, and internal_param
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.
RankTwoTensor df_dsig(const RankTwoTensor &stress, Real intnl) const
Derivative of the yield function with respect to stress.
Real dyieldFunction_dintnl(const RankTwoTensor &stress, Real intnl) const override
The derivative of yield function with respect to the internal parameter.
Plastic Model base class The virtual functions written below must be over-ridden in derived classes t...
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 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.
const Real _f_tol
Tolerance on yield function.
static InputParameters validParams()