Tabulated Beam Profile
This AlSi10Mg tutorial uses a measured nLight AFX Index 6 profile exported by PRIMES LaserDiagnosticsSoftware. It demonstrates conversion, normalization, bilinear interpolation, and use of measured planar data without implementing a new C++ model.
Physical setup
- AlSi10Mg properties from
$ADDITIVEFOAM_ETC/materials/AlSi10Mg.cfg. - One tabulated lateral heat-source distribution measured with PRIMES equipment.
- A projected axial distribution.
- A converter that transforms the vendor CSV export into AdditiveFOAM table format.
Run
cp -r "$ADDITIVEFOAM_TUTORIALS/tabulated" "$FOAM_RUN/tabulated"
cd "$FOAM_RUN/tabulated"
./Allrun
The first command in Allrun is:
primesToAdditiveFoam constant/primes-export.csv constant/beamProfile.txt
The generated beamProfile.txt is intentionally reproducible and is regenerated every run.
Important inputs
| File | Purpose |
|---|---|
constant/primes-export.csv |
Original PRIMES measurement export |
constant/beamProfile.txt |
AdditiveFOAM table generated by Allrun |
constant/heatSourceDict |
Tabulated-model dimensions, projection, absorption, and sampling |
constant/scanPath |
Beam position, time, and power |
system/controlDict |
Run controls and optional Function Objects |
Workflow
The first command in Allrun converts the measured profile:
primesToAdditiveFoam constant/primes-export.csv constant/beamProfile.txt
The resulting table is read by this model configuration:
tabulatedCoeffs
{
file "beamProfile.txt";
dimensions (250e-6 250e-6 50e-6);
A 0;
B 1;
nPoints (10 10 10);
}
The table describes relative planar intensity. The scan path supplies total incident power and the absorption model supplies the absorbed fraction. dimensions must cover the profile support; points outside the tabulated nodal domain receive zero weight.
To use another measured profile:
- Preserve the original vendor export.
- Run the converter and inspect its grid, spacing, integral, radii, and suggested dimensions.
- Plot or independently integrate the generated table.
- Set lateral source dimensions large enough to include the non-zero support.
The converter expects PRIMES metadata including pixel counts and pitches. It accepts the declared CSV separator and decimal commas in scalar fields.
Outputs
Open the reconstructed case in ParaView and visualize qDot to inspect the interpolated planar profile and T and alpha.solid to inspect the thermal response.
Absorbed power, melt-pool dimensions, solidification data, and ExaCA histories are covered by the baseline output workflows.