FEA of a 3D-Printed Part

About the development of the FEM module/workbench.

Moderator: bernd

Klemmkeil
Posts: 24
Joined: Sun Apr 04, 2021 11:12 am

Re: FEA of a 3D-Printed Part

Post by Klemmkeil »

I got my macro working, but just for parts of my model.
The Problem is, that FreeCAD uses 95% of my RAM, in my Case it´s 122 GB.
For small AM-Parts printed with a big nozzle and a coarse infill, it´s a Option, but not for my complex Models.
Here my macro:
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import FreeCAD as App
import Sketcher
import Draft, Part
import Part, Arch

fichier = "E:\\Neuer Ordner\\gcode2.txt" # path and name of file.txt

file = open(fichier, "r") # open the file read
wire = []
X=Y=Z = 0.0

for ligne in file:
coordinates = ligne.split()
try: # for format PCD ignore the header
X,Y,Z = coordinates # separate the coordinates
print(X," ",Y," ",Z)
wire.append(FreeCAD.Vector(float(X),float(Y),float(Z))) #append the coordinates
Line = Draft.makeWire(wire,closed=False,face=False,support=None) # create the wire open
Arch.makePipe(Line, 0.3)
except Exception:
None
file.close()


App.ActiveDocument.recompute()





I convert my G-code into a readable Format via a VBA-macro.

Here a Examplepart:
SLiced.JPG
SLiced.JPG (33.52 KiB) Viewed 3715 times
Greetings
Nic
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: FEA of a 3D-Printed Part

Post by Kunda1 »

Please put code in bbcode code tsgs
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
thschrader
Veteran
Posts: 3129
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: FEA of a 3D-Printed Part

Post by thschrader »

Klemmkeil wrote: Thu Apr 08, 2021 8:39 am The Problem is, that FreeCAD uses 95% of my RAM, in my Case it´s 122 GB.
Ups, that is a lot. Univerity computer?

I played with your printed model. Nearly the complete load runs through the sidebands.
The infill-polygons acting as a stabilizer, but they carry no load.

Mabe you can save a lot of printing work when doing FEM first, to find a practicable design.
Regards Thomas

file with cleared mesh:
test_iso2.FCStd
(353.48 KiB) Downloaded 57 times
polygon_infill.JPG
polygon_infill.JPG (81.1 KiB) Viewed 3657 times
RatonLaveur
Posts: 991
Joined: Wed Mar 27, 2019 10:45 am

Re: FEA of a 3D-Printed Part

Post by RatonLaveur »

Actually most FDM 3D printer afficionados would agree with your sim.

The rule of thumb is "if you want more strength, print more shells, not more infill" which saves a crap-ton of material and printing time as well.
Many people have tested mechanical resistance vs. infill
https://www.youtube.com/watch?v=AmEaNAwFSfI

So technically your simulation is a fantastic proof of concept.

One really cool test case, would be to recreate the designs proposed in the above video, and solve them...see if the shoe fits :lol: :lol:
Klemmkeil
Posts: 24
Joined: Sun Apr 04, 2021 11:12 am

Re: FEA of a 3D-Printed Part

Post by Klemmkeil »

The modle is just a example, which i used as a testcase for my macro.
I used just 3 shells and 10% infill, because i want a small Gcode-file.
In this case round about 2000 lines.
It would be not much more than a sidecase.
As resulut of my work i want to create an analytic way for calculating an design the correct infill for your part...
RatonLaveur
Posts: 991
Joined: Wed Mar 27, 2019 10:45 am

Re: FEA of a 3D-Printed Part

Post by RatonLaveur »

The ideal is to perform reduced modelling.

Make a very simple test case, model the variations of that case (infill%; #shells;...) Etc and monitor a set of metric such as stress (min, max, average)...etc.

From this you derive a fitted semi-analytical model.

More complex 3D CAD models can then be estimated in bulk, by applying the model, not with the 20000 lines of code. Such work is Master Thesis level.

The ideal result from your FreeCAD work is then two different workflow:
One to allow simulating a complete FDM 3DP model (current work) that can be used in a direct method or to calibrate the semi-analytical model.
One to allow simulating a bulk 3D model and apply the semi-analytical model to estimate 3DP parameters.

I am well aware that i am here only spewing words and the amount of work they can imply, i am merely projecting your idea further according to my own understanding. Consider it a thought experiment ;)

EDIT: re-reading your previous post carefully, it seems I am here barging into an open door...you seem to want to do exactly that already.
GAZ082
Posts: 51
Joined: Sat Sep 18, 2021 3:30 am
Location: Buenos Aires City, Argentina

Re: FEA of a 3D-Printed Part

Post by GAZ082 »

Wonder @Klemmkeil what's the status of this project. I'm really interested in this!
maxwxyz
Posts: 158
Joined: Sat Dec 31, 2022 2:42 pm
Location: Munich, Germany
Contact:

Re: FEA of a 3D-Printed Part

Post by maxwxyz »

You can export the .obj mesh of G-Code files with the G-Code Viewer included in the Prusa Slicer. You can directly import the .obj mesh in FreeCAD, adjust and convert it to a solid. I am not sure if you can somehow use the .obj mesh for FEA or remesh the .obj mesh in FreeCAD without the need to convert it to a solid first.
Klemmkeil
Posts: 24
Joined: Sun Apr 04, 2021 11:12 am

Re: FEA of a 3D-Printed Part

Post by Klemmkeil »

You can access my Thesis here.

Long things short:

1. Created multiple solids, which are suitable for meshing, did some FEA via FreeCAD and SalomeMeca.
2. Defined out of my calcs etc. some material properties for different grades of infill.
3. Defined orthotrop material via tensor
4. Calculated with orthotrop material (https://en.wikipedia.org/wiki/Orthotropic_material)

In the end it is a very fast way for calculating the behaviour of FDM-parts.


https://drive.proton.me/urls/6NGW2KM48W#0j9fuj5HdR40
maxwxyz
Posts: 158
Joined: Sat Dec 31, 2022 2:42 pm
Location: Munich, Germany
Contact:

Re: FEA of a 3D-Printed Part

Post by maxwxyz »

The pages are clipped and something seems wrong with the font or encoding in the .pdf
Post Reply