McXtrace logo

McXtrace - An X-ray ray-trace simulation package

Synchrotron SOLEIL DTU Physics

McXtrace

About McXtrace
 Publications
 Project Partners
 Project People
 Goal

Download
 Components

Mailing list

Search

Documentation
 Manual
 Commands
 Wiki (GitHub)
 Tutorial

Links

Report bugs (GitHub)

Code-repository (GitHub)



McXtrace: PowderN_porous

[ Identification | Description | Input parameters | Links ]

The PowderN_porous Component

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.
NameUnitDescriptionDefault
poresstrClosed mesh file with the pores. "NULL": no pores."NULL"
fill_ymPores below this height (local y) hold the liquid.0
fill_materialstrAttenuation table of the liquid. "NULL": no liquid."NULL"
fill_densityg/cm^3Density of the liquid.1
fill_col_tot1Column (from 0) of total mass attenuation in fill_material.5
fill_col_scat1Column (from 0) of scattering mass coefficient in fill_material, 0: no liquid scattering.4
p_fill1Fraction of rays scattered in the liquid. (all others): See PowderN.0.1
AT ( , , ) RELATIVE
ROTATED ( , , ) RELATIVE

Links

  • Source code for PowderN_porous.comp.
  • See also: PowderN

[ Identification | Description | Examples | Input parameters | Links ]

Generated on mcxtrace 3.10.4


Last Modified: Fri Nov 27 20:05:00 2026
Search website mailinglist archive GitHub repos