volcano-ash3d-optionalmodules is a repository the illustrates how to build user-created
optional modules to link into the core Ash3d source code. In this case, the module
built is TestCases
.
To build the module, change to the src
directory and edit makefile_optmod
.
You will need to ensure that the path to the Ash3d repository is set
correctly for your system.
ASH3dCCSRC=~/work/USGS/Software/GIT/volcano-ash3d/src
Once this path is set, you can test the build process by typing:
make -f makefile_optmod
This will build the module in:
volcano-ash3d-optionalmodules/src/Optional_Modules/TestCases/Testcases.f90
Note that there two other files that replace the counter parts in volcano-ash3d
:
-
Ash3d_TC.F90
This file is a local copy of the the top-level file of the Ash3d code, but with the calls to the optional module subroutines as needed. The design goal is that the optional modules should be minimally invasive and hopefully only require editing this top-level file. -
Set_BC_TC.f90
Unfortunately, sometimes a module requires editing additional file of the core-code. In this case, the method of manufactured solutions test case requires a more general treatment of boundary conditions.
As with the makefile from the core-code repository, you can edit the settings for
SYSTEM
to change the compiler, RUN
to switch between debugging, profiling, or
optimized code, among various other settings.
Other than being an example of how to build custom modules against the core-code, this repository tests the performance of the Ash3d routines using as series of convergence tests:
-
Linear horizontal advection (both Cartesian and Spherical)
- x+y0
- x-y0
- x0y+
- x0y-
- x+y+
- x-y-
- x-y+
- x+y-
-
Linear vertical advection
- z+ vf0
- z- vf0
- z0 vf+
- z0 vf-
-
Horizontal rotation of block and cone (both Cartesian and Spherical)
-
Diffusion (Cartesian only)
- Explicit Diffusion in x
- Explicit Diffusion in y
- Explicit Diffusion in z
- Crank-Nicolson in x
- Crank-Nicolson in y
- Crank-Nicolson in z
-
Horizontal rotational shear (both Cartesian and Spherical)
-
Method of manufactured solutions (Cartesian only)
To run all the test cases, change to the directory:
volcano-ash3d-optionalmodules/examples/Testcases
and edit the run_all.sh
script.
To control how many limiters to use, set il
to a number from 0-6, where
0=No limiter, 1=Superbee, 2=Lax-Wendroff, 3=Beam-Warming, 4=Fromm, 5=Minmod,
and 6=MC. The default is il=1
which means both the No-limiter and Superbee
cases are run.
To control the number of refinement steps, set ix
to be 1-5.
To control which test cases are run, toggle the corresponding elements of cases=()
from 0 (do not run) to 1 (run case).
Note that post-processing requires octave
, both for plotting and to calculate convergence rate.
Hans F. Schwaiger [email protected]