soilFlux: Physics-Informed Neural Networks for Soil Water Retention Curves

Implements a physics-informed one-dimensional convolutional neural network (CNN1D-PINN) for estimating the complete soil water retention curve (SWRC) as a continuous function of matric potential, from soil texture, organic carbon, bulk density, and depth. The network architecture ensures strict monotonic decrease of volumetric water content with increasing suction by construction, through cumulative integration of non-negative slope outputs (monotone integral architecture). Four physics-based residual constraints adapted from Norouzi et al. (2025) <doi:10.1029/2024WR038149> are embedded in the loss function: (S1) linearity at the dry end (pF in [5, 7.6]); (S2) non-negativity at pF = 6.2; (S3) non-positivity at pF = 7.6; and (S4) a near-zero derivative in the saturated plateau region (pF in [-2, -0.3]). Includes tools for data preparation, model training, dense prediction, performance metrics, texture classification, and publication-quality visualisation.

Package details

AuthorHugo Rodrigues [aut, cre] (ORCID: <https://orcid.org/0000-0002-8070-8126>)
MaintainerHugo Rodrigues <rodrigues.machado.hugo@gmail.com>
LicenseMIT + file LICENSE
Version0.2.0
URL https://github.com/HugoMachadoRodrigues/soilFlux  https://hugomachadorodrigues.github.io/soilFlux/ 
Package repositoryView on CRAN
Installation Install the latest version of this package by entering the following in R:
install.packages("soilFlux")

Try the soilFlux package in your browser

Any scripts or data that you put into this service are public.

soilFlux documentation built on Dec. 4, 2026, 5:10 p.m.