Skip to content

Latest commit

 

History

History
59 lines (41 loc) · 1.95 KB

README.md

File metadata and controls

59 lines (41 loc) · 1.95 KB

MEF

This repository contains methodes to calculate the displacement and reaction forces on trusses and gantries

Requirements

  • Install python 3 on your computer. You can download it here.

When installing it, don't forget to check the Add Python to PATH checkbox.

image

  • Install the numpy library, we will use it to generate matrices and do basic operations with them.

    • To install it you just need to open a CMD window and paste the following comand (do this after completing the python installation)
pip install numpy

How To Use

Clone this repository. You can use the git clone command or just download the .ZIP file and unzip it after.

To solve a new problem, just create a python script in the same directory and import the function you wanna use.

For trusses:

from trelica import trelica

For gantries:

from portico import portico

After that import the numpy library as follows:

import numpy as np

Then you can use the function and it will return three matrices.

The first one is the nodal displacement, the second is the nodal forces, and the last one is the nodal forces in each beam.

For example:

from trelica import trelica
import numpy as np

[U,F,f] = trelica(EA,L,theta,n,b,Fe)
print("Deslocamentos nodais global: \n",U,"\n","Forças nodais: \n",F,"\n","Forças nodais em cada barra: \n",f)

Given the inputs, the code will output U, F, and f (The first, sencond and tird matrices as explain before).

You can find examples of how to fill the inputs in the files:

  • main_trelica.py (trusse)

image

  • main_portico.py (gantry)

image