cylinder_intersect
Thomas Hansen
hansen at ill.fr
Thu Mar 11 14:02:44 CET 1999
>> As 'promised', I've got some trouble with mcstas, trying to put in the
>> powder1 sample. In fact, all incoming neutrons are absorbed by the
>> condition:
>> ...
>> if (cylinder_intersect(&t0, &t1, x, y, z, vx, vy, vz, radius, h))
>> {
>> printf("t0 %lf t1 %lf \n",t0, t1);
>> if (t0 < 0)
>> {
>> ABSORB;
>> }
>> ...
>> I checked the neutron parameters, and a typical neutron comes in with:
>> vx= 15 vy= -29 vz= 2903 m/s
>> x=-0.003 y=-0.014 z= 0.000 m
>> The sample is defined as
>> radius 0.020000 height 0.050000 m
>> And the routine cylinder_intersect gives finally
>> t0 -0.000007 t1 0.000007
>
>As you mention yourself, the problem is that the neutron is already in
>the middle of the sample (z=0) when the sample scattering is computed,
>so a negative flight time to the sample surface is computed. Since
>neutrons cannot pass backwards in time, McStas absorbs in this case (of
>course, it should really provide some warning about this condition; that
>will be in a later version).
>
>This kind of problem is usually caused by overlapping components. My
>guess is that you have some kind of monitor/detector at the same
>physical position as the sample, but before the sample in the logical
>ordering. Move the monitor 0.021 cm closer to the monochromator so that
>it does not overlap the sample, and I think the problem will be solved.
>
>Good luck with your simulations!
>
> - Kristian.
I am just comming into my office after having had some cross country skiing
with lots of snow but spring temperatures ... thanks for your quick answer,
in fact, I actually have had, as you may see, a monitor of sample cross
section in order to get the flux at sample position - that explains the
negative time.
...
COMPONENT mon7 = L_monitor(xmin = Sample_xmin, xmax = Sample_xmax,
ymin = Sample_ymin, ymax = Sample_ymax, Lmin = Monit_Lmin,
Lmax = Monit_Lmax,
nchan = Monit_ncan, filename="sim/mon7.dat", columns=Monit_columns)
AT (0, 0, 3.2) RELATIVE beta
COMPONENT sample = Powder0 (d_phi0 = d_phi0, radius = Sample_r, h = Sample_h,
pack = 1, Vc=100, sigma_a = 0, q = HOPG_Q, j = 1, F2 = 1, DW = 1,
target_x = 0, target_y = 0, target_z = 1)
AT (0,0,3.200) RELATIVE beta
...
Ian Anderson encouraged us to comment the necessarity of instrument
simulations, the usefullness of McStas in special and to suggest further
steps. I will do so soon as I have now some - in spite of difficulties
mostly good - experiences and a lot of suggestions - which might make you
working hard, if you take everything serious ...
Bye,
Thomas
________________________________________________________________________
Dr.Thomas HANSEN, Science/Diffrac/D20, Institut Laue-Langevin (ILL4-100)
BP 156, 38042 GRENOBLE Cedex 9, FRANCE, hansen at ill.fr, http://www.ill.fr
Phone (+33/0)4.76.20-70.44 Fax:(~)4.76.48.39.06 Home:(~)4.76.18.05.53
More information about the mcstas-users
mailing list