Skip to content

Commit

Permalink
Remove commented out blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
pschaugule authored Jun 27, 2023
1 parent ed7fcb6 commit 834dd75
Showing 1 changed file with 0 additions and 45 deletions.
45 changes: 0 additions & 45 deletions srlife/damage.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,16 +167,6 @@ def tube_log_reliability(self, tube, material, receiver, time):
tube.times, stresses, temperatures, volumes, material, time
)

# CARES/LIFE cutoff moved to each model
# if self.cares_cutoff:
# pstress = self.calculate_principal_stress(stresses)
# pmax = np.max(pstress, axis=2)
# pmin = np.min(pstress, axis=2)
# remove = np.abs(pmin / (pmax + 1.0e-16)) > 3.0
# mod_prob = inc_prob.flatten()
# mod_prob[remove] = 0.0
# inc_prob = mod_prob.reshape(inc_prob.shape)

# Return the sums as a function of time along with the field itself
inc_prob = np.array(list(inc_prob) * len(tube.times)).reshape(
len(tube.times), -1
Expand Down Expand Up @@ -233,13 +223,6 @@ def calculate_normal_stress(self, mandel_stress):
# Principal stresses
pstress = self.calculate_principal_stress(mandel_stress)

# CARES/LIFE cutoff
# if self.cares_cutoff:
# pmax = np.max(pstress, axis=2)
# pmin = np.min(pstress, axis=2)
# remove = np.abs(pmin / (pmax + self.tolerance)) > 3.0
# pstress[remove] = 0.0

# Normal stress
return (
pstress[..., 0, None, None] * (self.l**2)
Expand Down Expand Up @@ -296,13 +279,6 @@ def calculate_normal_stress(self, mandel_stress):
# Principal stresses
pstress = self.calculate_principal_stress(mandel_stress)

# CARES/LIFE cutoff
# if self.cares_cutoff:
# pmax = np.max(pstress, axis=2)
# pmin = np.min(pstress, axis=2)
# remove = np.abs(pmin / (pmax + self.tolerance)) > 3.0
# pstress[remove] = 0.0

# Normal stress
return (
pstress[..., 0, None, None] * (self.l**2)
Expand All @@ -317,13 +293,6 @@ def calculate_total_stress(self, mandel_stress):
# Principal stresses
pstress = self.calculate_principal_stress(mandel_stress)

# CARES/LIFE cutoff
# if self.cares_cutoff:
# pmax = np.max(pstress, axis=2)
# pmin = np.min(pstress, axis=2)
# remove = np.abs(pmin / (pmax + self.tolerance)) > 3.0
# pstress[remove] = 0.0

# Total stress
return np.sqrt(
((pstress[..., 0, None, None] * self.l) ** 2)
Expand Down Expand Up @@ -521,13 +490,6 @@ def calculate_element_log_reliability(
# Principal stresses
pstress = self.calculate_principal_stress(mandel_stress)

# CARES/LIFE cutoff
# if self.cares_cutoff:
# pmax = np.max(pstress, axis=2)
# pmin = np.min(pstress, axis=2)
# remove = np.abs(pmin / (pmax + self.tolerance)) > 3.0
# pstress[remove] = 0.0

# Material parameters
svals = material.strength(temperatures)
mvals = material.modulus(temperatures)
Expand Down Expand Up @@ -593,13 +555,6 @@ def calculate_avg_normal_stress(
tot_time: total service time used as input to calculate reliability
"""

# CARES/LIFE cutoff
# if self.cares_cutoff:
# pmax = np.max(pstress, axis=2)
# pmin = np.min(pstress, axis=2)
# remove = np.abs(pmin / (pmax + self.tolerance)) > 3.0
# pstress[remove] = 0.0

# Material parameters
self.temperatures = temperatures
self.material = material
Expand Down

0 comments on commit 834dd75

Please sign in to comment.