Neutron Acceptance Diagram Shading Phil Bentley ILL Monday, 17 - - PowerPoint PPT Presentation

neutron acceptance diagram shading
SMART_READER_LITE
LIVE PREVIEW

Neutron Acceptance Diagram Shading Phil Bentley ILL Monday, 17 - - PowerPoint PPT Presentation

Neutron Acceptance Diagram Shading Phil Bentley ILL Monday, 17 August 2009 Why? New problems in optics Nature has solved such often involve optimisation problems optimisation in many- already dimensional parameter spaces May


slide-1
SLIDE 1

Neutron Acceptance Diagram Shading

Phil Bentley ILL

Monday, 17 August 2009

slide-2
SLIDE 2

Why?

  • New problems in optics
  • ften involve
  • ptimisation in many-

dimensional parameter spaces

  • May have lots of local
  • ptima
  • Analytical solutions

might not exist

  • Nature has solved such
  • ptimisation problems

already

Monday, 17 August 2009

slide-3
SLIDE 3

Why?

  • Particle swarms / genetic

algorithms need 100 iterations or more to converge

  • Each iteration evaluates

30-50 agents

  • Therefore, 3000

simulations minimum

  • Either use a cluster or

something other than Monte-Carlo

Monday, 17 August 2009

slide-4
SLIDE 4
  • Complex geometry with

many coupled parameters

  • SPAN-cryopad
  • multi-channel guides IN5
  • WASP
  • TYREX 3He polariser

(new model)

A.I. Works Well

Monday, 17 August 2009

slide-5
SLIDE 5
  • Complex geometry with

many coupled parameters

  • SPAN-cryopad
  • multi-channel guides IN5
  • WASP
  • TYREX 3He polariser

(new model)

A.I. Works Well

Monday, 17 August 2009

slide-6
SLIDE 6
  • Complex geometry with

many coupled parameters

  • SPAN-cryopad
  • multi-channel guides IN5
  • WASP
  • TYREX 3He polariser

(new model)

A.I. Works Well

Monday, 17 August 2009

slide-7
SLIDE 7
  • Complex geometry with

many coupled parameters

  • SPAN-cryopad
  • multi-channel guides IN5
  • WASP
  • TYREX 3He polariser

(new model)

A.I. Works Well

Monday, 17 August 2009

slide-8
SLIDE 8

Full Optimisations

  • Simulate the instrument

all the way from moderator to detector

  • All parameters free
  • Don’t care if parameters

are strongly coupled

  • Parameter limit: >47 but

<650 with canonical algorithms

Monday, 17 August 2009

slide-9
SLIDE 9

SANS on D22

  • 100 000 000 trajectories entering the guide
  • 666 seconds CPU time (11 minutes) => 74

trajectories hit the sample

  • Statistical error = 12%
  • 1% error needs 25 hours
  • Optimisation of D22: 8-25 years (1 cpu)

Monday, 17 August 2009

slide-10
SLIDE 10

SANS on D22

  • 100 000 000 trajectories entering the guide
  • 666 seconds CPU time (11 minutes) => 74

trajectories hit the sample

  • Statistical error = 12%
  • 1% error needs 25 hours
  • Optimisation of D22: 8-25 years (1 cpu)

Monday, 17 August 2009

slide-11
SLIDE 11

SANS on D22

  • 100 000 000 trajectories entering the guide
  • 666 seconds CPU time (11 minutes) => 74

trajectories hit the sample

  • Statistical error = 12%
  • 1% error needs 25 hours
  • Optimisation of D22: 8-25 years (1 cpu)

< 1 minute

Monday, 17 August 2009

slide-12
SLIDE 12

SANS on D22

  • 100 000 000 trajectories entering the guide
  • 666 seconds CPU time (11 minutes) => 74

trajectories hit the sample

  • Statistical error = 12%
  • 1% error needs 25 hours
  • Optimisation of D22: 8-25 years (1 cpu)

