Install yt from yt-project.org

Install yt from yt-project.org

INTRODUCTIONTOENZO
Britton Smith

Enzo User Workshop

Hokkaido University, November 18, 2014

OUTLINE
I. Available Modules
II. Problem Types
III. Enzo Resources
IV. Development

Image: Devin Silvia

ENZO METHOD PAPER

Draft version July 22, 2013

Preprint typeset using LATEX style emulateapj v. 04/17/13

ENZO: AN ADAPTIVE MESH REFINEMENT CODE FOR ASTROPHYSICSThe Enzo Collaboration: Greg L. Bryan1 , Michael L. Norman2,3 , Brian W. O’Shea4,5 , Tom Abel6, 20 , John H.
Wise7 , Matthew J. Turk1 , Daniel R. Reynolds8 , David C. Collins9 , Peng Wang6 , Samuel W. Skillman10,11 ,Britton Smith4 , Robert P. Harkness12 , James Bordner2 , Ji-hoon Kim13 , Michael Kuhlen14,15 , Hao Xu2 , Nathan
Goldbaum15 , Cameron Hummels16 , Alexei G. Kritsuk2 , Elizabeth Tasker17 , Stephen Skory10 , Christine M.
Simpson1 , Oliver Hahn18 , Jeffrey S. Oishi19 , Geoffrey C So2 , Fen Zhao20 , Renyue Cen21 , and Yuan Li1
Draft version July 22, 2013

ABSTRACTThis paper describes the open-source code Enzo, which uses block-structured adaptive mesh refinement to provide high spatial and temporal resolution for modeling astrophysical fluid flows. The
code is Cartesian, can be run in 1, 2, and 3 dimensions, and supports a wide variety of physics including hydrodynamics, ideal and non-ideal magnetohydrodynamics, N-body dynamics (and, more
broadly, self-gravity of fluids and particles), primordial gas chemistry, optically-thin radiative coolingof primordial and metal-enriched plasmas (as well as some optically-thick cooling models), radiationtransport, cosmological expansion, and models for star formation and feedback in a cosmological context. In addition to explaining the algorithms implemented, we present solutions for a wide range oftest problems, demonstrate the code’s parallel performance, and discuss the Enzo collaboration’s codedevelopment methodology.
Keywords: methods: numerical — hydrodynamics

1. INTRODUCTION

http://adsabs.harvard.edu/abs/2014ApJS..211...19B

Due to the high spatial and temporal dynamical ranges involved, astrophysical and cosmological phenomena present
a taxing challenge for simulators. To tackle such situations, a number of numerical techniques have been developed that

WHAT IS ENZO?
Enzo is a cosmological,
adaptive-mesh refinement,
hydrodynamics + N-bodysimulation code.

Image: Eric Hallman, Brian O’Shea

AMR:

ADAPTIVE-MESH REFINEMENT• create and destroy gridpatches dynamically (blockstructured)• grids at multiple resolutions• multiple refinement criteria:• density (gas or dark matter)• gradients, shocks• cooling time
• Jeans length• refine regions around particles• easy to create new criteria

AMR:

ADAPTIVE-MESH REFINEMENT• create and destroy gridpatches dynamically (blockstructured)• grids at multiple resolutions• multiple refinement criteria:• density (gas or dark matter)• gradients, shocks• cooling time
• Jeans length• refine regions around particles• easy to create new criteria

AMR:

ADAPTIVE-MESH REFINEMENT• create and destroy gridpatches dynamically (blockstructured)• grids at multiple resolutions• multiple refinement criteria:• density (gas or dark matter)• gradients, shocks• cooling time
• Jeans length• refine regions around particles• easy to create new criteria

AMR:

ADAPTIVE-MESH REFINEMENT• create and destroy gridpatches dynamically (blockstructured)• grids at multiple resolutions• multiple refinement criteria:• density (gas or dark matter)• gradients, shocks• cooling time
• Jeans length• refine regions around particles• easy to create new criteria

AMR:

ADAPTIVE-MESH REFINEMENT• create and destroy gridpatches dynamically (blockstructured)• grids at multiple resolutions• multiple refinement criteria:• density (gas or dark matter)• gradients, shocks• cooling time
• Jeans length• refine regions around particles• easy to create new criteria

AMR:

ADAPTIVE-MESH REFINEMENT• create and destroy gridpatches dynamically (blockstructured)• grids at multiple resolutions• multiple refinement criteria:• density (gas or dark matter)• gradients, shocks• cooling time
• Jeans length• refine regions around particles• easy to create new criteria

AMR:

ADAPTIVE-MESH REFINEMENT• create and destroy gridpatches dynamically (blockstructured)• grids at multiple resolutions• multiple refinement criteria:• density (gas or dark matter)• gradients, shocks• cooling time
• Jeans length• refine regions around particles• easy to create new criteria

ADAPTIVE-MESH REFINEMENTEXTREME DYNAMIC RANGE

Image: Matthew TurkGRAVITY• dark matter treated ascollision-less particles• adaptive particle-meshmethod• solve Poisson eqn.: ∇2ϕ = 4πGρ• particles interpolated onto grid tocreate density field, then gas
densities added• multigrid relaxation for refined grids• advantage: very fast!
• disadvantage: force res. is2Δx (not great)

