Thanks!
Philipp Bernhardt
bernhard at amos.krist.uni-erlangen.de
Wed Mar 24 11:43:02 CET 1999
Hello Kristian,
Thank you very much for the nice visit in Risoe, I have learned a
lot of
Mcstas and Risoe!
Here is the name of the homepage of "Neutron Scattering WWW pages"
http://www.neutron.anl.gov/
I have added the components (they have changed a little bit)
Chopper.comp
First_Chopper.comp
together with manuel entries (TEX-format)
Chopper.tex, (together with pictures tracho.eps, Chopper.eps)
First_chopper.tex
So if you like and have enough time till 31 March, you can integrate them
to the Mcstas
library, but don't
hesitate to change the components or manuels to make them conform to
the library.
I think that there is a small bug in the component Powder1.
If you use neutrons,
where the reflexion angle theta is bigger than 90 degrees (slow neutrons),
theta can't be calculated in the line
theta = asin(q_v/(2.0*v));
Best wishes
- Philipp
-------------- next part --------------
/**********************************************************************************************
*
* Component: Chopper
*
* Written by: Philipp Bernhardt, Januar 22 1999
*
* Models a disc chopper with n identical slits, which are symmetrically disposed on the disc.
*
* INPUT PARAMETERS:
*
* w: (m) Width of the slits at the bottom side
* R: (m) Radius of the disc
* f: (rad/s) angular frequency of the Chopper (algebraic sign defines the direction
* of rotation
* n: (1) Number of slits
* pha: (s) Phase
*
* Example values: w=0.05 R=0.5 f=2500 n=3 pha=0
************************************************************************************************/
DEFINE COMPONENT Chopper
DEFINITION PARAMETERS (w, R, f, n, pha)
SETTING PARAMETERS ()
OUTPUT PARAMETERS ()
STATE PARAMETERS (x, y, z, vx, vy, vz, t, s1, s2, p)
DECLARE
%{
double Tg,To;
%}
INITIALIZE
%{
/* time between two pulses */
Tg=2*PI/fabs(f)/n;
/* how long can neutrons pass the Chopper at a single point */
To=2*atan(w/R/2.0)/fabs(f);
%}
TRACE
%{
double toff;
PROP_Z0;
toff=fabs(t-atan2(x,y+R)/f-pha)+To/2.0;
/* does neutron hit the slit? */
if (fmod(toff,Tg)>To)
ABSORB;
%}
END
-------------- next part --------------
/**********************************************************************************************
*
* Component: First_Chopper
*
* Written by: Philipp Bernhardt, Januar 22 1999
*
* Models a disc chopper at the first place.
*
* INPUT PARAMETERS:
*
* w: (m) Width of the slits
* R: (m) Radius of the Chopper
* f: (rad/s) angular frequency of the Chopper
* n: (1) Number of slits
* pha: (s) Phase
* a: (1) Number of pulses
*
* Example values: w=0.05 R=0.5 f=2500 n=3 pha=0 a=2
************************************************************************************************/
DEFINE COMPONENT First_Chopper
DEFINITION PARAMETERS (w, R, f, n, pha, a)
SETTING PARAMETERS ()
OUTPUT PARAMETERS ()
STATE PARAMETERS (x, y, z, vx, vy, vz, t, s1, s2, p)
DECLARE
%{
double Tg,To;
%}
INITIALIZE
%{
/* time between two pulses */
Tg=2.0*PI/fabs(f)/n;
/* how long can neutrons pass the Chopper at a single position? */
To=2.0*atan(w/R/2.0)/fabs(f);
%}
TRACE
%{
PROP_Z0;
t=atan2(x,y+R)/f+To*(rand01()-0.5)+pha+floor(a*rand01())*Tg;
%}
END
-------------- next part --------------
\documentclass{article}
\usepackage{english,latexsym}
\usepackage{epsfig}
\begin{document}
\section{Disc Chopper}
To cut a continuous neutron beam into short pulses, you can use a disc chopper (figure 1). This is
a fast rotating disc with the rotating axe parallel to the neutron beam. The disk consists of
neutron absorbing materials. To form the pulses there are slits, where the neutrons can pass.
\begin{figure}[h]
\includegraphics[width=1.0\linewidth]{Chopper.eps}
\caption{disc chopper}
\end{figure}
This component simulates choppers with more than one slit. The slits are symmetrically disposed on the
disc. You can set the direction of rotation, which allows to simulate double choppers. You can also define
the phase by setting the time, at which
one slit is heading to the top. The sides of the slits are heading to the center of the disc.
The thickness of the disc is neglected.
There is no parameter for the height of the slits, so if you like to limit the neutrons in the y-direction,
just use a slit-component in front of the chopper.
If you use a rectangular shaped beam and the beam has nearly the same size as the
slit, you will get almost a triangular shape of the transmission curve (figure 2).
\begin{figure}[h]
\includegraphics[width=1.0\linewidth]{tracho.eps}
\caption{example for a transmission curve for the disc chopper}
\end{figure}
The input parameters for this component are the width w of the slit at the
radius R of the disc, the phase pha, the number of slits n and the angular frequency f. The sign of f
defines the direction of rotation, as can be seen in figure 1.
\end{document}
-------------- next part --------------
\documentclass{article}
\usepackage{english,latexsym}
\usepackage{epsfig}
\begin{document}
\section{First Disc Chopper}
The disadvantage of the component 'Chopper' is the bad statistic, because most of the neutrons of a
continuous beam are absorbed. Furthermore TOF-instruments define the starting time of the neutrons at the
position of the first chopper and not at the source.
Therefore this component is useful.
This `first disc chopper` has the same geometrical and physical attributes as the normal disc chopper before.
But it doesn't investigate, if the neutron could pass the disc chopper, it gives the neutron a time, at which
it is
possible to pass. There isn't any absorption in this component, all neutrons will be used.
Because the value t of the incoming neutron will be overwritten, this chopper can only be used as a
first chopper.
The input parameters are, again, the width w of the slit at the
radius R of the disc, the phase pha of the chopper, the number of slits n and the angular frequency f
(sign defines direction of rotation). With the additional parameter a you can set the number of pulses.
This is useful, if you want to investigate frame overlaps.
\end{document}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tracho.eps
Type: application/postscript
Size: 6209 bytes
Desc:
URL: <http://mailman2.mcstas.org/pipermail/mcstas-users/attachments/19990324/9ff96a42/attachment.eps>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Chopper.eps
Type: application/postscript
Size: 8243 bytes
Desc:
URL: <http://mailman2.mcstas.org/pipermail/mcstas-users/attachments/19990324/9ff96a42/attachment-0001.eps>
More information about the mcstas-users
mailing list