DOI: 10.18419/darus-5372
title: Replication Data for: Super-resolution of turbulent velocity fields in two-way coupled particle-laden flows

description: &lt;p&gt;The repository contains files required to reproduce the results. The three compressed filed are (i) torch_code, (ii) datasets, and (iii) experiments. &lt;/p&gt;
&lt;h2 id="detailed-files-description"&gt;Detailed files description&lt;/h2&gt;
&lt;h3 id="torch_code"&gt;torch_code&lt;/h3&gt;
&lt;p&gt;The main Pytorch source code used for training/testing is provided in &lt;em&gt;torch_code.tar.gz&lt;/em&gt; file. &lt;/p&gt;
&lt;h3 id="datasets"&gt;datasets&lt;/h3&gt;
&lt;p&gt;The training/validation/testing datasets have been provided in lmdb format which is ready to use in the code. The datasets in &lt;em&gt;datasets.tar.gz&lt;/em&gt; contain:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Main train/validation/test dataset: &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Training dataset: &lt;/p&gt;
&lt;p&gt; data_train_OF-decaying2_f0_1_11_12_2_21_22_3_31_32_FHIT_particle_128_Re52-2D_320000_lmdb.lmdb &lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Validation dataset:&lt;/p&gt;
&lt;p&gt; data_valid_outOfSample_OF-decaying2_f0_1_11_12_2_21_22_3_31_32_FHIT_particle_128_Re52-2D_8000_lmdb.lmdb&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Test dataset:&lt;/p&gt;
&lt;p&gt; data_test_outOfSample_OF-decaying2_f0_1_11_12_2_21_22_3_31_32_FHIT_particle_128_Re52-2D_16000_lmdb.lmdb&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Note that the samples from 20 DNS cases are collected in order (each case 16000 samples for training and 800 samples for testing) which can be recognized using the provided metadata file in each folder. &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Particle-free training and test datasets (used in Fig 6 of the paper): &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Particle-free training dataset:&lt;/p&gt;
&lt;p&gt; data_train_OF-f0_FHIT_particle_128_Re52_prolonged-2D_102400_lmdb.lmdb&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Particle-free test dataset:&lt;/p&gt;
&lt;p&gt; data_test_outOfSample_OF-f0_FHIT_particle_128_Re52_prolonged-2D_800_lmdb.lmdb&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Out of sample test datasets: &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Test Case4 in the paper:&lt;/p&gt;
&lt;p&gt; data_test_outOfSample_OF-f41_FHIT_particle_128_Re52_test-2D_800_lmdb.lmdb&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Test Case5 in the paper:&lt;/p&gt;
&lt;p&gt; data_test_outOfSample_OF-f51_FHIT_particle_128_Re52_test-2D_800_lmdb.lmdb&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="experiments"&gt;experiments&lt;/h3&gt;
&lt;p&gt;The trained models are provided in &lt;em&gt;experiments.tar.gz&lt;/em&gt; file. Each experiment contains the log file of the training, the last training state (for restart) and the model wights used in the publication. &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Conditional model:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;conditionalSRGAN trained model using particle-free dataset (used in Figs 6 and 7 of the paper):&lt;/p&gt;
&lt;p&gt; 00110-01G_PFT-NoPrt_ArchT_condSRGANModel_L64SP4x_Gcond_WaveDisc_f256g128b16_I64_BS16x2_Pix1-Grada-Adva_LrG45D5_fixedLR_DS-f0-102k_cPad_20241218&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;conditionalSRGAN trained model using the main dataset (used in Figs 9-13 and Figs 15-16 of the paper):&lt;/p&gt;
&lt;p&gt; 01004-00H_PFT-Prt_ArchTest_condSRGANModel_L64SP4x_Gcond_WaveDisc_f256g128b16_I64_BS32x4_Pix1-Grada-Adva_LrG45D5_fixedLR_DS-fxD-320k_cPad_20241219 &lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Traditional model:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;unconditional SRGAN model trained model using the main dataset (used in Fig 14 of the paper):&lt;/p&gt;
&lt;p&gt; 01005-00H_PFT-Prt_DiscTest_condSRGANModel_L64SP4x_Gcond_TradDisc_f256g128b16_I64_BS32x4_Pix1-Grada-Adva_LrG45D5_fixedLR_DS-fxD-320k_cPad_20241224&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="how-to"&gt;How to&lt;/h2&gt;
&lt;h3 id="build-the-environment"&gt;Build the environment&lt;/h3&gt;
&lt;p&gt;To build the environment required for the training and inference you need Anaconda. Go to the torch_code folder and &lt;/p&gt;
&lt;pre&gt;&lt;code class="lang-bash"&gt;conda env create &lt;span class="hljs-_"&gt;-f&lt;/span&gt; environment.yml
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then create ipython kernel for post processing, &lt;/p&gt;
&lt;pre&gt;&lt;code class="lang-bash"&gt;conda activate torch_22_2025_Shamooni_POF

