/**************************************HANARO-HRPD**************************** *%Description *The HANARO-HRPD installed at ST2 beam tube which has a 1.28e14 (n/cm2.s) at beam nose. *The Real (measured) flux at monochromator is 2.7e8 (n/cm2.s). *The Real (measured) flux at Sample table is around 1.3e6 (n/cm2.s) for 1.836 A wavelength. *The HANARO-HRPD consists four collimators ( inpile collimator + 3 outer collimators ) with (30', 10, 30', 10') divergence angles. *The monochromator has a large mosaic spread of 20', two-fold type crystals with two take off angles (Theta_M) to give four wavelengths as following: Ge 511 + Theta_M = 45 ---------> 1.539 A Ge 511 + Theta_M = 59 ---------> 1.866 A Ge 331 + Theta_M = 45 ---------> 1.836 A Ge 331 + Theta_M = 59 ---------> 2.224 A *The monochromator located at L0=6.06 m from the beam nose, where the sample table located at L1=3.0 m from the monochromator. NOTE: this code is only to investigate the magnitude of flux (n/cm2.s) at both; Monochromator and Sample position. NOTE2: in every section below you will find a short desription of components and their justified parameters as they are on ground*/ /*******************************************************************************************************************/ DEFINE INSTRUMENT HANARO_HRPD_1(I=1.28e14, Wlmin = 0.1 , Wlmax = 10 , Temp=37, Alpha0=30, Alpha1=10, Alpha2=30, Beta=20, Theta_M=45, Lambda = 1.836 , Reflectivity_M = 0.301, NV=9, NH=2, L0=6.06, L1= 3.0 ) DECLARE %{ double DM, L, RV; %} INITIALIZE %{ /* Calculation of the value of Lambda after Monochromator by diffraction */ DM= fabs(Lambda / sin(Theta_M*DEG2RAD)/2); /* ----calculation of the Monochromator's radius of curveture----- */ L= 1 / (1/L0+1/L1); RV=2*L*sin(Theta_M*DEG2RAD); %} TRACE COMPONENT origin = Progress_bar( ) AT (0, 0, 0) ABSOLUTE /* +++++++++++++++++++ Source +++++++++++++++++++*/ /* The source is a thermal maxwellian source with (0.07 x 0.12) m2 size focuses on the reactor wall opening of ( 0.056 x 0.12 ) m2 size at ( 3.54m ) distance */ /* NOTE: I use the ( lambda0 = Lambda, dlambda = 0.01*Lambda ) below as a method to examine the reflected wavelength and flux at sample position only, where I make it comment when I'm trying to examine the flux at Monochromator position*/ COMPONENT S = Source_Maxwell_3( yheight = 0.12, xwidth = 0.07, Lmax = Wlmax, Lmin = Wlmin, lambda0 = Lambda, dlambda = 0.01*Lambda, dist = 3.54 , focus_xw = 0.056, focus_yh = 0.12, T1 = Temp +273 , I1 =I/4/PI) AT (0, 0, 0) RELATIVE origin /* ++++++++++++++++ In-pile Collimator+++++++++++++++*/ /*NOTE: the in-pile collimator has the same dimension of the focusing window but it is located at 3.8 m from the beam nose with following characteristics*/ COMPONENT C0 = Collimator_linear( xmin = -0.028, xmax = 0.028, ymin = -0.06, ymax = 0.06, length = 0.40, divergence =Alpha0, transmission = 0.56) AT (0, 0,3.8) RELATIVE origin /* +++++++++++++++ First Collimator +++++++++++++++++*/ /*NOTE: The ( +-0.001 and +-0.014 ) to get the real beam size (as measured in HANARO) at Monochromator */ COMPONENT C1 = Collimator_linear( xmin = -0.02+0.001, xmax = 0.02-0.001, ymin = -0.1+0.014, ymax = 0.1-0.014, length = 0.350, divergence =Alpha1, transmission = 0.90) AT (0, 0, 4.916) RELATIVE origin /* +++++++++++++++ Monochromator++++++++++++++++ */ /* The monochromator is vertically focusing type of 120mm in width and 212mm in height located at 6.06 m from beam nose, It is (9 rows x 2 columns) of Ge crystals, each has (60mm in width x 20mm in height) */ /* It has a large mosaic spread of 20', two-fold type crystals with two take off angles (Theta_M) to give four wavelengths as following: Ge 511 + Theta_M = 45 ---------> 1.539 A Ge 511 + Theta_M = 59 ---------> 1.866 A Ge 331 + Theta_M = 45 ---------> 1.836 A Ge 331 + Theta_M = 59 ---------> 2.224 A */ /* The maximum reflectivity (r0) has been specified to be (r0= 0.301 for "Ge 331", and r0= 0.218 for "Ge 511" ) i.e (1.539 A and 1.834 A both have the same r0)*/ /*NOTE: eventhough I believe that r0 should be different for each wavelength but I inserted it as I they defined it in the HANARO_instrumentations documents */ /* NOTE2: I used a psd_monitor with a window size of (1cm x 1cm) in order to get the intensity measured by McStas in flux unit (n/cm2.s) */ COMPONENT Before_Mono = PSD_monitor( filename = "Before_Mono1.psd" , xwidth = 0.01, yheight = 0.01) AT (0, 0, L0) RELATIVE origin COMPONENT Mono_Arm_1 = Arm( ) AT (0, 0, L0) RELATIVE origin SPLIT 50 COMPONENT Mono = Monochromator_curved( width = 0.12, height = 0.212, zwidth = 0.06, yheight= 0.02, NH =NH, NV =NV, DM = DM, mosaich =Beta , mosaicv = Beta , RV = RV, verbose=1, order= 1, r0 = Reflectivity_M) AT (0, 0, 0) RELATIVE Mono_Arm_1 ROTATED (0, Theta_M, 0) RELATIVE Mono_Arm_1 COMPONENT Mono_Arm_2 = Arm( ) AT (0, 0, 0) RELATIVE Mono_Arm_1 ROTATED (0,2*Theta_M, 0) RELATIVE Mono_Arm_1 COMPONENT After_Mono = PSD_monitor( filename = "After_Mono1.psd", restore_neutron = 1, xwidth = 0.01, yheight = 0.01) AT (0, 0, 1) RELATIVE Mono_Arm_2 /*+++++++++++++++Second Collimator++++++++++++++++++*/ /* NOTE: The (+-0.003 and -+0.014 ) to get the real beam size (as measured in HANARO) at sample */ COMPONENT C2 = Collimator_linear( xmin = -0.0175+0.003, xmax = 0.0175-0.003, ymin = -0.075+0.014, ymax = 0.075-0.014, length = 0.350, divergence =Alpha2, transmission = 0.9) AT (0, 0, 0.865) RELATIVE Mono_Arm_2 /*+++++++++++++++ Sample Table ++++++++++++++ */ /* The sample table located at L1=3.0 m from the monochromator.*/ /* NOTE: I used a psd_monitor with a window size of (1cm x 1cm) in order to get the intensity measured by McStas in flux unit (n/cm2.s) */ COMPONENT Sample_Arm = Arm( ) AT (0, 0, L1) RELATIVE Mono_Arm_2 COMPONENT Before_Sa = PSD_monitor( filename = "Before_Sa1.psd", restore_neutron = 1, xwidth = 0.01, yheight = 0.01) AT (0, 0, 0) RELATIVE PREVIOUS COMPONENT Before_Sa_L = L_monitor( filename = "Before_Sa1.L", Lmin = Lambda - Lambda*0.009, Lmax = Lambda + Lambda*0.009 , restore_neutron = 1, xwidth = 0.01, yheight = 0.01) AT (0, 0, 0) RELATIVE PREVIOUS END