[mcstas-users] Using Virtual_output Component

Granroth, Garrett E. granrothge at ornl.gov
Mon Jan 23 17:38:57 CET 2012


Hi Heloisa,
I have found the SPLIT keyword is easier to use and prefer this to the virtual source.  Nevertheless for a chopper spectrometer the Virtual_ouput and Virtual_input can make a huge help in efficiency.
for simulations where the incident configuration is identical.

I have only used  the Virtual input and output effectively once in 2010 as a proof of principal so I am far from an expert, but this is what worked for me.

I used the binary format, my virtual source was located just before the sample position on a direct geometry spectrometer.  So the distribution on the virtual_output  was well localized in time and space.

My output command looked similar to yours.


Best,

Garrett



On Jan 22, 2012, at 6:07 AM, Peter Kjær Willendrup wrote:

Dear Heloisa, Ruep,


On Jan 20, 2012, at 5:19 PM, Heloisa N. Bordallo wrote:

I have optimized my chopper and guide system, and now I am trying to use the Virtual_output Component. However I can only use a neutron count of 100000000 to perform my simulation in this way, if I try to send more I get the message : Job exited abnormally.

Doe it happen because the file I am trying to create is just huge?

This sounds a little strange, could you try sending me the complete output of your simulation, e.g. File -> Save output/Log file from mcgui?

By the way, what exactly do you mean by "huge"? Generally speaking, "some million events" in the output file should be enough as a starting point?

Then, what is the best way to use such a component?

At the moment I have it as:

COMPONENT fichier_sortie = Virtual_output(
   file = "exit_guide_result.dat", type = "double")
 AT (0, 0, 1e-4) RELATIVE PREVIOUS

I have generally only used the default "text" format with Virtual_output, but this of course does not help in regard to getting smaller output files…

Are you aware that an input file can be repeated a number of times in Virtual_input? The repeat_count is used for that, and your resulting --ncount will be repeat_count * number of events in the file. To be specific, use a "big" --ncount in the second part of the simulation, and perhaps define an input parameter Rep which is used as repeat_count on the Virtual_input source.

Also how can I be sure I get the right intensity distribution? By the way I am using the SNS_source.component as input, and I would like to preserve the ToF-lambda distribution, once using the file = "exit_guide_result.dat" as input file for the Virtual_input Component.

As long as you "use all events" from the file an integer number of times, any aspect of the neutron event distribution is preserved.

An alternative to using Virtual_input / Virtual_output is the use of the SPLIT keyword, see the manual and the "advanced McStas course" in Copenhagen on wednesday. :)


Cheers,

Peter


Technical University of Denmark



<image002.gif>


Department of Physics
DTU

Frederiksborgvej 399

Building 229

DK-4000  Roskilde

Direct +45 4677 5862

Mobil +45 2125 4612
Fax +45 4677 5758


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

_______________________________________________
mcstas-users mailing list
mcstas-users at mcstas.org<mailto:mcstas-users at mcstas.org>
http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users

Garrett E. Granroth
SEQUOIA Lead Instrument Scientist
Neutron Scattering Sciences Division
Oak Ridge National Laboratory
P.O. Box 2008 MS 6475
Oak Ridge TN 37831
Tel: 865-805-0631
Fax: 865-574-6080
email:granrothge at ornl.gov





More information about the mcstas-users mailing list