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

McStas

About McStas
 Conditions of use
 Authors/Contacts
 Project funding
 Screenshots

Download
 Components
 Share

Mailing list

Search web/mailinglist

Documentation
 McStas manual
 FAQ
 Known problems
 Publications
 C Compilers
 Other
 Tutorial

Workshops/conferences

Developments
 Platforms

Links

Report bugs

SVN

McStas Ubuntu live-dvd


Source_adapt

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

The Source_adapt component

Neutron source with adaptive importance sampling

Identification

  • Author: Kristian Nielsen
  • Origin: McStas release
  • Date: 1999
  • Version: 1.14

Description

Rectangular source with flat energy distribution that uses adaptive
importance sampling to improve simulation efficiency. Works
together with the Adapt_check component.

The source divides the three-dimensional phase space of (energy,
horizontal position, horizontal divergence) into a number of
rectangular bins. The probability for selecting neutrons from each
bin is adjusted so that neutrons that reach the Adapt_check
component with high weights are emitted more frequently than those
with low weights. The adjustment is made so as to attemt to make
the weights at the Adapt_check components equal.

Focosing is achieved by only emitting neutrons towards a rectangle
perpendicular to and placed at a certain distance along the Z axis.
Focusing is only approximate (for simplicity); neutrons are also
emitted to pass slightly above and below the focusing rectangle,
more so for wider focusing.

In order to prevent false learning, a parameter beta sets a
fraction of the neutrons that are emitted uniformly, without regard
to the adaptive distribution. The parameter alpha sets an initial
fraction of neutrons that are emitted with low weights; this is
done to prevent early neutrons with rare initial parameters but
high weight to ruin the statistics before the component adapts its
distribution to the problem at hand. Good general-purpose values
for these parameters are alpha = beta = 0.25.

Input parameters

Parameters in boldface are required; the others are optional.
Name Unit Description Default
N_E 1 Number of bins in energy dimension  
N_xpos 1 Number of bins in horizontal position  
N_xdiv 1 Number of bins in horizontal divergence  
alpha 1 Learning cut-off factor (0 < alpha <= 1)  
beta 1 Aggressiveness of adaptive algorithm (0 < beta <= 1)  
filename string Optional filename for adaptive distribution output  
xmin m Left edge of rectangular source  
xmax m Right edge  
ymin m Lower edge  
ymax m Upper edge  
dist m Distance to target rectangle along z axis  
xw m Width(x) of target  
yh m Height(y) of target  
E0 meV Mean energy of neutrons  
dE meV Energy spread (energy range is from E0-dE to E0+dE)  
flux 1/(cm**2*AA**st) Absolute source flux  

Output parameters

Name Unit Description Default
p_in  
y_0  
C  
r_0  
count  
adpt  

Links


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

Generated automatically by McDoc, Kristian Nielsen <kristian.nielsen@risoe.dk> / Jan 22 2001


Last Modified: Tuesday, 22-Jun-2004 14:04:09 CEST
Search website freshmeat.net McStas site RSS feed mailinglist archive SVN repos McCode Trac