Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate new solver #263

Open
33 of 68 tasks
stfnp opened this issue Aug 9, 2024 · 0 comments
Open
33 of 68 tasks

Integrate new solver #263

stfnp opened this issue Aug 9, 2024 · 0 comments

Comments

@stfnp
Copy link
Contributor

stfnp commented Aug 9, 2024

For the past year or so I have been working on a complete rewrite (and redesign) of the VirtualBow solver, i.e. the part that does the numerical computations. Unlike the old solver, the new one is written in Rust instead of C++ (see also #215). Even though the new solver is not yet finished, it has reached a state where it can be integrated into the main application in order to make testing and filling in missing features easier. This is currently happening on the branch integrate-new-solver (not usable yet).

This issue is for tracking the progress and the remaining tasks and will be updated frequently.

Remaining tasks for the integration

  • Include Rust compilation in the main build process
  • Make CI/CD pipeline work
  • Run solver tests in the pipeline
  • Call new solver from main application
  • Finalize new solver's output format
  • Load new solver output from the main application

Remaining tasks/missing functionality of the new solver

  • Add back test test_load_output
  • Evaluation and output of layer stresses
  • Dynamic simulation, including output of correct arrow position
  • Damping of limb and string
  • Manually test new string damping to verify that it does something
  • New string model without penalty contacts
  • Split solver into two crates: virtualbow-lib and virtualbow-cli and add back integration tests for the command line interface.

More detailed solver issues

  • Document test example of nonlinear pendulum
  • Implement and document static test for the string model
  • Implement test of linear beam dynamics
  • Extend static tests to bows with recurves
  • Extend static tests to cross section stresses and strains
  • Extend dynamic tests (energy, basic properties)
  • Complete last missing outputs
    • Minimum and maximum layer stresses
    • Kinetic energy of string and arrow
    • Limb velocity
    • String velocity
    • Characteristic dynamic numbers
    • Bonus: Force/draw stiffness
  • Release string force gradually, add setting for release time
  • String is not placed at the correct distance from the reference line
  • Bracing angle incorrect for recurves, probably wrong measurement of string angle. Fix and check in tests.
  • Reduce stiffness of the string in compression for dynamic analysis, document this in the theory manual
  • Consistent use of either SVector<f64, N> or [f64; N] in the input and output structs
  • Reference materials and layers by their name instead of their index
  • Check for self-intersecting geometry (curvature too high for thickness)
  • Progress estimation for dynamic simulation
  • Check for/fix duplicate time point in the dynamic output
  • Add new/changed numerical parameters to the bow settings
  • Timestep estimation or control for the dynamic simulation
  • Add missing documentation for eigenvalue solver
  • Implement Error trait for all custom errors
  • In solvers, check if states are finite and abort early if not
  • Better method than trapezoidal rule for segment stiffness matrices?
  • Add tests for cubic spline extrapolation
  • Consider replacing soa_derive with https://github.com/tim-harding/soa-rs
  • Proper error handling for computation of natural frequencies

GUI/Integration issues

  • Add tests for the C++ part for loading the new solver formats correcly

Final details/cleanup

  • Check all bow examples that don't pass the tests yet
  • Use Rustdoc to generate a documentation for the public API
  • Revisit all string parameters in public functions, make them usable for &str as well as String
  • Go over all error types and check if there is a test for them
  • Document evaluation of stresses and strains for the new beam elements
  • Include source for choice of corotational reference frame https://apps.dtic.mil/sti/tr/pdf/ADA358178.pdf
  • Completely revise the theoretical documentation
  • Have a look at all the TODO comments in the code
  • Document that files older than 0.7 are no longer supported
  • Document old settings that currently have no effect anymore
  • Have a look at all the unwrap() and expect() calls in the code
  • Run Clippy and maybe include in the CI build as well
  • Make warnings errors in the CI build
  • Check for symmetry errors in the model (*2, /2)

Keep for later

  • Move verification examples into their own LaTex document
  • assert_abs_diff_eq does not seem to check the length of the inputs. Verify and open an issue.
  • Use the new input format in the GUI, delegate conversion from older formats to the solver
  • Use GXBeam as a reference for the beam verification examples. Also pick beam length != 1.
  • Re-simulate user bows where the results didn't match well
  • Find a way to compute dissipated energy of each component
  • Implement stiffness of the force/draw curve
  • Add string angle to the output results
  • More advanced static algorithm (line search, modified Newton, step size control, ...)

Issues that need to be revisited after integrating the new solver

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant