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 |
| 33 | The 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 | |
| 37 | where $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 | |
| 41 | Note, 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 | |
| 43 | Next, the non dimensional density profile ($z=n/n_{amb}$) is calculated as a function of $\chi$ |
| 44 | |
| 45 | Using this, the density in each cell is set using: |
| 46 | |
| 47 | $info\%q(i,j,k,1)=z*n_{amb}$ |
| 48 | |
| 49 | Once 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 | |
| 53 | According 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 | |
| 57 | Since 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 | |
| 59 | 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 $\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 | |
| 61 | 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 $IBS$ if desired). |
| 62 | |
| 63 | {{{#!comment |
| 94 | }}} |
| 95 | |
| 96 | |
| 97 | == Initializing the Central Sink Particle == |
| 98 | |
| 99 | 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 $mcent$ defined above. Its accretion routine is set Krumholz accretion, which is AstroBEAR's closest prescription to Bondi accretion. |
| 100 | |
| 101 | == Multiphysics == |
| 102 | |
| 103 | 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. |
| 104 | |
| 105 | |
| 106 | == Module == |
| 107 | |
| 108 | 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). |