FEA of a 3D-Printed Part
Moderator: bernd
Forum rules
and Helpful information for the FEM forum
and Helpful information for the FEM forum
Re: FEA of a 3D-Printed Part
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: Greetings
Nic
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: Greetings
Nic
Re: FEA of a 3D-Printed Part
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
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
-
- Veteran
- Posts: 3129
- Joined: Sat May 20, 2017 12:06 pm
- Location: Germany
Re: FEA of a 3D-Printed Part
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:
-
- Posts: 991
- Joined: Wed Mar 27, 2019 10:45 am
Re: FEA of a 3D-Printed Part
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
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
Re: FEA of a 3D-Printed Part
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...
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...
-
- Posts: 991
- Joined: Wed Mar 27, 2019 10:45 am
Re: FEA of a 3D-Printed Part
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.
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.
Re: FEA of a 3D-Printed Part
Wonder @Klemmkeil what's the status of this project. I'm really interested in this!
Re: FEA of a 3D-Printed Part
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.
Re: FEA of a 3D-Printed Part
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
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
Re: FEA of a 3D-Printed Part
The pages are clipped and something seems wrong with the font or encoding in the .pdf