|
Richards
Solving The Richards equation with temporally periodic surface boundary conditions
|
This is a model for solving the richards equation for unsaturated groundwater flow in one dimension. For background information on the equations used here, please see Chapter 7, Section 4 of Margulis, S. "Introduction To Hydrology." Used as textbook in C&EE 150 (2014).
main programs that generate three different executables.main.cc is compiled into richards.exe, which integrates the model without any cycling. This program is most useful for testing. The scripts/plot_out.py program plots the results generated by theis program.main_periodic.cc is compiled into richards_periodic.exe, which spins up the model with cyclical surface wetting, then integrates over a single cycle and writes results. The scripts/plot_period.py script is meant to plot the results of this program.main_periodic_batch.cc is compiled into richards_periodic_batch.exe, and this program is more involved. It sweeps over ranges of parameters, spinning up and integrating the model for all possible combinations of these parameters. It writes the results of a single cycle for all the combinations. Integrations are performed in parallel, on however many threads you have available. Some of the settins in the input settings file are overridden inside the program.The first two programs require two input arguments at the command line:
The third program requires three command line arguments:
What is a settings file? An example should be included in the repository as settings.txt. This file is the means by which the model is configured. Each program reads and parses the file for information about how to set up the grid, physical parameters, integration settings, and output options. Browse that sample file for a complete list of the settings. The final section of that file, "tracker and output settings", controls which model variables are written to file as part of the model output.
To compile the model, edit the first four variables in the Makefile, then run make. The model runs on top of ODE solvers from libode, which must be downloaded and compiled first.
After things are compiled, a quick test would consist of: