Porous PowderN: powder matrix with mesh pores, partly filled by a liquid
Identification
Author: Peter Willendrup
Origin: DTU
Date: Nov 2026
Description
PowderN (INHERIT) with a pore mesh inside the matrix. All PowderN parameters
describe the matrix material and its outer shape (box, cylinder, sphere or
geometry= OFF file; hollow shapes/concentric are not supported).
pores: closed mesh file (OFF/PLY/STL, coordinates in m in the component frame)
with one closed, outward oriented shell per pore. Shells may overlap and
stick out of the outer shape (open channels); see make_pores.py in
examples/Tests_samples/Test_PowderN_porous.
Pores are void above y = fill_y and filled with a liquid below (e.g. water
sucked up through the pores). The liquid is given by an attenuation table
fill_material (first column E [keV], mass coefficients in [cm^2/g]) and
fill_density. Column fill_col_tot holds the total attenuation, column
fill_col_scat (optional) the part scattered, here isotropically. The defaults
fit the NIST element tables in the McXtrace data folder (e.g. H.txt, O.txt).
fill_material="NULL" leaves all pores void.
Single scattering as PowderN: each ray is transmitted, or scattered once
(matrix coherent/incoherent or liquid diffuse), attenuated along the full
in- and outgoing paths through matrix and liquid.
Rays crossing more than GMESH_MAX_HITS (50) pore surfaces lose the farther
pores; raise it with DEPENDENCY " -DGMESH_MAX_HITS=200 " in the instrument.
The limit is printed at start, and FINALLY reports how many rays reached it.
Example: PowderN_porous(reflections="Si.laz", material="Si.txt", density=2.33,
mat_format={0,3,0,5,0}, radius=5e-4, yheight=2e-3, pores="pores.off",
fill_y=0, fill_material="H2O_mix.txt", fill_density=1)
Input parameters
Parameters in boldface are required;
the others are optional.
Name
Unit
Description
Default
pores
str
Closed mesh file with the pores. "NULL": no pores.
"NULL"
fill_y
m
Pores below this height (local y) hold the liquid.
0
fill_material
str
Attenuation table of the liquid. "NULL": no liquid.
"NULL"
fill_density
g/cm^3
Density of the liquid.
1
fill_col_tot
1
Column (from 0) of total mass attenuation in fill_material.
5
fill_col_scat
1
Column (from 0) of scattering mass coefficient in fill_material, 0: no liquid scattering.
4
p_fill
1
Fraction of rays scattered in the liquid. (all others): See PowderN.