'use tabulated unsaturated functions'

Note: this post claims that using the command use tabulated unsaturated functions will result in improved model runtimes. While this is usually true, in some cases it may actually slow down model runtimes. When using unsaturated tables it is necessary for the model to do a lookup followed by linear interpolation to compute the saturation/relative permeability values. If the table is fine enough, then the lookup and linear interpolation may in fact take longer than evaluating the functions directly. The commands table smoothness factortable minimum pressure, and table maximum s-k slope control the overall 'fineness' of the table (i.e., the number of entries in each table).

This post describes how to use the use tabulated unsaturated functions command, introduced in the May 2022 release (Revision 2397) of HydroGeoSphere, to streamline the implementation of tabular constitutive relationships for unsaturated flow. By automating the process of generating and applying unsaturated tables, this command reduces manual steps and can improve model runtimes. However, in some cases, using unsaturated tables may introduce additional computational overhead. We find this command particularly useful for users working with van Genuchten or Brooks-Corey functions who want to optimize performance while maintaining accuracy.


In the May 2022 (revision 2397) release of HydroGeoSphere we introduced a new command called use tabulated unsaturated functions that should reduce model runtimes for those of you who use the unsaturated flow functions (van Genuchten and/or Brooks-Corey), and should help those of you who prefer to use unsaturated tables instead.

First a bit of background… In a HydroGeoSphere model water flow in the unsaturated zone is governed by the three-dimensional modified form of the Richards’ equation (see equation 2.1 in the Theory Manual). The primary variable being solved for in this equation is pressure head, and therefore a constitutive relationship must be established that relate the primary unknown (pressure head) to the secondary variables Sw (saturation) and kr (relative permeability). In HydroGeoSphere these constitutive relationships are established with common functions including van Genuchten [1] and Brooks and Corey [2].

Now the van Genuchten and Brooks-Corey functions can be fully parameterized and utilized to inform unsaturated flow throughout the model domain. This is done using the Unsaturated brooks-corey functions...End or Unsaturated van genuchten functions...End command blocks, and the associated parameters (e.g. the alpha and beta coefficient, air entry pressure, minimum relative permeability, residual saturation, etc.). If the functions are fully defined, then we would say that flow in the unsaturated zone is controlled using functional constitutive relationships (see section 2.8.3.4 of the Reference Manual).

Figure 1: Command Description

Alternatively, these constitutive relationships can be described using simple tables that describe the relationship between pressure-saturation and saturation-relative permeability. If the constitutive relationships are described using these tables, then we would say that flow in the unsaturated zone is controlled using tabular constitutive relationships (see section 2.8.3.5 of the Reference Manual).

Figure 2: Command Added to 'smith.mprops' File

Now, using functional constitutive relationships is typically more computationally intensive than using tabular constitutive relationships. Therefore, we have long supported a command (generate unsaturated tables) that would create the pressure-saturation and saturation-relative permeability tables based on user-defined functional constitutive relationships. In other words, a user would fully define the van Genuchten or Brooks-Corey parameters and the resulting pressure-saturation and saturation-relative permeability tables would be written to a file. The user could then swap the tabular constitutive relationship in to their material property files to effectively replace the functional constitutive relationships, thereby improving model runtimes. This entire process is described in an earlier ‘Command of the Week’ post (Speeding up HGS models using “unsaturated tables”)

The introduction of the new command use tabulated unsaturated functions significantly streamlines this process. Prior to May 2022 a user would have to manually copy the tabular relationships into their material property files, then the user would have to run grok.exe again before running their simulation.

The new command simply automates those steps. As you can see from the command description (Figure 1), “[this command] is similar to the command Generate tables from unsaturated functions, with the added benefit that it allows grok to be run only once and the generated tables will be used. There is no need to copy the generated tables into their respective property files followed by running grok again.”

To demonstrate the new command, you can download a modified version of the “smith-woolhiser” verification problem:

Download: Smith-woolhiser-use-tabulated-unsaturated-functions

Figure 3: Simulation Runtime Improvements

In the porous media material property file (smith.mprops) we can see that the new command has been embedded into each of the Unsaturated van genuchten functions...End command blocks (see Figure 2 ). That’s all you need to do to implement this command!

If we run this model the tabulated unsaturated functions are automatically subbed into the simulation, which should result in improved model runtimes. Figure 3 illustrates the runtime improvements of this modified version of “smith-woolhiser” compared to the regular version of this problem (found in the ‘verification’ folder, within the HGS installation directory).

As you can see, the new command is really simple to implement, and should result in improved runtimes for anyone using functional constitutive relationships. Let us know what you think!

References
[1] van Genuchten, M. T. (1980). A closed-form equation equation for predicting the hydraulic conductivity of unsaturated soils. Soil Sci. Soc. Am. J., 44:892–898.
[2] Brooks, R. J. and Corey, A. T. (1964). Hydraulic properties of porous media. Technical Report Hydrology Papers 3, Colorado State University, Fort Collins, CO.

Previous
Previous

HGS RESEARCH HIGHLIGHT – Sources of surface water in space and time: Identification of delivery processes and geographical sources with hydraulic mixing-cell modeling

Next
Next

CEA-MEM Joint Training Session