Image: Michael Norman et. al.

HYDRODYNAMICS
Multiple Hydro Methods• Piecewise Parabolic Method• fits state variables to 3rd orderparabolic• nonlinear Riemann solver for

excellent shock capturing• can be unstable with cosmology orcooling (much better now)

• Zeus• less accurate, more diffusive• extremely robust (excellent forcosmology)

Image: Nick EarlHYDRODYNAMICS
Multiple Hydro Methods• MUSCL• 2nd order accurate Godunov solver• 2nd order Runge-Kutta timeintegration• multiple Riemann solvers andinterpolation methods availableImage: Nick Earl

MHD
Multiple Hydro Methods• Dedner• uses MUSCL framework above• hyperbolic divergence cleaning

method to ensure ∇· B = 0• uses cell-centered B field• Constrained Transport• magnetic field updated as the curl of

the electric field• preserves ∇· B = 0(since ∇· (∇ x F) = 0)

• needs face and edge-centeredfields: more complicatedEnzo Method Paper

RADIATIVE TRANSFER
Two Rad. Transfer Methods• Adaptive Ray Tracing• radiation from discreet sources (starand black hole particles)• adaptive ray splitting and merging• fully coupled to chemistry network• Flux Limited Diffusion• treats radiation like a fluid• couple to atomic chemistry• highly scalable• unigrid and AMR versions available

Image: John Wise

RADIATION BACKGROUNDS• spatially smooth, time-dependent radiation fields• UV metagalactic, ionizing

backgrounds for photoheating and ionization during
Reionization (multiplemodels)• Lyman-Werner soft UV

fields represent radiationfrom first stellar sources andphoto-dissociate H2Image: Britton Smith

CHEMISTRY AND COOLING• Non-equilibrium primordialchemistry• H, H+, H-, He, He+, He++, H2, H2+, D,D+, HD, e-• H2 chemistry: 2-body, 3-bodychannels, dust grains, chemical
heating/cooling• Metal cooling• simple tabulated rates (T > 104 K)• atomic fine-structure lines• Cloudy tables: density, metallicity,temperature, electron fraction,
background redshift

Enzo Method Paper

CHEMISTRY AND COOLING

High temperature cooling rates at various
metallicities.

One-zone model of gas collapse at various
metallicities.

THERMAL CONDUCTION
Spitzer Conduction• heat transfer through electron

Coulomb interactions• ϰ ~ T5/2, with saturation for sharp

temperature gradients• significant for T > 107 K (galaxyclusters)• isotropic (hydro only) andanisotropic (MHD) available• explicit solver: dt ~ dx2 n / ϰ:short timesteps!
Enzo Method PaperACTIVE PARTICLES• act on the grid by adding or

removing gas, energy, andmomentum• non-radiating star particles• form in dense, collapsing, cooling gas• inject thermal energy, metals into

nearby grid cells• radiating star and black-holeparticles form the same wayand emit radiation• sink particles accrete nearby
gas like collapsing protostars

Image: John WiseTRACER PARTICLES• can be placed anywhere in asimulation• used to trace hydrodynamicflow• output field values in which
particles exist• output separately from main
dataset: can be output withhigher frequency
Image: Devin Silvia

Putting it all Together

PROBLEM TYPES• Need external initialconditions files• Cosmology• Turbulence• Enzo initializes everything• spheres: rotating, collapsing, colliding• galactic disks• shock tubes• cloud crushing• gravity, hydro tests• many, many more

Image: Elizabeth Tasker

RESOURCES• Enzo Webpage: enzo-project.org• Documentation• Email List
• IRC Channel• yt Webpage: yt-project.org
Image: Abel, Wise, Kahler• Mercurial tutorial: hginit.com

enzo-project.org

enzo-project.org
Documentation

Help!

DOCUMENTATIONDOCUMENTATION

on the internet oron your computer

EMAIL LIST
Quick Help

Send to:enzo-users@googlegroups.com
Archives:
http://groups.google.com/group/enzo-users

IRC CHANNEL
Live Help

Come say hello!
http://enzo-project.org/irc.html

yt-project.org

hginit.com

DEVELOPMENTDEVELOPMENT

1. Create a fork of the main repository.

DEVELOPMENT

1. Create a fork of the main repository.

DEVELOPMENT

1. Create a fork of the main repository.
2. Clone your fork, commit changes, push them to your fork.

DEVELOPMENT

1. Create a fork of the main repository.
2. Clone your fork, commit changes, push them to your fork.
3. Issue a “pull request”.

DEVELOPMENT
1. Create a fork of the main repository.
2. Clone your fork, commit changes, push them to your fork.
3. Issue a “pull request”.
4. Other developers review changes, make comments, accept.

DEVELOPMENT
1. Create a fork of the main repository.
2. Clone your fork, commit changes, push them to your fork.
3. Issue a “pull request”.
4. Other developers review changes, make comments, accept.

DEVELOPERSDEVELOPERS•You!

THANK YOU