# CHOLLA_PM: Dual energy advection test

**Column 1:** ENZO

**Column 2:** Phase diagram for All Gas ( top ) and Neutral Hydrogen ( bottom ). Temperature is internally computed by Grackle on run time.

**Column 3:** Phase diagram for the fraction of the gas that uses the Total Internal Energy to compute pressure.

**Column 4:** Phase diagram for the fraction of the gas that uses the Adavected Internal Energy to compute pressure.

**Column 5:** Phase diagram showing the temperature computed from the Total Internal Energy for ALL the gas.

**Column 6:** Phase diagram showing the temperature computed from the Advected Internal Energy for ALL the gas.

**Column 7:** Advected test scalar initially set equal to the density.

This is the first test to compare the evolution of an advected extra scalar field to the density.

The advected extra scalar field follows the same evolution as the density. To test if the advection on the internal energy is correct I set the Internal Energy to be allways equal to the advected internal energy in all the box and removed the term from the advected internal energy integration.

Since I want to follow evolution of the advected internal energy only due to advection, I donâ€™t have a cooling step, instead, to account for the reionization heating after , I measure the average temperature and compute the heat energy needed to bring the average temperature up to and I apply this heating to all the cells on the box at each time step, this keeps the average temperature at , if the advection part is correct the temperature should remain uniform, and it does!

Now I add the pressure term to the integration of the advected energy to see the effect of this term on the evolution of the advected internal energy (I multiplied the pressure term by )

The result was that the pressure term is cooling some of the cells and bringing them to temperatures below the temperature floor of and then my simple heating scheme is heating those cells, look on the low temperature cells and you will see how they are moving over the temperature floor. My conclusion is that the false adiabats we have been seeing are the result of gas cooled to the temperature floor on the Hydro step and then heated by the UV background, since the heating rate must have a dependency on the density that must be the origin of the slope on the false adiabats.

Now I set a temperature floor at after the hydro step and before the cooling. The absence of false adiabats on lower temperatures indicates that the cooling step is unlikely to cause those false adiabats.

My conclusion is that the pressure term in the hydro step could be a source of error, in the ENZO paper they have:

Following the equation above it seem like they use the values of the reconstructed velocities on the edges of the cell to compute while Cholla is using the centered values on the neighboring cells