Recording the Macro
Record the planned actions.
Any command issued to Simcenter STAR-CCM+ has an associated Java statement. The macroRecording tab of the Output window displays the statements. Do not record unnecessary commands to avoid the Java file being cluttered. Pause the recording to carry out actions without the associated statements being added to the macro.
-
In the
Macro toolbar, click
(Start Recording...).
- Save the file as macroRecording.java.
Set the initial velocity:
- Select the [-10, 10, 0] m/s. node and set Value to
Set the inflow velocity:
- Select the [-5, 5, 0] m/s. node and set Value to
Clear the previous solution and run the simulation:
- From the menu, select .
- Run the simulation.
-
Click
(Stop Iterating) to stop the simulation running.
Run the
Drag Coefficient report. When you create the final macro, obtain a single value for the drag coefficient rather than running the entire report. To obtain some of the statements required later on, however, run the report.
- Right-click the node and select .
Save hardcopies of the scene:
- Select the Velocity Magnitude tab in the Graphics window.
- Right-click in the white area of the scene and select .
-
In the
Save To File dialog, set the following properties:
Property Setting File Name velMag X Resolution 1024 Y Resolution 768 - Click Save.
- Repeat these steps to save a hardcopy of the Residuals plot; name the file res.
- Right-click the node and select .
- Name the file Streamlines and click Save.
- Click the trainMacro. button in the menu and save the file under the name
- Click Save.
-
Click the
(Stop Recording) button in the Macro toolbar to stop recording.