Cooling: internal energy vs. enthalpy

Cooling in AstroBEAR is currently handled by removing energy from the internal energy. In the Raymond code, cooling is different, but it appears to be equivalent to removing energy from the enthalpy. I have derived the resulting pressure for both cases below.


Internal Energy Formulation (current implementation)

The internal energy is defined as

.

Let be the energy loss due to cooling. The new internal energy is

,

.

Therefore, the new pressure is

.

For an ideal gas with

.


Enthalpy Formulation (proposed change)

The enthalpy is defined as

.

After cooling, we have

,

,

.

Therefore, the new pressure is

.

For an ideal gas with

.


It appears that the enthalpy formulation would result in removing less thermal pressure, and it would therefore have a higher temperature in comparison to the internal energy formulation.

Comments

1. Jonathan -- 11 years ago

The value for 'Q' used in the chance in energy and chance in enthalpy should not be the same. The change in enthalpy would include not just the heat loss, but the change in pV as well. And you should find that QHh = 3/5Qe. If we are using the same 'Q' function as Raymond - then I believe we should multiply that Q by gamma for use in AstroBEAR.

2. ehansen -- 11 years ago

So I think Jonathan is saying that in the enthalpy formulation, you have to remove from h. This would make the change in pressure equal to which is the same as the internal energy formulation.

This means either method should give the same temperature.