Exporting Data to CGNS Files

You specify all export settings in a CGNS link under the External Links node. Export settings include the mesh and solution data that Simcenter STAR-CCM+ exports to CGNS, the data export frequency, and the CGNS file format and location.

To set up a CGNS link for export:
  1. Follow the instructions in Preparing the Simulation for CGNS File Exchange .
  2. Expand the relevant CGNS link node, for example, External Links > [Link 1].
  3. Select the Conditions > Transfer Direction node and set Option to Export.
To specify the mesh and solution data that Simcenter STAR-CCM+ exports to CGNS, you set up an export zone. You can use the default zone node, Zones > [Zone 1].

A zone can export boundary data (surface zone) or region data (volume zone), depending on the space model selected in the associated external continuum (see Preparing the Simulation for CGNS File Exchange). Although a link node accepts a combination of volume and surface zones, you are advised to only have one type in each link node, particularly for 2D simulations.

To export mesh data, specify the relevant surface parts (boundaries) or volume parts (regions) for export:

  1. Select the [Zone 1] > Conditions > Surface Parts or Volume Parts node and set Parts to the relevant Simcenter STAR-CCM+ boundaries, or regions, from which data is exported.
Optionally, you can export solution data. To export solution data:
  1. Right-click the [Zone 1] > Conditions > Exported Fields node, select Add Auxiliary Field and choose Scalar or Vector, as appropriate.
  2. Select the Exported Fields > [Auxiliary Field] node and set the following properties:
    Property Setting
    Field Stencil Select a source stencil for data mapping. The available stencils depend on the Zone Type (see Field Stencil ).
    Scalar/Vector Function Select the field function whose data you want to export to CGNS.

    The remaining properties are read-only. If required, you can add other fields for export. If you do not add any fields under the Exported Fields node, Simcenter STAR-CCM+ exports only mesh data.

  3. Select the [Zone 1] > Conditions > External Surface Parts or External Volume Parts and select the Parts to relevant external boundaries, or regions, to which the data is mapped.
You can instruct Simcenter STAR-CCM+ to map the Simcenter STAR-CCM+ data to an external mesh before a CGNS export event:
  1. Select [Link 1] > Conditions > Mapping Options and set Options to Map Before Export.
    Simcenter STAR-CCM+ automatically creates a data mapper for each field that you add under the [Zone 1] > Conditions > Exported Fields node. These mappers are defined under Tools > Data Mappers. You can review or change the field-mapper associations under the [Zone 1] > Values > Export Mappers node.
For the default mappers, Simcenter STAR-CCM+ sets the Target Stencil to be the same as the Source Stencil.

During the simulation, at each time-step the Field Stencil that you specified for an [Exported Field] node overwrites the Source Stencil for the associated default mapper.

If you wish to set different source and target stencils, you require a custom data mapper. Setting different source and target stencils allows you to access interpolation methods such as Conservative Enclosed Face and Conservative Maximum Distance. For more information, see Mapping Fields Using Data Mappers and 求解插值模型参考.

  1. To replace the default data mapper for an exported field with a custom data mapper:
    1. Create and set up the required data mapper under Tools > Data Mappers.
    2. Expand the relevant Zones > [zone] > Values > Export Mappers > [Exported Field] node and select the desired data mapper.
When exporting boundaries with polygonal meshes, you can choose whether Simcenter STAR-CCM+ retains the original surface mesh or converts the mesh faces to triangular faces. Unlike polygonal meshes, triangular meshes are supported by most software packages.
  1. Select the [Zone 1] > Conditions > Boundary Triangulation node and set Option as required.
    For more information, see Boundary Triangulation.
When exporting multiple boundaries, you can choose whether Simcenter STAR-CCM+ retains the individual boundaries or merges the boundaries into one:
  1. Select the [Zone 1] > Conditions > Merge Boundaries node and set Option as required.
    • If you select Merge Boundaries Into One, specify the boundary name under the [Zone 1] > Values > Merged Boundaries Name node.

    For more information, see Merge Boundaries.

The CGNS standard provides two file formats, ADF (.cga) and HDF5 (.cgns). By default, Simcenter STAR-CCM+ uses the newer HDF5 format. To change the file format:
  1. Select the [Link 1] > Conditions > Database Format node and select the required format.
    For more information, see Database Format.
In a simulation, you can have one or more export events. While Simcenter STAR-CCM+ exports solution data at every export event, you can restrict the export of mesh data based on mesh changes:
  1. Select the [Link 1] > Conditions > Mesh Mode node and select one of the following:
    • Always Enabled—exports mesh data at every export event.
    • Initially and on Mesh Change—exports the mesh in the first export event. In subsequent events, mesh export occurs only if the mesh has changed.
You can instruct Simcenter STAR-CCM+ to create new CGNS files at each export event or append data to existing files:
  1. Select the [Link 1] > Conditions > File Mode node and select one of the following:
    • File Series—creates new files at every export event. The number of files depends on the specified Mesh Mode. See Output CGNS Files.
    • Single File—creates a single file each for mesh and solution data during the first export event. In subsequent export events, appends data to the same file.
    For more information, see File Mode.
You can trigger export events manually or instruct Simcenter STAR-CCM+ to export data automatically at regular time intervals. Automatic export is suitable for transient simulations, while steady simulations rely on manual export.

To define a trigger for automatic data export:

  1. Select the [Link 1] > Conditions > Interval Trigger node and set Option to one of the following:
    • None—automatic export is deactivated. You can trigger export events manually from the [Link 1] node.
    • Time Step—specify the number of time-steps between export events under the [Link 1] > Values > Time Steps Frequency node.
    • Delta Time—specify the time interval between export events under the [Link 1] > Values > Delta Time node.
Optionally, you can restrict automatic data export to a specified time range by specifying the times at which Simcenter STAR-CCM+ starts or stops exporting data:
  1. Select the [Link 1] > Conditions > Time Range node and select the desired Option.
    Depending on the selected option, set the relevant times using the [Link 1] > Values > Start Time and Stop Time nodes.
To trigger an export event manually:
  • Right-click the [Link 1] node and select Export File.

When exporting a File Series, you can visualize the files already exported, while Simcenter STAR-CCM+ continues the export process for subsequent files within the series.

By default, Simcenter STAR-CCM+ exports the relevant files to the current working directory. For the exported files, Simcenter STAR-CCM+ uses the name prefix, solution. To change these settings:

  1. Select the [Link 1] > Values > File node and set its properties.
    For more information, see File.