Skip to content
evazlimen edited this page Jul 22, 2024 · 3 revisions

2D Gresho Vortex: Currently broken

This test is used to test accuracy, conservation of angular momentum, and symmetry. It produces a stationary, time-independent vortex in which the centrifugal force is exactly balanced by pressure gradients. Parameters from Liska and Wendroff 2003. A vortex is centered at the origin, with density set to 1.0 everywhere. Gamma is set to 1.4. Full initial conditions can be found in cholla/src/grid/initial_conditions.cppunder Gresho().This test is performed with the static gravity build (cholla/builds/make.type.static_grav) and Van Leer integrator.

Parameter file: (cholla/examples/2D/Gresho.txt)- for dev branch

On main you will need to comment/uncomment appropriate accelerations in src/gravity/static_grav.h

#
# Parameter File for the 2D Gresho vortex test.
#

######################################
# number of grid cells in the x dimension
nx=40
# number of grid cells in the y dimension
ny=40
# number of grid cells in the z dimension
nz=1
# final output time
tout=3.0
# time interval for output
outstep=0.05
# value of gamma
gamma=1.4
# name of initial conditions
init=Gresho
# static gravity flag
custom_grav=1
# domain properties
xmin=-0.5
ymin=-0.5
zmin=0.0
xlen=1.0
ylen=1.0
zlen=1.0
# type of boundary conditions
xl_bcnd=1
xu_bcnd=1
yl_bcnd=1
yu_bcnd=1
zl_bcnd=0
zu_bcnd=0
# path to output directory
outdir=./

Upon completion, you should obtain 61 output files. The initial and final densities and pressures (in code units) is shown below. Examples of how to plot projections and slices can be found in cholla/python_scripts/Projection_Slice_Tutorial.ipynb.
Density:

Pressure:

An evolution of the pressure with density contours at 10 fps is shown here:

Final pressure and magnitude of velocity of the upper right corner is shown below:

We can compare final pressure and magnitude of velocity to Multiphase Flow with Interphase eXchanges (MFiX) test manual:

This is very different from the Cholla solution. However, the Van Leer integrator appears to produce a velocity solution which more closely matches that of MFiX. The result of the Simple integrator is shown below:

Additionally, no difference was found when turning on the H correction.

Clone this wiki locally