GeoFLAC Quick-Start Guide
July 28, 2026 ยท View on GitHub
This guide will walk you through compiling the solver, running the standard subduction case, and visualizing the numerical results.
1. Directory Layout
The GeoFLAC repository is structured as follows:
src/: The core Fortran 90 solver source code, including headers, math libraries, and the compilation Makefile.util/: Post-processing and analysis utility scripts (e.g., VTK converters, plotting scripts).examples/: Step-by-step benchmark tutorials (directories starting withtutorial*) and input templates.doc/: Documentation split into user references (root level) and internal code guides (doc/developer/).
2. Compilation
- Navigate to the source directory:
cd src - Build the optimized parallel binary with your Fortran compiler (e.g.,
gfortran):
(Note: Bothmake clean make FC=gfortran omp=1FC=gfortranandF90=gfortranare supported.) This will generate a compiled binary namedflacin thesrc/directory.
3. Running Your First Simulation
We provide a standard Ocean-Ocean Subduction model under the examples/ directory.
- Navigate to the examples folder:
cd ../examples - Clear out any old output files:
rm -f *.0 sys.msg output.asc _contents.rs - Set the number of threads for parallel execution (OpenMP):
export OMP_NUM_THREADS=15 - Run the subduction simulation using the input file:
../src/flac subduction.inp
You will see progress messages indicating step count and elapsed execution time. Once the simulation completes, it will display Congratulations !.
4. Visualizing Results with VisIt or ParaView
GeoFLAC writes its outputs in custom format files. We provide a utility script to convert these outputs into standard VTK files.
- Convert the generated binary outputs to VTK files:
This will generate a series of../util/flac2vtk.py ..vtsstructured grid files (e.g.,flac.000001.vts,flac.000002.vts, etc.). - Launch VisIt or ParaView.
- Open the
flac*.vtsfile series. - Select the variables you want to display:
Phase: Visualizes different material phases.Strain rate: Visualizes the deformation.Temperature: Visualizes the temperature field. It is usually plotted as contours (isotherms).Velocity: Visualizes velocity vectors.
- Remember to fix the min/max range of the colorbar and the magnitude scale of vectors.