Substrate raytracer
What this tool does
The substrate raytracer takes the particle flux that a DSMC or PIC-MC simulation delivers on a sampling plane and computes where that flux lands on a real part. Instead of a flat membrane it works with actual substrate geometries (lenses, disks, bent or slanted plates), with the motion of the part through the flux, and with masks that block part of the flux on purpose. The result is the local deposition rate on every patch of the part, which is what you compare against a measured thickness profile or feed into a mask optimisation.
It is a separate program from PICMC, distributed by Fraunhofer IST (version 0.2.0) and kept outside the PICMC source tree. It is written in C++ with a Python module, so a scenario is a normal Python script: you define geometry, trajectory, histograms and masks, run the loop, and evaluate the result with Python. That is also what makes the optimisation loop in the fitting section possible — the raytracer is a function you can call from a fitting routine.
Where this fits in the chain
The raytracer is the deposition stage of the simulation pipeline: DSMC and PICMC deliver the flux, the raytracer puts it on the part, and the optimisation loop closes around it. What it does not do is the plasma physics, the sputter transport or the optical evaluation — those stay with PICMC, DSMC and the measurement.
Two ways to compute the deposition
The matrix deposition described on the matrix deposition page and this raytracer solve the same problem and read the same histogram files. They are not the same code, and they are not interchangeable number for number.
| Matrix deposition (in-framework) | Substrate raytracer (this tool) | |
|---|---|---|
| Where it runs | Inside the RVM run (MPROJECTOR module, .r script) | Separate program, driven by a Python script |
| Input | Histogram matrix from the sampling membrane | The same histogram files, loaded per batch |
| Substrate | Membranes from the GMSH geometry of the case | Parametrised shapes (lens, disk, rectangle, torus, parabolic, custom mesh) |
| Motion | Turntable trajectory from the script | Arbitrary circular, linear or custom trajectories, also per mask |
| Masks | Shielding in the case geometry | Free mask polygons from nodes and circular arcs, mirrorable, movable |
| Concave substrates | Depends on the geometry | Explicit support, with precomputed self-intersections |
| Output | Fields in the simulation, POS files | Python list, CSV, POS, plus GEO files for masks and trajectory |
| Optimisation | Not built in | Mask parameters can be fitted with SciPy |
Use the in-framework matrix deposition when the deposition is the last step of an existing RVM case and the substrate is a flat membrane or a simple shape. Use the raytracer when the part has a real shape, when the mask has to be designed or optimised, when the substrate or the mask moves in a way the script cannot express, or when you want to run the same deposition thousands of times inside a fitting loop.
Both start from the same histogram matrix, so the practical workflow is: run DSMC/PICMC, export the histogram files as described on the matrix deposition page, then decide which of the two consumers to use.
In this section
| Page | Content |
|---|---|
| Getting started | Build the tool, make the module importable, check an existing installation, run on a cluster |
| Usage | Coordinate system, substrate, trajectory, histograms, masks, running the loop, output |
| Fitting with SciPy | Turn a scenario into a goal function and optimise mask parameters |
| Substrates | All parametrised shapes with their parameters and the exact parametrisation |
| Helper module | Trajectories from RPM and speed, uniformity metrics, mesh import |
| Algorithm | How a ray is cast, how masks and concave parts are handled |
Limits
- The mask is a closed polygon of circular arcs. Straight lines are approximated by a very large arc radius, which is fine visually but is still an arc.
- Only the substrate and the masks move. Gas, target and field are static during a raytracer run — that is exactly why the inner optimisation loop is cheap and the outer one is not.
- A histogram file has to carry all angle combinations for all slabs in one file, and the number of
columns has to match
size_x * size_y.