54 template <
class TPlasticPotentialType>
74 static constexpr
double tolerance = std::numeric_limits<double>::epsilon();
115 const Vector& rStrainVector,
116 double& rEquivalentStress,
126 const bool has_symmetric_yield_stress = r_material_properties.
Has(YIELD_STRESS);
127 const double yield_compression = has_symmetric_yield_stress ? r_material_properties[YIELD_STRESS] : r_material_properties[YIELD_STRESS_COMPRESSION];
128 const double yield_tension = has_symmetric_yield_stress ? r_material_properties[YIELD_STRESS] : r_material_properties[YIELD_STRESS_TENSION];
129 const double n = std::abs(yield_compression / yield_tension);
131 double SumA = 0.0, SumB = 0.0, SumC = 0.0, ere0, ere1;
132 for (std::size_t cont = 0; cont < 2; ++cont) {
133 SumA += std::abs(principal_stress_vector[cont]);
134 SumB += 0.5 * (principal_stress_vector[cont] + std::abs(principal_stress_vector[cont]));
135 SumC += 0.5 * (-principal_stress_vector[cont] + std::abs(principal_stress_vector[cont]));
141 for (std::size_t cont = 0; cont <
VoigtSize; ++cont) {
142 auxf += rStrainVector[cont] * rPredictiveStressVector[cont];
144 rEquivalentStress = std::sqrt(auxf);
145 rEquivalentStress *= (ere0 *
n + ere1);
160 const double yield_compression = r_material_properties.
Has(YIELD_STRESS) ? r_material_properties[YIELD_STRESS] : r_material_properties[YIELD_STRESS_COMPRESSION];
161 rThreshold = std::abs(yield_compression / std::sqrt(r_material_properties[YOUNG_MODULUS]));
173 const double CharacteristicLength
178 const double fracture_energy = r_material_properties[FRACTURE_ENERGY];
179 const bool has_symmetric_yield_stress = r_material_properties.
Has(YIELD_STRESS);
180 const double yield_compression = has_symmetric_yield_stress ? r_material_properties[YIELD_STRESS] : r_material_properties[YIELD_STRESS_COMPRESSION];
181 const double yield_tension = has_symmetric_yield_stress ? r_material_properties[YIELD_STRESS] : r_material_properties[YIELD_STRESS_TENSION];
182 const double n = yield_compression / yield_tension;
185 rAParameter = 1.0 / (fracture_energy *
n *
n / (CharacteristicLength * std::pow(yield_compression, 2)) - 0.5);
186 KRATOS_ERROR_IF(rAParameter < 0.0) <<
"Fracture energy is too low, increase FRACTURE_ENERGY..." << std::endl;
188 rAParameter = -std::pow(yield_compression, 2) / (2.0 * fracture_energy *
n *
n / CharacteristicLength);
208 TPlasticPotentialType::CalculatePlasticPotentialDerivative(rPredictiveStressVector, rDeviator,
J2, rDerivativePlasticPotential, rValues);
230 KRATOS_ERROR <<
"Yield surface derivative not defined for SimoJu..." << std::endl;
239 if (!rMaterialProperties.
Has(YIELD_STRESS)) {
240 KRATOS_ERROR_IF_NOT(rMaterialProperties.
Has(YIELD_STRESS_TENSION)) <<
"YIELD_STRESS_TENSION is not a defined value" << std::endl;
241 KRATOS_ERROR_IF_NOT(rMaterialProperties.
Has(YIELD_STRESS_COMPRESSION)) <<
"YIELD_STRESS_COMPRESSION is not a defined value" << std::endl;
243 const double yield_compression = rMaterialProperties[YIELD_STRESS_COMPRESSION];
244 const double yield_tension = rMaterialProperties[YIELD_STRESS_TENSION];
246 KRATOS_ERROR_IF(yield_compression <
tolerance) <<
"Yield stress in compression almost zero or negative, include YIELD_STRESS_COMPRESSION in definition";
247 KRATOS_ERROR_IF(yield_tension <
tolerance) <<
"Yield stress in tension almost zero or negative, include YIELD_STRESS_TENSION in definition";
249 const double yield_stress = rMaterialProperties[YIELD_STRESS];
251 KRATOS_ERROR_IF(yield_stress <
tolerance) <<
"Yield stress almost zero or negative, include YIELD_STRESS in definition";
253 KRATOS_ERROR_IF_NOT(rMaterialProperties.
Has(FRACTURE_ENERGY)) <<
"FRACTURE_ENERGY is not a defined value" << std::endl;
254 KRATOS_ERROR_IF_NOT(rMaterialProperties.
Has(YOUNG_MODULUS)) <<
"YOUNG_MODULUS is not a defined value" << std::endl;
256 return TPlasticPotentialType::Check(rMaterialProperties);
272 const double yield_compression = rMaterialProperties.
Has(YIELD_STRESS) ? rMaterialProperties[YIELD_STRESS] : rMaterialProperties[YIELD_STRESS_COMPRESSION];
273 const double yield_tension = rMaterialProperties.
Has(YIELD_STRESS) ? rMaterialProperties[YIELD_STRESS] : rMaterialProperties[YIELD_STRESS_TENSION];
274 return std::sqrt(rMaterialProperties[YOUNG_MODULUS]) * yield_tension / yield_compression;
static void CalculatePrincipalStresses(array_1d< double, Dimension > &rPrincipalStressVector, const BoundedVectorType &rStressVector)
This method computes the principal stresses vector.
Properties encapsulates data shared by different Elements or Conditions. It can store any type of dat...
Definition: properties.h:69
bool Has(TVariableType const &rThisVariable) const
Definition: properties.h:578
Short class definition.
Definition: simo_ju_yield_surface.h:56
KRATOS_CLASS_POINTER_DEFINITION(SimoJuYieldSurface)
Counted pointer of SimoJuYieldSurface.
static bool IsWorkingWithTensionThreshold()
This method returns true if the yield surfacecompares with the tension tield stress.
Definition: simo_ju_yield_surface.h:262
static void GetInitialUniaxialThreshold(ConstitutiveLaw::Parameters &rValues, double &rThreshold)
This method returns the initial uniaxial stress threshold.
Definition: simo_ju_yield_surface.h:153
static void CalculateYieldSurfaceDerivative(const array_1d< double, VoigtSize > &rPredictiveStressVector, const array_1d< double, VoigtSize > &Deviator, const double J2, array_1d< double, VoigtSize > &rFFlux, ConstitutiveLaw::Parameters &rValues)
This script calculates the derivatives of the Yield Surf according to NAYAK-ZIENKIEWICZ paper Interna...
Definition: simo_ju_yield_surface.h:222
static constexpr SizeType Dimension
The Plastic potential already defines the working simension size.
Definition: simo_ju_yield_surface.h:65
virtual ~SimoJuYieldSurface()
Destructor.
Definition: simo_ju_yield_surface.h:97
TPlasticPotentialType PlasticPotentialType
The type of potential plasticity.
Definition: simo_ju_yield_surface.h:62
SimoJuYieldSurface & operator=(SimoJuYieldSurface const &rOther)
Assignment operator.
Definition: simo_ju_yield_surface.h:91
static double GetScaleFactorTension(const Properties &rMaterialProperties)
This method returns the scaling factor of the yield surface surfacecompares with the tension tield st...
Definition: simo_ju_yield_surface.h:270
static constexpr double tolerance
The machine precision zero tolerance.
Definition: simo_ju_yield_surface.h:74
static int Check(const Properties &rMaterialProperties)
This method defines the check to be performed in the yield surface.
Definition: simo_ju_yield_surface.h:237
static void CalculateEquivalentStress(const array_1d< double, VoigtSize > &rPredictiveStressVector, const Vector &rStrainVector, double &rEquivalentStress, ConstitutiveLaw::Parameters &rValues)
This method the uniaxial equivalent stress.
Definition: simo_ju_yield_surface.h:113
SimoJuYieldSurface(SimoJuYieldSurface const &rOther)
Copy constructor.
Definition: simo_ju_yield_surface.h:86
static constexpr SizeType VoigtSize
The Plastic potential already defines the Voigt size.
Definition: simo_ju_yield_surface.h:68
static void CalculatePlasticPotentialDerivative(const array_1d< double, VoigtSize > &rPredictiveStressVector, const array_1d< double, VoigtSize > &rDeviator, const double J2, array_1d< double, VoigtSize > &rDerivativePlasticPotential, ConstitutiveLaw::Parameters &rValues)
This method calculates the derivative of the plastic potential DG/DS.
Definition: simo_ju_yield_surface.h:200
static void CalculateDamageParameter(ConstitutiveLaw::Parameters &rValues, double &rAParameter, const double CharacteristicLength)
This method returns the damage parameter needed in the exp/linear expressions of damage.
Definition: simo_ju_yield_surface.h:170
SimoJuYieldSurface()
Initialization constructor.
Definition: simo_ju_yield_surface.h:81
#define KRATOS_ERROR
Definition: exception.h:161
#define KRATOS_ERROR_IF_NOT(conditional)
Definition: exception.h:163
#define KRATOS_ERROR_IF(conditional)
Definition: exception.h:162
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
std::size_t SizeType
The definition of the size type.
Definition: mortar_classes.h:43
float J2
Definition: isotropic_damage_automatic_differentiation.py:133
Deviator
Definition: isotropic_damage_automatic_differentiation.py:135
int n
manufactured solution and derivatives (u=0 at z=0 dudz=0 at z=domain_height)
Definition: ode_solve.py:402
Definition: constitutive_law.h:189
const Properties & GetMaterialProperties()
Definition: constitutive_law.h:457