Index of /courses/2004spring/AST802/shock
Name Last modified Size Description
Parent Directory -
040224.1201.jou 24-Feb-2004 12:10 620
040226.1033.jou 26-Feb-2004 10:39 1.0K
040316.1240.jou 16-Mar-2004 12:51 1.0K
IRIX64/ 26-Feb-2004 09:49 -
Makefile 19-Jun-2001 05:26 1.5K
VPP300/ 26-Feb-2004 09:49 -
alpha/ 26-Feb-2004 09:49 -
aver.f 06-Jun-2000 09:36 1.5K
boundary.f 15-Apr-2004 13:47 11K
cdata.in 30-May-2000 15:49 309
cdata.inc 30-May-2000 06:59 773
convect.in 17-Feb-2004 15:12 491
convect2.in 20-Sep-2000 23:47 415
core 22-Mar-2005 18:10 0
courant.f 09-Jun-2000 09:08 2.5K
cparam.inc 16-Apr-2004 08:36 410
cprint.inc 01-Jun-2000 09:24 672
cprint.sed 01-Jun-2000 09:24 45
cread.inc 01-Jun-2000 09:24 356
cread.sed 01-Jun-2000 09:02 56
cread_com.inc 30-May-2000 15:48 271
cread_com.sed 21-Jun-1999 09:08 47
ctime.inc 02-Jun-2000 12:34 182
cwork.inc 02-Jun-2000 11:51 1.1K
cwrite_com.inc 30-May-2000 15:48 272
df.ifc 21-Jun-1999 09:08 1.3K
hd.f 13-Apr-2004 14:07 5.9K
hd.log 16-Apr-2004 09:02 0
hd_ext.f 26-Feb-2004 06:48 5.7K
hd_per.f 23-Mar-2004 14:31 5.7K
hyman.f 03-Nov-2000 14:11 4.1K
i386/ 26-Feb-2004 09:49 -
idl/ 20-Apr-2004 11:57 -
in.sed 21-Jun-1999 09:08 80
io.f 17-Oct-2001 16:05 5.8K
ism.aver 20-Apr-2004 12:05 22K
ism.com 20-Apr-2004 12:05 200
ism.dat 20-Apr-2004 11:55 3.1M
ism.dim 20-Apr-2004 12:05 70
ism.sav 20-Apr-2004 12:05 3.1M
job.in 16-Apr-2004 09:01 462
main.f 19-Jun-2001 05:26 3.0K
os.f 02-Jun-2000 12:35 862
os_win.f 08-Aug-2000 13:08 1.3K
rk3_2n.f 03-Nov-2000 14:11 1.2K
rs6000/ 26-Feb-2004 09:49 -
shock.in 26-Feb-2004 10:36 434
shtube0.f 24-Jul-1992 10:42 2.3K
smooth.f 21-Jun-1999 09:08 2.3K
sparc/ 26-Feb-2004 09:49 -
stagger.f 26-Feb-2004 09:51 36K
stagger.ifc 02-Jun-2000 11:49 8.7K
start.f 19-Feb-2004 11:58 3.3K
step 06-Apr-2004 12:52 77
test.in 04-Jun-2000 16:24 410
test_stagger.f 02-Jun-2000 12:37 6.8K
wave.in 26-Feb-2004 10:40 434
hd.x calculates 3D compressible flows
1. Inputs
Required: job.in
Optional: input snapshot file
2. Ouputs
Output snapshot file
Average values file
Scalar data file
Optional: restart file
Optonal: time step info
3. To compile
make
Optimization on kepler -O1
Possible modifications:
hd.f - boundary condition calls
hd.f - energy diffusion
4. To run
hd.x
5. job.in file
,, means use the value already in the code
First line is job name
Next 4 lines are file names
Input snapshot file, if any. If no input file put init to use start.f
Ouput snapshot file
Output restart file
Output timestep file
iread is the snapshot to read from the input snapshot file
iwrite is the snapshot to start writing on the output snapshot file
nstep is the maximum number of time steps
tstop is the maximum time of the run
dtsav is the time interval to save snapshots
dtscr is the time interval to save restart snapshots (overwritten)
nx,ny,nz are dimensions
x1,x2,x3,x4 are used in setting a mutlilayer structure in start.f
widthy, widthz are widths in the periodic directions
dx, dy, dz are the step sizes
t is the initial time
dt is the initial time step (must be smaller than expect code to want)
dtold is the old time step (when restarting)
Cdt is the courant factor
nu1,2,3 are the numerical viscosity coefficients for sound speed,
advection velocity and shock compression
flux is a flux
grav is gravity when stratified
dun1,dnu2 are used in multilayer states
eetop,eebot are the top and bottom values of the energy per unit mass
tcool is the optically thin cooling time
pxdamp is damping time for vertical oscillations
gamma is the ratio of specific heats for an ideal gas
drive is used in some simulations
ssbot, ppbot are the bottom entropy and pressure
6. Output files
snapshot file:
variables r (density), px, py, pz (momenta), e (internal energy)
are stored in contiguous blocks of dimension mx*my*mz
dim file:
*.dim (where * is the job name from job.in)
gives the dimensions mx, my, mz
the grid spacing dx, dy, dz
gamma, 1 for x vertical
number of variables (5 for HD, 8 for MHD)
This is needed by idl to know the size of the blocks in the snapshot file
com file:
*.com (where * is the job name from job.in)
values of scalar variables from cdata.inc
(the same variables as specified in job.in)
aver file:
*.aver (where * is the job name from job.in)
horizontally averaged variables, written in aver.f
currently: density, x momentum or mass flux, turbulent pressure, gas
pressure, convective flux, kinetic energy, kinetic energy flux
You can modify aver.f to calculate and store whateve you want
7. Analyzing output
Use idl.
open,a,'snapshot file name'
Uses the *.dim file to set up a variable a with the data blocks in it.
@common_cdata
Sets up common for dimensions
nt = number of snapshots printed by open command
To get variables from the snapshot file for snapshot number t
r=frho(a,t) density
px=fpx(a,t) mass flux or momenta
py=fpx(a,t)
pz=fpx(a,t)
ux=fux(a,t) velocity
uy=fux(a,t)
uz=fux(a,t)
e =fe (a,t) energy per unit volume
ee=fee(a,t) energy per unit mass (~temperature)
To get variables for all times
r=fltarr(nx,nt)
for t=0,nt-1 do r(*,t) = frho(a,t)
etc.