Code Monkey home page Code Monkey logo

truss_solver's Introduction

Truss Solver

This Python code solves any 2D truss structure using the joints method.

๐Ÿ”ฐ How does it work?

In order to explain the code, it was used for solving the following truss structure (Engineering Mechanics: Statics. Bedford & Fowler - Problem 6.7)

  • The data is uploaded from an excel file with two main sheets

    • Element Sheet shows the start and end joints for each element
    • Joint Sheet shows information such as:

      • X, Y coodinates for each joint.
      • Rx, Ry represents the support reactions. If there are 1 in both columns that joint is a pinned support. If just one column has 1 that joint is a roller support.
      • Fx, Fy represents the forces in X and Y direction for each joint.
  • In the first part of the code the support reactions are solved using the equilibrium equations for 2D structures:

$$ \Sigma F_x = 0 $$

$$ \Sigma F_y = 0 $$

$$ \Sigma M = 0 $$

  • After that, all the joints are sorted based on the unknown values.
  • The solution process starts with the joints with less unknowns (1 or 2) and uses the equilibrium equations for joints.

$$ \Sigma F_x = 0 $$

$$ \Sigma F_y = 0 $$

  • The equation system is solved using the linalg function from numpy
  • The quantity of unknowns are updated after solve a joint. The above process is repeated until all the joints are solved.
  • Finally, a line-plot with the internal load of each element (in tension[+] or compression[-]) is shown.

  • A solution of this example truss obtained using the software MDSolid is shown below.

๐Ÿ”ถ What is next?

  • Load tha truss data using a grid and straight lines drawn with mouse.

truss_solver's People

Contributors

alejo1630 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.