Macro API Changes 13.02
In Simcenter STAR-CCM+ 13.02, the macro API changed for surface preparation, boundary conditions, harmonic balance, heat transfer, DFBI, aeroacoustics, reacting flows, Eulerian multiphase, turbulence, monitors, plots, Design Manager, and co-simulation.
Surface Preparation
Changes to Unite and Intersect Operations
Due to adjustments for consistency in the functionality of mesh operations, the Unite and Intersect operations no longer set a Target Part. Therefore a statement such as
unitePartsOperation_0.setTargetPart(meshPart_0);
causes the current version of
Simcenter STAR-CCM+ to generate an error message. Modify your existing macros accordingly.
Changes to Extruder Operation
A change was implemented to facilitate copy-and-paste of the Surface Extruder mesh operation. Previously, when a Surface Extruder operation was created, an output part named Surface Extruder was created immediately. However, this output part was not reused, but deleted, when the mode of the Surface Extruder operation was changed to Per Part Surface. Consequently, when a subsequent Surface Extruder output part was created by a copy-and-paste of the Surface Extruder operation, its name was incremented by one.
In the following example, the output part obtained in the last line was named
Surface Extruder 2
:
SurfaceExtruderOperation surfaceExtruderOperation_4 =
(SurfaceExtruderOperation) simulation_0.get(MeshOperationManager.class).createSurfaceExtruderOperation(
new NeoObjectVector(new Object[] {simpleBlockPart_0}),"Surface Extruder"); // <-- create Surface Extruder operation
surfaceExtruderOperation_4.setOutputMode(SurfaceExtruderOperation.OutputMode.PER_PART_SURFACE); // <-- change output mode
surfaceExtruderOperation_4.getPartSurfaces().setQuery(null);
PartSurface partSurface_0 =
((PartSurface) simpleBlockPart_0.getPartSurfaceManager().getPartSurface("right"));
surfaceExtruderOperation_4.getPartSurfaces().setObjects(partSurface_0); // <-- set part surfaces after changing mode
MeshOperationPart meshOperationPart_1 =
((MeshOperationPart) simulation_0.get(SimulationPartManager.class).getPart("Surface Extruder 2")); // <-- notice first output part was replaced and name was incremented
This behavior has been improved and the default output part Surface Extruder is now reused. If your macros include working with Surface Extruder operations and output parts in the manner described above, update your macros to obtain the correct Surface Extruder output parts.
Previous Release | Simcenter STAR-CCM+ v13.02 |
---|---|
|
|
Boundary Conditions: Change of Free Stream Conditions
As part of restructuring free stream boundary conditions, the
FreeStreamOption
class has been moved from
flow
to
energy
.
Previous Release | Simcenter STAR-CCM+ v13.02 |
---|---|
|
|
Harmonic Balance: Change to Flutter Motion
The Harmonic Balance Flutter motion has changed to allow for larger blade pitching motions, resulting in changes to the macro code.
Previous Release | Simcenter STAR-CCM+ v13.02 |
---|---|
|
|
Heat Transfer: Changes to Participating Media Models and Properties
As part of restructuring of discrete ordinate radiation models, certain classes associated with models and material properties were changed.
The following classes were moved from
star.radiation.dom
to
star.radiation.common
. There will be no backward compatibility for macros for these models, but there should be backward compatibility for old simulation files.
GrayRefractionModel
MultiBandRefractionModel
ParticipatingGrayModel
ParticipatingMultiBandModel
ParticipatingSpectrumModel
These classes are used in the same way, but they simply must be imported from a different library location:
Previous Release | Simcenter STAR-CCM+ v13.02 |
---|---|
|
|
Certain classes were moved from
star.radiation.dom
to
star.radiation.common
,
and renamed.
- The class
AbsorptionCoefficientProperty
has been renamed toAbsorptionCoefficientMaterialProperty
. - The class
ScatteringCoefficientProperty
has been renamed toScatteringCoefficientMaterialProperty
. - The class
RefractiveIndexProperty
has been renamed toRefractiveIndexMaterialProperty
. - The class
WsggMethod
has been renamed toWsggPropertyMethod
.
In addition,
RadiationSpectrumManager
has been renamed to
MultiBandSpectrumManager
.
The
FireSmokeDialog
class links to
AbsorptionCoefficientMaterialProperty
and
ParticipatingGrayModel
in the
radiation.common
library.
Examples of using the renamed classes follow:
AbsorptionCoefficientMaterialProperty
Previous Release | Simcenter STAR-CCM+ v13.02 |
---|---|
|
|
ScatteringCoefficientMaterialProperty
Previous Release | Simcenter STAR-CCM+ v13.02 |
---|---|
|
|
RefractiveIndexMaterialProperty
Previous Release | Simcenter STAR-CCM+ v13.02 |
---|---|
|
|
WsggPropertyMethod
Previous Release | Simcenter STAR-CCM+ v13.02 |
---|---|
|
|
MultiBandSpectrumManager
Previous Release | Simcenter STAR-CCM+ v13.02 |
---|---|
|
|
DFBI: Changes to Creation of Bodies
With the introduction of pure Mechanical Bodies (that is, bodies with no representation in the volume mesh and no interaction with physics continua except for gravity), the classical Body has been renamed to Continuum Body (that is, a body interacting with physics continua and driving volume mesh motion). Accordingly, the class name has changed from
Body
to
ContinuumBody
.
Note | The class
Body is still supported as a base class. However, for long-term reliability, it is recommended that you upgrade your macros with the classes of the current version.
|
Previous Release | Simcenter STAR-CCM+ v13.02 |
---|---|
|
|
The method
Body.setObjects()
has been moved to
ContinuumBody.setObjects()
.
Previous Release | Simcenter STAR-CCM+ v13.02 |
---|---|
|
|
Aeroacoustics: Changes to Post Ffowcs Williams-Hawkings (FW-H) Receiver
As part of a change in the
Convective Acoustic Effects option of post point receivers, the object
ConvectiveVelocityProfile
has been renamed to
FwhConvectiveVelocityProfile
. Within macro code, all occurrences of
ConvectiveVelocityProfile
must be renamed accordingly. For example:
Previous Release | Simcenter STAR-CCM+ v13.02 |
---|---|
|
|
Reacting Flows: Changes to Progress Variable
User options have been changed for the Progress Variable source, resulting in changes to the macro code.
Previous Release | Simcenter STAR-CCM+ v13.02 |
---|---|
|
|
|
|
|
|
Eulerian Multiphase: Changes to Turbulence Damping
The turbulence damping model has been improved by providing additional turbulence damping formulation method. In the model, the damping parameters have to be specified phase wise. The turbulence damping formulation used in the previous releases is now exposed for selection. It is called Egorov formulation and it should be explicitly selected as compared to previous releases where it was done internally. This improvement has resulted in changes to the macro code.
Previous Release | Simcenter STAR-CCM+ v13.02 |
---|---|
|
|
Turbulence: Removal of Constant from Spalart-Allmaras Detached Eddy Model
Due to a change in formulation, the constant
Cv2
was removed. Remove instances of this constant from your existing macros.
Previous Release | Simcenter STAR-CCM+ v13.02 |
---|---|
|
|
Monitors: Change in Name Syntax
Due to refactoring, the string
cpu
has been changed to uppercase:
CPU
. Modify your existing macros accordingly.
Plots: Changes to Colors
As part of improvement of colors in plots, macro codes have changed for axis labels, axis ticks, and heatmap style.
An example of the code change follows:
Previous Release | Simcenter STAR-CCM+ v13.02 |
---|---|
|
|
Design Manager MdxDataSet: End of Support for Methods
Due to restructuring of the class MdxDataSet, certain methods that were available in v12.04 or v12.06 have been deprecated. Remove these methods from your macros.
public boolean getNeedsSorting()
public void setNeedsSorting(boolean newValue)
public double getXOffset()
public void setXOffset(double v)
public double getYOffset()
public void setYOffset(double v)
public double getXScale()
public void setXScale(double v)
public double getYScale()
public void setYScale(double v)
Co-Simulation
Removal of Field Import and Export Options
Due to removal of the Field Import Option and Field Export Option from the GT-SUITE co-simulation zone conditions, the following macro commands will stop working and need to be removed (no replacement is needed):
import star.cosimulation.common.FieldImportOption;
import star.cosimulation.common.FieldExportOption;
coSimulationZone_0.getCoSimulationZoneConditions().get(FieldImportOption.class).setSelected(FieldImportOption.Type.VELOCITY);
coSimulationZone_0.getCoSimulationZoneConditions().get(FieldImportOption.class).setSelected(FieldImportOption.Type.VELOCITY_AND_DENSITY);
coSimulationZone_0.getCoSimulationZoneConditions().get(FieldImportOption.class).setSelected(FieldImportOption.Type.MASS);
coSimulationZone_0.getCoSimulationZoneConditions().get(FieldImportOption.class).setSelected(FieldImportOption.Type.PRESSURE);
coSimulationZone_0.getCoSimulationZoneConditions().get(FieldExportOption.class).setSelected(FieldExportOption.Type.VELOCITY);
coSimulationZone_0.getCoSimulationZoneConditions().get(FieldExportOption.class).setSelected(FieldExportOption.Type.MASS);
coSimulationZone_0.getCoSimulationZoneConditions().get(FieldExportOption.class).setSelected(FieldExportOption.Type.PRESSURE);
coSimulationZone_0.getCoSimulationZoneConditions().get(FieldExportOption.class).setSelected(FieldExportOption.Type.MASS_FLOW_RATE_VIA_FILE);
Changes Due to Refactoring
Structural improvements in co-simulation have resulted in changes to the macro code.
Previous Release | Simcenter STAR-CCM+ v13.02 |
---|---|
|
|
The following classes have been moved from
star.cosimulation.starccmplus
to
star.cosimulation.link.starccmplus
:
StarccmplusConnectionFile
StarccmplusCoSimLaunch
StarccmplusCoSimHostPort
As a result, update the import statements in your macros as follows:
Previous Release | Simcenter STAR-CCM+ v13.02 |
---|---|
|
|
The following classes have been moved from
star.cosimulation.common
to
star.cosimulation.link.common
:
AbaqusCoSimulationType
AmesimCoSimulationType
ConsistencyCheckOption
CoSimAssignedHostPort
CoSimCommandLine
CoSimConnectionFile
CoSimHostPort
CoSimulation
CoSimulationConditionManager
CoSimulationConnectOption
CoSimulationEditor
CoSimulationLaunchOption
CoSimulationLoadPartnerLibraryOption
CoSimulationManager
CoSimulationPartner
CoSimulationType
CoSimulationValueManager
CoSimulationZone
CoSimulationZoneConditionManager
CoSimulationZoneManager
CoSimulationZoneType
CoSimulationZoneValueManager
CouplingPrecisionOption
DisconnectOption
FilePath
GtPowerCoSimulationType
IndexedOption
IndexedOptionNameComparator
LocalFilePath
OlgaCoSimulationType
PartnerFileSystemOption
PointCoSimulationZoneType
ReactingChannelCoSimulationType
RelapCoSimulationType
StarccmplusCoSimulationType
SurfaceCoSimulationZoneType
VolumeCoSimulationZoneType
WaveCoSimulationType
Examples follow of how to update the import statements in your macros:
Previous Release | Simcenter STAR-CCM+ v13.02 |
---|---|
|
|
The following classes that were part of the package
star.cosimulation.common
were deleted:
CoSimulationWithDomain
NullCoSimulation