nanoFluidX Companion

nanoFluidX companion (also known as, nFX[c]) is a post-processing tool developed to accompany the nanoFluidX solver and allow for an easier execution of certain post-processing tasks.

nFX[c]’s primary task is to execute a post-processing step that is known in ParaView as SPH Volume Interpolation and, optionally, Temporal Statistics. It does so using the same VTK libraries as ParaView and with less user interaction. Alternatively, nFX[c] can be used to interpolate nanoFluidX output data onto an AcuSolve mesh, or any other mesh (point cloud) provided to it (assuming appropriate format).

nFX[c] is shipped together with the nFX binary and can be found in the same folder as the nFX binary.

The output of the nFX[c] is a mesh-based data set, which can be broken down into separate variable fields for faster loading.
Restriction: The SPH volume interpolation in nFX[c] is carried out only for FLUID, not for WALL or MOVINGWALL phase types.
Benefits of using nFX[c] as a post-processing include the following:
  • No need for SPH Volume Interpolation inside ParaView, which results in fewer filters and less need to involve a workflow.
  • Significantly faster loading times.
  • Create movies in minutes instead of hours.
  • Photorealistic rendering using the OSPRay plugin in ParaView becomes plausible.
  • Automatically execute and save temporal statistics.
Important: The relative paths in nanoFluidX are relative to the nanoFluidX cfg path, whereas in nFX[c] the relative paths are with respect to the present work directory (pwd). Recommended running approach is to cd to the case folder directory and run nFX[c] from there (both cfg’s do not need to be in the same directory). This avoids any possible confusion between launching nFX[c] and nanoFluidX.

Using nFX[c]

The usage of nFX[c] is fairly straightforward as it is in principle similar to using nanoFluidX. In that sense it requires it’s own .cfg file with the commands described below. Once set_nFX_environment.sh script has been sourced and the nFX[c] .cfg file set up, the following command will execute basic post-processing:
nFXc example.cfg
If performing AcuSolve mesh interpolation, the command would be:
nFXc --acusolve example.cfg
Note: nFX[c] only needs one of these sections at a time (postparams, acupostparams, or cldpostparams).
postparams
{
        CaseDataDir     path/to/data 
        PostJobName     postjobname

        TandemInterp    false  

        ThrshFirst      false 
        ConstPrtlVol    true 
        Normalize       false 
        SpacingFactor   1.0

        InstOutRange    all
        InstOutStart    0.5
        InstOutEnd      0.9
        
        Overwrite       false
        InstOutRange    all 
        InstOutStart    0.5
        InstOutEnd      1.0

        BreakVars       true 
        TimeAvg         true
        TimeAvgStart    0.5 
        TimeAvgEnd      1.0
        MaxThreadCount  16
}

acupostparams
{
        CaseDataDir     path/to/data 

        SaveAsVTU       true

        MeshDataRoot    path/to/acusolve/mesh 
        cnnFile         filename.cnn 
        crdFile         filename.crd 
        specFile        filename.nic 
        presFile        filename.nic 
        veloFile        filename.nic 
    
        MeshScale       1 

        ThrshFirst      false 
        TimeAvgStart    0.5 
        TimeAvgEnd      1.0
}

cldpostparams
{
        CaseDataDir     path/to/data 

        SaveAsVTU       true

        MeshDataRoot    path/to/acusolve/mesh 
        crdFile         filename 
        specFile        filename 
        presFile        filename 
        veloFile        filename 
    
        MeshScale       1 

        ThrshFirst      false 
        TimeAvgStart    0.5 
        TimeAvgEnd      1.0
        MaxThreadCount  12
}

nFX[c] Commands

