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.
- Export a TRN file from a transient STAR-CCM+ simulation.
- Create a new simulation file, import the TRN file and the CAE model.
- Create a Surface Data Mapper with the TRN model as the source and the CAE model as the target.
- Right-Click on the Data Mapper created in step-3 and select “Map Data”.
- Record a macro and complete following action.
- Right-Click the imported CAE model and select “Export Mapped Data”.
- Define export settings in the pop-up window. Select surfaces, field functions.
- Specify file name and Export mapped data.
- Stop macro recording
- Copy the main function of the recorded macro and paste it in the specified section of the attached macro “export_TRN_To_Abaqus.java”.
- Update the recorded command for the file save location to simDir+"/MappedData_"+j+".inp". See more details in the example below.
- Adjust “user input” definition of the “export_TRN_To_Abaqus.java” 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:
- Specify a file name and save the *.inp file.
- The recorded macro is attached as “Step-5_recordedMacro.java”
Step-6: Copy the main function of the recorded macro to the macro provided as shown in the example below.
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.From:
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…