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
|
/*******************************************************************************
* McStas instrument definition URL=http://www.mcstas.org
*
* Instrument: FZJ_BenchmarkSfin2
*
* %Identification
* Written by: Henrich Frielinghaus
* Date: 2013
* Origin: FZ Juelich
*
* Test instrument for the H Frielinghaus SANS_benchmark2 component
*
* %INSTRUMENT_SITE: FZ_Juelich
*
* %Parameters
* cnum: [] Set to 0.0 for no polarizer as for benchmarking the normal SANS samples, to 2.0 for two cavities, keep default values as much as possible
* lbdmin: []
* lbdmax: []
* NGbend: []
* NGblen: []
* Clen: []
* SampD: []
* bendL: []
* bendR: []
* bendM: []
* bendiM: []
* dfltM: []
* vorPl: [] for two cavities
* PolLen: [] for two cavities
* PolTot: [] for two cavities
* MDOWN: []
* Min: []
* ROT: []
* modnum: []
* sglscatt: []
* incs: []
*
* %End
*******************************************************************************/
DEFINE INSTRUMENT FZJ_BenchmarkSfin2 (lbdmin=2.00, lbdmax=8.5, NGbend=0.053,
NGblen=0.03, Clen = 8.0, SampD=0.01,
bendL = 5.0, bendR = 385.0, bendM = 7.0, bendiM = 7.0, dfltM = 1.5,
vorPl = 0.5, PolLen = 0.492, PolTot = 2.30,
MDOWN = 3.6, Min=1.5, cnum=0.00, ROT=0.0,
modnum= 11.0,sglscatt=1.0, incs=0.0005)
/*
bandwidth for detector distances:
8m, delta = 6.5AA, so 2 .. 8.5 or 4 .. 10.5
20m, delta = 5.0AA, so 2 .. 7.0 or 4 .. 9.0
*/
DECLARE
%{
%}
INITIALIZE
%{
%}
TRACE
COMPONENT origin = Arm()
AT (0,0,0) ABSOLUTE
/* yheight MUST be set to 3cm */
COMPONENT source = ESS_butterfly(sector="N", beamline=5,dist=2.0,focus_xw=NGbend,focus_yh=NGblen,Lmin=lbdmin,Lmax=lbdmax)
AT (0, 0, 0) RELATIVE origin
COMPONENT rspin = Set_pol (randomOn=1)
AT (0, 0, 2.0001) RELATIVE source
COMPONENT pbar = Progress_bar(percent=2)
AT (0, 0, 2.0002) RELATIVE source
COMPONENT Bender1 = Bender (w=NGbend, h=NGblen, r=bendR, Win=bendL/bendR,
R0a=0.99,Qca=0.02174,alphaa=6.07,ma=bendM, Wa=0.003,
R0i=0.99,Qci=0.02174,alphai=6.07,mi=bendiM,Wi=0.003,
R0s=0.99,Qcs=0.02174,alphas=6.07,ms=dfltM, Ws=0.003)
AT (0, 0, 2.0003) RELATIVE source
ROTATED (0,0,90) RELATIVE source
COMPONENT Bender2 = Bender (w=NGbend, h=NGblen, r=bendR, Win=bendL/bendR,
R0a=0.99,Qca=0.02174,alphaa=6.07,ma=bendM, Wa=0.003,
R0i=0.99,Qci=0.02174,alphai=6.07,mi=bendiM,Wi=0.003,
R0s=0.99,Qcs=0.02174,alphas=6.07,ms=dfltM, Ws=0.003)
AT (0, 0, bendL+0.0001) RELATIVE Bender1
ROTATED (0,0,-90) RELATIVE source
COMPONENT Monitor = Monitor_nD (xmin = -.5*NGblen, xmax = 0.5*NGblen, ymin = -.5*NGblen, ymax = 0.5*NGblen,
options = "vdiv bins=100 limits[-0.6 0.6]; lambda bins=30 limits[1.0 20.0]",
filename = "Divergence.dip")
AT (0,0,bendL+0.0005) RELATIVE Bender2
ROTATED (-.70,0,0) RELATIVE source
COMPONENT vorpl = Guide(w1=NGblen, h1=NGblen, w2=NGblen, h2=NGblen, l=vorPl,
R0=0.99, Qc=0.02174, alpha=6.07, m=dfltM, W=0.003)
AT (0,0,bendL+0.001) RELATIVE Bender2
ROTATED (-.70,0,0) RELATIVE source
COMPONENT passNL = Guide(w1=NGblen, h1=NGblen, w2=NGblen, h2=NGblen, l=PolTot-vorPl+0.0003,
R0=0.99, Qc=0.02174, alpha=6.07, m=dfltM, W=0.003)
WHEN (cnum<0.5)
AT (0, 0, vorPl+0.0001) RELATIVE vorpl
ROTATED (0,0,0) RELATIVE vorpl
COMPONENT cav1 = CavitiesIn(xw=0.05,yw=0.05,xc=cnum,yc=1)
WHEN (cnum>=0.5)
AT (0, 0, vorPl+0.0001) RELATIVE vorpl
ROTATED (0,0,ROT) RELATIVE vorpl
/* Polarizer as parametrized by H. Frielinghaus for KWS-1 at FRM-2, Mirror pars by Swiss Neutronics */
COMPONENT polzr = Transmission_polarisatorABSnT(
w1 = 0.05/cnum, h1 = 0.05,
w2 = 0.05/cnum, h2 = 0.05,
l = PolLen,
R0 = 0.99, Qc = 0.02174, alpha = 4.25, W = 0.003,
mleft = dfltM, mright = dfltM, mtop = Min, mbottom = Min,
waferD = 0.0003, FeD=2.16e-6, Si_i = 0.25, Si_a = 0.215,
R0_up = 0.99, Qc_up = 0.0055, alpha_up = 6.2, W_up = 0.002, mup = 2.2,
R0_down = 0.99, Qc_down = 0.02174, alpha_down = 3.4, W_down = 0.004, mdown = MDOWN )
WHEN (cnum>=0.5)
AT (0, 0, 0.0001) RELATIVE cav1
ROTATED (0,0,0) RELATIVE cav1
COMPONENT cav2 = CavitiesOut(xw=0.05,yw=0.05)
WHEN (cnum>=0.5)
AT (0, 0, PolLen+0.0001) RELATIVE polzr
ROTATED (0,0,0) RELATIVE cav1
COMPONENT guide1 = Guide(w1=NGblen, h1=NGblen, w2=NGblen, h2=NGblen, l=PolTot-PolLen-vorPl,
R0=0.99, Qc=0.02174, alpha=6.07, m=dfltM, W=0.003)
WHEN (cnum>=0.5)
AT (0, 0, 0.0001) RELATIVE cav2
ROTATED (0,0,0) RELATIVE vorpl
COMPONENT guide2 = Guide(w1=NGblen, h1=NGblen, w2=NGblen, h2=NGblen, l=20.001-Clen,
R0=0.99, Qc=0.02174, alpha=6.07, m=dfltM, W=0.003)
AT (0, 0, PolTot+0.0007) RELATIVE vorpl
ROTATED (0,0,0) RELATIVE vorpl
/*
COMPONENT colap = Slit(xmin=-0.015,xmax=0.015,ymin=-0.015,ymax=0.015)
AT (0, 0,20.0015-Clen) RELATIVE guide2
ROTATED (0,0,0) RELATIVE vorpl
*/
COMPONENT smpap = Slit(xmin=-0.5*SampD,xmax=0.5*SampD,ymin=-0.5*SampD,ymax=0.5*SampD)
AT (0, 0,20.0020) RELATIVE guide2
ROTATED (0,0,0) RELATIVE vorpl
/*
COMPONENT PSDaft = Monitor_nD (xmin = -SampD, xmax = SampD, ymin = -SampD, ymax = SampD,
options = "hdiv bins=2 limits[-99 9] ; lambda bins=50 limits[1.0 20.0]",
filename = "after_sample_slit.psd")
AT (0, 0,20.0030) RELATIVE guide2
ROTATED (0,0,0) RELATIVE vorpl
*/
SPLIT 1000 COMPONENT repeat = Arm()
AT (0, 0,20.00367) RELATIVE guide2
ROTATED (0,0,0) RELATIVE vorpl
COMPONENT sample = SANS_benchmark2(xwidth=2.0*SampD, yheight=2.0*SampD, zthick=0.001, model=modnum, dsdw_inc=incs, sc_aim=0.90, sans_aim=0.95, singlesp = sglscatt)
AT (0,0,20.0040) RELATIVE guide2
ROTATED (0,0,0) RELATIVE vorpl
COMPONENT det = TOFSANSdet( plength=0.003163, ssdist=22.0124+2.0*bendL+PolTot,
coldis = Clen, Sthckn = 0.1,
ds1=1.0, xw1=0.0, yh1=0.0, hl1=0.0, /* first one switched off */
ds2=Clen*.125, xw2=1.0, yh2=1.0, hl2=0.2,
ds3=Clen, xw3=1.0, yh3=1.0, hl3=0.05,
tmin=0.0025, tmax=0.3,
Nx=128.0, Ny=128.0, Nt=800.0, /* be cautious with large numbers */
qmin=0.0002, qmax=2.5, Nq=166, /* Nq integer !!!!!!!!!!!!!!!!!!! */
fname="SANSareaDet", rstneu = 9.9999)
AT (0,0,20.0100) RELATIVE guide2
ROTATED (0,0,0) RELATIVE vorpl
/*
COMPONENT det1 = Monitor_nD_mod(xmin=-0.5, xmax=0.5, ymin=-0.5, ymax=0.5, xytr=0.1,
options ="kxy bins=300 limits=[0.0025,0.80]", filename ="short_dist.txt")
AT (0,0, Clen*0.2) RELATIVE sample
ROTATED (0,0,0) RELATIVE vorpl
COMPONENT det2 = Monitor_nD_mod(xmin=-0.5, xmax=0.5, ymin=-0.5, ymax=0.5, xytr=0.02,
options ="kxy bins=300 limits=[0.0005,0.16]", filename ="long__dist.txt")
AT (0,0, Clen ) RELATIVE sample
ROTATED (0,0,0) RELATIVE vorpl
*/
FINALLY
%{
%}
END
|