********************************************************************* * Solving the Advection-Diffusion * * Equation in Irregular Regions * * * ********************************************************************* * * * * * This code reproduces the numerical results from the paper * * * * Calhoun, D., LeVeque, R.J.,'A Cartesian Grid Finite-Volume * * Method for the Advection-Diffusion Equation in Irregular * * Geometries', submitted to Journal of Computational Physics * * 1998. * * * * In addition, the code can be used for user-supplied geometries * * for which a stream function is known. * * * * Please direct all questions and comments to either one of the * * authors : * * * * calhoun@amath.washington.edu * * rjl@amath.washington.edu * * * * September 14, 1998 * * Department of Applied Mathematics * * University of Washington * * Seattle, WA 98191 * * * ********************************************************************* * ---------------------------------------------------------------- * Downloading the code * ---------------------------------------------------------------- The code which goes along with the paper cited above can be downloaded from the website http://www.amath.washington.edu/~rjl/clawpack/cartesian/advdiff/ The entire directory is available in compressed tar format in the file http://www.amath.washington.edu/~rjl/clawpack/cartesian/advdiff.tar.gz and can be uncompressed and extracted using the commands gunzip advdiff.tar.gz tar -xvf advdif.tar Relevant subdirectories will be created. * ---------------------------------------------------------------- * Compiling the code * ---------------------------------------------------------------- The code is written in FORTRAN 90 and FORTRAN 77. To compile the code, use the GNU make utility 'gmake'. Type gmake from the directory containing the source code files. This uses the makefile GNUmakefile, which is provided. * ---------------------------------------------------------------- * Input parameters * ---------------------------------------------------------------- Three input files data_ are provided. These files reproduce the results in the paper cited above. The input files are data_channel, data_annulus and data_irr. Once the code has been compiled, the code can be run by typing, for example advdiff < data_irr To modify input parameters, the user can modify the file data_ Input parameters (also documented in files data_) are : dx, dy : mesh size in x and y directions dT, T_final, nout : Time steps for output. Output data files will be produced at times [0,dT, 2*dT, ... nout*dT]. Note that several inner loop time steps must be taken in order to ensure stability. Size of these inner time steps is determined automatically. D : Diffusion coefficient. ax, ay, bx, by : Size of computational domain. Lower left corner of grid is (ax,ay) and upper right hand corner is (bx, by). iprob : Problem geometry. Choices are : 1 = channel 2 = annulus 3 = irregular objects 4 = user specified domain diff_term : Indicates whether to include diffusion term 0 = do not include diffusion term 1 = include diffusion term adv_term : Indicates whether to include advection term 0 = do not include advection term 1 = include advection term outdir : String containing location for large output files. Name should be enclosed in single quotes. Examples : './' Write output files to current directory. './output/' Write output files to directory 'output' off of current directory. NOTE : Directory specified MUST exist or code will fail. Directory is NOT automatically created. Also, the smaller output files will always be written to the current directory, regardless of how the output string is specified. All output files have a name of the form fort.. * ---------------------------------------------------------------- * User specified geometry * ---------------------------------------------------------------- In addition to the three geomtrical configurations provided (channel, annulus, irregular regions), the user can specify their own geometry by modifing the file 'user_setup.f90'. This file contains a working example which can be used as a template for user specified geometry. The input data file data_user can be used as a template as well. * ---------------------------------------------------------------- * Plotting the output * ---------------------------------------------------------------- To plot output, several Matlab scripts are provided. The driver script is 'plot_flow'. To run this, the user should type, at the Matlab prompt >> plot_flow Output files will be retrieved from the directory specified in the data_ file. This will plot the results of the fortran run. If the user specifies their own domain (by modifying the file user_setup.f90), then the file 'init_shapes.m' should be modified to plot the user-defined domain. * ---------------------------------------------------------------- * CLAWPACK and BLAS and routines * ---------------------------------------------------------------- All necessary BLAS and CLAWPACK and routines are supplied for the user in the directories dblas and CLAW. More complete documention on the use of the CLAWPACK software, as well as the complete CLAWPACK package, can be found at http://www.amath.washington.edu/~rjl/clawpack.html ------------------------- END OF README FILE ------------------------------