Structural Analysis Program

About the development of the FEM module/workbench.

Moderator: bernd

altay
Posts: 5
Joined: Thu Jan 24, 2019 6:12 pm

Structural Analysis Program

Postby altay » Mon Jan 28, 2019 7:24 am

Hi everyone,
I am master student of Earthquake Engineering and I try to code open source structural analysis program. Actually we wrote our program's calculation algoritms in Python 3 but here is the thing we are using our algoritm text based input and output. So I want to add drawing capability to our code and draw some 3d lines (coloum and beam) and I want to read some data from my drawing area about these lines such as;

1- Start and end coordinate [ (xi,yi,zi), [xf,yf,zf]]
2- Section properties of line [ Ix ,Iy, Iz (Moment of Inertias) , Section Area]
3- Material properties of line [Elasticity modules ,Shear Modulus etc]

And after my calculation I want to plot my values on the same drawing screen.

I know FreeCAD can do these stuff but I have to finish my project before April and I don't have much time to learning " What modules I should use or which way is more efficient " so if you help me I will be very happy.

By the way I am adding one video here for show you what I need https://www.youtube.com/watch?v=AlpXZPJOyZQ&t=62s.

Thanks in advance
User avatar
microelly2
Posts: 4329
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Structural Analysis Program

Postby microelly2 » Mon Jan 28, 2019 8:19 am

The simplest way is to learn Draft Workbench.
You can draw lines and faces and you can display text in 3D scenes.
altay
Posts: 5
Joined: Thu Jan 24, 2019 6:12 pm

Re: Structural Analysis Program

Postby altay » Mon Jan 28, 2019 5:17 pm

Ok I understand drawing command with python console but still I don't know is it possible to I connect drawing object's info to my calculation algorithm and how ?? :roll:
User avatar
microelly2
Posts: 4329
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Structural Analysis Program

Postby microelly2 » Mon Jan 28, 2019 7:21 pm

if you have created an object you can access a lot of information by the methods of the shapes

the object has a Shape Property ...
and a Placement too.
>>> App.ActiveDocument.Shape001
<Part::PartFeature>
>>> App.ActiveDocument.Shape001.Shape.CenterOfMass
Vector (20.460534425327545, 37.35470259719471, 13.926378071000116)
>>> App.ActiveDocument.Shape001.Shape.MatrixOfInertia
Matrix ((6.08953e+10,-3.36811e+08,-5.72231e+08,0),(-3.36811e+08,9.89353e+10,-2.12977e+10,0),(-5.72231e+08,-2.12977e+10,7.44056e+10,0),(0,0,0,1))
>>> App.ActiveDocument.Shape001.Shape.Volume
-9561887.883230032
Starting here https://www.freecadweb.org/wiki/Python_ ... g_tutorial
and the next pages will gibve you some information how to work with FreeCAD python objects.
User avatar
bernd
Posts: 8214
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Structural Analysis Program

Postby bernd » Tue Jan 29, 2019 11:08 pm

play a bit with FEM Workbench GUI. If you find the Consttraint tools useful for you, you could use them for your solver too.

Anything you would need is to add your solver to FEM workbench. Check topic https://forum.freecadweb.org/viewtopic.php?f=18&t=31288 an especially development branch https://github.com/berndhahnebach/FreeC ... s/femoofem

Eventually for you it is much simpler since you do not seam to have a mesh. In this case it might be simpler to directly write an own module which extracts the data from FEM constraints and Part or Draft geometry and writes the input file for your analysis software.

If you have any specific question do not hesitate to ask. It is quite a short time line ... good luck