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

Lack of Good Error Reporting in solve_for_reaction_loads in Beam Class #26604

Open
mvg2002 opened this issue May 16, 2024 · 0 comments
Open

Lack of Good Error Reporting in solve_for_reaction_loads in Beam Class #26604

mvg2002 opened this issue May 16, 2024 · 0 comments

Comments

@mvg2002
Copy link

mvg2002 commented May 16, 2024

As also described in this comment.

When using solve_for_reaciton_loads in the wrong way in the beam class the output will be IndexError: tuple index out of range. It doesn't matter what the problem is. The user doesn't know what went wrong when trying to calculate the reaction loads.

The line that outputs this message is:

solution = list((linsolve([shear_curve, moment_curve] + slope_eqs
                        + deflection_eqs, (C3, C4) + reactions).args)[0])

The error message will be the same when:

  1. there is a mechanism
  2. when there are no *reactions given as input
  3. when the wrong *reactions are given as input
    There are probably a lot more possible ways to get the same error message.

As stated in this comment this method can be improved by adding some try and except statements to give more detailled error messages. This will make it easier for the user to find the problem in their code.

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

2 participants