CaseDataDir
Full path to the directory containing simulation data and Used_casefile.cfg.
Enclose [CaseDataDir] in quotation marks if it contains any blank space.
PostJobName
Job name (used as the folder name to store interpolated data).
It may not be empty or contain / character.
Enclose [PostJobName] in quotation marks if it contains any blank space.
TandemInterp
Interpolate during nanoFluidX runtime.
Options: true/false
ThrshFirst
Setting this to “true” executes a split between all the phases (threshold filter) before proceeding to the SPH data interpolation.
This is the common way it is done in ParaView, however it is not the preferred way. It is recommended to set this to false, as the property interpolation will in that case include WALL and MOVINGWALL phases, which will make for a better representation of the results.
Note: For this command to take effect when set to true, solid particles (WALL and MOVINGWALL) need to be output.
Options: true/false
ConstPrtlVol
Setting this to true is similar to standard ParaView command execution. Setting it to false uses kernel summation as a volume value and is much more time consuming.
It is recommended that you keep this command set to true.
Options: true/false
Normalize
Divide all the variables by the Shepard Summation, to likely produce more uniform and accurate results. Some cases may cause occurrence of discontinuities or unphysical data in the results.
It is recommended that unless you are confident in understanding what division by Shepard Coefficient implies, keep this command set to false.
Options: true/false
SpacingFactor
A number value that determines the resolution of the mesh data.
dx_mesh_data = dx_simulation*SpacingFactor
For maximum accuracy set to 1.0.
For speedier (and coarser) interpolation use values higher than 1.0.
Setting this below 1.0 does not gain anything and slows down the post-processing.
Overwrite
Overwrite previous data in a job folder (to avoid unintentional overwriting).
It is recommended that you set this command to false for first job run.
Note: You may return to a previous job (restart nFX[c]) by setting [Overwrite] to false. When returning to a previous job, nFX[c] will continue from the last converted file.

Changing [BreakVars], [TimeAvg], [TimeAvgStart] or [TimeAvgEnd] is allowed in a returning job.

Changing [CaseDataDir], [PostJobName], [ThrshFirst], [ConstPrtlVol], [Normalize] or [SpacingFactor] is not allowed in a returning job.

Options: true/false
InstOutRange
Interpolation and writing of instantaneous output is controlled by this option.
Options: all, none, custom
Specifying all will interpolate and write all the instantaneous output.
Specifying none will not write any instantaneous output at all. This can be used for example if the user wants only to output the time averaged result.
Specifying the custom option allows to define a specific time range in which the user wants the instantaneous output written.
InstOutStart
If you have specified the InstOutRange as custom, this command marks the beginning of the time interval where instantaneous data is written.
InstOutEnd
If you have specified the InstOutRange as custom, this command marks the end time of the interval where instantaneous data is written.
BreakVars
Save each variable in a separate file for faster load in addition to the single file containing all variables.
It is recommended that you set this command to true.
TimeAvg
Time average of the data.
It is recommended that you set this command to true.
TimeAvgStart
Starting time after you would like to start averaging the data (because of the transient nature of the simulation, ramp-up time of the RPM can bias the time-averaged result).
It is recommended that you set this to the time when the ramp-upof the motions ends.
TimeAvgEnd
Ending time for the time averaging.
This command is usually set to be the final time of the simulation (or larger than simulation time).
MaxThreadCount
nanoFluidX Companion has the capability to specify the number of threads that the code will use to execute the interpolation task.
This command is an integer number specifying the number of threads that the user wants to dedicate to nFX[c] post-processing.
The following set of parameters are used to interpolate nanoFluidX data onto an AcuSolve or arbitrary mesh.
SaveAsVTU
To inspect your interpolation, you are allowed to export a VTU dataset to visualize in ParaView.
It is recommended that you set this command to true.
MeshDataRoot
Full path to the directory containing mesh data of AcuSolve (or an arbitrary mesh). Interpolated data will be saved in this folder as well.
Enclose [MeshDataRoot] in quotation marks if it contains any blank space.
It is recommended that you set this command to true.
cnnFile
Nodal connectivity file for the fluid region.
Only applicable for the AcuSolve mesh interpolation.
Provide the name including the file extension (.cnn).
crdFile
Node coordinates file for the fluid region.
Only applicable for both the AcuSolve and arbitrary mesh interpolation.
Provide the name including the file extension (.crd in case of AcuSolve mesh)
If using this command to interpolate nanoFluidX data to an arbitrary mesh, the format that the cfdFile file needs to satisfy is either:
NodeID		X	Y	Z
or
X	Y	Z
Where, the delimiter is "space."
specFile
Full name (including the extension) of the output file containing interpolated volume fraction.
Applicable for both the AcuSolve and arbitrary mesh interpolation.
Provide the name including the file extension (.nic in case of AcuSolve mesh).
presFile
Full name (including the extension) of the output file containing interpolated pressure field.
Applicable for both the AcuSolve and arbitrary mesh interpolation.
Provide the name including the file extension (.nic in case of AcuSolve mesh).
veloFile
Full name (including the extension) of the output file containing interpolated velocity field.
Applicable for both the AcuSolve and arbitrary mesh interpolation.
Provide the name including the file extension (.nic in case of AcuSolve mesh).
MeshScale
Coordinate data is multiplied by [MeshScale] before interpolation.

Additional nFX[c] Help

Access additional in-situ help for nFX[c] usage by executing:
nFXc  --help
or
nFXc