PLUTO  4.4-patch2
Functions
flag_shock.c File Reference

Shock finding algorithm. More...

#include "pluto.h"

Functions

void FlagShock (const Data *d, Grid *grid)
 

Detailed Description

Search and flag computational zones lying in a shock wave. The flagging strategy is based on two switches designed to detect the presence of compressive motion or shock waves in the fluid:

\[ \nabla\cdot\vec{v} < 0 \qquad{\rm and}\qquad \Delta x\frac{|\nabla p|}{p} > \epsilon_p \]

where $\epsilon_p$ sets the shock strength. At the discrete level we replace the two conditions by

\[ \sum_d \frac{ A_{\vec{i}+\HALF\hvec{e}_d}v_{d,\vec{i}+\HALF\hvec{e}_d} -A_{\vec{i}-\HALF\hvec{e}_d}v_{d,\vec{i}-\HALF\hvec{e}_d} } {\Delta{\cal V}_{d,\vec{i}}} < 0 \qquad{\rm and}\qquad \sum_{d} \left|p_{\vec{i}+\hvec{e}_d} - p_{\vec{i}-\hvec{e}_d}\right| < \epsilon_p \min_d\left(p_{\vec{i}+\hvec{e}_d}, p_{\vec{i}-\hvec{e}_d},p_{\vec{i}}\right) \]

where $\hvec{i} = (i,j,k)$ is a vector of integer numbers giving the position of a computational zone, while $\hvec{e}_d = (\delta_{1d},\delta_{2d},\delta_{3d})$ is a unit vector in the direction given by d. Once a zone has been tagged as lying in a shock, different flags may be switched on or off to control the update strategy in these critical regions.

This function can be called called when:

Reference

Authors
A. Mignone (migno.nosp@m.ne@p.nosp@m.h.uni.nosp@m.to.i.nosp@m.t)
Date
July 31, 2018

Function Documentation

◆ FlagShock()

void FlagShock ( const Data d,
Grid grid 
)
Parameters
[in,out]dpointer to data structure
[in]gridpointer to grid structure