Multilayer Simulation¶
Introduction¶
Multilayer simulation is a step-by-step cycle of powder depostion and particle bed fusion.
In KiSSAM, each layer requires a separate simulation setup. It is recommended to create a directory for each layer, prepare JSON file in each directory.
The first layer is manufactured over a flat substrate. For each next layer, we require
The geometry output of the previous layer as the starting geometry
The powder that is deposited on the surface that was produced in the previous layer
- In short, after the simulation of the previous layer is finished, we need to:
clean up the geometry of the previous layer;
convert the geometry of the previous layer to the triangulated surface for the powder deposition;
simplify the surface for the powder deposition simulation;
configure the simulation of the next layer of powder particles deposition and run it;
insert the geometry of the previous layer and the new powder layer into the simulation setup of the next layer.
Preparation of the next layer¶
The geometry of the melted layer is in geometry.vdb
file of the previous layer simulation.
First, let us clean up the geometry with the removeIsolated script and put it in the directory for the next layer simulation (Layer1
).
/opt/KiSSAM/scripts/removeIsolated.x geometry.vdb sim_geometry.vdb
The sim_geometry.vdb
is generated.
Create a directory for the next layer simulation.
Copy the sim_geometry.vdb
into the directory.
You can also copy the JSON file of the previous layer, since many simulation parameters are often the same.
The powder generation software works with 3D triangulated surface, but sim_geometry.vdb
contains volume data.
To generate triangulated surface, run the triangulation script:
/opt/KiSSAM/scripts/vdb2stl.x sim_geometry.vdb surface.stl
The surface.stl
file is generated.
The surface resolution is high. To make the powder deposition software run faster, the surface is simplified with the decimate script
/share/scripts/decimate_stl.py surface.stl
The surface-decimated.stl
file is generated.
Let us include it in the powder generation.
In the JSON file,
"Substrate": {
"initGeometryVDBfile": "sim_geometry.vdb",
},
"PowderBedGenerator": {
"GroundSurface": "surface-decimated.stl",
}
The newly generated surface-decimated.stl
is used as the substrate for powder generation.
Do not forget to add the platform step value to the knife position in the powder generator settings.
Launch the powder generation script:
/share/bin/PowDEM layer1.json -n
The spheres.dat
is generated.
Launch rasterization script:
/opt/KiSSAM/scripts/rasterizeSpheres.x 3 spheres.dat
The init_spheres.vdb
is generated. 3 is the mesh step in the simulation by default. It should be the same as the one used in the KiSSAM simulation in the NumericalParams.dr
field (see JSON file description).
Simulation setup¶
The geometry of the previous layer and the new generated powder should be included in the generation.
"Powder": {
"initSpheresVDBfile": "init_spheres.vdb",
},
"Substrate": {
"initGeometryVDBfile": "sim_geometry.vdb",
}
It may be necessary to change scanning strategy.
Helper Scripts¶
The multilayer build can be automated with the Python interface.
The KiSSAM package contains the multilayer_run.py
script to help generate some common multilayer builds.
In the first step, it prepares the input data for several layers. In the second step, it is used to run several layer simulations one after another.
To get all options of the latest version of the scripts, run
/opt/KiSSAM/scripts/multilayer_run.py -h
Preparation¶
For the preparations stage, specify the --prepare
option for the multilayer_run.py
script, the input JSON file to be used as a template, as well as the following settings:
- --prepare {wallFF,wallBF,brick0,brick90,CLI,g-code}¶
Specifies that the script is used to generate the input files for the multilayer strategy, and the strategy is chosen as one among the following:
wallFF
- thin wall with the same scanning strategy for all layerswallBF
- thin wall with the changing scanning strategy at every layerbrick0
- square brick with snake scanning strategy (same for all layers, i.e. rotation angle=0)brick90
- square brick with snake scanning strategy and rotation angle between layers 90 degreesCLI
- any scanning strategy acquired from CLI file (need to specify--CLIfile
option)g-code
- scanning strategy acquired from the directory with g-code files (need to specify--gcode_dir
option)
- --layers-num LAYERS_NUM¶
Number of layers to initialize at preparation step.
- --pstep PSTEP¶
Platform Step (micrometers).
- --ff-init FF_INIT¶
Filling factor for the first layer.
- --CLIfile CLIFILE¶
CLI file name for CLI strategy.
- --gcode_dir GCODE_DIR¶
Slicer directory with the g-code files. It is necessary when the
--prepare
option is set tog-code
. The conversion options are set in the input JSON file. See also the G-code converter script.
For example, 25 layers for a thin wall build with the back-and-forth strategy are prepared with the following command:
/opt/KiSSAM/scripts/multilayer_run.py --prepare wallBF --layers-num 25 --pstep 50 --ff-init 0.5 layer001.json
Simulation Run¶
For the start of the multilayer simulation, which contains all steps outlined in the Introduction, the script is run without the --prepare
option.
The most simple way to start the simulation in the directory where the multilayer build is prepared with the same script is:
/opt/KiSSAM/scripts/multilayer_run.py
Sometimes the multilayer build can be interrupted by external factors. To restart the simulation from a specific layer, specify the --start-layer
option. The --end-layer
option is also available to stop the simulation on a specific layer.
For example:
/opt/KiSSAM/scripts/multilayer_run.py --start-layer 4 --end-layer 10
Powder Layer Thickness and Platform step¶
In the simulation of every subsequent layer, the knife position should be increased by the value of the platform step. Initially, powder layer thickness is equal to the distance between flat substrate and knife position. However, the melted surface height is uneven, and powder thickness varies. To account for this, we recommend to set double the value of the platform step on the first layer.
Here, for the simulation with platform step equal to 40 μm, we set the knife 80 μm over the substrate:

The surface is melted with laser and solidified:

The knife is raised 40 μm and the next layer of powder is deposited:

Note that the powder thickness varies from 0 to \(>120\) μm.