-
Notifications
You must be signed in to change notification settings - Fork 0
/
lokinoblades.in
176 lines (160 loc) · 7.78 KB
/
lokinoblades.in
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
!-----------------------------------------------------
! Approximate geometry of LoKI guide
!-----------------------------------------------------
!
! cold source
!-----------------------------------------------------
SOURCE RECTANGULAR ! W, H of source, Distance to and W, H of virtual aperture, (halo[*1])
30 200 2000 25 30
!
! Guide 1
!-----------------------------------------------------
GUIDE CURVED ! Gap, W, H at start, Length, Rc[m] (W, H at end) (sideways: -ve is down, +ve is up)
2000 25 30 3500 61.25 25 30
FACE 1 ! rhs (seen travelling with the neutron beam) bottom
3
FACE 2 ! lhs top
3
FACE 3 ! bottom lhs
3
FACE 4 ! top rhs
3
!
! Guide 2
!-----------------------------------------------------
GUIDE STRAIGHT ! Gap, W, H at start, Length, (W, H at end)
5 25 30 6000 25 30
FACE 1 ! rhs (seen travelling with the neutron beam) bottom
2
FACE 2 ! lhs top
2
FACE 3 ! bottom lhs
2
FACE 4 ! top rhs
2
!
! Guide 3
!-----------------------------------------------------
GUIDE CURVED ! Gap, W, H at start, Length, Rc[m] (W, H at end) (sideways: -ve is down, +ve is up)
5 25 30 3500 -61.25 25 30
FACE 1 ! rhs (seen travelling with the neutron beam) bottom
3
FACE 2 ! lhs top
3
FACE 3 ! bottom lhs
3
FACE 4 ! top rhs
3
!
! monitor
!-----------------------------------------------------
END GUIDE ! Distance between end of guide and monitor, monitor width, height, H-shift, V-shift
5 25 30 0 0
!
!-----------------------------------------------------
WAVELENGTH
6
!
!-----------------------------------------------------
GRAVITY SIDEWAYS
!
!-----------------------------------------------------
NEUTRONS ! Number of neutrons [*3*], seed for random number generator (0 : take a random odd number)
1000000 0
!
!-----------------------------------------------------
OUTPUT ! iresults and idebug
0 1
!
!-----------------------------------------------------
END INPUT
Syntax:
---------
! is the comment character: lines starting with ! are ignored
SOURCE RECTANGULAR ! W, H of source, Distance to and W, H of virtual aperture, (halo[*1])
SOURCE CIRCULAR ! W of source, Distance to and W, H of virtual aperture, (halo[*1])
SOURCE CYLINDRICAL ! W, H of source[*2*], Distance to and W, H of virtual aperture, (halo[*1])
SOURCE RECTANGULAR_COLLIMATED ! W, H of source, Hor and Ver m-number of divergence, (halo[*1])
SOURCE CIRCULAR_COLLIMATED ! W of source, Hor and Ver m-number of divergence, (halo[*1])
SOURCE CYLINDRICAL_COLLIMATED ! W, H of source[*2*], Hor and Ver m-number of divergence, (halo[*1])
SOURCE FILE ! name of input file. If you want to loop through wavelength,
you need to give the file name without the e.g. '_00500' bit, i.e. if the files are called
thingy_00100.dat, thingy_00200.dat, etc, you need to give thingy.dat as the file name here
GUIDE STRAIGHT ! Gap, W, H at start, Length, (W, H at end)
GUIDE CURVED ! Gap, W, H at start, Length, Rc[m] (W, H at end) (sideways: -ve is down, +ve is up)
GUIDE CYLINDRICAL ! Gap, W, Length
GUIDE PARABOLIC ! Gap, W, H at start, Length, (W, H at end) - hor focus is parabolic, ver focus is linear
GUIDE HORIZONTALLY_PARABOLIC ! same as above
GUIDE VERTICALLY_PARABOLIC ! same as above, but the other way, obviously!
GUIDE TRANSMISSION_MIRROR ! a Si-substrate mirror placed at an angle inside a guide section
! Gap, W, H at start, Length, thickness (W, H at end)
The surface properties must be described either for all faces, or each face individually:
ALL FACES ! following line contains
or ! m-number[*3*], (refl up to m=1 and at edge, waviness[deg], tilt[deg], shift[mm], chamfer[mm])
ALL FACES FILE ! following line contains name of reflectivity file
or
FACE 1 ! rhs (seen travelling with the neutron beam) bottom
- line with numbers (same syntax as for ALL FACES) -
FACE 2 ! lhs top
- line with numbers -
FACE 3 ! bottom lhs
- line with numbers -
FACE 4 ! top rhs
- line with numbers -
Alternatively, the following syntax can be used
FACE 1 FILE ! following line contains name of reflectivity file which can optionally
! be followed by waviness[deg], tilt[deg], shift[mm], chamfer[mm]
etc.
For a transmission mirror, a fifth face is used which can have the following syntax
FACE 5 <keyword1> <keyword2> ! keyword1 can be SINGLE_SIDED or DOUBLE_SIDED referring to the supermirr coating
! keyword2 can be LEFT or RIGHT for a single blade, referring to
! which side the blade starts at, or for a V-shaped device:
! V+ for the apex at the start or V- for the apex at the end
! the following line contains the usual numbers. Alternatively:
FACE 5 <keyword1> <keyword2> FILE ! the following line contains name of reflectivity file
GUIDE STRAIGHT MULTIPLE ! number of guides, hor gap between guides. Next line usual syntax
GUIDE CURVED MULTIPLE ! number of guides, hor gap between guides. Next line usual syntax
END GUIDE ! Distance between end of guide and monitor, monitor width, height, H-shift, V-shift
WAVELENGTH ! wavelength [A]
WAVELENGTH SCAN ! first wavelength, step, last wavelength [A]
WAVELENGTH FILE ! name of input file containing wavelengths [A] (one per line in the input file)
WAVELENGTH RANGE ! continuous range of wavelengths. Give min and max wavelengths [A]
SCAN OFF ! default
SCAN ON ! turns on scanning. The variable which has been given the value -999 is scanned
! following line contains first value, step and last value
SCAN FILE ! turns on scanning. The variable which has been given the value -999 is scanned
! following line contains name of input file containing values of scan variable
! - one per line in the input file
GRAVITY ON ! turns gravity on
GRAVITY OFF ! and off - or turns it
GRAVITY SIDEWAYS ! sideways if so desired
NEUTRONS ! Number of neutrons, seed for random number generator (0: take a random odd number)
! If the number of neutrons is negative, the loop keeps going until the full number of
! neutrons has been transmitted.
OUTPUT ! iresults, idebug:
iresults:
-1 : save each transmitted neutron in huge .dat file
0 : save nothing
1 : append transmission numbers to .out file
2 : append transmission numbers to .out file and save all binned data
idebug:
-2 : No output at all, except total number of neutrons (set screeninput to .FALSE. in main program
and recompile to take all input from screen and avoid prompting for input file)
-1 : Batchjob - no graphics, no prompting
0 : Normal interactive calculation, with prompts for output
1 : Plot trajectories to screen
2 : Print trajectories to PS file
END INPUT ! ignore everything after this
Notes:
[*1*] The source brightness is uniform over the area given by the width (and height). The halo
width describes a linear drop of brightness to zero outside the source area
[*2*] For a cylindrical source, the source brightness over the width varies as sqrt((w/2)^2-r^2).
In this case, the halo is only applied in the vertical direction.
[*3*] Set the m-number to a negative value to denote polarising supermirror
All dimensions are in mm, except the guide radius of curvature, which is in metres.
By default, the reflectivity is 1 up to m=1, decreasing linearly down to 0.9 at m=2.
The exception is for m=1.2, which corresponds to Ni-58, where the reflectivity is 1
right up to the edge.
To avoid direct line-of-sight in a curved guide, Lguide > SQRT(8*width*Rcurv)
The characteristic wavelength is the wavelength at which the curved guide is filled
to 2/3 and is given by lambda(star)=SQRT(2*width/Rcurv)*575/m