Notes on the sinks

Today I talked with Jonathan about the sink implementation. Here are some notes on what I learned.

The calculation of forces are broken down into 4 types —

1) gas-on-gas (source/selfgravity.f90), 2) particle-on-gas (source/pointgravity.f90), 3) gas on particle (particle/paritcle_advance.f90), and 4) particle-on-particle (particle/particle_advance.f90)

Sinks have a 'point gravity' source term, and there is usually softening factors involved in calculating the gravity force (to avoid nans when the particle is at the center of a cell). The force is calculated from the gradient of the potential from the neighboring four cells. This can be seen in source_control.f90.

Once the forces are calculated, the motion of the particle is advanced. This is done by a 'leap frog' method, and is in particle_info_ops.f90. The 2 subroutines that control the particles motion/position are 'advance particles', and the 'accrete subroutine'.

In diagnosing and updating the sinks, it is best to begin by degugging the current algorithms. Then we will decide what parts of the alogorithm work and don't. Next, we will choose to add an additional accretion procedure (Bondi-Hoyle) to the code.

Comments

No comments.