Changes between Version 2 and Version 3 of BondiModule


Ignore:
Timestamp:
04/23/18 13:14:07 (7 years ago)
Author:
Erica Kaminski
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • BondiModule

    v2 v3  
     1{{{#!comment
    12Back to [wiki:BearclawOutline]
    23[[BR]]
     4}}}
    35
    46= Bondi Module =
    57
    68== Description ==
    7 The Bondi module 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 the inner radius of the particle, or at the outer edge of the domain.  It is a good module to use as a basis for other modules that want to include the use of particles.  For the details of the Bondi solution see Bondi's 1952 paper (1952MNRAS.112..195B)
     9The 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 [http://adsabs.harvard.edu/abs/1952MNRAS.112..195B Bondi's 1952 paper] (1952MNRAS.112..195B).
    810
    9 == Initializing the Bondi Particle ==
     11== Initializing the Bondi Module ==
    1012
    11 The [source:dev/contrib/astro/sample_data_files/Bondi.data Bondi.data] file contains the following:
     13The problem.data file contains the following:
    1214
    13 === !BondiData ===
     15=== !ProblemData ===
    1416
    15  * '''''{{{mass:}}}'''''  The mass of the particle in solar masses
    16  * '''''{{{xloc:}}}'''''  The location of the particle in computational units
    17  * '''''{{{vel:}}}'''''  The velocity of the particle in computational units
    18  * '''''{{{rho_inf:}}}'''''  The asymptotic density for the Bondi Solution
     17 * '''''{{{mcent:}}}'''''  The mass of the sink particle in fraction of solar masses (e.g. mcent=0.4 would be 40% solar mass)
     18 * '''''{{{namb:}}}'''''  The number density of the ambient medium in units of cm^-3^.
     19 * '''''{{{tamb:}}}'''''  The temperature of the ambient medium in units of K.
     20 * '''''{{{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).
     21 * '''''{{{OBS:}}}'''''  The radius of an outer boundary sphere in computational units, outside of which the Bondi solution will be pasted.
     22
     23{{{#!comment
    1924 * '''''{{{c_inf:}}}'''''  The asymptotic sound speed for the Bondi Solution
    2025 * '''''{{{radius:}}}'''''  The radius of the particle region in computational units
    2126 * '''''{{{lCircular_Boundary:}}}'''''  Enforce a circular boundary?
    2227 * '''''{{{iRoutine:}}}'''''  Which routine does the particle use to update its surrounding region.  (0 = Accretion, 1 = Free Inflow, -1= nothing but user module updates)
     28}}}
     29[[br]]
    2330
    24 [[BR]]
     31== Initializing the Computational Domain ==
    2532
     33The Bondi module takes as input an inner and outer spherical boundary radius ($IBS$ and $OBS$), the temperature and density of the gas at infinity ($Tamb$ and $namb$), and the percentage of solar mass the sink particle should have ($mcent$). It then calculates the nondimensional radius for each zone of the grid, which is defined as:
     34
     35$\chi = r/r_{BH}$
     36
     37where $r_{BH}$ is the bondi radius calculated using the sound speed of the gas at infinity and the mass of the central object:
     38
     39$r_{BH}=\frac{GM*amu*\mu}{\gamma K_B T_{\infty}}$
     40
     41Note, strictly speaking the Bondi radius formula in the code also has a $v_\infty$ term, the velocity of the gas at infinity. This is zero in the present case so it is ignored in the above expression.
     42
     43Next, the non dimensional density profile ($z=n/n_{amb}$) is calculated as a function of $\chi$
     44
     45Using this, the density in each cell is set using:
     46
     47$info\%q(i,j,k,1)=z*n_{amb}$
     48
     49Once z is known, the nondimensional velocity follows from Eqn. 8 in [http://adsabs.harvard.edu/abs/1952MNRAS.112..195B Bondi 1952]:
     50
     51$y=\frac{\lambda}{\chi^2 z}$
     52
     53According to Bondi's scaling relations, $y= v/C_{\infty}$, where $v$ is the local inward velocity of the gas, and $C_\infty$ is the sound speed at infinity. The inward radial momentum is then set in each zone using:
     54
     55$Info\%(:,:,:,px)=-y C_{\infty} \rho \frac{x}{r}$
     56
     57Since the gas is a polytrope ($P\propto \rho ^\gamma$), the energy of each cell is then easily calculated (the total energy is a sum of radial kinetic energy + internal energy).
     58
     59The 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 $\chi=IBS/r_{BH}$. 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.
     60
     61At 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 $IBS$ if desired).
     62
     63{{{#!comment
    2664After reading in the information on the Bondi particle and the surrounding region, the routine initializes a Bondi Particle with type PData.  (The PData data type is a simplified particle data type - it contains all of the pertinent information without any pointers etc.) 
    2765{{{
     
    5492  END SUBROUTINE BondiInflow
    5593}}}
     94}}}
     95
     96
     97== Initializing the Central Sink Particle ==
     98
     99The 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 $mcent$ defined above. Its accretion routine is set Krumholz accretion, which is AstroBEAR's closest prescription to Bondi accretion.
     100
     101== Multiphysics ==
     102
     103The 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.
     104
     105
     106== Module ==
     107
     108Without 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).
    56109
    57110