First tries using McStas

artus at obiwan.kri.physik.uni-muenchen.de artus at obiwan.kri.physik.uni-muenchen.de
Thu Nov 5 18:21:04 CET 1998


Dear Kristian,

in the last days since our return from Denmark I've installed your
program McStas on my machine here. Right now I'm trying to get my
first "instrument" running. I have some 'beginners problems' and now allow
myself to ask for help.
I wanted to simulate a simple straight neutron guide with m=2 for left 
and right faces and m=3 for top and bottom faces. But the component
Guide only allows one kind of coating. It is not quite clear to me
from the manual how to build such a guide out of four Mirror
components. The manual says that Mirrors can be used to assemble a
guide but it says also that a Mirror lies in the xy-plane. Wouldn't
one need Mirrors lying parallel to the z-axis to build a guide? May be 
the use of different coatings within the same guide can be implemented 
within the Guide component in some future release?

To make things easier I tried to set up the instrument with m=2 for
all faces. But trying to compile it with McStas ends with:

artus at obiwan:/home/artus/mcstas/resi1 > mcstas resi1.instr 
parse error, expecting `"AT"' at line 37.
Errors encountered during parse.
artus at obiwan:/home/artus/mcstas/resi1 > 

The AT is expected in the END line? 
I cannot find any error in resi1.instr:

DEFINE INSTRUMENT RESI1()

TRACE

COMPONENT a1 = Arm()
  AT (0,0,0) ABSOLUTE

COMPONENT source = Source_flat(
	radius = 0.050,
	dist = 2.000,
	xw = 0.020, yh = 0.060,
	E0 = 81.804,	/* = 1A*/
	dE = 1.0)	/* =0.99394A - 1.00617A 
  AT (0,0,0) RELATIVE a1

COMPONENT guide1 = Guide(
	w1 = 0.020
	h1 = 0.060
	w2 = 0.020
	h2 = 0.060
	l = 11.500
	R0 = 1.0
	Qc = 0.0214
	alpha = 5.617
	m = 2
	W = 0.0033)
  AT (0,0,2) RELATIVE a1 

COMPONENT mon = Monitor(
	xmin = -0.01,
	xmax = 0.01,
	ymin = -0.03,
	ymax = 0.03)
  AT (0,0,13.5) RELATIVE a1

END

What is wrong with the input file? The example files on the CD
unfortunately don't contain a Mirror or Guide component for
comparison.

Furthermore I've tried to use mcdisplay on the example files but this
also ends with an error:

artus at obiwan:/home/artus/mcstas/example > mcdisplay linup-1.instr 
Can't locate PGPLOT.pm in @INC (@INC contains: /usr/lib/perl5/i586-linux/5.00404 /usr/lib/perl5 /usr/lib/perl5/site_perl/i586-linux /usr/lib/perl5/site_perl .) at /usr/local/bin/mcdisplay line 6.
BEGIN failed--compilation aborted at /usr/local/bin/mcdisplay line 6.
artus at obiwan:/home/artus/mcstas/example > 

I have installed pgplot from the CD. The pgplot examples are running
and 

PGPLOT_DIR="/usr/local/pgplot/"; export PGPLOT_DIR
PGPLOT_DEV="/xwin"; export PGPLOT_DEV

is added to my .bashrc file.

I couldn't find the file PGPLOT.pm anywhere on the harddisk. I also
didn't find any information about this in the installation guidelines
of pgplot. What is wrong?

Thank you very much for your help and

best wishes from Garching,

Georg

*********************************************

Dr. Georg Artus
Technische Universität München
FRM-II Reaktorstation
D-85747 Garching

Tel: +49 (0)89/289-14018
Fax: +49 (0)89/289-12112
E-mail: gartus at ph.tum.de





More information about the mcstas-users mailing list