[mcstas-users] abnormal result of virtual experiment

Peter Kjær Willendrup pkwi at fysik.dtu.dk
Tue Jun 30 10:18:31 CEST 2015

Dear Tom,

I am currently on paternity leave - i.e. not at work until mid-august.

Hence I only have very little time to devote to your issue. I hope other users or someone else from the McStas team may pick up on this later.

I have no ready-made solution for you, but having had a short look at your instrument files, I am puzzled by a number of things:

1) I see no reason to split the simulation in two. More statistics will not help a lot if you are “asking the wrong question” from your simulation. Especially using nrepeat this way will bias your results a lot - and may lead your simulation to give unphysical results!

2) To effectively use a ‘concentric’ arrangement, the components on the ‘incoming’ side must have a reasonable value of the ’tfrac’ parameter (called p_transmit in later versions of McStas) - this controls the fraction of the incoming statistics to describe an ‘attenuated direct beam’, i.e. what statistics will reach the ‘inner’ components. Your simulation leaves this parameter at the default, i.e. 10% only of the incoming beam - which is then multiplied further down as you enter further into the ‘assembly’.

3) Your ‘sample’ is VERY big - probably you are trying to describe some big mechanical device being mounted on your stress-rig? This is clearly not what ‘concentric components’ was designed for, even though it could maybe work… ‘Concentric components’ is much more aimed at investigating effects of multiple scattering back and forth between a more classically-sized sample and its container, i.e. a compact geometry. I would therefore suggest that you instead try something like what you see below - but with thin slabs of material at the front and slab at the back. PowderN distributes scattering evenly over the cross-section of the beam with the sample geometry.

double samplechoice;

COMPONENT SampleChoice = Arm(
AT (somewhere)
// Sample A or B?
samplechoice = rand01();

COMPONENT SampleA = PowderN(some parameterset)
WHEN (samplechoice<0.5) AT (somewhere)

COMPONENT SampleB = PowderN(some other parameterset)
WHEN (samplechoice>=0.5) AT (somewhere else)

Hope this helps a little - and that someone else may have other suggestions for you also.



Peter Kjær Willendrup
Senior Research Engineer, Special Advisor

DTU Physics

Technical University of Denmark

[cid:image002.gif at 01CCCAF1.5E6331F0]

Department of Physics

Building 307

DK-2800 Kongens Lyngby

Direct +45 2125 4612

Mobil +45 2125 4612
Fax +45 4593 2399

pkwi at fysik.dtu.dk<mailto:pkwi at fysik.dtu.dk>

On 25 Jun 2015, at 05:04 , 陈彦舟 <wokaoyan1981 at 126.com<mailto:wokaoyan1981 at 126.com>> wrote:

Hi all,
I’ve conducted a virtual experiment of residual stress neutron diffractometer by McStas 1.12c. The sample is shell-like: the outermost material is Al with 6mm thickness , the middle is Fe with 3mm thickness, and the innermost is
solid cylinder of Al. In order to save simulation time for different sample sets, the code has been split into two
parts. Ncount for part 1 is 10E9 and nrepeat for part 2 is 10E4.The simulation result, however, seems abnormal. The
 intensity detected by final PSD is about 22205.9 n/s with no beam spot found(see figure below)! In the case of
ignoring the outermost Al shell, the intensity is around several hundreds with normal beam spot. So I doubt whether
McStas could deal with more than 2 shells samples.

I have already attached the two parts of code in enclosure, and will anybody kindly take a few minutes to review them
 and give a solution to this problem? I am looking forward to your reply. Thank you!
Sincerely yours,

Mysource.dat<http://fs.163.com/fs/display/?p=X-NETEASE-HUGE-ATTACHMENT&file=wTI4018NZUW2vElD2_FjreMxu4oK4b69m7cOyYUT34HWJeKdASqfLKiIFl9aRpI89nWJI-w2W8jfVSlI4OXWWw&title=abnormal%20result%20of%20virtual%20experiment> (34.94M, 2015年7月25日 10:59 到期)
part1.instr<http://fs.163.com/fs/display/?p=X-NETEASE-HUGE-ATTACHMENT&file=wTI4018NZUW2vElD2_FjreMxu4oK4b69m7cOyYUT34GoU4rCuT8loPstuVz7lDTBcYWOiRVjyaL42spMYDvB3A&title=abnormal%20result%20of%20virtual%20experiment> (4.65K, 2015年7月25日 11:00 到期)
part2.instr<http://fs.163.com/fs/display/?p=X-NETEASE-HUGE-ATTACHMENT&file=wTI4018NZUW2vElD2_FjreMxu4oK4b69m7cOyYUT34Hk6dEvEafDmHUDHLY8AoputzaWbBObH5v10H7bZz5MTg&title=abnormal%20result%20of%20virtual%20experiment> (5.28K, 2015年7月25日 11:00 到期)

mcstas-users mailing list
mcstas-users at mcstas.org<mailto:mcstas-users at mcstas.org>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman2.mcstas.org/pipermail/mcstas-users/attachments/20150630/e5ae7bd5/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 58 bytes
Desc: image001.gif
URL: <http://mailman2.mcstas.org/pipermail/mcstas-users/attachments/20150630/e5ae7bd5/attachment.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.gif
Type: image/gif
Size: 1055 bytes
Desc: image002.gif
URL: <http://mailman2.mcstas.org/pipermail/mcstas-users/attachments/20150630/e5ae7bd5/attachment-0001.gif>

More information about the mcstas-users mailing list