Running the Macro
Modify the macro to use your working directory to find the input file:
-
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”;
- In place of /myTutorials, enter the absolute path to the location of the trainInput.txt file that was saved earlier in the tutorial.
- When the new path has been set, save the file to your working directory. Retain the file name trainFlowAngles.java.
- Close the file
You can now run the macro:
- Return to the Simcenter STAR-CCM+ GUI and make sure that the trainMacro simulation is active.
-
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.
- 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.