McStas logo McStas - A neutron ray-trace simulation package ILL; PSI; ESS Niels Bohr Institute DTU Physics NEXMAP

McStas

About McStas
 Conditions of use
 Authors/Contacts
 Project funding

Download
 Components
 Other Downloads (share)

Mailing list

Search web/mailinglist

Documentation
 Wiki (GitHub)
 McStas manual
 Publications

Links

Report bugs (GitHub)

Code-repository (GitHub)


McStas: Source_custom

[ Identification | Description | Input parameters | Links ]

The Source_custom Component

A flexible pulsed or continuous source with customisable parameters. Multiple pulses can be simulated over time.

Identification

  • Site:
  • Author: Pablo Gila-Herranz, based on 'Source_pulsed' by K. Lieutenant
  • Origin: Materials Physics Center (CFM-MPC), CSIC-UPV/EHU
  • Date: April 2025

Description

Produces a custom pulse spectrum with a wavelength distribution as a sum of up to 3 Maxwellian distributions and one of undermoderated neutrons.

Usage:

By default, all Maxwellian distributions are assumed to come from anywhere in the moderator.
A custom radius r_i can be defined such that the central circle is at temperature T1,
and the surrounding ring is at temperature T2.
The third Maxwellian distribution at temperature T3 always comes from anywhere in the moderator.

Multiple pulses can be simulated over time with the n_pulses parameter.
The input flux is in units of [1/(cm^2 sr s AA)], and the output flux is per second, regardless of the number of pulses.
This means that the intensity spreads over n_pulses, so that the units of neutrons per second are preserved.
To simulate only the neutron counts of a single pulse, the input flux should be divided by the frequency.
Bear in mind that the maximum emission time is given by t_pulse * tmax_multiplier,
so short pulses with long tails may require a higher tmax_multiplier value (3 by default).

To simulate a continuous source, set a pulse length equal to the pulse period (e.g. t_pulse=1.0, freq=1.0).
Note that this continuous beam is simulated over time, unlike other continuous sources in McStas which produce a Dirac delta at time 0.

Parameters xwidth and yheight must be provided for rectangular moderators, otherwise a circular shape is assumed.

Model description:

The normalised Maxwellian distribution for moderated neutrons is defined by [1]
$M(\lambda)=\frac{2a^2}{T^2\lambda^5}\exp\left(-\frac{a}{T\lambda^{2}}\right)$
where
$a=\left(\frac{h^2}{2m_{N}k_{B}}\right)$
and the joining function for the under-moderated neutrons is given by [1]
$M(\lambda)_{um}=\frac{1}{\lambda(1+\exp(\lambda\chi-\kappa))}$

The normalised time structure of the pulse is defined by [2]
$N_{t<=t_p}=1-\exp\left(-\frac{t}{\tau/n}\right)$
$N_{t>t_p}=\exp\left(-\frac{t-t_p}{\tau}\right)-\exp\left(-\frac{t}{\tau/n}\right)$
where tp is the pulse period, tau is the pulse decay time constant, and n is the ratio of decay to ascend time constants.

Parameters for some sources:

HBS thermal source:
t_pulse=0.016, freq=24.0, xwidth=0.04, yheight=0.04,
T1=325.0, I1=0.68e+12, tau1=0.000125,
I_um=2.47e+10, chi_um=2.5

HBS cold source:
t_pulse=0.016, freq=24.0, radius=0.010,
T1=60.0, I1=1.75e+12, tau1=0.000170,
I_um=3.82e+10, chi_um=0.9

HBS bi-spectral:
t_pulse=0.016, freq=24.0, radius=0.022, r_i=0.010,
T1= 60.0, I1=1.75e+12, tau1=0.000170,
T2=305.0, I2=0.56e+12, tau2=0.000130,
I_um=3.82e+10, chi_um=2.5

PSI cold source:
t_pulse=1, freq=1, xwidth=0.1, yheight=0.1,
T1=296.2, I1=8.5e+11, T2=40.68, I2=5.2e+11

References:
[1] J. M. Carpenter et al, Nuclear Instruments and Methods in Physics Research Section A, 234, 542–551 (1985).
[2] J. M. Carpenter and W. B. Yelon, Methods in Experimental Physics 23, p. 127, Chapter 2, Neutron Sources (1986).

Input parameters

Parameters in boldface are required; the others are optional.
NameUnitDescriptionDefault
target_index1Relative index of component to focus at, e.g. next is +1 (used to compute 'dist' automatically)1
distmDistance from the source to the target0.0
focus_xwmWidth of the target (focusing rectangle)0.02
focus_yhmHeight of the target (focusing rectangle)0.02
xwidthmWidth of the source0.0
yheightmHeight of the source0.0
radiusmOuter radius of the source (ignored if xwidth and yheight are set)0.010
r_imRadius of a central circle at temperature T1, sorrounded by a ring at temperature T2 (ignored by default)0.0
LminAALower edge of the wavelength distribution
LmaxAAUpper edge of the wavelength distribution
freqHzFrequency of pulses
t_pulsesProton pulse length
tmax_multiplier3.0
n_pulses1
T1KTemperature of the 1st Maxwellian distribution; for r_i > 0 it is only used for the central radii r < r_i0.0
I11/(cm^2 sr s AA)Flux per solid angle of the 1st Maxwellian distribution (integrated over the whole wavelength range)0.0
tau1sPulse decay time constant of the 1st Maxwellian distribution0.000125
T2KTemperature of the 2nd Maxwellian distribution (0 to disable); for r_i > 0 it is only used for the external ring r > r_i0.0
I21/(cm^2 sr s AA)Flux per solid angle of the 2nd Maxwellian distribution0.0
tau2sPulse decay time constant of the 2nd Maxwellian distribution0.000125
T3KTemperature of the 3rd Maxwellian distribution (0 to disable)0.0
I31/(cm^2 sr s AA)Flux per solid angle of the 3rd Maxwellian distribution0.0
tau3sPulse decay time constant of the 3rd Maxwellian distribution0.000125
n_mod1Ratio of pulse decay constant to pulse ascend constant of moderated neutrons (n = tau_decay / tau_ascend)1
I_um1/(cm^2 sr s AA)Flux per solid angle for the under-moderated neutrons0.0
tau_umsPulse decay time constant of under-moderated neutrons0.000012
n_um1Ratio of pulse decay constant to pulse ascend constant of under-moderated neutrons1
chi_um1/AAFactor for the wavelength dependence of under-moderated neutrons2.5
kap_um1Scaling factor for the flux of under-moderated neutrons2.2
AT ( , , ) RELATIVE
ROTATED ( , , ) RELATIVE

Links


[ Identification | Description | Input parameters | Links ]

Generated on mcstas 3.5.27


Last Modified: Tuesday, 29-Apr-2025 16:45:07 CEST
Search website mailinglist archive GitHub repos