390 likes | 564 Views
Application of adaptive mesh refinement to astrophysical simulations. Dmitry S. Shapovalov, Institute for Theoretical Physics and Astrophysics, Uni-Kiel , 2003. Impact of a massive star on the interstellar medium. Ram-pressure stripping of galaxies.
E N D
Application of adaptive mesh refinement to astrophysical simulations Dmitry S. Shapovalov,Institute for Theoretical Physics and Astrophysics, Uni-Kiel, 2003
Impact of a massive star on the interstellar medium Ram-pressure stripping of galaxies
Heavier portion of a fluid (brown-red) is on top of lighter portion (blue) in gravitational field.2D compressible gas dynamic simulation (J.Dreher)
3D cylindrical shear flow: Transition to turbulenceAn initially slight perturbation develops a Kelvin-Helmholtz like instability.(R.Grauer)
Singular current sheets in incompressible MHD flows2D simulation with adaptive mesh refinement (R.Grauer)
Singular current sheets in incompressible MHD flows2D simulation with adaptive mesh refinement (R.Grauer)
Statistics for the simulation with r = 2 Statistics for the simulation with r = 4
Comparison of different refinement factors + low memory consumption (dynamical allocation by data fields) + only 8% of total time spent for pure AMR subroutines(~92% of time spent for integration of DE)
1. Integrate PDE on a grid with a given resolution (level 0) 2. As some criterion fulfilled - refine initial grid: mark critical points where discretization error exceeds prescribed value 3. Generate new grids with finer resolution and timestep which cover all critical points (level 1) 4. Fill the new grids with interpolated data from level 0 5. Integrate both levels until resolution becomes insufficient 6. Regridding from the beginning and filling with data from former grids 7. Recursive repetition of previous steps Level 1 Level 0
The timestep on a given level: procedure integratelevel do singlestep on levelbetter boundary on levelsolve poissonequation on level if next level exists, then default boundary on next leveldo r times integratenext levelupdateof levelcheckcriterion on level
Regridding of a given level: procedure regriddinglevel for all gridson level mark critical points and append them to a list cover the critical points with rectangles (saw up) nestingrectangles into their parents and assign parents and neighbors fill the new rectangles with default data if old level of same resolution existed before regridding, then better data on new level from old level if finer level existed before regridding, then regriddingof new level
procedure saw uprectangles for all rectangles calculate and variance in x- and y-direction if variance in x> variance in y, then apply cut dimon rectangle in x-direction else apply cut dimon rectangle in y-direction if no cut found and efficiency insufficient, then half rectangle in longer direction append resulting rectangles to temporary list saw up of temporary list of rectangles if temporary list is not empty, then replace actual rectangle by temporary list
procedure cut dim of rectangle in direction dim determine best cut in direction dim and return two rectangles loop over the two rectangles cut in other direction if costs are smaller than those of actual rectangle, then replace actual rectangle by list compare costs of new list (of 2-4 rectangles) with those of original rectangle and return cheapest