python -m ipykernel install --&lt;span class="hljs-keyword"&gt;user&lt;/span&gt; &lt;span class="hljs-title"&gt;--name&lt;/span&gt; ipyk_torch_22_2025_Shamooni_POF --display-name &lt;span class="hljs-string"&gt;"ipython kernel for post processing of POF2025"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="perform-training"&gt;Perform training&lt;/h3&gt;
&lt;p&gt;It is suggested to create softlinks to the dataset directly in the torch_code folder:&lt;/p&gt;
&lt;pre&gt;&lt;code class="lang-bash"&gt;cd torch_code 
&lt;span class="hljs-built_in"&gt;ln&lt;/span&gt; -s &lt;path &lt;span class="hljs-built_in"&gt;to&lt;/span&gt; &lt;span class="hljs-keyword"&gt;the&lt;/span&gt; dataset &lt;span class="hljs-built_in"&gt;folder&lt;/span&gt;&gt; datasets
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then activate the conda environment &lt;/p&gt;
&lt;pre&gt;&lt;code class="lang-bash"&gt;conda &lt;span class="hljs-built_in"&gt;activate&lt;/span&gt; torch_22_2025_Shamooni_POF
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;An example script to run on single node with 2 GPUs:&lt;/p&gt;
&lt;pre&gt;&lt;code class="lang-bash"&gt;&lt;span class="hljs-comment"&gt;torchrun&lt;/span&gt; &lt;span class="hljs-literal"&gt;-&lt;/span&gt;&lt;span class="hljs-literal"&gt;-&lt;/span&gt;&lt;span class="hljs-comment"&gt;standalone&lt;/span&gt; &lt;span class="hljs-literal"&gt;-&lt;/span&gt;&lt;span class="hljs-literal"&gt;-&lt;/span&gt;&lt;span class="hljs-comment"&gt;nnodes=1&lt;/span&gt; &lt;span class="hljs-literal"&gt;-&lt;/span&gt;&lt;span class="hljs-literal"&gt;-&lt;/span&gt;&lt;span class="hljs-comment"&gt;nproc_per_node=2&lt;/span&gt; &lt;span class="hljs-comment"&gt;train&lt;/span&gt;&lt;span class="hljs-string"&gt;.&lt;/span&gt;&lt;span class="hljs-comment"&gt;py&lt;/span&gt; &lt;span class="hljs-literal"&gt;-&lt;/span&gt;&lt;span class="hljs-comment"&gt;opt&lt;/span&gt; &lt;span class="hljs-comment"&gt;options/train/condSRGAN/00110&lt;/span&gt;&lt;span class="hljs-literal"&gt;-&lt;/span&gt;&lt;span class="hljs-comment"&gt;01G_PFT&lt;/span&gt;&lt;span class="hljs-literal"&gt;-&lt;/span&gt;&lt;span class="hljs-comment"&gt;NoPrt_ArchT&lt;/span&gt;&lt;span class="hljs-string"&gt;.&lt;/span&gt;&lt;span class="hljs-comment"&gt;yml&lt;/span&gt; &lt;span class="hljs-literal"&gt;-&lt;/span&gt;&lt;span class="hljs-literal"&gt;-&lt;/span&gt;&lt;span class="hljs-comment"&gt;launcher&lt;/span&gt; &lt;span class="hljs-comment"&gt;pytorch&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;Make sure that the paths to datasets &quot;dataroot_gt&quot; and &quot;meta_info_file&quot; for both training and validation data in option files are set correctly.&lt;/em&gt; &lt;/p&gt;
description: 1.0