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

Try deflection as independent variable #796

Closed grumpyinca closed 4 days ago

grumpyinca commented 1 year ago

There is a desire to experiment with having deflection rather than force as an independent variable for the Spring design type. This issue is being opened so as to provide a branch to host the experimental work. This branch is based on master-4.3.3, not the current master.

At the time of opening the issue, there is no plan for migrate or extending the changes to spring types beyond compression or units beyond US Customary. Plans could change based on the results of the experimentation.

It is possible that a more permanent implementation would involve an alternate design type that co-exists with the current force as independent variable formulation.

grumpyinca commented 1 year ago

Testing based on the code in place as this is written suggests that things are functioning as intended. When comparing to the current v4.3.3 staging system, Search & Seek results can be quite different.

Initial testing with Action : Select Catalog seems to produce valid results. Since these results are different from the v4.3.3 staging system results, more detailed investigation should be undertaken to confirm correct operation.

Operation with tutor7 (Seek) seems to produce valid results but in some cases (mostly early in the sequence), the results are significantly different from those of the v4.3.3 staging system. Again, more testing is indicated.

grumpyinca commented 1 year ago

The Demo script named demoNewDesign has a Select : Catalog operation near the end. As compared to the staging system, the results are slightly different. The fact that the Search operations took different paths and produced slightly different designs is only part of the issue. The fact that the two different models produce different Objective Values when evaluating candidate catalog springs is also a factor.

grumpyinca commented 1 year ago

Comparing results between the staging system (Force is independent) and this branch (Deflection is independent) using the Demo & Tutorial scripts can run into problems. There are places in the scripts where simply changing (or Fixing) the value of Force_1 or Force_2 is sufficient, and the operation of some scripts depends on that. However, when Force is a dependent variable, A Fix and Search is required to achieve the desired result. The scripts do not always provide that.

As an example, look at:

grumpyinca commented 1 year ago

Note: #799 has been merged into this branch.

grumpyinca commented 1 year ago

A general conclusion of testing demo & tutorial scripts on this branch is that if Force and Deflection switch between dependent and independent, the narrative of each script needs to be reviewed. In many cases, the narrative will need to be adjusted in order to work properly. As noted in the Dec 29 comment above, there are cases where a Search operation will need to be added to the script.

1fifoto commented 4 days ago

See #798 as a replacement for this issue, because it has the capability to switch Defection 1&2 from dependent to independent variables. Closing this issue.