wiki:AMROptions

Version 4 (modified by trac, 12 years ago) ( diff )

Variables

GlobalData

  • CoarsenRatio: The coarsening ratios used by each level of refinement. There should be at least MaxLevel elements in this array; any elements beyond MaxLevel are ignored. This number is usually 2 - in other words, each Cartesian coordinate is doubled in refinement. In 2D this will lay down 4 refined cells for every 1 coarse cell. A coarsen ratio of 4 is also possible, but not recommended.
  • MinimumGridPoints: Only the first MaxLevel-1 of these values matter. This number represents the minimum number of cells in every dimension that each refinement level grid should have. There must be at least MaxLevel-1 of these values for the simulation to run. It is possible for a refinement grid to have less than the minimum number of grid points, but once the grid reaches that stage, the refined grid will not bisect any further into smaller grids. It is recommended that the largest value be the first refined level, and decreasing or staying the same on each additional level, in order to avoid improper nesting of grids.

DomainData

  • MaxLevel Indicates the maximum level of AMR refinement to use. MaxLevel = 0 indicates no levels of refinement (fixed grid).
  • iBuffer: The size in cells of the buffer zones to be created around each refinement area. This array should always have at least nDim elements. The iBuffer setting actually flags extra cells for refinement around cells that are flagged based on gradients. Unfortunately, iBuffer currently does not necessarily work across domain decomposition boundaries. More work is needed in this area.
  • DesiredFillRatios: Desired fill ratios in determining a new subgrid. Should be MaxLevel of these. A high value such as .99 is ideal for only refining exactly the cells flagged for refinement based on gradients - however this can create many tiny subgrids if the gradient region is non-axial (not straight along the x or y-axis). Many subgrids of refinement can increase computation time because of data transfer. However, a lower value of the desired fill ratio, such as .9 or even .8 can end up refining many cells that are not in need of refinement, but will create less grids. Much discretion is needed when setting this value, with care taken on each level. It is recommended for stability that the fill ratio on the first level be the lowest, and increasing or remaining the same on each additional level, to avoid improper nesting.
  • qTolerance: An array of tolerance values for the field variables. There should never be less than MaxLevel values in this array. AstroBEAR is currently set to look at the gradients between any two cells in all q fields (density, momemtum, etc), and flagging cells for refinement whenever any gradient exceeds the qTolerance set for that level. Future work should allow for the more precise setting of qTolerance for each field. These values are also at the discretion of the user, and care should be taken when setting them for each level. As an example, if you wanted 3 levels of refinement specifically in one area of activity, without extra areas being refined to levels 1-2, you might set the first value to a higher number (0.2), and the remaining 3 to a very small number (1e-3), to ensure that anywhere the first level is laid down, the other 2 will also be laid down. Alternately, you might want a gradual refinement inward of a region where activity becomes increasingly important. For this you might set all three numbers the same or similar.

Known Problems using AMR

Each of these options has a hand in determining how new refined grids are laid down in the domain. These values can and should be adjusted to change the properties of your grids, particularly in problems with sharp gradients and multiply refined levels.

Improper Nesting

Improper Nesting occurs when two adjacent grids (grids that share a boundary) lie on refinement levels that are not adjacent, or rather, when grids are separated by more than one refinement level. Ideally, fixup fluxes should correct for this. However, this problem can also cause spurious oscillations at these boundaries that can lead to simulations that diverge from their fixed grid versions. Unfortunately there is currently no way to absolutely ensure that improper nesting never happens in AstroBEAR. Careful choices of the parameters MinimumGridPoints, iBuffer, DesiredFillRatios, and qTolerance can usually prevent it from occurring, although it may require refining more space than is absolutely necessary. It is important to look for improper nesting in your simulations, and to ensure that if it occurs, it occurs far away from regions of strong gradients in fluid variables.

Note: See TracWiki for help on using the wiki.