Macro API Changes 4.04
In Simcenter STAR-CCM+ 4.04, the macro API changed for Flow-Split Outlet boundaries, VOF, system reports, porous energy, 6-DOF bodies, and the Turbo Wizard.
Changes to various items within the macro API are detailed below. Macros created using previous releases of the software will not run in Simcenter STAR-CCM+ 4.04.011 if any of the items in the Previous Release column below have been accessed.
Previous Release | Simcenter STAR-CCM+ 4.04.011 | |
Split Ratio in Flow-Split Outlet |
f.setSplitFactor(dv); |
f.getSplitFactor() .setValue(dv); |
where f is the OutletSplitFactor. |
||
HTCxArea in the VOF Boiling model |
vofBoilingModel_0 .getHTCxArea() .setValue(5000045.0); |
VofBoilingHTCxArea vofBoilingHTCxArea_0 = vofBoilingModel_0 .getVofBoilingHTCxArea(); VofBoilingHTCxAreaConstantMethod vofBoilingHTCxAreaConstantMethod_0 = vofBoilingHTCxArea_0 .getHTCxAreaConstantMethod(); vofBoilingHTCxAreaConstantMethod_0 .getHTCxArea() .setValue(5000556.0); |
IterationElapsedTimeReport and IterationCpuTimeReport |
IteratorCpuTimeReport iteratorCpuTimeReport_0 = ((IteratorCpuTimeReport) simulation_0 .getReportManager() .getReport("Solver CPU Time per Iteration")); |
IteratorCpuTimeReport iteratorCpuTimeReport_0 = ((IteratorCpuTimeReport) simulation_0 .getReportManager() .getReport("Solver Iteration CPU Time")); |
IteratorElapsedTimeReport iteratonElapsedTimeReport_0 = ((IteratorElapsedTimeReport) simulation_0 .getReportManager() .getReport("Solver Elapsed Time per Iteration")); |
IteratorElapsedTimeReport iteratorElapsedTimeReport_0 = ((IteratorElapsedTimeReport) simulation_0 .getReportManager() .getReport("Solver Iteration Elapsed Time")); |
|
Porous energy specification |
RegionThermalPorosity rts = region.getValues() .get(RegionThermalPorosity.class); rts .setPorousConductivity(0.0260305); |
PorousConductivityProfile porousConductivityProfile = region .getValues() .get( PorousConductivityProfile.class); porousConductivityProfile .setMethod( IsotropicTensorProfileMethod .class); ScalarProfile scalarProfile = ((IsotropicTensorProfileMethod) porousConductivityProfile .getMethod()) .getIsotropicProfile(); ((ConstantScalarProfileMethod) scalarProfile .getMethod()) .getQuantity() .setValue(0.0260305); |
RegionThermalPorosity rts = region.getValues() .get(RegionThermalPorosity.class); rts .setPorousSpecificHeat(1023.3); |
PorousSpecificHeatProfile porousSpecificHeatProfile = region .getValues() .get( PorousSpecificHeatProfile.class); porousSpecificHeatProfile .setMethod( IsotropicTensorProfileMethod .class); ScalarProfile scalarProfile = ((IsotropicTensorProfileMethod) porousSpecificHeatProfile .getMethod()) .getIsotropicProfile(); ((ConstantScalarProfileMethod) scalarProfile.getMethod()) .getQuantity() .setValue(1023.3); |
|
6-DOF Body Properties
The former 6-DOF body properties ExternalForce, ExternalLocalForce, ExternalMoment and ExternalLocalMoment have been removed. Instead, an ExternalForceAndMomentManager has been introduced which can be used to add or delete different kinds of forces, including the old ones. As a consequence, access to the forces/moments via macros has changed. |
Body body_0 = ((Body) simulation_0 .get(BodyManager.class) .getObject("ship")); |
Body body_0 = ((Body) simulation_0 .get(BodyManager.class) .getObject("ship")); |
// 1) Set external force: body_0.getExternalForce() .setVector( new DoubleVector( new double[] {1.0, 0.0, 0.0})); |
// 1) Set external force: ExternalForceCM externalForceCM_0 = body_0 .getExternalForceAndMomentManager() .createExternalForceAndMoment( ExternalForceCM.class); externalForceCM_0 .getForce() .setComponents(1.0, 0.0, 0.0); |
|
// 2) Set external local force: body_0 .getExternalLocalForce() .setVector( new DoubleVector( new double[] {2.0, 0.0, 0.0})); |
// 2) Set external local force: ExternalForceCM externalForceCM_1 = body_0 .getExternalForceAndMomentManager() .createExternalForceAndMoment( ExternalForceCM.class); externalForceCM_1 .getForce() .setComponents(2.0, 0.0, 0.0); CartesianCoordinateSystem cartesianCoordinateSystem_0 = ((CartesianCoordinateSystem) simulation_0 .getCoordinateSystemManager() .getObject("ship-CSys")); externalForceCM_1 .setCoordinateSystem( cartesianCoordinateSystem_0); |
|
// 3) Set external moment: body_0 .getExternalMoment() .setVector( new DoubleVector( new double[] {3.0, 0.0, 0.0})); |
// 3) Set external moment: ExternalMomentCM externalMomentCM_0 = body_0 .getExternalForceAndMomentManager() .createExternalForceAndMoment( ExternalMomentCM.class); externalMomentCM_0.getMoment() .setComponents(3.0, 0.0, 0.0); |
|
// 4) Set external local moment: body_0 .getExternalLocalMoment() .setVector( new DoubleVector( new double[] {4.0, 0.0, 0.0})); |
// 4) Set external local moment: ExternalMomentCM externalMomentCM_1 = body_0 .getExternalForceAndMomentManager() .createExternalForceAndMoment( ExternalMomentCM.class); externalMomentCM_1 .getMoment() .setComponents(4.0, 0.0, 0.0); externalMomentCM_1 .setCoordinateSystem( cartesianCoordinateSystem_0); |
|
Turbo Wizard |
Macros involving the importTurboBlade method on the ImportManager should be re-recorded using the Turbo Wizard, as several changes have been made to the argument list for this method. |