Importing Data from a CGNS File
You specify all import settings in a CGNS link under the External Links node. Import settings include the mesh and solution data that Simcenter STAR-CCM+ imports from CGNS, and the CGNS file details.
- Follow the instructions in Preparing the Simulation for CGNS File Exchange.
- Expand the relevant CGNS link node, for example, .
- Select the Import. node and set Option to
-
Select the Single File or File Series, as
appropriate.
node and set Option to either
When importing from multiple files, the files must have the same name prefix. For example, the file series LinkExp@00001.cgns, LinkExp@00002.cgns, LinkExp@00003.cgns has the same name prefix, LinkExp.
-
Select the
node and set the following properties:
Property Setting Directory Select (Custom Editor) and navigate to the folder containing the CGNS file. You can either select the directory or the file itself. When selecting the file, Simcenter STAR-CCM+ automatically updates the Base Filename and Extension properties.
Base Filename - For single file import, enter the name of the file, without path or file extension.
- For multiple files, enter the name prefix of the file series.
-
Right-click the [Link 1] node and select
Scan.
Simcenter STAR-CCM+ parses the base nodes in the CGNS file and retrieves the available zones and solution states. Each solution state corresponds to solution data at a particular time or iteration. For more information on the structure of a CGNS file, see the official documentation, CGNS File Structure.
-
Select the
node.The State Name property lists the solution states from the CGNS file. Each state is named <Solution State Time>:<Base Filename>:<CGNS Base Node Name>. For each state, the other properties of the Import Link State node display information on the solution time or iteration and an index assigned by Simcenter STAR-CCM+.
To import the data at a specified solution state:
-
Select the Import Link State node and select the
relevant solution state by selecting either the State
Name, Solution State Time, or Iteration under the corresponding property.
These three properties are dependent, so you only need to set one of the properties to select a solution state.
-
Right-click the [Link 1] node and select
Create External Parts.
Simcenter STAR-CCM+ automatically performs the following operations:
- Checks that the CGNS file contains zones that are consistent with the space model that you selected in the external continuum.
- Creates external regions and boundaries based on the volume and surface zones that are defined in the CGNS file.
- Creates the required zone nodes under the Simcenter STAR-CCM+ automatically selects the External Volume Parts or External Surface Parts, and the Imported Fields, as defined in the CGNS file. node. For each zone,
For more information, see Import Settings.
To control import triggering:
-
Select the
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 import events under the node.
- Delta Time—specify the time interval between import events under the node.
- Right-click the [Link 1] node and select Import Meshes.
- Right-click the [Link 1] node and select Import Fields.
To control the time treatment:
-
Select the
node and set the Timescale Control to one of the
following:
- Independent: Import State per
Time-Step.
With this setting, Simcenter STAR-CCM+ imports the CGNS solution in a time independent manner, ignoring the CGNS solution time values. The Time Range condition allows for the import of CGNS solution data to occur within a specific Simcenter STAR-CCM+ time range.
- Time Interpolated.
With this setting, the CGNS solution state values are linearly interpolated with respect to their time values, to match the solution time in the Simcenter STAR-CCM+ solution. The Time Range condition allows offsetting and scaling of the timings between the CGNS data timescale and Simcenter STAR-CCM+ timescale.
For more information, see Time Range.
If there are mesh changes in the CGNS file, for example between solution state A and solution state B, no data interpolation takes place between states A and B. Once the CGNS import time has passed the time of solution state A, the mesh and data are imported from solution state B. Interpolation then occurs as normal once the CGNS import time reaches the time for solution state B.On initialization of the solution, Simcenter STAR-CCM+ initializes the data using the CGNS solution state for the first selected CGNS import. - Independent: Import State per
Time-Step.
-
Select the Map After Import.
node and set Option to Simcenter STAR-CCM+ adds the Surface Parts or Volume Parts node under the relevant node.
-
Select the relevant Volume Parts node and set Parts to the boundaries or regions onto which Simcenter STAR-CCM+ maps the imported CGNS
data.
or Data mapping occurs automatically after each import event. Simcenter STAR-CCM+ does not create a field function for the mapped fields. To access the mapped CGNS data (for example when setting boundary conditions on the boundaries and regions onto which the fields were mapped), you can use the field functions associated with the imported fields. These field functions are named Co-Simulation:<imported field name>.
- If you wish to change the default data mappers, expand the node and select a custom mapper for the imported fields.
- Right-click the [Link 1] node and select Map Import Fields.