1 / 13

Peter Willendrup, Kim Lefmann

Peter Willendrup, Kim Lefmann. A short introduction to. 1. Peter Willendrup, Kim Lefmann (RISØ) A gentle instroduction to McStas. McStas What is it? What is it good for? How is it done? Use? Tutorial examples. Agenda. 2.

Download Presentation

Peter Willendrup, Kim Lefmann

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Peter Willendrup, Kim Lefmann A short introduction to 1 Peter Willendrup, Kim Lefmann (RISØ) A gentle instroduction to McStas

  2. McStas What is it? What is it good for? How is it done? Use? Tutorial examples Agenda 2 Peter Willendrup, Kim Lefmann (RISØ) A gentle instroduction to McStas

  3. What is it? • Flexible, general simulation utility for neutron scattering experiments. • Originally designed for Monte Carlo Simulation of triple axis spectrometers • Developed at • RISØ National Laboratory, Roskilde, Denmark – primary (2 people) • ILL (Institute Laue Langevin), Grenoble, France – primary (2 people) • Apx. 100+ users worldwide, some making contributions • Original developer/maintainer Kristian Nielsen (KU), MSc Computer Science and Physics 3 Peter Willendrup, Kim Lefmann (RISØ) A gentle instroduction to McStas

  4. What is it good for? • Instrumentation • Planning • Optimization • Data analysis • “I am seeing this strange effect, could it be due to....” • “Toy” spectrometer for students and novice users 4 Peter Willendrup, Kim Lefmann (RISØ) A gentle instroduction to McStas

  5. Three levels of source code: Instrument file (All users) Component files (Some users) ANSI c code (no users) How is it done? 5 Peter Willendrup, Kim Lefmann (RISØ) A gentle instroduction to McStas

  6. How is it done? Instrument file: 6 Peter Willendrup, Kim Lefmann (RISØ) A gentle instroduction to McStas

  7. How is it done? Component file: 7 Peter Willendrup, Kim Lefmann (RISØ) A gentle instroduction to McStas

  8. How is it done? Resulting ANSI-C file: McStas is a (pre)compiler! Input is .comp and .instr files + runtime functions for e.g. random numbers Output is a single c-file, which can be compiled using e.g. gcc. Can take input arguments if needed. 8 Peter Willendrup, Kim Lefmann (RISØ) A gentle instroduction to McStas

  9. How about the neutron? • Neutrons in McStas are neutron 'rays' or 'packages', representing a large number of neutrons emitted by the source (Initial Monte Carlo weight). • Each As the neutron package carries the physical properties, reflecting interaction with components in the instrument Spatial coordinates: x,y,z Velocity components:vx,,vy,vz Time: t Spin components: sx,sy,sz Monte Carlo weight: p • As physics take place, e.g. scattering in a sample or reflection on a monochromator, the weight is adjusted accordingly (taking local probabilities in the component into account). • Coordinate systems: Global and local Global: Normally, neutrons originate at the origin... ;-) z axis is initial travelling dirction, y is gravitational axis Local: z axis is directed towards the 'next' component • Focusing: Monte Carlo 'trick' to not spend time on 'useless' neutrons, e.g. send all neutrons in the direction that we are interested in, adjusting the weight accordingly... 9 Peter Willendrup, Kim Lefmann (RISØ) A gentle instroduction to McStas

  10. Use? 10 Peter Willendrup, Kim Lefmann (RISØ) A gentle instroduction to McStas

  11. Use? Detectors Detector data Neutron source 11 Peter Willendrup, Kim Lefmann (RISØ) A gentle instroduction to McStas

  12. Use? 12 Peter Willendrup, Kim Lefmann (RISØ) A gentle instroduction to McStas

  13. Let's go through the tutorial... McStas crash course, 2 independent sessions on sept 14th/15th @ILL 6 registrees for session 1 – Still room for more people 5 registrees for session 2 – Still room for more people -> If you are interested in attending, please come see us, a maximum of 12 people pr. session can attend. Lets go :-) ? 13 Peter Willendrup, Kim Lefmann (RISØ) A gentle instroduction to McStas

More Related