Tutorial: NCS Data Formats

Neural Concept Shape (NCS), the cloud 3D deep-learning platform for CAE developed by Neural Concept, can handle multiple types of data types and formats. This tutorial will guide you through the different formats that are supported and help you determine how your data needs to be organised to be fed into the platform.

Data types

NCAPI, Neural Concept Shape’s web API, can handle different types of data.

  • geometry data: data that defines a surface mesh representing a geometry.

  • field data: data that is defined at each point of the surface mesh. Note: this can also be sparse data only defined at some of the node locations on the surface mesh. To use this option, you need to select it when uploading the data.

  • scalar data: global numbers related to the whole shape

  • geometry_fields data: mix of geoemtry and fields in the same file (e.g. tecplot)

Inputs and Outputs

For each type of data, the data can either be defined as an Input to the neural network, i.e. a set of known variables that condition the problem, or as an Output, i.e. a set of output quantities that will be provided in the Training Data and need to be predicted by the neural network at Runtime.

Example

Training a neural network to predict the pressure profile on an airfoil for different flow velocities:

Input - input_scalars

  • flow velocity

  • geometry (input by default)

Output - output_fields

  • pressure

Data organization

We consider that each dataset corresponding to a specific problem / type of simulation is composed of individual samples corresponding to different designs or simulated cases.

Each sample must have a unique id composed of an arbitrary sequence of alphanumeric characters. For example 0001, 23, abcd, or 8f2x are all valid sample ids.

For each of these samples, you need to provide one file for each Data type and Input/Output, and follow the naming convention in the following format (input/output)_(type)_(id).(xx).

Example

Example of directory structure:

$ ls my_dataset

geometry_0001.stl
input_scalars_0001.json
output_scalars_0001.json
output_fields_0001.csv
geometry_3d5f.stl
input_scalars_3d5f.json
output_scalars_3d5f.json
output_fields_3d5f.csv

Note

We currently don’t support organizing samples in separate sub-directories.

File formats

Currently, our software supports the following file formats out-of-the-box:

Input - geometry:

  • stl

  • obj

  • geometry_fields:
    • tecplot

  • scalars:
    • json

  • fields:
    • csv

Note

For the fields, the information about the location for each value needs to be specified a x,y,z coordinates. For example:

x,y,z,p,Ux,Uy,Uz,k,omega,nut
-0.6858233,-0.0002383724,-0.04042943,59.30568,0,0,0,0.430216,438.5864,0.000118547
-0.6859346,-0.0002189352,-0.03843583,60.33672,0,0,0,0.4301909,437.6493,0.0001187975
...

For the tecplot format, we only support the tecplot ASCII data format. The following format has to be followed : geometry_(input/output)_fields_(id).dat

Note

You can specify geometry rotations around x,y,z axes as input scalars, in radians. For example in your input_scalars_<sample id>.json file you can put:

{rotation_x: 0.34, rotation_y: 0.01, rotation_z:0}

In the framework, this will be used to automatically rotate the shape in the 3D space (0.34 rad around axis x, 0.01 rad around axis y and no rotation around z). Then the network will receive rotation both as scalars and implicitely in the geometry, which is what has proven to provide best results in practice.

Practical examples

To make things more concrete, here is a list of practical examples on how to organize data between input/output and different data types.

CFD - Design of an aerodynamic bike shell (fixed speed)

Input - geometry:

  • shape of the shell surface

Output - output_scalars:

  • pressure_drag_x

  • pressure_drag_y

  • pressure_drag_z

  • viscous_drag_x

  • viscous_drag_y

  • viscous_drag_z

  • pressure_moment_x

  • pressure_moment_y

  • pressure_moment_z

  • viscous_moment_x

  • viscous_moment_y

  • viscous_moment_z

  • output_fields:
    • p

    • Ux

    • Uy

    • Uz

    • k

    • omega

    • nut

CFD - Design of a wing (varying flow conditions)

Input - geometry:

  • shape of the wing surface

  • input_scalars:
    • rotation_y (angle of attach)

    • mach (mach number)

Output - output_fields

  • cp (pressure coefficient)

Electromagnetics - Design of an optic fiber

Input - geometry:

  • shape of the optic fiber

  • input_scalars
    • frequency

Output - output_scalars

  • reflection coeffcient

  • transmission coefficient

Mechanics - Stress analysis

Input - geometry:

  • shape of the object

  • input_fields:
    • forces

    • material properties

Output - output_fields

  • displacement_x

  • displacement_y

  • displacement_z

Additive Manufacturing (AM) - Pricing of 3D printed parts

Input - geometry:

  • shape of the part

  • input_scalars
    • printing material

Output - output_scalars

  • printing time

  • printing cost

  • boolean indicating failure or success in AM process