The groundwater component of SWMM 5 is found in the gwater.c code. It (as is all of SWMM 5) is excellently written in small functions by Lew Rossman of the EPA during the SWMM 5 development process. However, code being code sometimes it is easier to see how the code is functioning. This blog or note tries to show that function.
The groundwater component consists of groundwater data (gw in the equation) and aquifer data (a) in the equation. The equation for the groundwater volume is shown in Figure 1. The volume is the water content (theta) times the upper depth and the porosity of the aquifer times the lower depth (Figure 2).
Figure 1. Groundwater Volume Calculations
Figure 2. Lower and Upper Depth of the Groundwater Compartrment