wiki:SelfGravity

Version 2 (modified by Jonathan, 8 years ago) ( diff )

Self-Gravity

AstroBEAR uses the hypre library to solve the self-gravity equations. To use self-gravity:

  1. Look for the HYPREFLAG variable in Makefile.inc and make sure that it is set to 1.
  2. Set the lSelfGravity flag in your physics.data file and set it to T.

Hypre will automatically initialize the potential field using the density. The only caveat is that the initial density cannot be uniform. When the density is uniform, hypre produces a singular matrix that it can't solve. Fortunately, a small density perturbation takes care of this problem without substantially affecting the dynamics of the domain. AstroBEAR comes with a Perturbation object type that can be used for this.

For more information see SelfGravityDevel.

Note: See TracWiki for help on using the wiki.