< 1 minute < ~1 week

Monday, 17 August 2009

slide-13
SLIDE 13

nads Speed Gain

1.5 x

http://flickr.com/photos/17393884@N00/5341048/ Flickr http://www.apolloarchive.com/apollo_gallery.html

Monday, 17 August 2009

slide-14
SLIDE 14

Similar Problem Solved

  • Ray tracing is routinely

used in movies

  • Very slow! Scenes

rendered on huge clusters

  • Vector graphics is close

to ray trace quality

  • 30 frames per second

Monday, 17 August 2009

slide-15
SLIDE 15

Similar Problem Solved

  • Ray tracing is routinely

used in movies

  • Very slow! Scenes

rendered on huge clusters

  • Vector graphics is close

to ray trace quality

  • 30 frames per second

Monday, 17 August 2009

slide-16
SLIDE 16

Neutron Bunches

  • The analogy is to group trajectories into

“similar” bunches and treat the group as

  • ne single object.
  • Bunches are phase space regions with

linear relation between trajectories

  • How do we separate the bunches so the

calculation remains accurate?

Monday, 17 August 2009

slide-17
SLIDE 17

Guide Reflectivity

  • Divide bunches along

m=1 and critical m.

  • Trajectories within a

bunch are linearly dependent

  • Guide reflectivity is an

idealised curve

  • R at m_crit taken from

Swiss neutronics

Monday, 17 August 2009

slide-18
SLIDE 18

Acceptance Diagrams

  • Define boundaries in distance-divergence

space

  • Division is on module-by-module basis

Monday, 17 August 2009

slide-19
SLIDE 19

Source Module

  • Just like Monte-Carlo,

we have a source plane and a virtual “exit window”.

  • Exit window must be at

least as large as subsequent module

  • Propagation = shear

Monday, 17 August 2009

slide-20
SLIDE 20

Source Module

  • Just like Monte-Carlo,

we have a source plane and a virtual “exit window”.

  • Exit window must be at

least as large as subsequent module

  • Propagation = shear

Monday, 17 August 2009

slide-21
SLIDE 21

Source Module

  • Just like Monte-Carlo,

we have a source plane and a virtual “exit window”.

  • Exit window must be at

least as large as subsequent module

  • Propagation = shear

Monday, 17 August 2009

slide-22
SLIDE 22

Collimator/Aperture

  • For aperture clip off

extrema in space axis

  • For collimator, clip off

extrema in divergence axis

Monday, 17 August 2009

slide-23
SLIDE 23

Collimator/Aperture

  • For aperture clip off

extrema in space axis

  • For collimator, clip off

extrema in divergence axis

Monday, 17 August 2009

slide-24
SLIDE 24

Collimator/Aperture

  • For aperture clip off

extrema in space axis

  • For collimator, clip off

extrema in divergence axis

Monday, 17 August 2009

slide-25
SLIDE 25

Change Coordinates

  • Rotate beam axis
  • Translate beam axis
  • Both are a translation of

phase space volumes

Monday, 17 August 2009

slide-26
SLIDE 26

Guide Module

  • Kill neutrons that miss

the entrance

  • Propagate neutrons to

the end of the guide

  • Divide along m

boundaries

  • Multiply reflected weight

by reflectivity

Monday, 17 August 2009

slide-27
SLIDE 27

Guide Module

  • Kill neutrons that miss

the entrance

  • Propagate neutrons to

the end of the guide

  • Divide along m

boundaries

  • Multiply reflected weight

by reflectivity

Monday, 17 August 2009

slide-28
SLIDE 28

Guide Module

  • Kill neutrons that miss

the entrance

  • Propagate neutrons to

the end of the guide

  • Divide along m

boundaries

  • Multiply reflected weight

by reflectivity

Monday, 17 August 2009

slide-29
SLIDE 29

Statistical Weight

  • Use triangular primitives
  • Statistical weight of a

triangle is a volume calculation

  • Right-wedge plus

