1 / 25

What’s FLASH? How does FLASH do it?

What’s FLASH? How does FLASH do it?. Katherine M Riley Code Group. Overview. What is FLASH Basics of FLASH2 Architecture Basics behind a problem setup Walk away with: Enough of an idea of these concepts to be able to look at a sample setup and understand what is happening.

flo
Download Presentation

What’s FLASH? How does FLASH do it?

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. What’s FLASH?How does FLASH do it? Katherine M Riley Code Group

  2. Overview • What is FLASH • Basics of FLASH2 Architecture • Basics behind a problem setup • Walk away with: • Enough of an idea of these concepts to be able to look at a sample setup and understand what is happening.

  3. FLASH: The Application • To simulate matter accreted onto the surfaces of compact stars, nuclear ignition of the accumulated (and possibly stellar) material, and subsequent evolution of the star’s interior, surface, and exterior. • Novae (on white dwarf surfaces) • Type 1a supernovae (in white dwarf interiors) • X-ray bursts (on neutron star surfaces)

  4. FLASH Results • Compressible reactive flow • Wide range of length of time scales • Many interacting physical processes • Only indirect validation possible for the astrophysics • Many people in collaboration Flame-vortex interactions Compressible turbulence Shocked cylinder Nova outbursts on white dwarfs Intracluster interactions Cellular detonations White Dwarf deflagration Helium burning on neutron stars Rayleigh-Taylor instability

  5. Physics Hydrodynamics PPM MHD Relativistic PPM Nuclear Physics Gravity Cosmology Particles Infrastructure Setup AMR: Paramesh Regular testing Parallel I/O hdf5, pnetcdf, Profiling Runtime and post-processing visualization What FLASH Provides

  6. A Little FLASH History BAM • FLASH0 • Paramesh2, Prometheus and EOS/Burn • FLASH1 • Smoothing out the smash • First form of module architecture & inheritance • FLASH2 • Untangle modules from each other (Grid) • dBase • Concept of levels of users • FLASH3 • Stricter interface control & module architecture • Taming the database

  7. FLASH2 Audiences FLASH Application Developer End User Application Programmer • Works on just about everything • Grid development • Data access • Architecture • Initialize setup • Boundary conditions • Basic data structure • (Might add a kernel) • Develop physics modules • Talk to grid • Module communication

  8. FLASH2 Code Basics • An application code, composed of units/modules. Particular modules are set up together to run different physics problems. • Performance, Testing, Usability, Portability • Fortran, C, Python, … • 560,000* lines of code • 75% code, 25% comment • Very portable • Scaling to 1000’s of procs * Internal Release

  9. Basic Computational Unit : Block • The adaptive grid is composed of blocks • All blocks: same dimensions • Cover different fraction of the physical domain. • Kevin Olson will talk about this more.

  10. First Look at FLASH • ‘The tar-ball’ • ‘source’ directories • modules or groups of modules • Post-processing tools, docs, setups • Setup • FLASH architecture tool • Selects and sets up these modules • Collecting variables, runtime parameters, etc

  11. Mesh Database Cosmology Driver Particles MHD IO Visualization mesh_init() mesh_guardcells() mesh_updateRef() mesh_fluxConserve() init() dBaseGetData() dBasePutData() dBaseProperty() init() init() Checkpoint_write() Checkpoint_read() init() init() advance() dBase_init() dBaseGetData() dBasePutData() dBaseProperty() init() render() Explicit mhd constant burn Gamma point_mass iso13 Helmholtz ... Unsplit PPM Poisson ... cool heat Diffuse WENO PPM Multigrid Multipole Structure of FLASHModules (not exact!) Hydro Gravity Source_terms Materials init() tstep() hydro3d() init() tstep() grav3d() init() tstep() src_terms() eos3d() eos1d() eos()

  12. What’s a FLASH Module? • FLASH basic architecture unit: Modules • Component of the FLASH code providing a particular functionality • Different combinations of modules are used for particular problem setups • Ex: driver, hydro, mesh, dBase, I/O • Fake inheritance by use of directory structure • Modules communicate • Driver • Variable Database

  13. mesh Abstract FLASH2 Module 1. Meta-data (Configuration Info) • Interface with driver and setup • Variable/parameter registration • Variable attributes • Module Requirements FLASH Component 2.Interface Wrapper • Exchange with variable database • Prep data for kernels • 3. Physics Kernel(s) • Single patch, single proc functions • written in any language • Can be sub-classed FLASH Application driver Collection of Flash2 Modules Database

  14. Module Implementations • FLASH2 Modules are directory trees • source/hydro/explicit/split/ppm • Each level might have source • Source relevant for all directories/implementations below • Preserves interfaces • Allows flexible implementations

  15. Inheritance Through Directories: Hydro An ‘empty’ hydro init, hydro, tstep are defaults on top of the directory tree. init hydro tstep Explicit Hydro/Explicit Replaces tstep Introduces ‘shock’ No hydro Implemented yet! tstep tstep shock Split Hydro/Explicit/Split hydro implemented Uses general explicit tstep Uses general shock Replaces init hydro hydro implemtation implemtation init DeltaForm

  16. The Module Config File • Declare solution variables, fluxes • Declare runtime parameters • Sets defaults • Lists required, exclusive modules • Config files are additive down the directory tree - no replacements

  17. Source Terms Materials Gravity MHD Driver Hydro Particles I/O Vis Setup Building an Application Configuration Tool (Setup) Database Mesh

  18. FLASH Setup: Implements Architecture • Python code links together needed physics and tools for a problem • object • Traverses modules to get implementations • Determines solution data storage list • Creates list of parameters from modules • Configures Makefiles properly

  19. Accessing the Mesh • Physics and tools access some scope of mesh • Database • Unifies method for module to access data out of its scope • Mesh data • Solution Data, Grid information • Runtime parameters • Mesh Interface • Wrappers to the public grid routines • initialize, guardcell, fluxconserve, updateRefinment

  20. FLASH Audiences FLASH Application End User • Solidify information so far • Modules and setup • How do they combine to make create an application? That runs? • Go through a little of that. • Initialize setup • Boundary conditions • Basic data structure • (Might add a kernel)

  21. Simple FLASH Flow Function Driver Init Evolve TimeStep Variable Database Data dBase Paramesh updateGrid ghostCellFill fluxConserve Evolve Hydro SourceTerms … UpdateGrid Mesh Hydro Prepare data for kernels SourceTerms Burn Heat Cool Ioniz… hydroBlock Burn burnBlock

  22. Pulling it All Together • Choose a problem setup • Run setup to configure that problem • Everything is in a new top-level directory • ‘object’ • Make • Run • Flash.par for runtime parameters • Defaults already set from particular modules

  23. Setups • A basic problem setup • Config file • Required physics modules • Flash.par • Default list runtime parameter configuration • Init_block • Initial conditions for the problem set block by block • Many other possible files: • Driver, Refinement algorithms, User defined boundary conditions • Any files in setup take precedence

  24. Provided Driver • New drivers • Put in setups • Welcome contributions • Provided: • Second order, state form, strang split evolve.F90 set time step hydro sourceTerms cosmology radiation particles gravity set time step (repeat physics) Mesh_updateGrid flash.F90 Initialize() Loop over timesteps evolvePhysics() timestep() output() visualize() End loop Finalize()

  25. What’s Next • Covered the basics of what FLASH can do • Now - How does it do it? • Alan Calder

More Related