thegrumpys / odop

Open Design Optimization Platform (ODOP) - Coil spring design app; mechanical springs; compression spring, extension spring, torsion spring
https://www.springdesignsoftware.org
MIT License
4 stars 5 forks source link

Force Cycle_Life calculation to zero, "NA" or NaN in specific cases #914

Open grumpyinca opened 1 month ago

grumpyinca commented 1 month ago

Case 1: FS_2 less than 1.0

As noted in the help text associated with alert "_CycleLife not defined beyond yield": https://odop-staging.herokuapp.com/docs/Help/DesignTypes/Spring/alerts.html#Cycle_LifeNA_FS_2 Cycle_Life does not have meaning if the factor of safety at maximum operating load is less than 1.0. This is basically a situation where the spring fails before it completes the first cycle.

I believe that the user experience would be improved if, (at least) in Calculator View and the Reports, the display of Cycle_Life was suppressed when FS_2 is less than 1.0. As an expedient, it might be reasonable to force the value to zero or NaN at the time that it is calculated. Alternatively, the calculated value could be maintained in the model but the rendering forced to "NA".

I do not believe that it absolutely necessary to suppress the display of Cycle_Life in Advanced View. However, if the calculated value of Cycle_Life is forced to zero, "NA" or NaN, at least then Advanced View will be consistent.

Case 2: Compression spring deflected below solid

Previous attempts to limit the calculated deflection of a compression spring at the solid height have introduced other problems. So, in compression springs, the calculation of force & deflection is allowed to go below the solid condition. Thus, the display of Cycle_Life should be suppressed (set to zero, NaN or "NA") when L_2 is less than L_Solid.