JesseBonanno / IndeterminateBeam

A solver for 1D indeterminate beams
MIT License
67 stars 18 forks source link

Allow latest SymPy #27

Closed daradib closed 2 years ago

daradib commented 2 years ago

Currently, installing IndeterminateBeam downgrades the version of SymPy installed. The tests run fine with the latest SymPy 1.9. I also updated requirements.txt so that Travis CI tests with the latest version.

JesseBonanno commented 2 years ago

Hi @daradib ,

Thank you for taking a look into the package.

The reason sympy was downgraded to be below 1.8 was due to an observed computation error with version 1.8 for some specific beam cases. This is thought to be due to a float precision error with Sympy's linsolve. You can see below comments for your own reference:

https://github.com/openjournals/jose-reviews/issues/111#issuecomment-821862363 (major revision point 1) https://github.com/openjournals/jose-reviews/issues/111#issuecomment-826333433 (point 1) https://github.com/openjournals/jose-reviews/issues/111#issuecomment-826377209 https://github.com/openjournals/jose-reviews/issues/111#issuecomment-830785135 (point 2) https://github.com/openjournals/jose-reviews/issues/111#issuecomment-831844968

I have just added an example to the unit testing to try and recreate this error in order to be able to tell if the error was solved with version 1.9 of sympy. Unfortunetly i could not recreate the error during unit testing with Sympy 1.8.

I have changed the code so that sympy is >= 1.9 to prevent downgrading users version of sympy, however i am not sure if the same issues will occur as was observed in version 1.8. I will give Sympy the benefit of the doubt and if errors occur hopefully someone will raise an issue for it.

I am going to close this pull request since i have made the minor changes required as above while making another change this morning. See commit 6ce5def for change.

Best, Jesse