Union process: Isotropic dispersion: S(Q,E) = S(Q) delta(E - E(Q)) with analytic E(Q), S(Q).
Author: Fahima Islam (McStas port of the MCViNE E_Q_Kernel; MCViNE by J. Y. Y. Lin et al.)
Origin: MCViNE, https://github.com/mcvine/mcvine (mccomponents/lib/kernels/sample/E_Q_Kernel.icc)
Date: 2026-09-29
Powder/liquid-like excitation with dispersion E(|Q|) given as an expression in Q [Å^-1] returning meV, and intensity S(Q). |Q| is sampled uniformly in [Qmin,Qmax] (up to 100 attempts to find a kinematically allowed Q).
Functions are given as strings evaluated at run time (MCViNE uses fparser): + - * / ^ (or **), % , comparisons, && ||, if(c,a,b), sin cos tan asin acos atan sinh cosh tanh exp log log10 log2 sqrt abs floor ceil int sign cbrt, pow atan2 min max hypot fmod, constants pi and e.
Union process. Part of the Union components: define this process, collect it into a material with Union_make_material (absorption is set there with my_absorption, the absorption inverse penetration depth at 2200 m/s), assign the material to Union_box/Union_cylinder/Union_sphere/Union_mesh geometries, and add a Union_master after them. Geometry, attenuation and multiple scattering are handled by Union_master; this component provides the MCViNE kernel: the scattering coefficient and the final-state sampling (weight). Isotropic process (powder/liquid-like); rotation is irrelevant. The kernel code is shared with the standalone component MCViNE_E_Q (mcvine-lib.c). Uses share/mcvine-lib.h/.c and share/mcvine-union-lib.h/.c; the process type MCViNE is declared in share/union-lib.h and registered with Union_master in share/mcvine-union-lib.h.
Example: MCViNE_E_Q_process(E_Q="20*sin(Q*1.5)^2", S_Q="1", Qmin=0, Qmax=10, scattering_coefficient=10)
Parameters in boldface are required; the others are optional.
|
Name |
Unit |
Description |
Default |
|
|
|||
|
E_Q |
str |
E(Q) expression, variable Q [Å^-1], result [meV] |
"10" |
|
S_Q |
str |
S(Q) expression, variable Q |
"1" |
|
Qmin |
Å\(^{-1}\) |
Lower Q bound |
0 |
|
Qmax |
Å\(^{-1}\) |
Upper Q bound |
10 |
|
unbiased |
1 |
0: MCViNE sampling (up to 100 retries, weight/attempts; slightly biased when part of [Qmin,Qmax] is forbidden). 1: single attempt, unbiased |
0 |
|
scattering_coefficient |
m\(^{-1}\) |
Scattering coefficient (inverse penetration depth for scattering) |
0 |
|
sigma_scat |
barn |
Alternative: scattering cross section per unit cell (used when Vc>0) |
0 |
|
Vc |
Å\(^{3}\) |
Unit cell volume; when >0 the coefficient is sigma_scat/Vc |
0 |
|
packing_factor |
1 |
Packing factor (scales the scattering coefficient) |
1 |
|
interact_fraction |
1 |
Union: fraction of interactions forced to this process (-1: by cross section) |
-1 |
|
init |
string |
Deprecated and unused, accepted like on the other Union components (see Union_init). |
"" |
|
|
|||
|
|
|||
|
|
|||
Component source code found in file MCViNE_E_Q_process.comp.
MCViNE documentation: https://mcvine.github.io