CLAWPACK (Conservative LAW's PACKage) is a package of Fortran subroutines for solving time-dependent hyperbolic systems of conservation laws in 1, 2 and 3 space dimensions made by Randall J. LeVeque.The finite differences method is used with a flux limitation .This library is freely available on the web and can be downloaded from http://www.amath.washington.edu/~rjl/clawpack.html.
Organization of CLAWPACK
A number of applications are in the claw/applications directory. These are typically subdivided into 1d and 2d, and then within each of these is a subdirectory rp which contains the Riemann solver(s) and other subdirectories for solving particular problems or classes of problems. These are :
This is the basic directory containing the softawre package
itself, and has subdirectories 1d, 2d, and 3d,
containing the algorithms in 1,2 and 3 space dimensions
respectively.There is also a subdirectory limiters which
contains limiter functions used in all dimensions.
Each of the dimensionnal subdirectories is organized in a similar manner, and 1d will be described in a next part Example of 1D Fortran subroutines.
This directory contains the documentation in the form of postcript files. This is divided into Notes on various aspect of the software or particular applications :
Introduction to using clawpack
The Clawpack Algorithms
Capacity-form flux differencing
Advection on a curvilinear grid
Advection in stratified fluid
Saturated groundwater flow
Acoustics in a heterogenous medium
Isothermal gas dynamics
See also the paper
Wave propagation algorithms for multi-dimensional hyperbolic systems, J. Comput. Phys. 131(1997) pp 327-353.
After downloading content.ps, you can print it with giving the
following command :
lp -dprinter's name cover.ps note*.ps biblio.ps
Getting started with Clawpack
The best is to look at the simple example programs included 1d, 2d or 3d directories. For example in clawpack/1d/ you will find a subdirectory nammed example. It is organized in the same manner as other applications directories. It contains the following files :
Description of the example
This file contains the Unix instruction needed to compile the code, pulling together the necessary surboutines from different directories. Giving the command
at the unix prompt will execute f77 to compile the program and produce the executable
If it does not work , verify that the acces permission of compile for the user is x; if not give this command :
In order for this to work properly, the environnement variable CLAWPACK must be set to point to the proper path for the clawpack routines. This can be put in your .cshrc file.
Data file is read in by the program to set various parameters. To run the code, type
The main driver routine for this example, which calls clawpack.
Sets initial conditions
To view the results, open matlab and then type : plotq
For more details, see the manual and forget the files README.