nanoFluidX Companion
nanoFluidX companion, also known as nFX[c], is a post-processing tool developed to accompany the nanoFluidX solver allowing for an easier execution of certain post-processing tasks.
Use nFX[c] 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.
- 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.
Using nFX[c]
nFXc example.cfg
nFXc --acusolve example.cfg
postparams
{
CaseDataDir path/to/data
PostJobName postjobname
OutputFormat vtk
TandemInterp false
FrameSuite inplace
ThrshFirst false
ConstPrtlVol true
Normalize false
NormLowThrsh 0.25
SpacingFactor 1.0
InstOutRange all
InstOutStart 0.5
InstOutEnd 0.9
Overwrite false
InstOutRange all
InstOutStart 0.5
InstOutEnd 1.0
BreakVars true
ArchiveData 0
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.
- PostJobName
- Job name (used as the folder name to store interpolated data).
- OutputFormat
- Output format of the interpolated data files containing all variables.
- TandemInterp
- Interpolate during nanoFluidX runtime.
- FrameSuite
- Interpolate during nanoFluidX runtime.
- ThrshFirst
- Setting this to true executes a split between all the phases (threshold filter) before proceeding to the SPH data interpolation.
- 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.
- 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.
- NormLowThrsh
- This command is optional.
- SpacingFactor
- A number value that determines the resolution of the mesh data.
- Overwrite
- Overwrite previous data in a job folder to avoid unintentional overwriting.
- InstOutRange
- Interpolation and writing of instantaneous output is controlled by this option.
- 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.
- ArchiveData
- This command is optional.
- TimeAvg
- Time average of the data.
- TimeAvgStart
- Starting time after you want 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.
- TimeAvgEnd
- Ending time for the time averaging.
- MaxThreadCount
- nanoFluidX Companion has the capability to specify the number of threads that the code will use to execute the interpolation task.
- SaveAsVTU
- To inspect your interpolation, you are allowed to export a VTU dataset to visualize in ParaView.
- 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.
- cnnFile
- Nodal connectivity file for the fluid region.
- crdFile
- Node coordinates file for the fluid region.
- specFile
- Full name (including the extension) of the output file containing interpolated volume fraction.
- presFile
- Full name (including the extension) of the output file containing interpolated pressure field.
- veloFile
- Full name (including the extension) of the output file containing interpolated velocity field.
- combFile
- Full name (including the extension) of the output file containing coordinates and interpolated values arranged as x,y,z,u,v,w,p,s (path always relative to MeshDataRoot).
- MeshScale
- Coordinate data is multiplied by [MeshScale] before interpolation.
Comments
To further clarify the relationship of the options, note the following items.
- crdFile is the key to activating internal generation. If provided, the points in the file will be used. Otherwise, internal point generation will be used.
- specFile, presFile,
veloFile, combFile:
- At least one set of specFile, presFile, veloFile or combFile is needed. Both can be present.
- specFile, presFile, veloFile: Optional, if one is provided, all should be available.
- Without crdFile, there will be an additional file containing the coordinates when the triplet file outputs are chosen.
- combFile: optional.
- With a valid crdFile: The points read from crdFile will be multiplied by MeshScale value.
- Without crdFile: nFX.kernel.dx is multiplied by MeshScale before generating the internal cuboid based on nFX.domain.min/max_domain or nFX.domain.min/max_boundingbox expanded by nFX.kernel.dx.
Special Note on Point-Cloud Interpolation and Coupling to AcuSolve
To provide a simpler avenue of using cloud point interpolation cldpostparams, nFX[c] is now able to perform interpolation and averaging of the nanoFluidX data onto an internally generated uniformly distributed cuboid of points based on nanoFluidX simulation settings. This allows for quick preparation of interpolated data sets for use in other applications. One such application is to conduct a SimLab mediated nanoFluidX-AcuSolve off-line one-way coupled simulation, where SimLab performs a further interpolation onto the AcuSolve mesh internally. This provides an alternative to direct interpolation to an AcuSolve mesh for nanoFluidX-AcuSolve off-line one-way coupled simulation.
- Support for internally generated cuboid of points based on nanoFluidX cfg for pointcloud interpolation mode in nFX[c].
- Support for comma separated output of coordinates, velocities, pressure and volume fraction in nFX[c] pointcloud (--pointcloud) and image (--nfx) interpolation modes.
- Support for SimLab mediated nanoFluidX/AcuSolve off-line one-way coupled thermal simulation via comma separated output.
- Only fully filled containers of one or two fluid phases are supported.
- The flow field data is time averaged and carries no trace of fluctuations or transient information. Fluctuations and transient events may or may not have an impact on the average heat transfer rate.
- The time averaged field is inherently non-solenoidal (not divergence-free). This may or may not affect the convergence of the solution observed via fluxes.
- The time averaged field may have signs of boundary layers that are not affected by the motions.
- The time averaged field is motion void compensated. This applies to locations in AcuSolve geometry where a fluid is expected but contain intermittent fluid/solid presence during nanoFluidX simulation due to motions.
- The AcuSolve solution does not have any transient or moving components. It may or may not be suitable to compensate this by averaging the results over the moving parts. The following items when using the internal point cloud for SimLab 2020.1 mediated nanoFluidX-AcuSolve off-line one-way coupled simulation. These points may or may not be important.
- Interpolation to a body fitted mesh has the advantage that motion void compensation is more likely to coincide with the points on the surface. The interpolation to a cuboid of points does not follow the surfaces that have contact with fluid and motion void compensation may not be as effective. Further interpolation on this field disregards the original compensation. However, this may not be as important in practice as the output of nFX[c] is averaged over time and may be less susceptible to further interpolation errors.
- The SimLab mediation process involves double interpolation, first to a uniformly spaced cuboid and then to a body fitted mesh. In principle, this may lead to non-negligible interpolation errors. In practice, the output of nFX[c] is averaged over time and may be less susceptible to further interpolation errors.
- SimLab 2020.1 uses a nearest neighbor interpolation scheme. In principle, this may lead to non-negligible interpolation errors. In practice, the output of nFX[c] is averaged over time and may be less susceptible to further interpolation errors.
EnSight Gold output file format support
To provide users with a wider choice in post-processing tools as well as facilitating the development of Altair post-processors such as HW-CFD in its current form, nFX[c] 2021.2 offers an additional output option in EnSight Gold Case file format.
To activate the EnSight Gold format output the user needs to add OutputFormat command to the postparam section of the nFX[c] configuration file and specify its value to either vtk or vtkens value.
Choosing the vtkens option results in the creation of an additional directory named EnsVars besides AllVars directory under PostJobName directory to store all EnSight Gold files. The EnSight Gold files include data of each variable as well as the geometry in separate files and as a result setting BreakVars to true has no effect on the EnSight Gold output. EnSight Gold files are larger than VTK image files since they do not offer data compression. Additionally, please note that currently it is not possible to avoid VTK image output as the files are required for reducing the complexity of returning nFX[c] jobs.
The EnSight Gold output written by nFX[c] has three elements. These are data files
for each output time, geometry files for each output time and a case file
referencing the other files and defining time information. The EnSight Gold data
files only contain fluid data while geometry files include both fluid interpolation
points (block uniform or image) and solid surfaces (coordinates or unstructured) at
the time of the output. The geometry file description for the fluid interpolation
points reads FLUID(s)
and moving walls and stationary walls are
described as MOVINGWALL: phasename
and WALL:
phasename
, respectively, where phasename is the name of the respective
solid phase. The geometry file of the time averaged data includes solids at the
first input time of the field data pvd file from nanoFluidX.
When opened in ParaView, an EnSight Gold case file appears as multiblock data with geometry file descriptions shown as block names. Use an Extract Block filter to visualize separate blocks. Similar to their pvd counterparts, transient and time averaged case files are named interpData.case and timeAverage.case, respectively.
Additional nFX[c] Help
nFXc --help
ornFXc