Skip to content

Commit

Permalink
small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Shuaihao-Zhang committed Sep 10, 2024
1 parent f68f50b commit d18fb68
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/shared/materials/general_continuum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ Matd J2Plasticity::ReturnMappingShearStress(Matd &shear_stress, Real &hardening_
Real f = sqrt(2.0 * stress_tensor_J2) - sqrt_2_over_3_ * (hardening_modulus_ * hardening_factor + yield_stress_);
if (f > TinyReal)
{

Real r = (sqrt_2_over_3_ * (hardening_modulus_ * hardening_factor + yield_stress_)) / (sqrt(2.0 * stress_tensor_J2) + TinyReal);
shear_stress = r * shear_stress;
}
Expand All @@ -116,7 +115,6 @@ Real J2Plasticity::ScalePenaltyForce(Matd &shear_stress, Real &hardening_factor)
Real f = sqrt(2.0 * stress_tensor_J2) - sqrt_2_over_3_ * (hardening_modulus_ * hardening_factor + yield_stress_);
if (f > TinyReal)
{

r = (sqrt_2_over_3_ * (hardening_modulus_ * hardening_factor + yield_stress_)) / (sqrt(2.0 * stress_tensor_J2) + TinyReal);
}
return r;
Expand All @@ -126,13 +124,6 @@ Real J2Plasticity::HardeningFactorRate(const Matd &shear_stress, Real &hardening
{
Real stress_tensor_J2 = 0.5 * (shear_stress.cwiseProduct(shear_stress.transpose())).sum();
Real f = sqrt(2.0 * stress_tensor_J2) - sqrt_2_over_3_ * (hardening_modulus_ * hardening_factor + yield_stress_);
if (f > TinyReal)
{
return 0.5 * f / (G_ + hardening_modulus_ / 3.0);
}
else
{
return 0.0;
}
return (f > TinyReal) ? 0.5 * f / (G_ + hardening_modulus_ / 3.0) : 0.0;
}
} // namespace SPH

0 comments on commit d18fb68

Please sign in to comment.