Bender from Phillip Bernhard
Kim Lefmann
kim.lefmann at risoe.dk
Fri Mar 23 12:35:44 CET 2001
Date: Fri, 23 Mar 2001 11:33:06 +0100 (MET)
From: Philipp Bernhardt <bernhard at amos.krist.uni-erlangen.de>
Subject: Re: Bender.comp ...
In-reply-to: <3AB870E5.116C476E at dxray.mpi-stuttgart.mpg.de>
To: neutron-mc at risoe.dk
Message-id:
<Pine.HPP.3.96.1010323100107.6544A-100000 at amos.krist.uni-erlangen.de>
MIME-version: 1.0
Content-type: TEXT/PLAIN; charset=US-ASCII
Hi everybody,
I just want to answer to the question of Ulrich about the new versions of
the Bender (22 Feb 1999). I am sorry that there was still the old version
(7 Feb 1999) in the mcstas archive.
The small bug is not easy to see. The problem is that in the old version
one variable was not initiated by 0.0 as it should be.
If your compiler does this automatically for you, everything is fine. If
not, you
will see differences, whenever neutrons are absorbed on the top and
the bottom side caused by too big divergence (argument of the
tanh-function bigger than 10 like the standard guide component).
Then all following neutrons, which Q-value is smaller than Qcs will also
be absorbed in the old version, which is the bug.
I have added an example file, where you should see diverences, when your
compiler does not automatically initiate double variables.
DEFINE INSTRUMENT BEND()
TRACE
COMPONENT a1 = Arm()
AT (0,0,0) ABSOLUTE
COMPONENT source = Source_div(
width=0.05, height=0.12,
hdiv=1.0, vdiv=0.5,
E0=5.0,dE=1.0)
AT (0,0,0) RELATIVE a1
COMPONENT ben=Bender(
w=0.06, h=0.12, r=500.0, d=0.0, Win=0.03, k=1,
R0a=1.0, Qca=0.02, alphaa=1.0, ma=1, Wa=0.000001,
R0i=1.0, Qci=0.02, alphai=1.0, mi=1, Wi=0.000001,
R0s=1.0, Qcs=0.02, alphas=1.0, ms=1, Ws=0.000001)
AT(0, 0, 0) RELATIVE a1
COMPONENT mon=Monitor(
xmin=-0.03, xmax=0.03,ymin=-0.06,ymax=0.06)
AT(0,0,15.01) RELATIVE a1
END
I hope I could help
Philipp Bernhardt
More information about the mcstas-users
mailing list