Showing posts with label WHETGEO 1D. Show all posts
Showing posts with label WHETGEO 1D. Show all posts

Sunday, June 22, 2025

The tricky Physics of freezing soils

 Soil freezing is one of the most complex physical processes affecting the Earth's hydrological cycle, yet it remains poorly understood despite its critical importance for climate modeling, agriculture, and infrastructure.  This presentation aims to introduce the intricate thermodynamic relationships governing frozen soil behavior and introduces innovative numerical solutions that are revolutionizing how we model these processes. A video on these slides can be found here. 

Modified from Lu and Godt, 2012. Find the presentation by clicking here

"Permafrost is not ice." This seemingly simple observation reflects a profound understanding that frozen soil represents a complex multiphase system where air, biota, liquid water, ice, and soil particles coexist in dynamic equilibrium. The traditional view of soil freezing as a simple phase transition grossly oversimplifies the physics involved.

The presentation emphasizes that proper soil freezing models must account for three fundamental thermodynamic potentials: temperature (or its inverse in non-equilibrium thermodynamics), pressure exerted by the system on the environment, and chemical potential. Each of these potentials drives different aspects of the freezing process and their interactions determine the overall system behavior.

The energy conservation equation reveals the intimate coupling between heat transfer and mass transfer during freezing. When soil freezes, the energy budget becomes strongly coupled to the mass budget and phase transitions, creating a system where small changes in one variable can cascade through the entire soil column. This coupling is mathematically expressed through terms that include both temperature gradients and mass flux divergence, highlighting why traditional approaches that treat heat and water transport separately often fail.

One of the most important insights from recent research concerns how water actually freezes in soil pores. Due to freezing point depression effects, the largest pores freeze first. This sequential freezing process means that as temperature drops, progressively smaller pores freeze, each at different temperatures determined by the complex interplay of solute concentration, pore geometry, and surface tension effects.

The research identifies several mechanisms controlling freezing point depression: the Gibbs-Thomson effect (curvature-induced freezing point depression), solute presence, ice nucleation kinetics, and interactions with pore boundaries. These processes combine to create soil freezing characteristic curves that show unfrozen water content decreasing gradually with temperature rather than exhibiting the sharp transition seen in pure water.

An educated guess in understanding soil freezing comes from recognizing its mathematical similarity to soil drying. The "freezing = drying hypothesis" suggests that during freezing, the effective chemical potential is determined only by liquid water, not the total water content. This insight allows researchers to use established soil water retention theory, such as the van Genuchten or Kosugi models, to predict freezing behavior.

This analogy proves particularly powerful because it enables the use of well-established relationships like Mualem's theory for predicting hydraulic conductivity as a function of unfrozen water content. The result is a unified framework where soil freezing can be modeled using modified versions of the Richardson-Richards equation, the standard equation for unsaturated soil water flow.

The mathematical complexity of coupled heat and water transport in freezing soil creates severe numerical challenges. The governing equations become highly nonlinear, with hydraulic capacity functions that exhibit sharp peaks near the freezing point. Traditional Newton methods fail to converge when solving these systems, leading to computational failures or unphysical results.

The breakthrough solution presented is the nested Newton-Casulli-Zanolli (NCZ) algorithm, which decomposes the nonlinear problem using Jordan decomposition. This approach separates the sharp nonlinear functions into monotonic components that can be solved iteratively. The NCZ algorithm dramatically outperforms traditional Newton methods, allowing stable solutions with large time steps while maintaining energy conservation.

The researchers have implemented these theoretical advances in WHETGEO-1D, a sophisticated modeling framework built on object-oriented programming principles. Unlike traditional procedural codes that hardwire specific equations, WHETGEO uses abstract interfaces and factory patterns to allow flexible combination of different soil water retention curves, hydraulic conductivity functions, and energy budget formulations.

This design philosophy, built on the OMS3 framework, enables rapid model evolution and prevents the "screwdriver problem" where having only one tool leads to seeing every problem as a screw. The modular architecture allows researchers to easily substitute different physical theories while maintaining the same robust numerical solver.

Field applications demonstrate WHETGEO's capabilities across multiple scales and conditions. The model successfully simulates complex scenarios including infiltration events that bring thermal energy deep into soil columns, surface energy exchanges during diurnal cycles, and seasonal freeze-thaw cycles. Comparison studies show that including phase change effects significantly alters predicted soil behavior, with frozen periods exhibiting markedly different hydraulic properties than unfrozen conditions.

The model's efficiency allows simulation of multi-year periods with time steps of hours or days, making it practical for long-term climate studies. This computational efficiency, combined with rigorous energy conservation, makes WHETGEO suitable for integration into larger Earth system models. WHETGEO  is an open source software distributed under the GPL 3.0 license. For learning its use, please browse the GEOframe 2022 Summer School slides and videos.

Bibliography

Amankwah, S. K., A. M. Ireson, C. Maulé, R. Brannen, and S. A. Mathias. 2021. "A Model for the Soil Freezing Characteristic Curve That Represents the Dominant Role of Salt Exclusion." Water Resources Research 57 (8). https://doi.org/10.1029/2021wr030070.

Casulli, Vincenzo, and P. Zanolli. 2010. "A Nested Newton-Type Algorithm for Finite Volume Methods Solving Richards' Equation in Mixed Form." SIAM Journal of Scientific Computing 32 (4): 2225–73.

