2D HD Test: Rayleigh Taylor Instability
The Rayleigh-Taylor instability problem. This instability occurs in a gravitational field when a dense fluid lies above a less dense fluid.
Location
demo/hd2d_rayleigh_taylor/
Geometry
\(-0.25 \leq x \leq 0.25\)
\(-0.5 \leq y \leq 0.5\).
Force
A constant gravity is applied in the negative \(y\) direction. The gravitational acceleration is set to \(g=0.1\).
Initial Conditions
The initial condition is described by the upper and lower states separated at \(y=0.0\). The density is \(\rho = 2\) in the upper region (\(y \geq 0\)) and \(\rho =1\) in the lower region (\(y < 0\)). The pressure is \(p =p_0 - \rho g y\). The ratio of specific heats is \(\gamma = 1.4\).
Boundary Conditions
A periodic boundary condition is imposed in the \(x\) direction, and a symmetric boundary condition is imposed on all variables in the \(y\) direction. Only \(V_y\) is set antisymmetric at \(y=\pm0.5\). Note that if you set the periodic boundary flag in the \(x\) direction to true in config.yaml, the symmetric boundary condition no longer works.
domain:
periodic:
x: true # when this flag is true, the symmetric boundary condition does not work
Results
A Python script for visualization is provided. The plots of the results are saved in demo/hd2d_rayleigh_taylor/figs.
cd demo/hd2d_rayleigh_taylor
python plot_data.py

3D Version
The extension to 3D is achieved simply by setting k_size to a value larger than 1 in the configuration file config.yaml.
# config.yaml
grid:
i_size: 512
j_size: 512
k_size: 512 # change from 1 to 512