cylindrical source terms

I have been double checking the cylindrical source terms in astrobear, because the Athena paper (link) that I was referencing had some differences. I derived the source terms myself…this time using the full 3D MHD equations, and my results were different from Skinner and Ostriker. Astrobear has two cylindrical source term routines for both the conservative and primitive formulations. I get the same results as the conservative routine. However, the primitive routine has some errors, but those are easy to fix. Below is a table showing what I believe the source terms should be…


Conservative

From this point on, these source terms are written to conveniently compare with cylindrical.f90 in astrobear. The "actual" source terms are these values multiplied by a factor of -1/r. Also, the magnetic terms usually come with a factor of 1/4pi, but all these values are in computational units.

variable source term
0
0


Primitive

Momentum —→ velocity which is not as simple as just dividing the momentum source terms by the density. Those have to be derived separately (see Jonathan's comment). The density and magnetic field source terms remain the same. Energy —→ thermal pressure which also has to be derived on its own.

variable source term
0
0


So in conclusion, I guess it's possible that I am not understanding some of Skinner and Ostriker's assumptions and/or techniques, but I think they might have some errors in their source terms.

Comments

1. Jonathan -- 12 years ago

Dividing the momentum equation by rho is different then getting the evolution equation for velocity…

ie

Does this change the source terms for the velocity?

2. ehansen -- 12 years ago

Good point Jonathan. I hadn't thought of that. That will introduce an additional term to each velocity source term. I updated the primitive section above with its own table.