Flag zones where pressure is updated using entropy. More...
#include "pluto.h"
Functions | |
void | EntropySwitch (const Data *d, Grid *grid) |
Flag cells where pressure has to be updated from the conserved entropy density and compute entropy at the beginning of each integration stage.
The flagging strategy is based on two switches designed to detect the presence of compressive motion or shock waves in the fluid:
By default, if at least one of the switch is FALSE, we flag the computational zone by turning the FLAG_ENTROPY bit of the d->flag
array on. In this way, the default strategy is to evolve the entropy equation everywhere, except at shocks (where both switches are TRUE).
This flag will be checked later in the ConsToPrim() functions in order to recover pressure from the entropy density rather than from the total energy density. The update process is:
{V,s}
where s
is the entropy;{V}
; compute {s}
from {V}
; flag zones where entropy may be used (flag = 1); {U,S}
to primitive: where (flag == 0) { p = p(E); }else{ p = p(S); correct E using new p; }
Reference