McStas-MCNP interface solutions Erik B Knudsen 1 , Peter Willendrup - - PowerPoint PPT Presentation

mcstas mcnp interface solutions
SMART_READER_LITE
LIVE PREVIEW

McStas-MCNP interface solutions Erik B Knudsen 1 , Peter Willendrup - - PowerPoint PPT Presentation

McStas-MCNP interface solutions Erik B Knudsen 1 , Peter Willendrup 1,2 , Esben Klinkby 3,4 1 NEXMAP, Physics Department, Technical University of Denmark, Denmark 2 ESS Data Management & Software Center, Denmark 3 Center for Nuclear


slide-1
SLIDE 1

06/09/16 Sine 2020 workshop 1

McStas-MCNP interface solutions

Erik B Knudsen1, Peter Willendrup1,2, Esben Klinkby3,4

1NEXMAP, Physics Department, Technical University of Denmark, Denmark 2ESS Data Management & Software Center, Denmark 3Center for Nuclear Technologies, Technical University of Denmark, Denmark 4ESS Neutronics Group, Sweden

slide-2
SLIDE 2

06/09/16 Sine 2020 workshop 2

McStas overview

Project website at http://www.mcstas.org Project mailing list at mcstas-users@mcxtrace.org

  • Monte Carlo neutron ray tracing engine
  • Release 1.1 (1.2 beta available for linux)
  • Portable code (Unix/Linux/Mac/Windows, 32 and 64 bit support)

Has run on all from iPhone to 1000+ node clusters (inlucding FERMI)

  • GPL-license
  • DSL / Compiler Technology.

Using Lex & Yacc

  • Modular Open Structure.

Components/devices written in structured ISO-c automatically fits in the system

  • Dependencies: c-compiler (perl/tk for gui).
  • Permanent staff at DTU Physics maintaining the code
slide-3
SLIDE 3

06/09/16 Sine 2020 workshop 3

McStas overview

Neutron ray/package Weight (p): # neutrons (left) in the package Coordinates (x,y,z) Velocity (vx,vy, vz) Spin (sx,sy,sz) Neutron ray/package Weight (p): # neutrons (left) in the package Coordinates (x,y,z) Velocity (vx,vy, vz) Spin (sx,sy,sz) Instrument: positioning + transformations between sequential component coordinate systems, e.g. neutron source, crystal, detector Instrument: positioning + transformations between sequential component coordinate systems, e.g. neutron source, crystal, detector

n n

Components: Where neutron physics happen, Weights adjusted according to scattering cross sections etc. Independent geometrical entities with local Internal coordinate systems. Components: Where neutron physics happen, Weights adjusted according to scattering cross sections etc. Independent geometrical entities with local Internal coordinate systems.

slide-4
SLIDE 4

06/09/16 Sine 2020 workshop 4

NEUTRON STATE (x,y,z, vx,vy,vz, t, sx,sy,sz, p)

McStas particle model and validity

  • ONLY neutrons
  • Validity determined by the code in the

components.

  • (Epi)Thermal to cold neutrons
  • No high energy stuff
  • Structured materials
slide-5
SLIDE 5

06/09/16 Sine 2020 workshop 5

MCNP overview

  • Distributed “Freely” by RSICC.
  • Source code available.
  • Restrictive licensing-terms.
  • Parallelism through MPI: MCNP6/MCNPx (most functionality)
  • Not restricted to neutrons (MCNPx / MCNP6)
slide-6
SLIDE 6

06/09/16 Sine 2020 workshop 6

MCNP particle models and validity

NEUTRON STATE (x,y,z, vx,vy,vz, t, p)

  • Materials: Everything is a gas
  • E < 150 MeV
  • Sense of p slightly different: p<1
  • Particle conversions possible
slide-7
SLIDE 7

06/09/16 Sine 2020 workshop 7

slide-8
SLIDE 8

06/09/16 Sine 2020 workshop 8

Present day normal

MCNP5/x/6 McStas

  • Fits
  • Direct Histograms

Not so many rays ~1e6 rays/s

slide-9
SLIDE 9

06/09/16 Sine 2020 workshop 9

Examples

  • ISIS_moderator
  • SNS_source
  • ESS_moderator/butterfly
slide-10
SLIDE 10

06/09/16 Sine 2020 workshop 10

Present day

  • Fits
  • Direct Histograms

