Running the Macro

Modify the macro to use your working directory to find the input file:

  1. With the trainFlowAngles.java file open in an appropriate text editor, locate the following line. Change the section of code that is shown in bold.
    public static final String folder =
      “/myTutorials”;
  2. In place of /myTutorials, enter the absolute path to the location of the trainInput.txt file that was saved earlier in the tutorial.
  3. When the new path has been set, save the file to your working directory. Retain the file name trainFlowAngles.java.
  4. Close the file
You can now run the macro:
  1. Return to the Simcenter STAR-CCM+ GUI and make sure that the trainMacro simulation is active.
  2. In the Macro toolbar, click (Play Macro) and select the trainFlowAngles.java file.
    If the macro does not run, make sure that:
    • The case has been set up correctly to receive the input data, for example the inlet velocity specification is set to components
    • The trainInput.txt file is located in the directory specified in the macro
    • Use the tools described in the Testing and Debugging section to identify the source of the problem.
  3. Proceed to the next section if you wish to run the simulation for sufficient iterations to achieve convergence, or jump to the Summary to review the tutorial.