Dall'Amico, M., S. Endrizzi, S. Gruber, and R. Rigon. 2011. "A Robust and Energy-Conserving Model of Freezing Variably-Saturated Soil." The Cryosphere 5 (2): 469–84. https://doi.org/10.5194/tc-5-469-2011.

Devoie, Élise G., Stephan Gruber, and Jeffrey M. McKenzie. 2022. "A Repository of Measured Soil Freezing Characteristic Curves: 1921 to 2021." Earth System Science Data 14 (7): 3365–77. https://doi.org/10.5194/essd-14-3365-2022.

Groot, Sybren Ruurds de, and Peter Mazur. 1984. Non-Equilibrium Thermodynamics. New York, NY: Dover Publications.

Kosugi, K. 1999. "General Model for Unsaturated Hydraulic Conductivity for Soils with Lognormal Pore-size Distribution." Soil Science Society of America Journal 63 (2): 270–77. https://doi.org/10.2136/sssaj1999.03615995006300020003x.

Lunardini, V. J. 1985. "Freezing Soil Phase Change Occurring over Finite Temperature Difference." Proceedings 4th International Offshore Mechanics Arctic Engineering Symposium. ASM.

Muskat, M., and M. W. Meres. 1936. "The Flow of Heterogeneous Fluids through Porous Media." Physics 7 (September): 346–63. https://doi.org/10.1063/1.1745403.

Tubini, Niccolò. 2021. "Theoretical and Numerical Tools for Studying the Critical Zone from Plot to Catchments." Ph.D., Università degli Studi di Trento. https://iris.unitn.it/retrieve/handle/11572/319821/498093.

Tubini, Niccolò, Stephan Gruber, and Riccardo Rigon. 2021. "A Method for Solving Heat Transfer with Phase Change in Ice or Soil That Allows for Large Time Steps While Guaranteeing Energy Conservation." The Cryosphere 15 (6): 2541–68. https://doi.org/10.5194/tc-15-2541-2021.

Tubini, Niccolò, and Riccardo Rigon. 2022. "Implementing the Water, HEat and Transport Model in GEOframe (WHETGEO-1D v.1.0): Algorithms, Informatics, Design Patterns, Open Science Features, and 1D Deployment." Geoscientific Model Development 15 (1): 75–104. https://doi.org/10.5194/gmd-15-75-2022.

Zhang, Chao, Lingyun Gou, Shaojie Hu, and Ning Lu. 2022. "A Thermodynamic Formulation of Water Potential in Soil." Water Resources Research 58 (9). https://doi.org/10.1029/2022wr032369.

Zhang, Lianhai, Chengsong Yang, Dayan Wang, Peng Zhang, and Yida Zhang. 2022. "Freezing Point Depression of Soil Water Depending on Its Non-Uniform Nature in Pore Water Pressure." Geoderma 412 (115724): 115724. https://doi.org/10.1016/j.geoderma.2022.115724.

Saturday, June 5, 2021

Theoretical and Numerical Tools for Studying the Critical Zone from Plots to Catchments

 What a valuable work is the thesis by Niccolò Tubini, here presented in its draft.  It covers works in hydrology of the critical zone, numerics, programming, software engineering, open science methods. Having a so wide horizon of interest it could  not be easy to grasp in all of these details, but it is well written and, we hope inspiring. As the Author, Ph.D. candidate says: "In the following we suggest that studying the CZ requires tools that are not yet readily available to researchers; then we propose one of our own. These tools should be flexible enough to allow the quick embedding of advancements in science"

Who wants to access the draft, can click on the figure of the Thesis first page below.

The Thesis included the work present in the two submitted paper by Niccolò,  on The Cryosphere and a second one presented in GMDD regarding WHETGEO-1D.  Whilst a thesis being considered kind of a definitive work, this one remains very much a work in progress with the extensions of the codes foreseen to arrive soon and whose informatics has already been implemented. All the tools developed during the Thesis are open source and freely available both as executable and source codes on Github.  Any comment or suggestion to the  Thesis as well as to the papers are welcomed. 

The Video of the defense is here.

Wednesday, May 19, 2021

WHETGEO 1D is out

WHETGEO-1D (Water HEat and Transport in GEOframe) is a physically based model simulating the water and energy budgets in a soil column. WHETGEO-1D is developed as an open-source code, adopting the Object-Oriented paradigm and a generic programming approach to improve its usability and expandability. WHETGEO-1D is fully integrated in the GEOframe/OMS3 system allowing the use of the many ancillary tools it provides. It comes on top of several years of work on engineering software, discussing and debating about Richards equation, taking care of getting appropriate integration methods in a travel that crossed hydrology, mathematics, numerics and software engineering.  Click on the figure below to access the paper.


The code is really solid and was throughly tested over the last three year by my students of the Hydrology class and in various applications. Its inputs and outputs can be analyzed by using Python and some standard Notebooks prepared to help the user to do it.  The paper has been submitted to the Geoscientific model development discussions (GMDD) and it is available for discussion to everyone and can be obtained by clicking on the Figure above. Complementary material is present in the GEOframe blog. The paper comes with its software, documentations and test and the GEOframe blog post explains where all of it is. You did a nice job Niccolò Tubini!

Here the paper on GMD.