1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208
|
/*******************************************************************************
*
* McStas, neutron ray-tracing package
* Copyright (C) 1997-2008, All rights reserved
* Risoe National Laboratory, Roskilde, Denmark
* Institut Laue Langevin, Grenoble, France
*
* Instrument: HZB_NEAT (1995)
*
* %Identification
* Written by: <a href="mailto:farhi@ill.fr">Emmanuel Farhi</a> and R. Lechner
* Date: 2011
* Origin: <a href="http://www.ill.fr">ILL (France)</a>/<a href="http://www.helmholtz-berlin.de/user/neutrons/index_en.html">BENSC (Germany)</a>
* %INSTRUMENT_SITE: HZB
*
* V3 Time-of-Flight-Spectrometer (NEAT) at BENSC, 1995 version.
*
* %Description
*
* In time-of-flight spectrometers neutron pulses are created by us-
* ing mechanical chopper devices, realised on NEAT by fast rotating
* discs with speeds up to 20000 RPM. The discs are coated with neu-
* tron absorbing materials except for the narrow windows. Phased to
* each other according to the flight time of neutrons between them,
* the choppers 'cut out' pulses of neutrons with a desired wave-
* length from the white beam. An interaction with moving atoms in
* the sample changes the velocities of the scattered neutrons and
* this is detected by the secondary part of the spectrometer on the
* basis of the time of flight between the sample and the neutron de-
* tectors at 2.5 m distance. The secondary spectrometer of NEAT
* contains an array of 388 3He 60 cm2 area single counter detectors
* (SD) for the large-angle scattering.
*
* The NL 2 (upper part) guide is modelled.
* This model only contains the first and last choppers, and has only a single
* pulse (no frame overlap). The sample is a 2mm thick plate rotated by 45 degrees,
* which material can be any powder/liquid/amorphous sample.
*
* %Example: lambda=6 Detector: Detector_I=2900
* %Example: lambda=6 coh=Y2O3.laz inc=NULL Detector: Detector_I=1080
*
* %Parameters
* lambda: [Angs] incident wavelength on sample
* dlambda: [Angs] wavelength spread shot from the source
* rpm: [rpm] disk chopper rotation speed, setting the resolution, Hz=rpm/60.
* coh: [str] sample coherent S(q,w) file name. Use LAZ/LAU or SQW file
* inc: [str] sample incoherent S(q,w) file name. Use NULL to scatter incoherently
* tmin: [s] Minimum ToF measured
* tmax: [s] Maximum ToF measured
*
* %Link
* <a href="http://www.helmholtz-berlin.de/user/neutrons/instrumentation/neutron-instruments/v3/index_en.html">NEAT at HZB/BENSC</a>
* %End
*******************************************************************************/
DEFINE INSTRUMENT HZB_NEAT(lambda=6, dlambda=0.05, rpm=10000, string coh="Rb_liq_coh.sqw", string inc="Rb_liq_inc.sqw", tmin=0.01806, tmax=0.01826)
DECLARE %{
double time_elastic;
char detector_options[128];
char lmon_options[128];
char tmon_options[128];
%}
INITIALIZE %{
double Chopper2Detector = 11.97+2.143+0.165;
double KI, Vi, EI;
double Emin, Emax, Vmin, Vmax, Tmin, Tmax;
KI= 2*PI/lambda;
Vi = K2V*fabs(KI);
EI = VS2E*Vi*Vi;
printf("%s: Detailed NEAT/TOF configuration\n", NAME_INSTRUMENT);
printf("* Incoming beam: lambda=%.4g [Angs] EI=%.4g [meV] KI=%.4g [Angs-1] Vi=%g [m/s]\n",
lambda, EI, KI, Vi);
time_elastic = 252.78*Chopper2Detector*lambda*1e-6; /* time from Chopper1 to reach Detector */
printf(" Sample: coh=%s inc=%s\n", coh, inc);
printf(" Elastic line time: %g [us]\n", time_elastic*1e6);
/* compute a +/- 20 meV */
Emin = EI-20; if (Emin < EI/3) Emin=EI/3;
Emax = EI+20;
Vmin = sqrt(Emin/VS2E);
Vmax = sqrt(Emax/VS2E);
Tmin = 2.5/Vmax;
Tmax = 2.5/Vmin;
sprintf(detector_options,
"banana, abs angle limits=[13 136] bins=300, time limits=[%g %g] bins=256",
time_elastic+Tmin, time_elastic+Tmax);
sprintf(lmon_options,"lambda limits=[%g %g] bins=100",lambda-dlambda/2.0,lambda+dlambda/2.0);
sprintf(tmon_options,"tof limits=[%g %g] bins=100",tmin,tmax);
%}
TRACE
COMPONENT PG = Progress_bar()
AT (0,0,0) ABSOLUTE
COMPONENT Source = Source_gen(T1=43.7 ,I1=1.4e12, T2=137.2,I2=2.08e12,radius=.155,
lambda0=lambda, dlambda=dlambda,
focus_xw=0.03, focus_yh=0.055)
AT (0,0,0) ABSOLUTE
COMPONENT Guide0 = Guide_gravity(w1=0.03, h1=0.055, l=2, m=1.2)
AT (0,0,2) RELATIVE Source
COMPONENT COPY(Guide0) = COPY(Guide0)
AT (0,0,2+1e-4) RELATIVE PREVIOUS ROTATED (0, 2.0/2500*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Guide0) = COPY(Guide0)
AT (0,0,2+1e-4) RELATIVE PREVIOUS ROTATED (0, 2.0/2500*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Guide0) = COPY(Guide0)
AT (0,0,2+1e-4) RELATIVE PREVIOUS ROTATED (0, 2.0/2500*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Guide0) = COPY(Guide0)
AT (0,0,2+1e-4) RELATIVE PREVIOUS ROTATED (0, 2.0/2500*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Guide0) = COPY(Guide0)
AT (0,0,2+1e-4) RELATIVE PREVIOUS ROTATED (0, 2.0/2500*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Guide0) = COPY(Guide0)
AT (0,0,2+1e-4) RELATIVE PREVIOUS ROTATED (0, 2.0/2500*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Guide0) = COPY(Guide0)
AT (0,0,2+1e-4) RELATIVE PREVIOUS ROTATED (0, 2.0/2500*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Guide0) = COPY(Guide0)
AT (0,0,2+1e-4) RELATIVE PREVIOUS ROTATED (0, 2.0/2500*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Guide0) = COPY(Guide0)
AT (0,0,2+1e-4) RELATIVE PREVIOUS ROTATED (0, 2.0/2500*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Guide0) = COPY(Guide0)
AT (0,0,2+1e-4) RELATIVE PREVIOUS ROTATED (0, 2.0/2500*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Guide0) = COPY(Guide0)
AT (0,0,2+1e-4) RELATIVE PREVIOUS ROTATED (0, 2.0/2500*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Guide0) = COPY(Guide0)
AT (0,0,2+1e-4) RELATIVE PREVIOUS ROTATED (0, 2.0/2500*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Guide0) = COPY(Guide0)
AT (0,0,2+1e-4) RELATIVE PREVIOUS ROTATED (0, 2.0/2500*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Guide0) = COPY(Guide0)
AT (0,0,2+1e-4) RELATIVE PREVIOUS ROTATED (0, 2.0/2500*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Guide0) = COPY(Guide0)
AT (0,0,2+1e-4) RELATIVE PREVIOUS ROTATED (0, 2.0/2500*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Guide0) = COPY(Guide0)
AT (0,0,2+1e-4) RELATIVE PREVIOUS ROTATED (0, 2.0/2500*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT Guide_PSD = Monitor_nD(xwidth=0.03, yheight=0.055, options="y x")
AT (0,0,2+1e-4) RELATIVE PREVIOUS
COMPONENT Guide_Lambda = Monitor_nD(xwidth=0.03, yheight=0.055, options=lmon_options)
AT (0,0, 1e-4) RELATIVE PREVIOUS
/* time set here */
COMPONENT Chopper1 = DiskChopper(radius=0.24,
yheight=0.06, xwidth=0.03, nu=rpm/60, isfirst=1)
AT (0,0, 1.2e-2/2) RELATIVE Guide_Lambda
COMPONENT Guide_SGS1 = COPY(Guide0)(l=2.41-2*6e-3)
AT (0,0, 1.2e-2) RELATIVE Guide_Lambda
COMPONENT Guide_SGS2 = COPY(Guide0)(l=5.065-2*6e-3)
AT (0,0, 2.41) RELATIVE Guide_SGS1
COMPONENT Guide_SGS3 = COPY(Guide0)(l=2.352-2*6e-3)
AT (0,0, 5.065) RELATIVE Guide_SGS2
COMPONENT Guide_CGS = COPY(Guide0)(l=2.143-2*6e-3, w2=0.015, m=2.4)
AT (0,0, 2.352) RELATIVE Guide_SGS3
COMPONENT Guide2_PSD = Monitor_nD(xwidth=0.03, yheight=0.055, options="x y")
AT (0,0,2.143-2*6e-3+1e-4) RELATIVE PREVIOUS
COMPONENT Guide2_Lambda = Monitor_nD(xwidth=0.03, yheight=0.055, options=lmon_options)
AT (0,0, 1e-4) RELATIVE PREVIOUS
COMPONENT Guide2_dXY = Monitor_nD(xwidth=0.03, yheight=0.055, options="dx dy")
AT (0,0, 1e-4) RELATIVE PREVIOUS
/* distance 11.970 from Chopper 1 */
COMPONENT Chopper6 = DiskChopper(radius=0.24,
yheight=0.06, xwidth=0.03, nu=rpm/60, delay=252.78*11.97*lambda*1e-6)
AT (0,0, 1.2e-2/2) RELATIVE Guide2_dXY
COMPONENT Guide_time = COPY(Guide_PSD)(options=tmon_options)
AT (0,0, 1.2e-2/2) RELATIVE Chopper6
COMPONENT Guide_DGS = COPY(Guide0)(w1=0.015, l=1.0-2*6e-3, w2=0.023, m=2.4)
AT (0,0, 2.143) RELATIVE Guide_CGS
COMPONENT Sample_pos = Arm()
AT (0,0,2.143+0.165)RELATIVE Guide_DGS
/* sample at 2.143+0.165 m from Chopper 6 */
SPLIT COMPONENT Sample = Isotropic_Sqw(
Sqw_coh=coh, Sqw_inc=inc, p_interact=0.99,
xwidth=0.05, yheight=0.06, zdepth=0.002)
AT (0,0,0) RELATIVE Sample_pos ROTATED (0,45,0) RELATIVE Sample_pos
EXTEND %{
if (!SCATTERED) ABSORB;
%}
/* detector at 2.5 m from sample */
COMPONENT Ideal_Det= Monitor_nD(radius=2.5, yheight=2,
options=detector_options, restore_neutron=1)
AT (0,0,0) RELATIVE Sample_pos
/* total distance from Chopper1: 16.778 */
COMPONENT Detector = PSD_Detector(angle=136-13, yheight=2.0, nx=640, ny=256,
radius=2.5, zdepth=0.01, dc=0, threshold=100,
borderx=-1, bordery=-1,
PressureConv=8, PressureStop=1,
FN_Conv="Gas_tables/He3inHe.table", FN_Stop="Gas_tables/He3inCF4.table",
xChDivRelSigma=0, yChDivRelSigma=0.0037,
filename="NEAT.psd")
AT (0,0,0) RELATIVE Sample_pos ROTATED (0,(136-13)/2+13, 0) RELATIVE Sample_pos
END
|