square-based pyramid

  • Only difficulty is very

thin triangles (known problem in CS)

Monday, 17 August 2009

slide-30
SLIDE 30

Guides Supported

  • Straight
  • Curved parallel
  • Converging
  • Diverging
  • Arbitrary

Monday, 17 August 2009

slide-31
SLIDE 31

Test 1: Simple Guide

Monday, 17 August 2009

slide-32
SLIDE 32

Test 1: Simple Guide

Monday, 17 August 2009

slide-33
SLIDE 33

Test 1: Simple Guide

Monday, 17 August 2009

slide-34
SLIDE 34

Test 1: Simple Guide

Monday, 17 August 2009

slide-35
SLIDE 35

Test 1: Simple Guide

2% Error, 4.8 s 48 ms

Monday, 17 August 2009

slide-36
SLIDE 36

Test 2: D22 (V)

Monday, 17 August 2009

slide-37
SLIDE 37

Test 2: D22 (V)

Monday, 17 August 2009

slide-38
SLIDE 38

Test 2: D22 (V)

Monday, 17 August 2009

slide-39
SLIDE 39

Test 2: D22 (H)

Monday, 17 August 2009

slide-40
SLIDE 40

Test 2: D22 (H)

Monday, 17 August 2009

slide-41
SLIDE 41

Test 2: D22 (H)

Monday, 17 August 2009

slide-42
SLIDE 42

Test 2: D22 (H)

Monday, 17 August 2009

slide-43
SLIDE 43

Test 2: D22 (H)

Calculate flux on sample: 55 ms

Monday, 17 August 2009

slide-44
SLIDE 44

Test 3: WASP

  • Agreement between

NADS and MCSTAS on sample

  • MCSTAS model

Independently calculated by Peter Fouquet from moderator to Sample

  • ~5 seconds for nads per

wavelength (3 mins for white beam)

Monday, 17 August 2009

slide-45
SLIDE 45

Test 3: WASP

  • Agreement between

NADS and MCSTAS on sample

  • MCSTAS model

Independently calculated by Peter Fouquet from moderator to Sample

  • ~5 seconds for nads per

wavelength (3 mins for white beam)

MCSTAS nads

Monday, 17 August 2009

slide-46
SLIDE 46

Test 4: Thales

  • Agreement between

SIMRES / RESTRAX and nads

  • Trace up to virtual

source (M3)

  • ~40 ms for nads per

wavelength (1.7 sec for white beam)

4

ThALES

M2 M1 M3 M4

.

Monday, 17 August 2009

slide-47
SLIDE 47

Test 4: Thales

  • Agreement between

SIMRES / RESTRAX and nads

  • Trace up to virtual

source (M3)

  • ~40 ms for nads per

wavelength (1.7 sec for white beam)

4

ThALES

M2 M1 M3 M4

.

SIMRES nads

Monday, 17 August 2009

slide-48
SLIDE 48

For Coders

  • nads kernel in C++
  • Understands xml input

from file or pipe

  • xml schema lets you

check syntax of hand- coded simulations

  • Uses getopt with varying

degrees of verbosity

  • nads -q prints only the
  • utput flux
  • Fully scriptable using

bash / c / mathematica...

Monday, 17 August 2009

slide-49
SLIDE 49
  • GUI
  • 3d instrument visualisation with OpenGL
  • Mathematica scripts

Live Demonstration

Monday, 17 August 2009

slide-50
SLIDE 50

Limitations

  • Each nads calculation is monochromatic

(white beam possible via looping)

  • Small angle approximation
  • Separable vertical & horizontal channels
  • Round objects approximated by rectangular
  • bjects of equal area (round sources etc)

Monday, 17 August 2009

slide-51
SLIDE 51

Acknowledgements

  • ESFRI
  • Ken Andersen
  • Klaus Habicht (HMI / BLZ)
  • Leo Cussen (Cussen Consulting)

Monday, 17 August 2009