Visualization of the progression of the iteration

The iteration run doesn’t have a physically accurate time component. However, visualizing the iteration progress from start to near steady state can aid in understanding the iteration system. To do this, there’s the ‘create frequent output’ option. Warning: This will write a huge number of TIF files and requires a ton of storage space! Using frequently output files, you can automate visualizing and exporting the iteration progress as individual frames in QGIS with a bit of Python.

import os
 from qgis.PyQt import QgsLayoutExporter
 QgsApplication.setPrefixPath("/usr", True)
 inpath = '/home/tim/GIS/SplashOut_Mischgebiet'
 outpath = '/home/tim/GIS/SplashOut_QGIS'
 show_wd = True
 show_fa = True
 files = os.listdir(inpath)
 wd_list = []
 fa_list = []
 for item in files:
     if 'vwd' in item:
         wd_list.append(item)
     if 'vfa' in item:
         fa_list.append(item)
 wd_list.sort()
 fa_list.sort()
 wd_list = wd_list[40:43]
 fa_list = fa_list[40:43]
 if len(wd_list) != len(fa_list):
     raise ValueError('number of input files do not match!')
 for i, wd in enumerate(wd_list):
     fa = fa_list[i]
     if show_wd:
         layers = QgsProject.instance().mapLayersByName('wd')
         layer = layers[0]
         layer.setDataSource(os.path.join(inpath, wd),
                             'wd',
                             'gdal',
                             QgsDataProvider.ProviderOptions())
         layer.reload()
     if show_fa:
         layers = QgsProject.instance().mapLayersByName('flow')
         layer = layers[0]
         layer.setDataSource(os.path.join(inpath, fa),
                             'flow',
                             'gdal',
                             QgsDataProvider.ProviderOptions())
         layer.reload()
     project = QgsProject.instance()
     manager = project.layoutManager()
     layout = manager.layoutByName('4K')
     exporter = QgsLayoutExporter(layout)
     outfile = os.path.join(outpath, str(i).zfill(5) + '.jpg')
     result = exporter.exportToImage(outfile, QgsLayoutExporter.ImageExportSettings())

The individual images can then be combined into a video using ffmpeg:

ffmpeg -framerate 60 -f image2 -i %05d.jpg -c:v libx265 -preset slow -crf 29 -r 60 a.mp4
Visualization of the iteration progress