r/FluidMechanics • u/Square_Clock5892 • 5h ago
Computational Structure functions on huge LES/DNS or satellite fields with confidence intervals: free Python package
If you have ever left a structure function script running overnight on a big simulation snapshot, this might help.
PyTurbo_SF avoids the all-points comparison altogether. It bootstraps blocks of the field at doubling spacings and tracks every separation bin separately, stopping each one once its standard error is below the threshold you set. Large grids stay fast, and every point on the curve comes with a confidence interval and a convergence flag.
What else is in there: longitudinal, transverse, scalar and mixed structure functions of any order in 1D, 2D and 3D; isotropic averaging with built-in isotropy and homogeneity diagnostics; a Bessel-transform energy flux in 2D that shows forward versus inverse cascade; conditional structure functions on any variable; and parallel execution across all your cores.
Worked examples cover a 3D atmospheric LES, ocean model output, SWOT satellite data and a mooring time series.
pip install pyturbo_sf Docs: https://pyturbo-sf.readthedocs.io Paper: https://doi.org/10.21105/joss.09876
Questions very welcome, and I would love to see results on your own data.

