-
Notifications
You must be signed in to change notification settings - Fork 32
1D Constant
This test ensures the code can create and maintain a uniform density and pressure, both in space and time. Density is set to 1e4 and pressure to 1.380658e-5 everywhere. Gamma is set to 1.4. This test was performed with the hydro build (cholla/builds/make.type.hydro
) as the given initial magnetic field is zero. Full initial conditions can be found in cholla/src/grid/initial_conditions.cpp
under Constant()
.
#
# Parameter File for box filled with gas
#
################################################
# number of grid cells in the x dimension
nx=10
# number of grid cells in the y dimension
ny=1
# number of grid cells in the z dimension
nz=1
# final output time
tout=100000.0
# time interval for output
outstep=100000.0
# name of initial conditions
init=Constant
# domain properties
xmin=0.0
ymin=0.0
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=1
zu_bcnd=1
# path to output directory
outdir=./
#################################################
# density
rho=1e4
# velocity
vx=0
vy=0
vz=0
# pressure
P=1.380658e-5
# Magnetic Field
Bx=0.0
By=0.0
Bz=0.0
# value of gamma
gamma=1.666666667
Upon completion, you should obtain two output files. The final density and pressure (in code units) of the solution is shown below . Examples of how to extract and plot data can be found in cholla/python_scripts/plot_sod.ipynb
.
We obtain a box of gas that is both constant in time and uniform in space. The L1 error norm for the difference between initial and final states is zero for both density and pressure.