# Gravity (Part 2)

## December 14, 2016

In addition to the operator-split source term update I added last week,

I’ve now tried correcting the velocities and total energy before the input states are passed to the Riemann solver. The correction takes the same form as the source terms, so for example, the correction to the left states would be:

where , , and are the three components of the gravitational acceleration.

I’ve tested the two versions (the original update versus the corrected input states) using the same Rayleigh-Taylor initial conditions as last week’s post, but without the velocity perturbation. Because the fluid is in hydrostatic equilibrium to start, the fluctuations in the rms y-velocities seem like a decent measure of how well the code is doing. I found (somewhat surprisingly) that there is virtually no difference between the two methods. The plot below shows the rms velocities for the original version - the corrected version looks exactly the same. All tests so far have been run using PPMC, an exact Riemann solver, and CTU.