[mcstas-users] Too low I and N on detector

wokaoyan1981 wokaoyan1981 at 126.com
Thu Jul 24 12:57:03 CEST 2008


Hello colleagues,

   I've set up a residual stress instrument.The simulation result suggests(Neutron count=109): Neutrons after Fe(211) diffraction are I I_err N=[29927.1 31233.5 3];And neutrons reaching the detector through aperture are I I_err N=[0 0 0]. Both I and N are too low.
   I raised horizontal divergences of the first and second collimator but I and N remain too low. What should I do in order to get high I and N on detector?
   
   Here is the code:
/*******************************************************************************
*         McStas instrument definition URL=http://www.mcstas.org
*
* Instrument: residual stress instrument 
*
* %Identification
* Written by: Tom
* Date:10 Jan 2008
* Origin: institute
* Release: McStas 1.6
* Version: 0.2
* %INSTRUMENT_SITE:thesis
*
* residual stress instrument 
*
* %Description
* try to optimize parameters of residual stress instrument. default geometry is 
* from blueprints of residual stress instruments at CARR,FRM-II(Germany),E3* (Germany) * and SALSA(France) 
* Example: mcrun residual_stress.instr <RV=-1>
*
* %Parameters
* dist:       [m]    focusing distance from source to SlitIn
* GapM2_G:    [m]    distance between M2Exit and guide entrance
* xw:         [m]    width of neutron guide entrance
* yh:         [m]    height of neutron guide entrance
* l:          [m]    length of straight neutron guide
* m:          [1]    m-value of material1.5~3
* CH1:        [']    horizontal divergence of the first collimator
* len_C1      [m]    length of the first collimator
* L1:         [m]    distance between exit of first collimator and     
*                    monochromator,0.01~0.3m
* A1:         [deg]  rotation of mono
* DM:         [Angs] d-spacing of monochromator
* NH:         [columns]   number of slabs horizontal 
* NV:         [rows]   number of slabs vertical 
* mosaich:   [']    Horisontal mosaic FWHM 
* mosaicv:    [']    Vertical mosaic FWHM 
* RV:         [m]    Monochromator vertical curvature, 0 for flat, -1 for automatic
*                    setting(then RV=2*L2*sin(DEG2RAD*A1) )
* RH:         [m]    Monochromator horizontal curvature, 0 for flat, -1 for automatic
*                    setting(then  RH = 2*L2/sin(DEG2RAD*A1))
* L2:         [m]    distance between monochromator and sample,1.9~2.2
* CH2:        [']    horizontal divergence of the second collimator
* DS:         [Angs] d-spacing of sample:default Fe(hkl) 
* L3:         [m]    distance between sample and detector   
* %Link
* A reference/HTML link for more information
*
* %End
*******************************************************************************/
/* Change name of instrument and input parameters with default values */
DEFINE INSTRUMENT residual_stress(
   dist=2, GapM2_G=0, xw=0.06, yh=0.11, l=6, m=2, CH1=10,
   L1=0.3, A1=45, DM=1.0886, len_C1=0.6, NH=1, NV=15, mosaich=30,mosaicv=30,
   RV=-1, RH=0, L2=1.9,CH2=30,DS=1.1782,L3=1.0) 
/* The DECLARE section allows us to declare variables or  small      */
/* functions in C syntax. These may be used in the whole instrument. */

DECLARE
%{
double M2Exit_mono; /* distance between M2Exit and monochromator */
double lambda; /*wavelength after diffraction*/
double monow; /*width of mono*/ 
double A2;  /*half of sample take off angle*/
%}

/* The INITIALIZE section is executed when the simulation starts     */
/* (C code). You may use them as component parameter values.         */
INITIALIZE
%{
M2Exit_mono=GapM2_G+l+len_C1+L1;
lambda=2*DM*sin(DEG2RAD*A1);
if (RV<0) RV=2*L2*sin(DEG2RAD*A1);
if (RH<0) RH = 2*L2/sin(DEG2RAD*A1);
monow=xw/sin(DEG2RAD*A1);
A2=asin(lambda/(2*DS))*RAD2DEG;
printf("\nlambda=%f\tRV=%f\tRH=%f\tmonow=%f\tA2=%f\n",lambda,RV,RH,monow,A2); 
%}

/* Here comes the TRACE section, where the actual      */
/* instrument is defined as a sequence of components.  */
TRACE
/* Progress_bar is an Arm displaying simulation progress.*/
COMPONENT Origin = Progress_bar()
  AT (0,0,0) ABSOLUTE

/********************* neutron source********************************/
COMPONENT Source = Source_Maxwell_3(
    height = 0.75, width =0.52988 , 
    l_low =0.2,l_high =7,               
    dist = dist,                         
    xw = 0.06, yh = 0.11,
    T1 = 320,I1 =9.87E12) 
   AT (0, 0, 0)  RELATIVE Origin

