wiki:BondiModule

Version 3 (modified by Erica Kaminski, 7 years ago) ( diff )

Bondi Module

Description

The Bondi module (located in astrobear/src/modules/) was originally designed to be used by the accretion module to enable sink particles to accrete. It has since been expanded to include the ability to initialize the domain with a Bondi solution, as well as impose the Bondi solution at an inner spherical boundary surrounding a sink particle, or over a spherical boundary at the edge of the domain. For the details of the Bondi solution see Bondi's 1952 paper (1952MNRAS.112..195B).

Initializing the Bondi Module

The problem.data file contains the following:

ProblemData

  • mcent: The mass of the sink particle in fraction of solar masses (e.g. mcent=0.4 would be 40% solar mass)
  • namb: The number density of the ambient medium in units of cm-3.
  • tamb: The temperature of the ambient medium in units of K.
  • IBS: The radius of an inner spherical boundary in computational units, within which the Bondi solution will be pasted (this can be shut off in the problem module, as described below).
  • OBS: The radius of an outer boundary sphere in computational units, outside of which the Bondi solution will be pasted.


Initializing the Computational Domain

The Bondi module takes as input an inner and outer spherical boundary radius ( and ), the temperature and density of the gas at infinity ( and ), and the percentage of solar mass the sink particle should have (). It then calculates the nondimensional radius for each zone of the grid, which is defined as:

where is the bondi radius calculated using the sound speed of the gas at infinity and the mass of the central object:

Note, strictly speaking the Bondi radius formula in the code also has a term, the velocity of the gas at infinity. This is zero in the present case so it is ignored in the above expression.

Next, the non dimensional density profile () is calculated as a function of

Using this, the density in each cell is set using:

Once z is known, the nondimensional velocity follows from Eqn. 8 in Bondi 1952:

According to Bondi's scaling relations, , where is the local inward velocity of the gas, and is the sound speed at infinity. The inward radial momentum is then set in each zone using:

Since the gas is a polytrope (), the energy of each cell is then easily calculated (the total energy is a sum of radial kinetic energy + internal energy).

The above solution is pasted everywhere in the grid (including ghost zones) except close to the origin where the speeds become very large. Within the inner spherical boundary the solution is just set to be constant — using the Bondi solution at nondimensional radius . Note, in the problem module copied below this functionality is actually turned off, and the Bondi solution is copied to the mesh everywhere in the domain. This is because under most circumstances the code should be able to handle the high speeds generated by the Bondi solution close to the origin.

At each subsequent cycle after initialization, the bondi flow is only set in the ghost zones (again with the option of stepping on the zones within if desired).

Initializing the Central Sink Particle

The Bondi module initializes a sink particle at the center of the Bondi flow corresponding to the origin. This particle is set to be fixed at the origin so that it cannot move over the course of the simulation (this is a safety check — given the spherical symmetry of the problem the particle should not move on its own). Its mass is set using the input variable defined above. Its accretion routine is set Krumholz accretion, which is AstroBEAR's closest prescription to Bondi accretion.

Multiphysics

The only physics turned on in this module on top of the hydrodynamics is point gravity, associated with the sink particle. The gas in the mesh is not self-gravitating, but rather, only feels the force of the particle which causes its collapse.

Module

Without further adieu, the Bondi module in its most recent form is copied below, and the associated .data files are attached to this page. I have tried to comment the module heavily, but if the reader should have any questions, feel free to email the astrobear developer team with questions (astrobear_dev@pas.rochester.edu).

Note: See TracWiki for help on using the wiki.