2.17. Field Data Collector Node

This node is located in the Advanced > Utilities folder in the Modules pane.

This node merges many single-design optiSLang 3D Post-Processing (oSP3D) database (.sdb) files into a multi-design database file. This can include mapping with interpolation of field data onto a chosen reference mesh.

ETK-nD Workflow

How it Works

  • Higher-dimensional datasets are treated with optiSLang 3D Post-Processing (oSP3D). oSP3D databases (SDBs) are stored as .sdb files.

  • With the help of the ETK-nD and Field Data Collector nodes, you can graphically program the SDB generation routine in a two-step process (see the previous workflow image):

    1. Create a single-design SDB in each design folder using the ETK-nD node.

    2. Merge many single-design SDBs into one multi-design SDB using the Field Data Collector node.

    This section describes the second step, see ETK-nD Node for additional information.

Setup

  1. Place a Field Data Collector node into the Scenery pane.

    The location of the node in the scenery determines the location of the generated .sdb file in the folder structure. The name of the generated multi-design .sdb file mirrors the name of the merged single-design .sdb files.

  2. Select a suitable optiSLang database (.omdb) reference file.

    You can manually browse and pick the reference file, or you can connect a wire to the IPath slot.

    The Field Data Collector node in its current implementation scans the sub-folders situated in the same directory as the given .omdb file. It requires the standard design folder naming convention (Design0001, Design0002, ...).

  3. Using the node settings, determine how the node seeks its target files in each design directory, and choose the reference mesh.

    If you choose a reference mesh from an extra SDB which is not part of the scanned sub-folders, the resulting SDB will contain the reference mesh dataset as additional design. This means you will get an SDB with 101 designs from a sensitivity system with 100 successful designs.

FDC Plugins

  • The FDC plugins are customizable Python scripts located in the plugins folder inside of the FDC integration folder.

  • Each plugin script represents an SDB generation routine tailored for a particular dataset format to read and interpret.

  • Two default plugins are installed with the integration, 2D Grid. These plugins require very specific properties of their target files and interpret the given data in a specific way. They can be used as a reference for custom plugins.

  • The plugins internally use the Python API of oSP3D for the .sdb file generation. Additional information can be found in the oSP3D Script API Documentation located on the Ansys API Docs website.

  • To create a new custom plugin you can add a new Python script to the plugins folder and implement the get_name and create_merged_sdb methods (see the default plugins for reference and interface description below). To implement create_merged_sdb you can consult the oSP3D Python API.

  • When selecting the custom plugin in the node, a few checks will automatically be performed to make sure the script is valid and compatible with the node. The result of this check is displayed at the bottom of the user interface.

Settings

NameInstallation DefaultDescription
Take every *.sdbTrueWhen selected, all SDB files are merged. When cleared, you can specify the SDB files to merge in the field below. Only SDB files with the same file name will be merged together.
Search all subfoldrsFalseWhen selected, the node performs a deep search for SDB files inside of the design directory (includes sub-folders). When cleared, the node will only search inside the design directory itself (excludes sub-folders).
SDB file selection by name(s)data1.sdb;data2.sdbSpecify the SDB file names to be merged together. Multiple file names can be specified by separating them with a semicolon.
Use other SDB for reference meshFalseWhen selected, you can specify the path of the SDB file to load the reference mesh from. Otherwise you can specify which design number from the merged set becomes the reference mesh. Every other imported dataset is mapped onto the reference mesh.
SDB path for reference mesh-

Insert the path to the folder that contains the reference mesh SDB file. The node will try to automatically detect a correspondingly named SDB reference file for each SDB file name.

You can also manually edit the field to insert the path to a single SDB file. The path can also contain optiSLang specific environment variables like OSL_PROJECT_DIR. To specify environment variables use either %ENVVAR% or ${ENVVAR}.

Choose reference mesh by number1Select the design number where the reference mesh will be taken from. The SDB with the reference mesh will be loaded first and the data from all other designs will be mapped onto the node positions of the reference mesh.
SDB merge plugin2D GridSelect the plugin that will merge the .sdb file.

Run Options

This node has general Run Options. The number of supported options is individual for each node.

Versions and Requirements

  • The Field Data Collector node requires optiSLang 2023 R1 or later.

  • The Field Data Collector node requires optiSLang 3D Post-Processing (oSP3D) 2023 R1 or later.

  • When needed, optiSLang will load oSP3D of the same version.

Interface Description

`.py` file requirements:
------------------------
- implement `get_name()` method returning plugin's name
- implement `create_merged_sdb(*kwargs)` method


`.qml` file requirements:
-------------------------
- QML file is not required
- additional plugin settings (which are supposed to be passed to the plugin's Python method) can be specified in QML file
- the following methods must be used to store and retrieve plugin's settings (see docstrings below):
	- `getPluginBackendSettings(pluginName, valueName)`
	- `setPluginBackendSettings(pluginName, valueName, value)`
- another modification/access to backend settings is not permitted in order to keep data consistent for all plugins


/**
 * Get the plugin setting value from the backend settings object.
 * 
 * Use this method for plugin development. This method ensures data consistency for all plugins.
 * @param  {string}  pluginName   The name of the plugin. Must be consistent with value returned 
 *                                by get_name() method implemented in plugin Python code.
 * @param  {string}  valueName    Name of the setting.
 * @return {*}                    Value of the plugin setting.
 */
function getPluginBackendSettings(pluginName, valueName)


/**
 * Set the plugin setting value to the backend settings object.
 * 
 * Use this method for plugin development. This method ensures data consistency for all plugins.
 * @param {string}  pluginName   The name of the plugin. Must be consistent with value returned 
 *                               by get_name() method implemented in plugin Python code.
 * @param {string}  valueName    Name of the setting.
 * @param {*}       value        Value of the setting.
 */
function setPluginBackendSettings(pluginName, valueName, value)