@zhouhuibin
2023-03-15T15:36:59.000000Z
字数 27009
阅读 204
博士后出站报告附录
/******************************************************************************
McStas instrument definition URL=http://www.mcstas.org
*
* Instrument: CSNS_BNS 2.0
*
* %Identification
* Date: 2020
* Origin: IHEP
* Written by: T Xiong (xiongtao@ihep.ac.cn)
* %INSTRUMENT_SITE: CSNS
*
* %DESCRIPTION
*
*THis is a pre vision of the code of CSNS_BNS,which plan to be installed at BL10 in CSNS. This is a pre model of Backscattering spectrometer along with the moderator installed at BL 10
*
*
*
* %Parameters
* Lam: [AA] Wavelength selected by the chopper system
* Delta_Lam: [AA] Wavelength spread selected by the chopper system
* Lambda_min: [AA] Minimum wavelength produced at the source
* Lambda_max: [AA] Maximum wavelength produced at the source
* E_min: [meV] Minimum energy produced at the source
* E_max: [meV] Maximum energy produced at the source
* RadCurv: [m] Radius of Curvature of the guide system
* omega1: [Hz] Frequency of the first DiskChopper
* omega2: [Hz] Frequency of the second DiskChopper
* omega3: [Hz] Frequency of the third DiskChopper
* dist1: [m] Distance of the first DiskChopper from source
* dist2: [m] Distance of the second DiskChopper from source
* dist3: [m] Distance of the third DiskChopper from source
* delay1: [s] Delay time of the first DiskChopper
* delay2: [s] Delay time of the second DiskChopper
* delay3: [s] Delay time of the third DiskChopper
* ch1_open: [deg] Angular opening of the first Diskchopper
* ch2_open: [deg] Angular opening of the second Diskchopper
* ch3_open: [deg] Angular opening of the third Diskchopper
* ROT1: [deg] Positioning of central analyser wrt. the incoming beam, in the scattering plane
* dROT: [deg] Positioning of neighbouring analysers wrt. central analyser
* AN_ROT: [deg] Out-of-plane rotation of analysers wrt. scattering plane
* TOTAL_LENGTH: [m] Total length of the guide system
*
* %Link
*
*
* %End
********************************************************************************/
/* Change name of instrument and input parameters with default values */
DEFINE INSTRUMENT CSNS_chopper (Lam=6.267, Lambda_min=2, Lambda_max=10,RadCurv=1000, omega1=25, omega2=25, omega3=25,
ch1_open=62.32, ch2_open=71.36, ch3_open=147.33, AN_ROT=2,ROT1=10, dROT=20,sltx=0.03,slty=0.03)
/* The DECLARE section allows us to declare variables or small */
/* functions in C syntax. These may be used in the whole instrument. */
DECLARE
%{
double E_min;
double E_max;
double delay1;
double delay2;
double delay3;
double q_si111=2.003886241;
%}
/* The INITIALIZE section is executed when the simulation starts */
/* (C code). You may use them as component parameter values. */
INITIALIZE
%{
E_min=81.82/(Lambda_max*Lambda_max);
E_max=81.82/(Lambda_min*Lambda_min);
delay1=11.921*1e-3;
delay2=15.880*1e-3;
delay3=79.224*1e-3;
%}
/* Here comes the TRACE section, where the actual */
/* instrument is defined as a sequence of components. */
TRACE
/* The Arm() class component defines reference points and orientations */
/* in 3D space. Every component instance must have a unique name. Here, */
/* Origin is used. This Arm() component is set to define the origin of */
/* our global coordinate system (AT (0,0,0) ABSOLUTE). It may be used */
/* for further RELATIVE reference, Other useful keywords are : ROTATED */
/* EXTEND GROUP PREVIOUS. Also think about adding a neutron source ! */
/* Progress_bar is an Arm displaying simulation progress. */
COMPONENT Origin = Progress_bar()
AT (0,0,0) ABSOLUTE
/* ============================== SOURCE =============================== */
/* Moderator Source for BL10*/
/* xwidth [m] Moderator vertical size */
/* yheight [m] Moderator Horizontal size */
/* dist [m] Distance from source to the focusing rectangle */
/* focus_xw [m] Width of focusing rectangle */
/* focus_yh [m] Height of focusing rectangle */
/* Emin [meV] Minimum of the neutron energy distrubution */
/* Emax [meV] Maximum of the neutron energy distrubution */
COMPONENT Source = SNS_source(
filename ="MCSTAS-DPHM-BL10.dat", xwidth = 0.1, yheight = 0.1,
dist = 4.3, focus_xw = 0.12, focus_yh = 0.12, Emin =E_min,
Emax =E_max)
AT (0, 0, 0) RELATIVE Origin
ROTATED (0, 0, 0) RELATIVE Origin
EXTEND %{
%}
/* ===================================== GUIDE ======================================== */
/* ================ shutter_insert guide ================== */
/* d=2.25 m */
/*shutter_insert guide */
/* w1 [m] Width at the guide entry */
/* h1 [m] Height at the guide entry */
/* w2 [m] Width at the guide exit */
/* h2 [m] Height at the guide exit */
/* l [m] length of guide */
/* parameter of Refelctive (optional) */
/* ================ Gap 1 ================== */
COMPONENT Gap_1_begin = Arm()
AT (0, 0, 4.25) RELATIVE Origin
COMPONENT Gap_1_end = Arm()
AT (0, 0, 0.05) RELATIVE Gap_1_begin
/* ================================================ curved guide ================================================ */
/* L2=2800cm=28m*/
/* ================================== curved guide section I =================================== */
/* This guide is 3.20-0.04 m = 0.40*7+0.36 pieces */
COMPONENT Curved_Guide_Section_I= Guide_gravity(w1=0.12, h1=0.12, l=0.40,
mleft = 2.5, mright = 3, mtop = 2, mbottom = 2)
AT (0,0,0) RELATIVE Gap_1_end
COMPONENT COPY(Curved_Guide_Section_I) = COPY(Curved_Guide_Section_I)
AT (0, 0, 0.40) RELATIVE PREVIOUS
ROTATED (0, (0.40/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_I) = COPY(Curved_Guide_Section_I)
AT (0, 0, 0.40) RELATIVE PREVIOUS
ROTATED (0, (0.40/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_I) = COPY(Curved_Guide_Section_I)
AT (0, 0, 0.40) RELATIVE PREVIOUS
ROTATED (0, (0.40/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_I) = COPY(Curved_Guide_Section_I)
AT (0, 0, 0.40) RELATIVE PREVIOUS
ROTATED (0, (0.40/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_I) = COPY(Curved_Guide_Section_I)
AT (0, 0, 0.40) RELATIVE PREVIOUS
ROTATED (0, (0.40/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_I) = COPY(Curved_Guide_Section_I)
AT (0, 0, 0.40) RELATIVE PREVIOUS
ROTATED (0, (0.40/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT Curved_Guide_Section_I_short= Guide_gravity(w1=0.12, h1=0.12, l=0.36,
mleft = 2.5, mright = 3, mtop = 2, mbottom = 2)
AT (0, 0, 0.4) RELATIVE PREVIOUS
ROTATED (0, (0.36/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
/* ================ Gap 2: including the first disk chopper=============== */
COMPONENT Gap_2_begin = Arm()
AT (0, 0, 0.36) RELATIVE Curved_Guide_Section_I_short
/* ================ Start First disk chopper===================== */
/*Chopper 1*/
/* theta_0 [deg] Angular width of the slits*/
/* radius=0.5 [m] Radius of the disc*/
/* yheight [m] Slit height (if=0, equal to radius). Auto centering of beam at half height*/
/* xwidth [m] Horizontal slit width opening at beam center*/
/* nu [algebricsign defines the direction of rotation] [Hz] Frequency of the Chopper, omega=2∗PI∗nu*/
/* nslit [1] Number of slits, regularly arranged around the disk*/
/* jitter [s] Jitter in the time phase*/
/* delay=0 [s] Time delay*/
/* isfirst [it then spreads the neutron time distribution] [0/1] Set it to 1 for the first chopper position in a cw source*/
/* npulse=1 [Only if is first] [1] Number of pulses*/
/* abs_out [0/1] Absorb neutron shitting outside of chopper radius?*/
/* phase=0 [overrides delay] [deg] Angular delay*/
/* verbose [1] Set to 1 to display Disk chopper configuration*/
COMPONENT Chopper1 = DiskChopper(radius=0.254, theta_0=ch1_open, nu=omega1, nslit=1, delay=delay1,yheight=0.128)
WHEN (omega1>0)
AT (0, 0, 0.04) RELATIVE Gap_2_begin
ROTATED (0, (0.04/RadCurv)*RAD2DEG, 0) RELATIVE Gap_2_begin
/* ================ End First disk chopper===================== */
COMPONENT Gap_2_end = Arm()
AT (0, 0, 0.08) RELATIVE Gap_2_begin
ROTATED (0, (0.08/RadCurv)*RAD2DEG, 0) RELATIVE Gap_2_begin
/* =========================================== curved guide section II ========================================= */
/* This guide is 2.50-0.08 m = 0.32*7+0.18 pieces */
COMPONENT Curved_Guide_Section_II= Guide_gravity(w1=0.12, h1=0.12, l=0.32,
mleft = 2.5, mright = 3, mtop = 2, mbottom = 2)
AT (0,0,0) RELATIVE Gap_2_end
COMPONENT COPY(Curved_Guide_Section_II) = COPY(Curved_Guide_Section_II)
AT (0, 0, 0.32) RELATIVE PREVIOUS
ROTATED (0, (0.32/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_II) = COPY(Curved_Guide_Section_II)
AT (0, 0, 0.32) RELATIVE PREVIOUS
ROTATED (0, (0.32/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_II) = COPY(Curved_Guide_Section_II)
AT (0, 0, 0.32) RELATIVE PREVIOUS
ROTATED (0, (0.32/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_II) = COPY(Curved_Guide_Section_II)
AT (0, 0, 0.32) RELATIVE PREVIOUS
ROTATED (0, (0.32/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_II) = COPY(Curved_Guide_Section_II)
AT (0, 0, 0.32) RELATIVE PREVIOUS
ROTATED (0, (0.32/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_II) = COPY(Curved_Guide_Section_II)
AT (0, 0, 0.32) RELATIVE PREVIOUS
ROTATED (0, (0.32/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT Curved_Guide_Section_II_short= Guide_gravity(w1=0.12, h1=0.12, l=0.18,
mleft = 2.5, mright =3, mtop = 2, mbottom =2)
AT (0, 0, 0.32) RELATIVE PREVIOUS
ROTATED (0, (0.18/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
/* ================ Gap 3: including the second disk chopper=============== */
COMPONENT Gap_3_begin = Arm()
AT (0, 0, 0.18) RELATIVE Curved_Guide_Section_II_short
/* ================ Start Second disk chopper===================== */
/*Chopper 2*/
COMPONENT Chopper2 = DiskChopper(radius=0.254, theta_0=ch2_open, nu=omega2, nslit=1, delay=delay2, yheight=0.128)
WHEN (omega2>0)
AT (0, 0, 0.04) RELATIVE Gap_3_begin
ROTATED (0, (0.04/RadCurv)*RAD2DEG, 0) RELATIVE Gap_3_begin
COMPONENT Chopper2_n = DiskChopper(radius=0.254, theta_0=ch2_open, nu=-omega2, nslit=1, delay=delay2, yheight=0.128)
WHEN (omega2>0)
AT (0, 0, 0.04) RELATIVE Gap_3_begin
ROTATED (0, (0.04/RadCurv)*RAD2DEG, 0) RELATIVE Gap_3_begin
COMPONENT Gap_3_end = Arm()
AT (0, 0, 0.08) RELATIVE Gap_3_begin
ROTATED (0, (0.08/RadCurv)*RAD2DEG, 0) RELATIVE Gap_3_begin
/* =========================================== curved guide section III ======================================= */
/* This guide is 24.25-0.04m = 0.5*48+0.21 pieces */
COMPONENT Curved_Guide_Section_III= Guide_gravity(w1=0.12, h1=0.12, l=0.5,
mleft = 2.5, mright = 3, mtop = 2, mbottom = 2)
AT (0,0,0) RELATIVE Gap_3_end
COMPONENT COPY(Curved_Guide_Section_III) = COPY(Curved_Guide_Section_III)
AT (0, 0, 0.5) RELATIVE PREVIOUS
ROTATED (0, (0.5/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_III) = COPY(Curved_Guide_Section_III)
AT (0, 0, 0.5) RELATIVE PREVIOUS
ROTATED (0, (0.5/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_III) = COPY(Curved_Guide_Section_III)
AT (0, 0, 0.5) RELATIVE PREVIOUS
ROTATED (0, (0.5/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_III) = COPY(Curved_Guide_Section_III)
AT (0, 0, 0.5) RELATIVE PREVIOUS
ROTATED (0, (0.5/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_III) = COPY(Curved_Guide_Section_III)
AT (0, 0, 0.5) RELATIVE PREVIOUS
ROTATED (0, (0.5/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_III) = COPY(Curved_Guide_Section_III)
AT (0, 0, 0.5) RELATIVE PREVIOUS
ROTATED (0, (0.5/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_III) = COPY(Curved_Guide_Section_III)
AT (0, 0, 0.5) RELATIVE PREVIOUS
ROTATED (0, (0.5/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_III) = COPY(Curved_Guide_Section_III)
AT (0, 0, 0.5) RELATIVE PREVIOUS
ROTATED (0, (0.5/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_III) = COPY(Curved_Guide_Section_III)
AT (0, 0, 0.5) RELATIVE PREVIOUS
ROTATED (0, (0.5/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_III) = COPY(Curved_Guide_Section_III)
AT (0, 0, 0.5) RELATIVE PREVIOUS
ROTATED (0, (0.5/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_III) = COPY(Curved_Guide_Section_III)
AT (0, 0, 0.5) RELATIVE PREVIOUS
ROTATED (0, (0.5/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_III) = COPY(Curved_Guide_Section_III)
AT (0, 0, 0.5) RELATIVE PREVIOUS
ROTATED (0, (0.5/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_III) = COPY(Curved_Guide_Section_III)
AT (0, 0, 0.5) RELATIVE PREVIOUS
ROTATED (0, (0.5/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_III) = COPY(Curved_Guide_Section_III)
AT (0, 0, 0.5) RELATIVE PREVIOUS
ROTATED (0, (0.5/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_III) = COPY(Curved_Guide_Section_III)
AT (0, 0, 0.5) RELATIVE PREVIOUS
ROTATED (0, (0.5/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_III) = COPY(Curved_Guide_Section_III)
AT (0, 0, 0.5) RELATIVE PREVIOUS
ROTATED (0, (0.5/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_III) = COPY(Curved_Guide_Section_III)
AT (0, 0, 0.5) RELATIVE PREVIOUS
ROTATED (0, (0.5/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_III) = COPY(Curved_Guide_Section_III)
AT (0, 0, 0.5) RELATIVE PREVIOUS
ROTATED (0, (0.5/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_III) = COPY(Curved_Guide_Section_III)
AT (0, 0, 0.5) RELATIVE PREVIOUS
ROTATED (0, (0.5/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_III) = COPY(Curved_Guide_Section_III)
AT (0, 0, 0.5) RELATIVE PREVIOUS
ROTATED (0, (0.5/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_III) = COPY(Curved_Guide_Section_III)
AT (0, 0, 0.5) RELATIVE PREVIOUS
ROTATED (0, (0.5/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_III) = COPY(Curved_Guide_Section_III)
AT (0, 0, 0.5) RELATIVE PREVIOUS
ROTATED (0, (0.5/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_III) = COPY(Curved_Guide_Section_III)
AT (0, 0, 0.5) RELATIVE PREVIOUS
ROTATED (0, (0.5/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_III) = COPY(Curved_Guide_Section_III)
AT (0, 0, 0.5) RELATIVE PREVIOUS
ROTATED (0, (0.5/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_III) = COPY(Curved_Guide_Section_III)
AT (0, 0, 0.5) RELATIVE PREVIOUS
ROTATED (0, (0.5/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_III) = COPY(Curved_Guide_Section_III)
AT (0, 0, 0.5) RELATIVE PREVIOUS
ROTATED (0, (0.5/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_III) = COPY(Curved_Guide_Section_III)
AT (0, 0, 0.5) RELATIVE PREVIOUS
ROTATED (0, (0.5/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_III) = COPY(Curved_Guide_Section_III)
AT (0, 0, 0.5) RELATIVE PREVIOUS
ROTATED (0, (0.5/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_III) = COPY(Curved_Guide_Section_III)
AT (0, 0, 0.5) RELATIVE PREVIOUS
ROTATED (0, (0.5/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_III) = COPY(Curved_Guide_Section_III)
AT (0, 0, 0.5) RELATIVE PREVIOUS
ROTATED (0, (0.5/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_III) = COPY(Curved_Guide_Section_III)
AT (0, 0, 0.5) RELATIVE PREVIOUS
ROTATED (0, (0.5/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_III) = COPY(Curved_Guide_Section_III)
AT (0, 0, 0.5) RELATIVE PREVIOUS
ROTATED (0, (0.5/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_III) = COPY(Curved_Guide_Section_III)
AT (0, 0, 0.5) RELATIVE PREVIOUS
ROTATED (0, (0.5/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_III) = COPY(Curved_Guide_Section_III)
AT (0, 0, 0.5) RELATIVE PREVIOUS
ROTATED (0, (0.5/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_III) = COPY(Curved_Guide_Section_III)
AT (0, 0, 0.5) RELATIVE PREVIOUS
ROTATED (0, (0.5/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_III) = COPY(Curved_Guide_Section_III)
AT (0, 0, 0.5) RELATIVE PREVIOUS
ROTATED (0, (0.5/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_III) = COPY(Curved_Guide_Section_III)
AT (0, 0, 0.5) RELATIVE PREVIOUS
ROTATED (0, (0.5/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_III) = COPY(Curved_Guide_Section_III)
AT (0, 0, 0.5) RELATIVE PREVIOUS
ROTATED (0, (0.5/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_III) = COPY(Curved_Guide_Section_III)
AT (0, 0, 0.5) RELATIVE PREVIOUS
ROTATED (0, (0.5/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_III) = COPY(Curved_Guide_Section_III)
AT (0, 0, 0.5) RELATIVE PREVIOUS
ROTATED (0, (0.5/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_III) = COPY(Curved_Guide_Section_III)
AT (0, 0, 0.5) RELATIVE PREVIOUS
ROTATED (0, (0.5/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_III) = COPY(Curved_Guide_Section_III)
AT (0, 0, 0.5) RELATIVE PREVIOUS
ROTATED (0, (0.5/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_III) = COPY(Curved_Guide_Section_III)
AT (0, 0, 0.5) RELATIVE PREVIOUS
ROTATED (0, (0.5/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_III) = COPY(Curved_Guide_Section_III)
AT (0, 0, 0.5) RELATIVE PREVIOUS
ROTATED (0, (0.5/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_III) = COPY(Curved_Guide_Section_III)
AT (0, 0, 0.5) RELATIVE PREVIOUS
ROTATED (0, (0.5/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_III) = COPY(Curved_Guide_Section_III)
AT (0, 0, 0.5) RELATIVE PREVIOUS
ROTATED (0, (0.5/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT COPY(Curved_Guide_Section_III) = COPY(Curved_Guide_Section_III)
AT (0, 0, 0.5) RELATIVE PREVIOUS
ROTATED (0, (0.5/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT Curved_Guide_Section_III_short= Guide_gravity(w1=0.12, h1=0.12, l=0.21,
mleft = 2.5, mright = 3, mtop = 2, mbottom = 2)
AT (0, 0, 0.5) RELATIVE PREVIOUS
ROTATED (0, (0.21/RadCurv)*RAD2DEG, 0) RELATIVE PREVIOUS
COMPONENT Curved_Guide_end = Arm()
AT (0, 0, 0.21) RELATIVE PREVIOUS
/* =======================================================Long Straight Guide ======================================= */
/*=================================Straight Guide Section I ===============================*/
/* This guide is 15.75-0.04 m = 15.71 m */
COMPONENT Straight_Guide_Section_I = Guide_gravity(
w1 = 0.12, h1 = 0.12, w2 = 0.12 , h2 = 0.12, l = 15.71, m = 2)
AT (0, 0, 0) RELATIVE Curved_Guide_end
/* ================ Gap 4: including the third disk chopper=============== */
COMPONENT Gap_4_begin = Arm()
AT (0, 0, 15.71) RELATIVE Straight_Guide_Section_I
/* ================ Start third disk chopper===================== */
/*L3=50 m */
/*Chopper 3*/
COMPONENT Chopper3 = DiskChopper(radius=0.254, theta_0=ch3_open, nu=omega3, nslit=1, delay=delay3, yheight=0.128)
WHEN (omega3>0)
AT (0, 0, 0.04) RELATIVE Gap_4_begin
COMPONENT Chopper3_n = DiskChopper(radius=0.254, theta_0=ch3_open, nu=-omega3, nslit=1, delay=delay3, yheight=0.128)
WHEN (omega3>0)
AT (0, 0, 0.04+1e-4) RELATIVE Gap_4_begin
/* ================ End third disk chopper===================== */
COMPONENT Gap_4_end = Arm()
AT (0, 0, 0.08) RELATIVE Gap_4_begin
/*===========================================Straight Guide Section II ====================================*/
/* This guide is 31.75-0.04 m = 31.71 m */
COMPONENT Straight_Guide_Section_II = Guide_gravity(
w1 = 0.12, h1 = 0.12, w2 = 0.12, h2 = 0.12, l = 32.685, m = 2)
AT (0, 0, 0) RELATIVE Gap_4_end
COMPONENT Straight_Guide_II = Arm()
AT (0, 0, 32.685) RELATIVE PREVIOUS
/* ========================== Funnel Guide Section ===================== */
/*?? = (Rm - R0) / (m Qc,Ni - Qc)*/
/* === Funnel Guide I=== */
COMPONENT Funnel_Guide=Guide_tapering(w1=0.12, h1=0.12, linw=7.27, loutw=0.27, linh=7.27,
louth=0.27, l=7, option="elliptical",
R0=0.99, Qcx=0.021, Qcy=0.021, alphax=6.07, alphay=6.07, W=0.003, mx=5, my=5, segno=100)
AT (0, 0, 0) RELATIVE Straight_Guide_II
COMPONENT Funnel_Guide_I = Arm()
AT (0, 0, 7) RELATIVE PREVIOUS
COMPONENT Slit_end=Slit(xwidth=sltx, yheight=slty)
AT (0, 0, 0.20) RELATIVE Funnel_Guide_I
/* ========SAMPLE.V_rho(Å-3) is the Number of atoms in the unit cell/Unit cell volume in Å^3. For Vanadium Z=2 and Lattice Constant (Å): 3.020.=============== */
SPLIT 1000 COMPONENT Sample = Isotropic_Sqw(radius=0.015, yheight=0.03, rho=1/13.827,
sigma_abs=0, sigma_inc=24.935, sigma_coh=0, order = 1)
AT (0, 0, 0.275) RELATIVE Funnel_Guide_I
EXTEND %{
if (!SCATTERED) ABSORB;
%}
/* =============================ANALYZER ARMS================================= */
COMPONENT An1_rot_axis=Arm()
AT (0,0,0) RELATIVE Sample
ROTATED (0,ROT1,0) RELATIVE Sample
COMPONENT An2_rot_axis=Arm()
AT (0,0,0) RELATIVE Sample
ROTATED (0,ROT1+dROT,0) RELATIVE Sample
COMPONENT An3_rot_axis=Arm()
AT (0,0,0) RELATIVE Sample
ROTATED (0,ROT1+2*dROT,0) RELATIVE Sample
COMPONENT An4_rot_axis=Arm()
AT (0,0,0) RELATIVE Sample
ROTATED (0,ROT1+3*dROT,0) RELATIVE Sample
COMPONENT An5_rot_axis=Arm()
AT (0,0,0) RELATIVE Sample
ROTATED (0,ROT1+4*dROT,0) RELATIVE Sample
COMPONENT An6_rot_axis=Arm()
AT (0,0,0) RELATIVE Sample
ROTATED (0,ROT1+5*dROT,0) RELATIVE Sample
COMPONENT An7_rot_axis=Arm()
AT (0,0,0) RELATIVE Sample
ROTATED (0,ROT1+6*dROT,0) RELATIVE Sample
COMPONENT An8_rot_axis=Arm()
AT (0,0,0) RELATIVE Sample
ROTATED (0,ROT1+7*dROT,0) RELATIVE Sample
/* =============================ANALYZER ARMS 2================================= */
COMPONENT An1_rot_axis2=Arm()
AT (0,0,2.5) RELATIVE An1_rot_axis
ROTATED (AN_ROT,0,0) RELATIVE An1_rot_axis
COMPONENT An2_rot_axis2=Arm()
AT (0,0,2.5) RELATIVE An2_rot_axis
ROTATED (AN_ROT,0,0) RELATIVE An2_rot_axis
COMPONENT An3_rot_axis2=Arm()
AT (0,0,2.5) RELATIVE An3_rot_axis
ROTATED (AN_ROT,0,0) RELATIVE An3_rot_axis
COMPONENT An4_rot_axis2=Arm()
AT (0,0,2.5) RELATIVE An4_rot_axis
ROTATED (AN_ROT,0,0) RELATIVE An4_rot_axis
COMPONENT An5_rot_axis2=Arm()
AT (0,0,2.5) RELATIVE An5_rot_axis
ROTATED (AN_ROT,0,0) RELATIVE An5_rot_axis
COMPONENT An6_rot_axis2=Arm()
AT (0,0,2.5) RELATIVE An6_rot_axis
ROTATED (AN_ROT,0,0) RELATIVE An6_rot_axis
COMPONENT An7_rot_axis2=Arm()
AT (0,0,2.5) RELATIVE An7_rot_axis
ROTATED (AN_ROT,0,0) RELATIVE An7_rot_axis
COMPONENT An8_rot_axis2=Arm()
AT (0,0,2.5) RELATIVE An8_rot_axis
ROTATED (AN_ROT,0,0) RELATIVE An8_rot_axis
/* =============================ANALYZERS================================= */
COMPONENT An1 = Spherical_Backscattering_Analyser_modify(
xmin=-0.43, xmax=0.43, ymin=0, ymax=0.98,
radius=2.5, Q = q_si111, mosaic=0.0, dspread=0.000186, R0=1, debug=0)
AT (0, 0, 0) RELATIVE An1_rot_axis2
GROUP ANALYZERS
COMPONENT An2 = Spherical_Backscattering_Analyser_modify(
xmin=-0.43, xmax=0.43, ymin=0, ymax=0.98,
radius=2.5, Q = q_si111, mosaic=0.0, dspread=0.000186, R0=1, debug=0)
AT (0, 0, 0) RELATIVE An2_rot_axis2
GROUP ANALYZERS
COMPONENT An3 = Spherical_Backscattering_Analyser_modify(
xmin=-0.43, xmax=0.43, ymin=0, ymax=0.98,
radius=2.5, Q = q_si111, mosaic=0.0, dspread=0.000186, R0=1, debug=0)
AT (0, 0, 0) RELATIVE An3_rot_axis2
GROUP ANALYZERS
COMPONENT An4 = Spherical_Backscattering_Analyser_modify(
xmin=-0.43, xmax=0.43, ymin=0, ymax=0.98,
radius=2.5, Q = q_si111, mosaic=0.0, dspread=0.000186, R0=1, debug=0)
AT (0, 0, 0) RELATIVE An4_rot_axis2
GROUP ANALYZERS
/* COMPONENT An5 = Spherical_Backscattering_Analyser_modify(
xmin=-0.43, xmax=0.43, ymin=0, ymax=0.98,
radius=2.5, Q = q_si111, mosaic=0.0, dspread=0.000186, R0=1, debug=0)
AT (0, 0, 0) RELATIVE An5_rot_axis2
GROUP ANALYZERS
COMPONENT An6 = Spherical_Backscattering_Analyser_modify(
xmin=-0.43, xmax=0.43, ymin=0, ymax=0.98,
radius=2.5, Q = q_si111, mosaic=0.0, dspread=0.000186, R0=1, debug=0)
AT (0, 0, 0) RELATIVE An6_rot_axis2
GROUP ANALYZERS
COMPONENT An7 = Spherical_Backscattering_Analyser_modify(
xmin=-0.43, xmax=0.43, ymin=0, ymax=0.98,
radius=2.5, Q = q_si111, mosaic=0.0, dspread=0.000186, R0=1, debug=0)
AT (0, 0, 0) RELATIVE An7_rot_axis2
GROUP ANALYZERS
COMPONENT An8 = Spherical_Backscattering_Analyser_modify(
xmin=-0.43, xmax=0.43, ymin=0, ymax=0.98,
radius=2.5, Q = q_si111, mosaic=0.0, dspread=0.000186, R0=1, debug=0)
AT (0, 0, 0) RELATIVE An8_rot_axis2
GROUP ANALYZERS */
/*======== PSD Detector ========= */
/*
COMPONENT PSDcyl_2= Monitor_nD(yheight=0.4,radius=0.27,
options="theta bins=100 limits=[-20 180], y bins=201, incoming", filename="PSDcyl_1.dat", restore_neutron = 1)
AT (0,0.15,0) RELATIVE Sample */
/* ======== TOF-PSD Monitors ========= */
COMPONENT Sample_rot_axis_000=Arm()
AT (0,0,0) RELATIVE Sample
ROTATED (0,0,0) RELATIVE Sample
COMPONENT PSDTOF_000 = Monitor_nD(yheight=0.4, xwidth=0.012,
options="t limits=[0.14900 0.150800] bins=200, y bins=41, incoming", filename="TOF_PSD_000.dat", restore_neutron = 1)
AT (0,0.15,0.27) RELATIVE Sample_rot_axis_000
COMPONENT Sample_rot_axis_005=Arm()
AT (0,0,0) RELATIVE Sample
ROTATED (0,5,0) RELATIVE Sample
COMPONENT PSDTOF_005 = Monitor_nD(yheight=0.4, xwidth=0.012,
options="t limits=[0.14900 0.150800] bins=200, y bins=41, incoming", filename="TOF_PSD_005.dat", restore_neutron = 1)
AT (0,0.15,0.27) RELATIVE Sample_rot_axis_005
COMPONENT Sample_rot_axis_010=Arm()
AT (0,0,0) RELATIVE Sample
ROTATED (0,10,0) RELATIVE Sample
COMPONENT PSDTOF_010 = Monitor_nD(yheight=0.4, xwidth=0.012,
options="t limits=[0.14900 0.150800] bins=200, y bins=41, incoming", filename="TOF_PSD_010.dat", restore_neutron = 1)
AT (0,0.15,0.27) RELATIVE Sample_rot_axis_010
COMPONENT Sample_rot_axis_015=Arm()
AT (0,0,0) RELATIVE Sample
ROTATED (0,15,0) RELATIVE Sample
COMPONENT PSDTOF_015 = Monitor_nD(yheight=0.4, xwidth=0.012,
options="t limits=[0.14900 0.150800] bins=200, y bins=41, incoming", filename="TOF_PSD_015.dat", restore_neutron = 1)
AT (0,0.15,0.27) RELATIVE Sample_rot_axis_015
COMPONENT Sample_rot_axis_020=Arm()
AT (0,0,0) RELATIVE Sample
ROTATED (0,20,0) RELATIVE Sample
COMPONENT PSDTOF_020 = Monitor_nD(yheight=0.4, xwidth=0.012,
options="t limits=[0.14900 0.150800] bins=200, y bins=41, incoming", filename="TOF_PSD_020.dat", restore_neutron = 1)
AT (0,0.15,0.27) RELATIVE Sample_rot_axis_020
COMPONENT Sample_rot_axis_025=Arm()
AT (0,0,0) RELATIVE Sample
ROTATED (0,25,0) RELATIVE Sample
COMPONENT PSDTOF_025 = Monitor_nD(yheight=0.4, xwidth=0.012,
options="t limits=[0.14900 0.150800] bins=200, y bins=41, incoming", filename="TOF_PSD_025.dat", restore_neutron = 1)
AT (0,0.15,0.27) RELATIVE Sample_rot_axis_025
COMPONENT Sample_rot_axis_030=Arm()
AT (0,0,0) RELATIVE Sample
ROTATED (0,30,0) RELATIVE Sample
COMPONENT PSDTOF_030 = Monitor_nD(yheight=0.4, xwidth=0.012,
options="t limits=[0.14900 0.150800] bins=200, y bins=41, incoming", filename="TOF_PSD_030.dat", restore_neutron = 1)
AT (0,0.15,0.27) RELATIVE Sample_rot_axis_030
COMPONENT Sample_rot_axis_035=Arm()
AT (0,0,0) RELATIVE Sample
ROTATED (0,35,0) RELATIVE Sample
COMPONENT PSDTOF_035 = Monitor_nD(yheight=0.4, xwidth=0.012,
options="t limits=[0.14900 0.150800] bins=200, y bins=41, incoming", filename="TOF_PSD_035.dat", restore_neutron = 1)
AT (0,0.15,0.27) RELATIVE Sample_rot_axis_035
COMPONENT Sample_rot_axis_040=Arm()
AT (0,0,0) RELATIVE Sample
ROTATED (0,40,0) RELATIVE Sample
COMPONENT PSDTOF_040 = Monitor_nD(yheight=0.4, xwidth=0.012,
options="t limits=[0.14900 0.150800] bins=200, y bins=41, incoming", filename="TOF_PSD_040.dat", restore_neutron = 1)
AT (0,0.15,0.27) RELATIVE Sample_rot_axis_040
COMPONENT Sample_rot_axis_045=Arm()
AT (0,0,0) RELATIVE Sample
ROTATED (0,45,0) RELATIVE Sample
COMPONENT PSDTOF_045 = Monitor_nD(yheight=0.4, xwidth=0.012,
options="t limits=[0.14900 0.150800] bins=200, y bins=41, incoming", filename="TOF_PSD_045.dat", restore_neutron = 1)
AT (0,0.15,0.27) RELATIVE Sample_rot_axis_045
COMPONENT Sample_rot_axis_050=Arm()
AT (0,0,0) RELATIVE Sample
ROTATED (0,50,0) RELATIVE Sample
COMPONENT PSDTOF_050 = Monitor_nD(yheight=0.4, xwidth=0.012,
options="t limits=[0.14900 0.150800] bins=200, y bins=41, incoming", filename="TOF_PSD_050.dat", restore_neutron = 1)
AT (0,0.15,0.27) RELATIVE Sample_rot_axis_050
COMPONENT Sample_rot_axis_055=Arm()
AT (0,0,0) RELATIVE Sample
ROTATED (0,55,0) RELATIVE Sample
COMPONENT PSDTOF_055 = Monitor_nD(yheight=0.4, xwidth=0.012,
options="t limits=[0.14900 0.150800] bins=200, y bins=41, incoming", filename="TOF_PSD_055.dat", restore_neutron = 1)
AT (0,0.15,0.27) RELATIVE Sample_rot_axis_055
COMPONENT Sample_rot_axis_060=Arm()
AT (0,0,0) RELATIVE Sample
ROTATED (0,60,0) RELATIVE Sample
COMPONENT PSDTOF_060 = Monitor_nD(yheight=0.4, xwidth=0.012,
options="t limits=[0.14900 0.150800] bins=200, y bins=41, incoming", filename="TOF_PSD_060.dat", restore_neutron = 1)
AT (0,0.15,0.27) RELATIVE Sample_rot_axis_060
COMPONENT Sample_rot_axis_065=Arm()
AT (0,0,0) RELATIVE Sample
ROTATED (0,65,0) RELATIVE Sample
COMPONENT PSDTOF_065 = Monitor_nD(yheight=0.4, xwidth=0.012,
options="t limits=[0.14900 0.150800] bins=200, y bins=41, incoming", filename="TOF_PSD_065.dat", restore_neutron = 1)
AT (0,0.15,0.27) RELATIVE Sample_rot_axis_065
COMPONENT Sample_rot_axis_070=Arm()
AT (0,0,0) RELATIVE Sample
ROTATED (0,70,0) RELATIVE Sample
COMPONENT PSDTOF_070 = Monitor_nD(yheight=0.4, xwidth=0.012,
options="t limits=[0.14900 0.150800] bins=200, y bins=41, incoming", filename="TOF_PSD_070.dat", restore_neutron = 1)
AT (0,0.15,0.27) RELATIVE Sample_rot_axis_070
COMPONENT Sample_rot_axis_075=Arm()
AT (0,0,0) RELATIVE Sample
ROTATED (0,75,0) RELATIVE Sample
COMPONENT PSDTOF_075 = Monitor_nD(yheight=0.4, xwidth=0.012,
options="t limits=[0.14900 0.150800] bins=200, y bins=41, incoming", filename="TOF_PSD_075.dat", restore_neutron = 1)
AT (0,0.15,0.27) RELATIVE Sample_rot_axis_075
COMPONENT Sample_rot_axis_080=Arm()
AT (0,0,0) RELATIVE Sample
ROTATED (0,80,0) RELATIVE Sample
COMPONENT PSDTOF_080 = Monitor_nD(yheight=0.4, xwidth=0.012,
options="t limits=[0.14900 0.150800] bins=200, y bins=41, incoming", filename="TOF_PSD_080.dat", restore_neutron = 1)
AT (0,0.15,0.27) RELATIVE Sample_rot_axis_080
FINALLY
%{
%}
END