/************channel(Al and Fe) inside reactor, length:4.049m**********/
COMPONENT SlitIn = Slit(
    width = 0.06, height = 0.11)
  AT (0, 0, 0 ) RELATIVE  Source

COMPONENT M2Exit = Slit(
    width = 0.06, height = 0.11)
  AT (0, 0, 4.049 ) RELATIVE SlitIn 


 /*************************straight_guide*******************/
COMPONENT straight_guide = Guide(
    w1 = xw, h1 = yh, w2 = xw, h2 = yh, l =l, m = m)
  AT (0, 0, GapM2_G) RELATIVE M2Exit


/**************************first collimator**************************/
COMPONENT collimator1 = Collimator_linear(
    xmin = -xw/2, xmax = xw/2, ymin = -yh/2, ymax = yh/2,
    len = len_C1, divergence = CH1)
  AT (0, 0, l) RELATIVE straight_guide


/*************************mono_craddle***************************/
COMPONENT mono_craddle = Arm(
    )
  AT (0, 0, M2Exit_mono) RELATIVE M2Exit
  ROTATED (0, A1, 0) RELATIVE Origin

/***************************monochromator Ge(511)****************************/
COMPONENT monochromator = Monochromator_curved(
    width=monow, height=0.15, NH=NH, NV=NV,reflect = "0", transmit = "0",
    gap = 0.0005,  mosaich = mosaich, mosaicv = mosaicv, r0 = 0.7, 
    t0 = 1.0, RV = RV, RH = RH, DM = DM)
  AT (0, 0, 0) RELATIVE mono_craddle

/*********************mono_out*******************/
COMPONENT mono_out = Arm(
    )
  AT (0, 0, 0) RELATIVE mono_craddle
  ROTATED (0, 2*A1, 0) RELATIVE Origin

/********************detectors before second collimator**************************/
COMPONENT LDbeforeC2 = L_monitor(
    nchan = 200, filename = "LDbeforeC2", xwidth = 0.15,
    yheight = 0.15, Lmin = 0, Lmax = lambda+0.1)
  AT (0, 0, 0.8) RELATIVE mono_out

COMPONENT PSDbeforeC2 = PSD_monitor(
    filename = "PSDbeforeC2", xwidth = 0.15, yheight = 0.15)
  AT (0, 0, 0.8) RELATIVE mono_out

/***********************second collimator***************************/
 COMPONENT collimator2 = Collimator_linear(
    xmin = -xw/2, xmax = xw/2, ymin = -yh/2, ymax = yh/2, len = 0.4,
    divergence = CH2)
 AT (0, 0, 0.8) RELATIVE mono_out

/**********************detector after second collimator********************/
COMPONENT PSDafterC2 = PSD_monitor(
    filename = "PSDafterC2", xwidth = 0.06, yheight = 0.11)
  AT (0, 0, 0.4) RELATIVE collimator2


/**********************aperture before sample*************************/
 COMPONENT slit_before = Slit(
     width = 0.008, height = 0.008)
   AT (0, 0, 1.88) RELATIVE mono_out

/**********************detector behind Slit_before***********************/
COMPONENT PSDafterSlit_before = PSD_monitor(
    filename = "PSDafterSlit_before", xwidth = 0.01, yheight = 0.01)
  AT (0, 0, 0.01) RELATIVE slit_before


/************************Fe(221) sample****************************/
COMPONENT Sample = PowderN(
    reflections = "Fe.laz", radius = 0.004, yheight = 0.8)
  AT (0, 0, L2) RELATIVE mono_out
EXTEND
%{
if(!SCATTERED) ABSORB;          /*perfect beamstop*/
%}

/************************sample_out************************/
COMPONENT sample_out = Arm(
   )
  AT (0, 0, 0) RELATIVE Sample
  ROTATED (0, -2*A2, 0) RELATIVE Sample

/************************detector before slit_after********************/
COMPONENT PSDbeforeSlit_after = PSD_monitor(
    filename = "PSDbeforeSlit_after", xwidth = 0.008,
    yheight = 0.050)
  AT (0, 0, 0.01) RELATIVE sample_out

/************************aperture after sample***************************/
COMPONENT slit_after = Slit(
    width = 0.008, height = 0.050)
 AT (0, 0, 0.02) RELATIVE sample_out

/************************detector*********************************/
COMPONENT PSDafterSample = PSDlin_monitor(
    nx = 200, filename = "PSDafterSample", xwidth = 0.2,
    yheight = 0.2)
  AT (0, 0, L3) RELATIVE sample_out

 
/* This section is executed when the simulation ends (C code). Other    */
/* optional sections are : SAVE                                         */
FINALLY
%{
%}
/* The END token marks the instrument definition end */
END

Regards,
Tom


   
 

 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman2.mcstas.org/pipermail/mcstas-users/attachments/20080724/d8eccd18/attachment.html>
-------------- next part --------------
_______________________________________________
mcstas-users mailing list
mcstas-users at mcstas.org
http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users


More information about the mcstas-users mailing list