https://github.com/caiolaytynher/truss-solver
A CLI truss solver that avoids to write the hole matrix.
https://github.com/caiolaytynher/truss-solver
python truss
Last synced: 4 months ago
JSON representation
A CLI truss solver that avoids to write the hole matrix.
- Host: GitHub
- URL: https://github.com/caiolaytynher/truss-solver
- Owner: caiolaytynher
- License: mit
- Created: 2022-05-07T22:01:27.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-07-23T06:19:57.000Z (almost 3 years ago)
- Last Synced: 2024-12-27T20:33:39.534Z (6 months ago)
- Topics: python, truss
- Language: Python
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Truss solver
A CLI program to solve truss problems. The first time you run the program,
it'll ask you about how many nodes your truss have and to name all of the forces
that are unknown to you. Then, the program will ask you about the expression that
describes the sum of all forces in the horizontal and the vertical direction for
each node.## Rules to fill in the CLI
Because the output of the CLI input is just a string, there are some rules to be
obey in this step.1. The force names are separated by commas and are space insensitive;
2. The expressions are separated by plus signals and are space insensitive only
between the signals;
3. Negative signs are attatched to the expression;
4. You need to obey the names you selected for each force;
5. To multiply the forces by a scalar, follow these formats:
- force\*scalar to multiply by a scalar;
- force\*num/denom to multiply by a fraction;
- force\*sinX or force\*cosX, with X being any angle in degrees.
6. Special rules include:
- You don't need to specify when the scalar is one;
- Any number will be summed up;
- Any force left over becomes zero.
7. You need to write the expression as if it's equal to zero but you cannot write
the equals to zero.## After run
After you run the file for the first time, it'll generate a json file that you can
reuse to run the program. This way, you can make minor changes without having to
type everything again. To run the program again using the file, just specify the
name of the file after the program when you run it.```
$ python truss_solver.py output.json
```