Corrections to the Buoyancy Terms in Viper

The problem

While working more with the viper code, I discovered that the buoyancy terms were not being computed correctly. Basically, the model assumes that the air density within the wake cell is constant with altitude during the descent in the absence of entrainment or detrainment of ambient fluid. This assumption is incorrect since the air within the wake cell will experience adiabatic compression as it encounters increased pressure on its downward trajectory. The density within the wake cell must respond to this effect in addition to exchanges with the ambient fluid. Since the buoyancy term is related to the air density, errors in the density evolution carry over to the buoyancy term in the momentum equation. The following sketch illustrates the concept.


compression


With this error, viper would predict a non-zero buoyancy force for a neutrally-stratified atmosphere. The following plots illustrate the incorrect behavior. These plots were generated by running viper with a specified temperature profile, but the remainder of the parameters consistent with case 001 of the Frankfort B744 data set.


neutral temperature incorrect neutral temperature results


Viper would also predict no buoyancy force for an isothermal atmosphere. This is incorrect since an isothermal atmosphere is actually rather stably stratified. The following plots illustrate the incorrect behavior.


isothermal temperature incorrect isothermal temperature results


The fix

The problem was corrected by adding the appropriate source term to the mass balance equation to account for adiabatic compression of the wake cell. The source term is derived by assuming that the pressure within the wake cell remains in equilibrium with the local ambient pressure during the descent. It is further assumed that the density within the wake cell responds to the increasing pressure via an isentropic compression (adiabatic and reversible). The source term is quite compact and relies on variables readily available where it is needed in viper. It was also found that viper would not compute density profiles consistent with the input temperature profile and the hydrostatic balance. This portion of the code was also corrected. With these corrections, viper now predicts no buoyancy force for a neutrally-stratified atmosphere, as the following plots illustrate.


neutral temperature correct neutral temperature results


In addition, the corrected viper behaves as expected, predicting a non-zero buoyancy force for an isothermal atmosphere.


isothermal temperature correct isothermal temperature results