摘要:Graphical abstractDisplay OmittedAbstractSurface soil structure is very responsive to natural and anthropogenic impacts and these changes alter soil hydraulic properties and the soil water budget. In the midst of a dearth of efforts to capture soil structural dynamics, an analytical solution to the Fokker-Planck Equation with physically-based coefficients has shown promising results in predicting the evolution of soil pore space in agricultural soils. In this study, the Python code for the analytical solution is shown along with steps to estimate coefficients leading towards obtaining the analytical solution.•Python code for modeling the evolution of soil pore space based on an existing model is shared.•The code for the estimation of physically-based coefficients of the model and parameter optimization are also shown.•The final output of the model may be used in estimation of soil water retention and hydraulic conductivity functions.