README.html Source file:   README.txt Directory:   /Users/rjl/git/rjleveque/clawpack-4.6.3/book/chap7/acouinflow Converted:   Mon Jan 21 2013 at 20:15:45   using clawcode2html This documentation file will not reflect any later changes in the source file.

$\phantom{******** If you see this on the webpage then the browser could not locate *********}$
$\phantom{******** the jsMath file load.js *********}$


## CLAWPACK Sample Code

Acoustics equations with zero initial conditions, inflow at x=0, solid wall at x=1.

The density and bulk modulus are specified in setrun.py [.html].

The inflow boundary conditions are set in bc1.f [.html] to be an incoming wave of strength 0.5*sin(omega*t). The value of omega is specified in setrun.py [.html].

Note that after time 2*pi/omega the boundary conditions at the left are replaced by extrapolation (outflow) boundary conditions.

Example [book/chap7/acouinflow] to accompany the book
Finite Volume Methods for Hyperbolic Problems by R. J. LeVeque.

Converted to Clawpack 4.4 form in 2009.

#### Plots of results

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

#### Fortran files

Makefile [.html]
Determines which version of fortran files are used when compiling the code with make and specifies where output and plots should be directed. Type "make .help" at the Unix prompt for options.

driver.f [.html]
The driver routine allocates storage and then calls the main Clawpack routine.

setprob.f [.html]
A routine by this name is called by the library routine clawpack/1d/lib/claw1ez.f [.html] and is generally used to set any values needed for the specific problem being solved.

rp1.f [.html]
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. qinit.f [.html] This subroutine sets the initial data at time$t=0$. bc1.f [.html] This subroutine specifies the boundary conditions, including the inflow condition at the left boundary. This is a locally-modified version of the library routine$CLAW/clawpack/1d/lib/bc1.f .

#### Python files

setrun.py [.html]
This file contains a function that specifies what run-time parameters will be used.

setplot.py [.html]
This file contains a function that specifies what plots will be done and sets various plotting parameters.

#### Data files

Warning: These files are generally changed when setting up a run and the versions here may not be the ones actually used.

claw.data [.html]
This file contains a number of parameter values that are used by CLAWPACK. The values in this file are read by the library routine clawpack/1d/lib/claw1ez.f [.html]. 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 documentation .

setprob.data [.html]
This file may contain various parameters used in setting the initial conditions or otherwise setting up the problem.

#### Library routines

In addition to the Fortran routines in this library, several library routines from \$CLAW/clawpack/1d/lib are used. See the Makefile [.html] to determine which ones are used.