Simcenter STAR-CCM+ How to Map transient data from a TRN file to an import CAE model

Simcenter STAR-CCM+ Simcenter STAR-CCM+ Virtual Reality Teamcenter Share Simcenter Cloud HPC Simcenter STAR-CCM+ Viewer Simcenter STAR-CCM+ Application Specific Solutions


This articles provides a method to map transient data from a TRN file to an imported CAE model using a java macro.


The co-simulation module can be used to couple STAR-CCM+ with several external CAE codes. While running a co-simulation is the best approach to couple with external CAE codes, we may sometimes be limited to running a File-based coupling. File-based coupling is a method used to couple STAR-CCM+ with external CAE codes with files being stored on computers memory. 

This article deals with a special case of file-based coupling of a transient case. A TRN file (Transient Surface Data File) can be used to store field functions on a boundary during a transient STAR-CCM+ simulation. This TRN file can be used to map the transient CFD data onto an external CAE mesh which can then be exported. Utilizing the TRN file provides users flexibility by decoupling the “running and mapping” portions of the STAR-CCM+ simulation. 

Follow the steps below to map a transient data from a TRN file to an import CAE model.

  1.  Export a TRN file from a transient STAR-CCM+ simulation.
  2. Create a new simulation file, import the TRN file and the CAE model.
  3. Create a Surface Data Mapper with the TRN model as the source and the CAE model as the target.
  4. Right-Click on the Data Mapper created in step-3 and select “Map Data”.
  5. Record a macro and complete following action.
    1. Right-Click the imported CAE model and select “Export Mapped Data”.
    2. Define export settings in the pop-up window. Select surfaces, field functions.
    3. Specify file name and Export mapped data.
    4. Stop macro recording
  6. Copy the main function of the recorded macro and paste it in the specified section of the attached macro “”.
  7. Update the recorded command for the file save location to simDir+"/MappedData_"+j+".inp". See more details in the example below. 
  8. Adjust “user input” definition of the “” and play the macro. 
In the attached example simulation file (TRN_to_CAE_Map.sim), a transient temperature data is exported from a CFD analysis of an exhaust manifold. The example demonstrates mapping the surface temperature to an Abaqus file. 
Step-1~Step-4 have already been completed in the attached example simulation file. 
Step-5: Record a macro and complete following actions:
  1. Picture1.png
  2. Picture2.pngPicture3.png
  3. Specify a file name and save the *.inp file.
  4. The recorded macro is attached as “
Step-6: Copy the main function of the recorded macro to the macro provided as shown in the example below. 

Step-7: Adjust the output file name so that the macro exports a separate file at each user-defined time stamp. In the example the save line is adjusted as below.

…("D:\\CD-adapco\\KnowledgeArticle\\2023\\Abaqus_FileBased_With_TRN\\MappedData.inp", …
…(simDir+"/MappedData_"+j+".inp", …

simDir is a variable that defines the file path of the simulation file. 
MappedData is the file name for the exported abaqus file
j is a variable to signify time-stamp value i.e., 1,2,3…

KB Article ID# KB000112420_EN_US



Associated Components

Design Manager Electronics Cooling In-Cylinder (STAR-ICE) Job Manager Simcenter STAR-CCM+