Numerical models simply divide the model space into subspaces in time and space.
Solve for the GW head
Compute flow
Solving a numerical model means finding a solution that satifies the governing differential equations (heads at each computational node or cell head must satisfy the water balance)
FDM vs. FEM / FVM approaches.
Constant properties within each cell / element / volume
FDM -> head in cell center, FVM -> head at the node
FDM -> flows at the cell interface, FVM -> flows at the nodes
So technically, FDM assumes cell properties are constant AT the cell centers
In FDM the governing differential equations are descritized on the grid
In FVM/FEM the governing differential equations are integrated over finite volumes
We will use FDM
Grid and mesh.
Structured and unstructured
Triangular, hexagonal and regular
We will strictly use rectangular grids, due to later similarity with MODFLOW
The Finite Difference Method (FDM) and the finite difference scheme in 2D
2D model with a 2D finite difference scheme
3D model is not much more complicated
Divide a model into Ny rows and Nx columns
dx and dy need not to be constant
Z-direction is assumed to be small but can vary from cell to cell
Heads are calculated at the cell centers, and flow is calculated at the cell interfaces
Set up the water balance for each cell center, then solving these water balances simply means computing the heads in each cell that satifies ALL nodes water balances
Governing Equations
System of equations for water balances at nodes (FVM) or cells (FDM)
FDM is derived by using the differential equations directly
FVM requires the governing partial differential equation to fulfilled over the cell volume
FVM is more complicated to solve. However, you get more flexibility in cell shapes
Both methods yields a set of water balances, on for each node
Both have "links" between each node. Different approaches
The number of equations matches the number of non-fixed nodes (water balances)
A model with 300 rows, 300 columns and 10 layers yields 0.9 million equations with the same order of unknowns
The flow $Q_{i,j}$ from node $i$ in the direction of the adjecent node $j$ with heads $\phi_i$ and $\phi_j$ is described by:
$$ Q_{i,j} = C_{i,j}(\phi_i - \phi_j) = \frac{1}{R_{i,j}}(\phi_i - \phi_j)$$
$C_{i,j}$ $[(L^3 / T) / L]$ or $[L^2 / T]$ is the conductance and its reciprocal is the "resistance" $[(L / (L^3 / T)]$.
Existing numerical software
MODFLOW (GMS), FEFLOW, MIKE SHE, etc.
Why program our own model?
Better understanding
Good way to learn "real" programming
How to get help?
Search for your instruction and add "python" at the end. Example: "flip array python"