Operation Modes

The operationMode option allows you to change the solver for either minimal run time or maximum accuracy.

There is a number of requirements and nuances that determine the performance or level of assumptions required from nanoFluidX. While it was always possible to tune the solver to meet your specific needs, doing so requires a level of user proficiency.

However, with the operationMode option you can choose between three modes, DESIGN, NORMAL, and CONSERVATIVE. These modes tune the solver for either minimal run time or maximum accuracy.

Performance numbers between the DESIGN and CONSERVATIVE modes can differ significantly, depending on the case, more than 10x. The main differences in performance are caused by changing the core assumptions that you are willing to use. For example, do you run in single or multiphase, is your allowed fluid compressibility one percent or three percent and how many data reads (outputs) would you like to have.

You are able to decide what set of assumptions is acceptable and to set up the solver accordingly.

Figure 1 and Figure 2 show a 2-gear FZG test rig example that ran in DESIGN and NORMAL (default) mode.

Both simulations shown in Figure 1 were single phase. Run time of the NORMAL mode is 4h 33min, while the DESIGN mode ran in 59min (4.5x speed up).


Figure 1. Time-Averaged Oil Distribution for 2-Gear FZG Case (No Gears Shown). DESIGN mode is enabled for the image on the right, and NORMAL (default) mode is enabled for the image on the left.
Both simulations show in Figure 2 were single phase. Run time of the NORMAL mode is 4h 33min, while the DESIGN mode ran in 59min (4.5x speed up).


Figure 2. Time-Averaged Velocity Magnitude for 2-Gear FZG Case (No Gears Shown). DESIGN mode is enabled for the image on the right, and NORMAL (default) mode is enabled for the image on the left.

As can be seen in Figure 1 and Figure 2, the differences caused by numerical changes in the code are not substantial, though again, depending on the purpose of the simulation, one might argue otherwise. Another important consideration is that this example case was run in single phase only, and that including the air phase in the normal mode would most likely immediately increase the run time by a factor of two. This would bring run time comparison to 9h versus 59min, which is obviously a 9x speed up. What you have to ask yourself is: do you want or need to include multiphase flow phenomena, such as aeration or windage effects?

Operating in NORMAL mode (default) does not change anything, whereas operating in NORMAL mode will use all of parameters you have defined, giving you full flexibility.

DESIGN mode only operates in single phase, which is the first big assumption that is made. Running in single phase is acceptable in terms of accuracy for a number of applications, especially if the RPM of the gearbox is low or if you are not interested in evaluating multiphase phenomena. Besides this major assumption, the following parameters are changed:
simulationParameters
{
        dt_factor              2.0
        ns_phaseinfo           5
        ref_vel_factor         1.0
        velcorrScheme      T_VCORR
}
phases
{
    phase
    {
        rho_compr 		0.03
    }
}

The above commands imply that the time step will be 2x larger than the default. This is allowed in single phase, as single phase SPH simulations have a relaxed CFL condition with respect to multiphase simulations. It also implies that only five data samples will be collected between the phase information output, and that the maximum velocity in the domain is set as the reference velocity. The transport velocity formulation, which is also the recommended behavior for single phase simulations, is turned off, and the compressibility of the fluid phase is changed to three percent, instead of the default one percent. The last assumption reduces the numerical speed of sound in the simulation to help increase the time step further, at the expense of a slightly more compressible fluid.

CONSERVATIVE mode will on the other hand operate in both single and multiphase, but will set a number of parameters to values which should insure quality output in the limit of the solver level of accuracy. The parameters that are hard set by the CONSERVATIVE mode are:
simulationParameters
{
        dt_factor              1.0
        ns_phaseinfo           100
        ref_vel_factor         2.0
        velcorrScheme      T_VCORR
}
phases
{
    phase
    {
        rho_compr 		0.01
    }
}

With the above set parameters, CONSERVATIVE mode will likely be at least five to 10 times slower than the DESIGN mode, even in single phase.