Macro API Changes 2302
In Simcenter STAR-CCM+ 2302, the macro API changed for meshing, simulation operations, morphing, material properties, electromagnetism, battery modeling, and Simcenter STAR-CCM+ In-cylinder.
Meshing: Removal of Region-Based Meshing
Region-based meshing has been removed. For details about specific changes in the Simcenter STAR-CCM+ UI, see "Meshing: Removal of Region-Based Meshing" in the Important Notes section of the 2302 Release Notes.
The recommended practice is to use parts-based meshing—see the section "Simcenter STAR-CCM+ > Pre-Processing > Meshing > Parts-Based Meshing" in the Simcenter STAR-CCM+ User Guide.
Macro codes related to this feature have also changed.
Previous Release | Simcenter STAR-CCM+ 2302 |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Classes that are related to
FeatureCurves
, MeshContinuum
, and
MeshValueManager
have been removed. Many classes that end with
Solver
or Model
have also been taken out.
Below is a list of classes that you might find in your macros that have been removed
or altered:
|
|
Simulation Operations: Change to Solve Normal Modes Operation
Due to restructuring, macro codes for the Solve Normal Modes simulation operation have changed.
Previous Release | Simcenter STAR-CCM+ 2302 |
---|---|
|
|
Morphing: Change to Default Morphing Method
For a morpher, the default setting of the Morpher Method property has been changed from RBF to BSpline.
This affects the macro code, depending on which default you prefer.
- If you want to retain RBF as the default method, update your macros
as shown below.
Previous Release Simcenter STAR-CCM+ 2302 MorphingMotion morphingMotion_0 = _sim.get(MotionManager.class).createMotion(MorphingMotion.class, "Morphing"); RbfMorpherParameters rbfMorpherParameters_0 = morphingMotion_0.getRbfMorpherParameters(); rbfMorpherParameters_0.setAutomaticThinout(false);
MorphingMotion morphingMotion_0 = _sim.get(MotionManager.class).createMotion(MorphingMotion.class, "Morphing"); morphingMotion_0.getMorpherMethodOption().setSelected(MorpherMethodOption.Type.RBF); RbfMorpherParameters rbfMorpherParameters_0 = morphingMotion_0.getRbfMorpherParameters(); rbfMorpherParameters_0.setAutomaticThinout(false); rbfMorpherParameters_0.setLinearFit(true);
- Alternatively, to use the new default B-Spline morpher, update your
macros as follows using the relevant settings object (instead of
RbfMorpherParameters
).Previous Release Simcenter STAR-CCM+ 2302 MorphingMotion morphingMotion_0 = _sim.get(MotionManager.class).createMotion(MorphingMotion.class, "Morphing"); RbfMorpherParameters rbfMorpherParameters_0 = morphingMotion_0.getRbfMorpherParameters(); rbfMorpherParameters_0.setAutomaticThinout(false);
MorphingMotion morphingMotion_0 = _sim.get(MotionManager.class).createMotion(MorphingMotion.class, "Morphing"); // B-Spline is used by default here. But we need to grab the relevant settings object. BsplineMorpherParameters bsplineMorpherParameters_0 = morphingMotion_0.getBsplineMorpherParameters(); bsplineMorpherParameters_0.setLinearFit(true);
Material Properties: Deprecation of Anisotropic Material Property Specification Methods
The material property specification methods Anisotropic and Anisotropic (Legacy) have been deprecated in version 2210 and are planned for removal from a future version. For details about these methods and the planned replacements, see "Material Properties" in the Important Notes section of the 2302 Release Notes.
If any of your existing macros use the deprecated material property methods (9 Anisotropic components for Thermal Conductivity, Electrical Conductivity, Permeability, Permittivity, or Anisotropic (Legacy) for Thermal Conductivity), search for instances of following strings and update them as shown in the following table:
Previous Release | Simcenter STAR-CCM+ 2302 |
---|---|
AnisotropicElectricalConductivityMethodWithValues |
FullTensorElectricalConductivityMethodWithValues |
AnisotropicPermeabilityMethodWithValues |
FullTensorPermeabilityMethodWithValues |
AnisotropicPermittivityMethodWithValues |
FullTensorPermittivityMethodWithValues |
AnisotropicThermalConductivityMethodWithValues |
FullTensorThermalConductivityMethodWithValues |
AnisotropicThermalConductivityMethod |
FullTensorLegacyThermalConductivityMethod |
Electromagnetism: Changes Due to Extension of Part Curve Selection
Due to the added capability of supporting multiple parts curves, related macro code has changed.
Previous Release | Simcenter STAR-CCM+ 2302 |
---|---|
|
|
Battery Modeling: Changes to Workflow
The introduction of Battery Thermal Runaway has changed the workflow of battery modeling in Simcenter STAR-CCM+, resulting in changes to the macro code.
star.battery.EquivalentCircuitBatteryCell
has been renamed tostar.battery.UserDefinedBatteryCell
.Previous Release Simcenter STAR-CCM+ 2302 EquivalentCircuitBatteryCell equivalentCircuitBatteryCell_0 = ((EquivalentCircuitBatteryCell) batteryTool_0.getCells().getBatteryCellBase("Equivalent Circuit Battery Cell"));
UserDefinedBatteryCell equivalentCircuitBatteryCell_0 = ((UserDefinedBatteryCell) batteryTool_0.getCells().getBatteryCellBase("User Defined Battery Cell"));
- In the previous release,
EquivalentCircuitBatteryCell
contains an RCR model by default. In Simcenter STAR-CCM+ 2302,UserDefinedBatteryCell
contains no models by default. The RCR model needs to be activated.
Previous Release | Simcenter STAR-CCM+ 2302 |
---|---|
|
|
Simcenter STAR-CCM+ In-cylinder: Reorganization of Objects
A variety of changes were made to objects used in Simcenter STAR-CCM+ In-cylinder. Many of these changes involved removing "1" from the object name to prevent functional conflicts with other objects. For details about specific changes in the Simcenter STAR-CCM+ In-cylinder UI, see "Simcenter STAR-CCM+ In-Cylinder: Reorganization of Objects" in the Important Notes section of the 2302 Release Notes.
As a consequence of this reorganization, related macro codes have also changed:
- The names of the QuickPart definitions have changed such that they
match the initial QuickPart name. Update the names accordingly in your macros.
For example,
getQuickPartDefinition("CustomCylinderDef 1")
must now begetQuickPartDefinition("Cylinder")
. - Any name that does not follow the
object : quantity
format must be manually updated. - Switch the names
Min Cell Quality
andMin Cell Quality 1
wherever they appear. - The following Java classes have been removed, so any imports of
them in macros must also be removed:
CellCountMonitorPlot.java
CylinderMassMonitorPlot.java
CylinderPressureMonitorPlot.java
CylinderTemperatureMonitorPlot.java
CylinderTurbulenceKineticEnergyPlot.java
CylinderVolumeMonitorPlot.java
MinimumTimeStepMonitorPlot.java
PressureVolumeDiagramPlot.java
SwirlMonitorPlot.java
TumbleXMonitorPlot.java
TumbleYMonitorPlot.java