DOE Run Tab

Within the Design of Experiments node a fourth tab appears, the Run tab, when Nodeworks is used within the MFiX GUI environment. The run tab helps facilitate the launching of MFiX simulations which correspond to samples from the selected design. The first option in the Run tab is to select the Run Directory in which the subdirectories will be created. By default, the run directory is that which was created when initiating the MFiX base case. The prefix entry specifies the beginning of the names of the subdirectories. The full subdirectory name will be appended with an integer corresponding to the sample number from the design table. Each subdirectory will contain an .mfx file with the MFiX keyword variables changed from the base case (as set in the Modeler panel) to correspond to that particular sample index. The subdirectories are created by hitting the Over-Write button.

Previous DOE simulations can be re-launched by checking the Restart box. The Project directory can be specified if it is different than the directory set in the Modeler panel. The restart Method can be set to a simple Restart (continuation) or to Use as initial condition for the actual simulation of interest.

../_images/runtab.png

Finally, pressing the Run button brings up the Run solver pop-up window, at right in figure above. The first step is running the MFiX simulations is to select a solver. When available, the window will list default, project and previously used mfixsolvers. When compiled in a parallel mode, the run solver window also allow for the selection of shared memory (SMP) and distributed memory (DMP) parallelism options. Clicking the Run button will launch the jobs directly on the CPUs from which the MFiX GUI was launched. Alternatively, checking the Submit to queue allows jobs to be submitted to queueing systems, such as SLURM. Presently, the only queue submission Template is for NETL’s Joule HPC system.

Lastly, the run subdirectories can also be used in downstream surrogate modeling and analysis nodes, which was restricted to the DOE table information outside of MFiX. One of the most common situations in which one would use the MFiX runs in downstream nodes is when the MFiX simulation produces an output file which contains a quantity of interest which is then used to create a surrogate model for further analysis. This situation can be easily handled with a code node. Set the Output Selection of the DOE node to Completed Runs, Uncompleted Runs, or All Runs which will be connected to the input terminal specified by the arguments entry of a Code node. In the below example, the argument is specified as sims. Then the following python snipit can be used in the function entry to loop over the sims specified in the Output Selection (i.e., completed, uncompleted or all runs), open a text file named data.txt and read the quantity of interest from second column of the second line in the file. The skiprows can be removed if there is no header or increased if there are more header lines. Note that usecols starts at 0.

import os
import numpy as np
sims.sort()

f = []
for ii in sims:
  outputFile = os.path.join(ii, 'data.txt')
  if os.path.exists(outputFile):
    fii = np.loadtxt(outputFile, skiprows = 1, usecols = 1)
    f.append(float(fii))
  else:
    f.append(-1.0)
returnOut = f