Recording the Actions for Step 1
Record the actions for Step 1 in a macro:
- Launch Simcenter STAR-CCM+ and load the latest version of the assistant.
- Work through the assistant until you reach the end.
- Start recording a macro and name it CreatingPhysicsContinuum.java.
- Create a physics continuum and rename it to Physics.
-
Edit the
node and set the following properties:
Group Box
Model
Space
Three Dimensional Time
Steady
Material
Gas
Flow
Segregated Flow
Equation of State
Constant Density
Viscous Regime
Laminar
- Click Close.
-
Stop recording the macro.
When you record a macro, a macro window appears next to the Output window. The code for the macro is displayed there. The following code is displayed:
// begin macro: CreatePhysicsContinuum Simulation simulation_0 = getActiveSimulation(); PhysicsContinuum physicsContinuum_0 = simulation_0.getContinuumManager().createContinuum(PhysicsContinuum.class); physicsContinuum_0.setPresentationName("Physics"); physicsContinuum_0.enable(ThreeDimensionalModel.class); physicsContinuum_0.enable(SteadyModel.class); physicsContinuum_0.enable(SingleComponentGasModel.class); physicsContinuum_0.enable(SegregatedFlowModel.class); physicsContinuum_0.enable(ConstantDensityModel.class); physicsContinuum_0.enable(LaminarModel.class); // end macro: CreatePhysicsContinuum
From here, you can copy and paste the code into the relevant function:
- Return to NetBeans.
- Copy and paste the code between // begin macro: CreatePhysicsContinuum and // end macro into the createPhysicsContinuum() function.
- Reformat the macro code in NetBeans.
- Select to automatically add all the missing imports to the class.