|Groundwater modelling with MicroFEM • Lesson 9B: Batch file|
Before we start with transient models, we have to discuss the batch-file editor. In MicroFEM these two are closely related. As soon as text is entered in the editor it is assumed that we want a transient flow solution.
Load the "Lesson 8" model / Calculate / Options
At this moment "Steady state" is selected and it is not possible to select "Transient".
Click the tab: "Batch-file editor" and enter some nonsense "qqqqq" in the blue text window.
Return to the Options tab.
Because of text in the editor it is assumed that we are dealing with a Transient model. When we calculate the model (click [Calculate]) the commands in the batch-file are processed one-by-one. Only commands known to MicroFEM are processed; other texts are considered Comments and only copied to the black "Calculation of heads" screen.
The commands that MicroFEM understands are 14 "main commands" and several "secondary commands" (also called "specifications") that always look like "something = something". The available main commands are given in a list to the right of the editor window. Clicking one of the commands in the list opens (if applicable) another list with possible secondary commands. Double-clicking a command enters the command in the editor window.
Empty the editor using the Backspace-key / double-click "EVAL" / double-click "Q1" / enter "12345"
This produces the following text in the editor:
We have run the batch-file. The black screen repeats the commands and adds: "New values assigned to 2203 nodes".
[Stop] / [OK]
As a result of our action, all nodes in the model show a discharge of 12345 m3/d. From this simple example we learn that in stead of manual assignments in Input mode, we can also assign values to parameters with the EVAL command in a batch-file.
When we want to run a steady-state model from the batch-file, we can use the main command RUN. However, since this command is meant for transient models, MicroFEM checks whether a time period is specified with the TIME command and whether the Storativity unit is present. The trick now is that when all storativities are set to zero, running the model for any period will produce the steady-state solution.
Use the Project manager to add the "Storativity" unit to the model
Also add an "Xtra worksheet" (12 registers is OK)
Click the Stor tab in the Table and find that the storativities of all nodes are zero by default. (Try to draw contours!)
Edit the batch-file as follows:
Run the batch-file (click [Calculate] / [Stop] / [OK])
Check the model water balance and draw the head contours.
This result is the same as after the first run of Lesson 8 (Maximum head = 25.864).
Since the EVAL command can also be used to assign formulas to parameters, we can extent the batch-file to include a number of iterations similar to Lesson 8.
With the last 3 lines we assign values to the "top level" and the aquifer thickness.
Although somewhat easier than the procedure of Lesson 8, the iterative steps in the above batch-file are still rather awkward. There is a better way in MicroFEM to handle the condition that the transmissivity of an unconfined aquifer depends on the water table height. All you have to do is check the box "Phreatic top aquifer" on the Options tab (or add "phreat=1"to the RUN command) and make sure that you start with a consistent set of values for: H1, T1, TOP and MT1.
After each time step T1, MT1 and TOP are updated according to the new H1.
Check the results.
Save the model.