Version 13 (modified by 10 years ago) ( diff ) | ,
---|
Sink Particles
The Sink Particle algorithm is more or less taken from Federrath et al although Bondi type accretion is also implemented from Krumholz et al.
Before each step after overlaps have been applied - each processor searches through each info structure looking for new particles. This requires data out to 4 ghost cells. The processors then gather all of the new particles and the moments of the surrounding cells. Then each processor updates all of its grids by accreting material onto the sink particles. Then the change in particle mass from each processor is accumulated and the particles new properties (mass, mom, etc…) are then updated. The sink particles are then advanced redundantly using a leap-frog integration on every processor.
There are several criteria for creating sink particles. The Truelove criteria states the following must be satisfied:
else artificial fragmentation can occur. Thus, the first criteria is that the density and sound speed in a cell must violate the Truelove criteria:
Regions that satisfy (1) are subject to potential artificial fragmentation.
A cell that violates the truelove criteria must also have converging flow and must be located at the minimum of a potential well within a radius of
In addition to the central cell violating the truelove criteria - the surrounding region must be Jeans unstable or from the virial equation
where we have ignored external pressure. This implies that:For an ideal gas we have
or for an isothermal gas.If we assume a uniform sphere of radius
we getor that
So if a cell satisfies the Truelove criteria - then assuming that it is surrounded by cells of similar density within a radius of
it will also be Jeans unstable.Magnetic fields modify the Jeans stability / virial equation to be
whereFinally the region must be gravitationally bound
Accretion
Federrath accretion removes just enough density from cells within 4 zones of the particle to keep them below the truelove limit.
Bondi accretions is a bit more involved. The host cell of the particle first estimates
and using the host cell and calculates the bondi radius from the particles mass. It then calculates the surrounding mean density using , and estimates using the solution to bondi accretion . It then calculates the accretion rate as
The accretion rate can be written as
. The Krumohlz paper suggests the amount of accreted material from each cell should be proportional to the weight factor but it makes more sense to make it proportional to the density times the weight factor . If then which then gives
This makes implementation easier since each processor only needs to calculate A for local particles and then share them with other processors. This quantity is stored in particle%AccretionRate
Outflows
Particles can launch outflows following the description in Federrath et al 2014
The basic problem is to apply the following outflow function, but in a discrete way that is numerically symmetric and exact.
The change in rho has the following functional form
as does the change in momentum
Since we want the total mass to equal some fraction of the accreted mass, as well as the top and bottom mass injection to be symmetric, we must have
And since we also must have the total momentum be balanced, we need to have
as well as
If we introduce scaling parameters for the density and momentum for the top and bottom…
and plug these into the above equations, we can solve for
and
The momentum equations give us 4 constraints for two variables.
For reference on another way astrobear has implemented sinks in the past, see SinkParticle