Slow down to go faster?
One of the perennial requests that we receive is to make FLOW-3D faster. While we’re always making performance improvements with new models and methods (see, for example, some of the new features in FLOW-3D v10.1 and the development note about FLOW-3D/MP v5.0 in this issue), there are many things that a user can do in the simulation setup to help improve analysis turnaround time. Some high-level simulation setup suggestions intended to reduce the overall analysis time will be the focus of this article.
To begin, it is useful to look at the entire analysis process, from simulation setup to analyzing the results, to note where time is spent. A typical workflow is illustrated in Figure 1. Note that the time required to run the simulation is just a portion of the overall analysis time.
There are two steps in this process that could use some additional clarification: (1) determining how to model the problem and (2) creating the input file for the simulation. The first step involves figuring out what models, options, mesh sizes, etc. are necessary to model the process, while the next step is simply transcribing these options into the input file.
Figure 1. This diagram shows a typical workflow for an analysis and illustrates
why it is so important to avoid mistakes in the early stages of an analysis.
The first notable observation about this workflow is that just a few mistakes can significantly increase the analysis time, especially if they are not caught until postprocessing the results. This is not surprising, but the importance of being careful and catching mistakes early should not be underestimated. A second observation is that the duration of a given step in the process depends on what happened in the preceding step. While obvious, this point is valuable because it implies that the first step, determining how to model the problem, is the most important stage of the process since it affects all the following steps in the analysis. From these two simple observations we can derive some useful conclusions about where to focus effort during the analysis:
- Spend as much time as necessary determining exactly how to model the problem because it impacts all subsequent steps. A mistake in this step will make all subsequent steps incorrect, while thoughtful planning can make all of the following steps faster and easier.
- Do not rush the analysis. Spending a little more time will reduce the probability of making a mistake and the time spent correcting it.
- Check for mistakes after each step in the process. This will increase the probability of detecting a mistake soon after it was made, thereby reducing its impact on the analysis time.
Adapting the three conclusions above into a short checklist provides the following guidelines to help reduce analysis times.
Simulation setup checklist:
- Develop an approach for modeling the problem. The desired end product of this step is a description of how the problem will be formulated and analyzed, complete with justification for all of the input parameters. Some of the more important parameters to consider and justify are listed below. The information generated here also provides an excellent start to a report documenting the analysis.
- The modeling domain
- Boundary and initial conditions
- Physical models and properties
- Grid cell sizes
- The simulation finish condition and time-step size
- Data output rates
- Changes from the default numerical options
- Have a peer review the approach to help flush out any fundamental errors in it before proceeding.
- Create the simulation input file following the approach that you have developed.
- Verify that the input file matches the intended approach.
- Check the FAVORized geometry and any inputs (e.g., STL files, tabular data sources, etc.) for errors.
- Run the preprocessor and search the output for anything that does not match expectations or the modeling approach.
- Run the simulation, checking the output and diagnostics periodically for anything that does not match expectations or the modeling approach.
- Analyze the results and compare them to available validation cases, hand calculations, and expectations to confirm that the solution is reasonable.
- In some cases it may be suitable to make use of a new feature in FLOW-3D v10.1 and define this simulation as a template for later use on similar problems. Even in these cases it is still important to go through these guidelines to ensure that everything is as expected.