Density and Pressure Protections

In physics.data, there are options for protecting density and pressure. These control the Protect routines in EOS.f90. This routine is called various times throughout the simulation to make sure the density does not go below MinDensity and the temperature does not go below MinTemp.

There is also a routine called PrimProtect in EOS.f90. This routine is also called to protect density and pressure. The difference is that it is called on the q-array when the code is calculating predictor fluxes and final fluxes. Due to the way the code is written, PrimProtect cannot make use of the different protection options in physics.data.

Below, I have described how each routine handles density and pressure protections.


Protect

If the density < MinDensity, then a variety of things can happen depending on the options set in physics.data. Because momentum and density are related, they are both protected.

Momentum

  1. momentum is conserved and nothing happens
  2. momentum is set to zero
  3. momentum is set using average nearby velocity (default)

Density

  1. density is set to MinDensity
  2. density is set to the minimum nearby density
  3. density is set to average nearby density (default)

Then, no matter what options are chosen, the code sets the energy to zero for some reason.

Pressure

This protection occurs when the temperature < MinTemp.

  1. temperature set to MinTemp
  2. pressure set to minimum nearby pressure
  3. pressure set to average nearby pressure
  4. temperature set to minimum nearby temperature
  5. temperature set to average nearby temperature (default)


PrimProtect

Since data about neighboring cells is not available to the routines that call PrimProtect, the protection is more limited. As before, the momentum and density protection occurs when density < MinDensity and the pressure protection occurs when temperature < MinTemp.

Momentum

  1. momentum set to zero

Density

  1. density set to MinDensity

Then, the temperature is set to MinTemp.

Pressure

  1. temperature set to MinTemp

Comments

No comments.