Scatter_logger / SSR/W Using escaped neutrons MCNP5/x/6 McStas MCNP5/x/6

slide-11
SLIDE 11

06/09/16 Sine 2020 workshop 11

History: possible routes 1)Tallys and Fits (traditional, typically uniform emission same spectrum everywhere) 2)Ptrac-files 3)Combined compilation 4)SSW/SSR 5)….

slide-12
SLIDE 12

06/09/16 Sine 2020 workshop 12

Fits and functions

  • Fast
  • Robust
  • No reentry
  • Highly dependent on quality of documentaion
slide-13
SLIDE 13

06/09/16 Sine 2020 workshop 13

Ptracs

  • Fast
  • No reentry
  • No MPI
  • Large ascii files ~.2kB/event
  • Only 1 ptrac surface allowed
  • MCNPx outputs an ascii file containing

neutron states.

  • This file may be read by McStas

MCNP_virtual_input

slide-14
SLIDE 14

06/09/16 Sine 2020 workshop 14

SSW/SSR files

Source Surface Write/Read in MCNP stops/starts simulations at a given logical point. Neutron state is written to a binary file McStas Components: MCNP_Virtual_ss_Input & MCNP_Virtual_ss_Output

  • Flexible
  • Access to full McStas functionality
  • Access to full MCNPx functionality
  • Reentrant (but limited)
  • Big files ~.1kB/event
  • Proprietary binary format (diff. MCNPx & MCNP6)
slide-15
SLIDE 15

06/09/16 Sine 2020 workshop 15

  • Flexible
  • Access to full McStas functionality
  • Access to full MCNPx functionality
  • Reentrant

Combined compilation

Prototype exists for MCNPx

  • Slow
  • Requires MCNP source code
  • Licensing Issues
  • Not al all user-friendly
  • McStas entry surface defined in MCNPx
  • Neutrons crossing the surface trigger
  • a McStas simulation.
  • Upon reentry the neutron state is updated.
  • Flexible
  • Access to full McStas functionality
  • Access to full MCNPx functionality
  • Reentrant
  • Slow
  • Requires MCNP source code
  • Licensing Issues
  • Not al all user-friendly

PROTOTYPE Exists for MCNPx

slide-16
SLIDE 16

16

  • I. Neutrons generated with MCNPX

II.Handed to McStas through SSW interface [1] III.Unreflected neutrons returned to MCNPX for dose- rate calculation

[1] E. Klinkby et al. 'Interfacing MCNPX and McStas for simulation of neutron transport.' Nucl. Instr & Meth A , 700: p106, 2013.

12cm 12cm 2m 50m MCNPX

McStas

MCNPX SSW/SSR

Guide cross-section 50cm 2cm Detectors 16 5o steel steel source

slide-17
SLIDE 17

17

  • I. Neutrons generated with MCNPX

II.Handed to McStas through SSW interface [1] III.Unreflected neutrons returned to MCNPX for dose-rate calculation

At each scattering: Incomming state: nin =(x,vin,t,win ) Transmitted state: ntrans=(x,vin,t,wtrans) Reflected state: nrefl =(x,vout,t,win-witrans)

   

Þ

17

q

reflect absorb

q

n n

slide-18
SLIDE 18

18

  • I. Neutrons generated with MCNPX

II.Handed to McStas through SSW interface [1] III.Unreflected neutrons returned to MCNPX for dose-rate calculation

Guide cross-section 50cm 2cm

Neutron channel

s t e e l s t e e l λ [Å] L

  • g

( I n t e n s i t y ) Guide end overilluminated by energetic neutrons 18

slide-19
SLIDE 19

19

Straight guide Curved guide (rcurvature=1500m) Line-of-sight lost

➢ Dose-rates, measured 5cm in the steel converted from flux according to official

Swedish radiation protection procedures 19

slide-20
SLIDE 20

06/09/16 Sine 2020 workshop 20

Goal: Signal to Noise

MCNP5/x/6 McStas MCNP5/x/6 e.g. Geant4

slide-21
SLIDE 21

06/09/16 Sine 2020 workshop 21

Goal: Signal to Noise

MCNP5/x/6 FLUKA PHITS McStas VITESS NISP MCNP5/x/6 e.g. Geant4 PENELOPE FLUKA PHITS

slide-22
SLIDE 22

06/09/16 Sine 2020 workshop 22

The Solution

NONE OF THE ABOVE Next talk by Thomas Kittelmann