-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadd_rev_and_run.java
More file actions
36 lines (25 loc) · 850 Bytes
/
add_rev_and_run.java
File metadata and controls
36 lines (25 loc) · 850 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Simcenter STAR-CCM+ macro: add_rev_and_run.java
// Written by Simcenter STAR-CCM+ 20.02.007
package macro;
import java.util.*;
import star.common.*;
import star.base.neo.*;
public class add_rev_and_run extends StarMacro {
public void execute() {
execute0();
}
private void execute0() {
Simulation simulation_0 =
getActiveSimulation();
// set revs
ScalarGlobalParameter scalarGlobalParameter_0 =
((ScalarGlobalParameter) simulation_0.get(GlobalParameterManager.class).getObject("revs"));
Units units_0 =
((Units) simulation_0.getUnitsManager().getObject(""));
scalarGlobalParameter_0.getQuantity().setValueAndUnits(6.0, units_0);
// run
simulation_0.getSimulationIterator().run();
// save to current path
simulation_0.saveState(simulation_0.getSessionPath());
}
}