Kim lefmann peter willendrup
This presentation is the property of its rightful owner.
Sponsored Links
1 / 21

Kim Lefmann, Peter Willendrup PowerPoint PPT Presentation


  • 48 Views
  • Uploaded on
  • Presentation posted in: General

Kim Lefmann, Peter Willendrup. An introdution to. McStas. n. McStas introduction. Flexible, general simulation utility for neutron scattering experiments. Original design for M onte c arlo S imulation of t riple a xis s pectrometers Developed at RISØ DTU and ILL, Grenoble.

Download Presentation

Kim Lefmann, Peter Willendrup

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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Kim lefmann peter willendrup

Kim Lefmann, Peter Willendrup

An introdution to


Kim lefmann peter willendrup

McStas

n

McStas introduction

  • Flexible, general simulation utility for neutron scattering experiments.

  • Original design for Monte carlo Simulation of triple axis spectrometers

  • Developed at RISØ DTU and ILL, Grenoble.

GNU GPL license

Open Source

  • V. 1.0 by K Nielsen & K Lefmann (1998)‏

  • Currently 2.5+1 people full time plus students

Project website at

http://www.mcstas.org

[email protected] mailinglist


Kim lefmann peter willendrup

McStas

n

McStas introduction


Kim lefmann peter willendrup

McStas

n

What is McStas used for?

  • Instrumentation

    • Planning

    • Construction

  • Virtual experiments

    • Data analysis

  • Teaching


Kim lefmann peter willendrup

McStas

n

What is McStas used for?

  • Instrumentation

    • Planning

    • Construction

  • Virtual experiments

    • Data analysis

  • Teaching


Kim lefmann peter willendrup

McStas

n

Simulated

What is McStas used for?

  • Instrumentation

    • Planning

    • Construction

  • Virtual experiments

    • Data analysis

  • Teaching

Real data


Kim lefmann peter willendrup

McStas

n

What is McStas used for?

  • Instrumentation

    • Planning

    • Construction

  • Virtual experiments

    • Data analysis

  • Teaching


Kim lefmann peter willendrup

McStas

n

What is McStas used for?

  • Instrumentation

    • Planning

    • Construction

  • Virtual experiments

    • Data analysis

  • Teaching

(KU 2005-2007)‏


Kim lefmann peter willendrup

McStas

n

What is McStas used for?

  • Instrumentation

    • Planning

    • Construction

  • Virtual experiments

    • Data analysis

  • Teaching

(KU 2005-2007)‏


Kim lefmann peter willendrup

McStas

n

What is McStas used for?

  • Instrumentation

    • Planning

    • Construction

  • Virtual experiments

    • Data analysis

  • Teaching

(KU 2005-2007)‏


Kim lefmann peter willendrup

McStas

n

McStas neutron rays

Neutron ray/package:

Weight (p): # neutrons (left) in the package

Coordinates (x,y,z)‏

Velocity (vx,vy,vz)‏

Spin (sx,sy,sz)‏


Kim lefmann peter willendrup

McStas

n

McStas components

Components: Here the neutron physics happen, neutron weight adjusted according to scattering probabilities etc.


Kim lefmann peter willendrup

McStas

n

McStas instrument

Instrument: positioning + transformation between sequential component coordinate systems, e.g. neutron source, crystal, detector.


Kim lefmann peter willendrup

McStas

n

McStas instrument


Kim lefmann peter willendrup

Portable code (Unix/Linux/Mac/Win32)‏

Write in (simple) 'instrument' language

'Component' files (~100) inserted from library

Sources, optics, samples, monitors

If needed, write your own components

GUI / commandline functionality

Tools for plotting and datahandling included

McStas

n

McStas overview


Short mcstas introduction

Short McStas introduction

n

McStas


Kim lefmann peter willendrup

Three levels of source code:

Instrument file (All users)‏

Component files (Some users)‏

ANSI c code (no users)‏

McStas

n

How is it done?


Kim lefmann peter willendrup

McStas

n

Instrument file

Instrument file:

Written by you!


Kim lefmann peter willendrup

McStas

n

Component file

Component file:

Written by developers

and possibly you!


Kim lefmann peter willendrup

McStas

n

Generated c-code

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.

Written by mcstas!


Kim lefmann peter willendrup

McStas

n

Demo time!

Let's see it run!


  • Login