begin_html [use: doc/doc.css]

CLAWPACK Code

These codes were developed to accompany the paper {{{ Universality in the run-up of shock waves to the surface of a star by C. Gundlach and R.J. LeVeque. Submitted to J. Fluid Mech., 2010. [www.clawpack.org/links/shockvacuum10 Link to preprint]. }}} 1d Euler equations with polytropic or ideal gas equation of state. The EOS and parameters are specified in [code: setrun.py]. See [link: #instructions Instructions]

Plots of results

After running this code and creating plots via "make .plots", you should be able to view the plots in [link: _plots/_PlotIndex.html].

Fortran files

[code: Makefile]
Determines which version of fortran files are used when compiling the code with make.
[code: setprob.f]
A routine by this name is called by the library routine [clawcode: clawpack/1d/lib/claw1ez.f] and is generally used to set any values needed for the specific problem being solved.
[code: rp1eu_geneos_wb.f]
This is the Riemann solver, which takes the $q$ values stored in the arrays ql and qr and returns the waves in the array wave and speeds in the array s that result in solving the Riemann problem at each cell interface, and the fluctuations amdq and apdq. See [claw:doc/rp1.html] for more information about 1d Riemann solvers.
[code: pres_psi.f]
Specifies the EOS.
[code: qinit.f]
This subroutine sets the initial data q(x,0) at time t=0.
[code: b4step1.f]
Handles the regridding when the shock approaches the right boundary.

Python files

[code: setrun.py]
This file contains a function that specifies what run-time parameters will be used.
[code: setplot.py]
This file contains a function that specifies what plots will be done and sets various plotting parameters.
[code: make_plots.py]
Runs the code and makes the plots for figures in the paper.
[code: setrun2.py]
Used by [code: make_plots.py].
[code: setplot2.py]
Used by [code: make_plots.py].

Data files

Warning: These files are generally changed when setting up a run and the versions here may not be the ones actually used.
[code: claw.data]
This file contains a number of parameter values that are used by CLAWPACK. The values in this file are read by the library routine [clawcode: clawpack/1d/lib/claw1ez.f]. Each line contains one or more values to be read in, followed by comments that are ignored by the Fortran code but may be used by Pythons scripts. Some parameters that you might want to modify are described in the [http://kingkong.amath.washington.edu/clawpack/users documentation].
[code: setprob.data]
This file contains the advection velocity $u$ and various other parameters used in setting the initial conditions. Values in this file are read in by the subroutine [code: setprob.f95].

Library routines

In addition to the Fortran routines in this library, several library routines from [claw:clawpack/1d/lib] are used. See the [code: Makefile] to determine which ones are used. [name: instructions]

Instructions

Developed to work with Clawpack 4.5.0, Subversion revision 700. To run code, edit [code: setrun.py] and then: {{{ $ make .output }}} View plots interactively with Iplotclaw or use "make .plots" to create html files. To run the code 4 times for the test cases used in the paper: {{{ $ python make_plots.py }}} end_html