I found this https://anastruct.readthedocs.io/en/latest/index.html python module which may be interesting.
Since it is working for Python versions >3 I guess now it's possible to use it in some way into FreeCAD.
Similar to the use of fluids/thermo modules inside flamingo, one possible application could be
draw the line diagram of the structure in a Sketch
lay down the beams over it (for example with "frameBranch")
calculate the inertia properties of the section respect to the plane of the sketch and rotation of beams around to centerlines
draw the force diagrams N-S-M or deflection lines with anastruct
Regards
(BTW: it seems fluids/thermo will no more run with py3 builds but most of their functions has been duplicated with explicit formulas)
"""
Test anaStruct for FreeCAD
Version: 0.19.16523 (Git)
Python version: 3.6.6
"""
from anastruct.fem.system import SystemElements
# Create a new system object.
ss = SystemElements()
# Add beams to the system.
ss.add_element(location=[[0, 0], [3, 4]], EA=5e9, EI=8000)
ss.add_element(location=[[3, 4], [8, 4]], EA=5e9, EI=4000)
# get a visual of the element IDs and the node IDs
#ss.show_structure()
# add loads to the element ID 2
ss.q_load(element_id=2, q=-10)
# add hinged support to node ID 1
ss.add_support_hinged(node_id=1)
# add fixed support to node ID 2
ss.add_support_fixed(node_id=3)
# solve
ss.solve()
showFlag=5
if showFlag==1:
# show the structure
ss.show_structure()
elif showFlag==2:
# show the reaction forces
ss.show_reaction_force()
elif showFlag==3:
# show the axial forces
ss.show_axial_force()
elif showFlag==4:
# show the shear force
ss.show_shear_force()
elif showFlag==5:
# show the bending moment
ss.show_bending_moment()
elif showFlag==6:
# show the displacements
ss.show_displacement()
Hi, there. I made a little step ahead with anastruct creating a macro which takes the structure from the FreeCAD document and solve it with anastruct.
Below a short gallery with an example.
There are few dependencies:
a release of FC python 3
python library anastruct
dodo workbench (for the class "FrameBranch")
[\list]
Summarizing you can select the framebranch (the Base must be a sketch; not a dwire) from the drop-down box, input the loads (distributed) and constraints in a separate window and perform a static analysis.
The next step could be to bring both input and output inside the window of FreeCAD and add other loads.
Final target is to solve also 3D structures with the principle of superposition of effects.
@bernd: this library is very basic but may that interest you for the 1D analysis?
oddtopus wrote: ↑Sun Sep 29, 2019 7:46 am
Hi, there. I made a little step ahead with anastruct creating a macro which takes the structure from the FreeCAD document and solve it with anastruct.
dodo workbench (for the class "FrameBranch")
Is it possible to include this macro directly as part of the Dodo workbench? Then we can give it more prominence in the release notes.
@vocx. Up to now I don't want to include this stuff in the workbench because it relies on an optional python module which is not within the package of FC. I made something similar before to compute pressure losses in pipes with the modules "fluids" and "thermo" but since the project of FC progress quickly, the compatibility could not be always guaranteed.
oddtopus wrote: ↑Sat Oct 12, 2019 5:41 pm
@vocx. Up to now I don't want to include this stuff in the workbench because it relies on an optional python module which is not within the package of FC....
That it is optional is not a problem, you can always add a note somewhere that says, "to use this feature you need to install this requisite first".
hi everyone. I can't run anastruct6.py macro in my freecad 0.20. I attach a imagen with the error that i obtain. octopus can you explain me how insstall and run a anastruct and anastruct6?