Macro API Changes 2402

In Simcenter STAR-CCM+ 2402, the macro API changed for 3D-CAD, motion, material properties, heat transfer, radiation, Eulerian multiphase, battery modeling, post-processing, and Design Manager.

3D-CAD: New Boolean Unite Option to Keep Original Faces

An option to keep original faces in the Boolean unite operation has been added to Simcenter STAR-CCM+ 2402. This new option allows you to specify whether or not to preserve any redundant edges that are imprinted by the unite bodies feature onto any of the input bodies. In previous releases, these redundant imprinted edges were automatically deleted by unite bodies features. This improvement has resulted in changes to the macro code.

The following member function has been added to the class UniteBodiesFeature of the package star.cadmodeler: void setKeepImprintedEdges(boolean mode);.

When you record a macro with the creation of a default unite bodies feature in Version 2402, an additional statement is recorded to the macro: uniteBodiesFeature_0.setKeepImprintedEdges(false);.

Previous Release Simcenter STAR-CCM+ 2402
UniteBodiesFeature uniteBodiesFeature_0 = cadModel_0.getFeatureManager().createUniteBodies2();
uniteBodiesFeature_0.setImprintOption(0);
uniteBodiesFeature_0.setUseAutoMatch(true);
uniteBodiesFeature_0.setTransferFaceNames(true);
uniteBodiesFeature_0.setTransferBodyNames(false);
UniteBodiesFeature uniteBodiesFeature_0 = cadModel_0.getFeatureManager().createUniteBodies2();
uniteBodiesFeature_0.setKeepImprintedEdges(false);
uniteBodiesFeature_0.setImprintOption(0);
uniteBodiesFeature_0.setUseAutoMatch(true);
uniteBodiesFeature_0.setTransferFaceNames(true);
uniteBodiesFeature_0.setTransferBodyNames(false);

Motion: Changes to Rotating Motion

Due to introduction of new rotating motion capabilities in Simcenter STAR-CCM+, the macro code for rotating motions and superposing rotating motions has changed.

Setting rotation rate in rotating motions

Previous Release Simcenter STAR-CCM+ 2402
  RotatingMotion rotatingMotion_0 = 
    ((RotatingMotion) simulation_0.get(MotionManager.class).getObject("Rotation"));

  Units units_0 = 
    ((Units) simulation_0.getUnitsManager().getObject("radian/s"));

  rotatingMotion_0.getRotationRate().setValueAndUnits(1.0, units_0);
  RotatingMotion rotatingMotion_0 = 
    ((RotatingMotion) simulation_0.get(MotionManager.class).getObject("Rotation"));

  RotationRate rotationRate_0 = 
    ((RotationRate) rotatingMotion_0.getRotationSpecification());

  Units units_0 = 
    ((Units) simulation_0.getUnitsManager().getObject("radian/s"));

  rotationRate_0.getRotationRate().setValueAndUnits(1.0, units_0);

Setting rotation axis direction and origin in rotating motions

Previous Release Simcenter STAR-CCM+ 2402
  RotatingMotion rotatingMotion_0 = 
    ((RotatingMotion) simulation_0.get(MotionManager.class).getObject("Rotation"));

  Units units_0 = 
    ((Units) simulation_0.getUnitsManager().getObject(""));

  rotatingMotion_0.getAxisDirection().setComponentsAndUnits(0.0, 1.0, 1.0, units_0);
  // Alternatively it can also be:
  // rotatingMotion_0.getAxisVector().setComponentsAndUnits(0.0, 1.0, 1.0, units_0);

  Units units_1 = 
    ((Units) simulation_0.getUnitsManager().getObject("m"));

  rotatingMotion_0.getAxisOrigin().setComponentsAndUnits(0.0, 0.0, 1.0, units_1);
  // Alternatively it can also be:
  // rotatingMotion_0.getOriginVector().setComponentsAndUnits(0.0, 0.0, 1.0, units_1);
  RotatingMotion rotatingMotion_0 = 
    ((RotatingMotion) simulation_0.get(MotionManager.class).getObject("Rotation"));

  MotionRotationAxis motionRotationAxis_0 = 
    rotatingMotion_0.getRotationAxis();

  Units units_0 = 
    ((Units) simulation_0.getUnitsManager().getObject(""));

  motionRotationAxis_0.getDirection().setComponentsAndUnits(0.0, 1.0, 1.0, units_0);

  Units units_1 = 
    ((Units) simulation_0.getUnitsManager().getObject("m"));

  motionRotationAxis_0.getOrigin().setComponentsAndUnits(0.0, 0.0, 1.0, units_1);

Setting rotation axis direction and origin in superposing rotating motions

Previous Release Simcenter STAR-CCM+ 2402
  SuperposingRotatingMotion superposingRotatingMotion_0 = 
    ((SuperposingRotatingMotion) rotatingMotion_0.getSuperposingMotionManager().getObject("Superposing Rotation"));

  Units units_0 = 
    ((Units) simulation_0.getUnitsManager().getObject(""));

  superposingRotatingMotion_0.getAxisDirection().setComponentsAndUnits(0.0, 1.0, 1.0, units_0);
  // Alternatively it can also be:
  // superposingRotatingMotion_0.getAxisVector().setComponentsAndUnits(0.0, 1.0, 1.0, units_0);

  Units units_1 = 
    ((Units) simulation_0.getUnitsManager().getObject("m"));

  superposingRotatingMotion_0.getAxisOrigin().setComponentsAndUnits(0.0, 0.0, 1.0, units_1);
  // Alternatively it can also be:
  // superposingRotatingMotion_0.getOriginVector().setComponentsAndUnits(0.0, 0.0, 1.0, units_1);
  SuperposingRotatingMotion superposingRotatingMotion_0 = 
    ((SuperposingRotatingMotion) rotatingMotion_0.getSuperposingMotionManager().getObject("Superposing Rotation"));

  MotionRotationAxis motionRotationAxis_0 = 
    superposingRotatingMotion_0.getRotationAxis();

  Units units_0 = 
    ((Units) simulation_0.getUnitsManager().getObject(""));

  motionRotationAxis_0.getDirection().setComponentsAndUnits(0.0, 1.0, 1.0, units_0);

  Units units_1 = 
    ((Units) simulation_0.getUnitsManager().getObject("m"));

  motionRotationAxis_0.getOrigin().setComponentsAndUnits(0.0, 0.0, 1.0, units_1);

Setting rotation angle in rotating motions

Previous Release Simcenter STAR-CCM+ 2402
  RotatingMotion rotatingMotion_0 = 
    ((RotatingMotion) simulation_0.get(MotionManager.class).getObject("Rotation"));

  RotationAngle rotationAngle_0 = 
    ((RotationAngle) rotatingMotion_0.getRotationSpecification());

  UserFieldFunction userFieldFunction_0 = 
    ((UserFieldFunction) simulation_0.getFieldFunctionManager().getFunction("AngleFieldFunction"));

  rotationAngle_0.setRotationAngleFunction(userFieldFunction_0);
  RotatingMotion rotatingMotion_0 = 
    ((RotatingMotion) simulation_0.get(MotionManager.class).getObject("Rotation"));

  RotationAngle rotationAngle_0 = 
    ((RotationAngle) rotatingMotion_0.getRotationSpecification());

  rotationAngle_0.getRotationAngle().setDefinition("${AngleFieldFunction}");

Setting rotation angle in superposing rotating motions

Previous Release Simcenter STAR-CCM+ 2402
  SuperposingRotatingMotion superposingRotatingMotion_0 = 
    ((SuperposingRotatingMotion) rotatingMotion_0.getSuperposingMotionManager().getObject("Superposing Rotation"));

  RotationAngle rotationAngle_0 = 
    ((RotationAngle) superposingRotatingMotion_0.getRotationSpecification());

  UserFieldFunction userFieldFunction_0 = 
    ((UserFieldFunction) simulation_0.getFieldFunctionManager().getFunction("AngleFieldFunction"));

  rotationAngle_0.setRotationAngleFunction(userFieldFunction_0);
  SuperposingRotatingMotion superposingRotatingMotion_0 = 
    ((SuperposingRotatingMotion) rotatingMotion_0.getSuperposingMotionManager().getObject("Superposing Rotation"));

  RotationAngle rotationAngle_0 = 
    ((RotationAngle) superposingRotatingMotion_0.getRotationSpecification());

  rotationAngle_0.getRotationAngle().setDefinition("${AngleFieldFunction}");

Material Properties: Deprecation of Anisotropic Material Property Specification Methods

The material property specification methods Anisotropic and Anisotropic (Legacy) have been deprecated since version 2210 and are planned for removal from a future version. For details about these methods and the planned replacements, see Material Properties in Important 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+ 2402
AnisotropicElectricalConductivityMethodWithValues FullTensorElectricalConductivityMethodWithValues
AnisotropicPermeabilityMethodWithValues FullTensorPermeabilityMethodWithValues
AnisotropicPermittivityMethodWithValues FullTensorPermittivityMethodWithValues
AnisotropicThermalConductivityMethodWithValues FullTensorThermalConductivityMethodWithValues
AnisotropicThermalConductivityMethod FullTensorLegacyThermalConductivityMethod

Radiation: Changes to Photon Monte Carlo Modeling

Due to the introduction of Volumetric Photon Monte Carlo modeling, macro codes for the Photon Monte Carlo solver have changed.

Previous Release Simcenter STAR-CCM+ 2402
PMCSolver pMCSolver_0 = ((PMCSolver) simulation.getSolverManager().getSolver(PMCSolver.class));
S2sPMCRtPhysicsSolver s2sPMCRtPhysicsSolver_0 =
    ((S2sPMCRtPhysicsSolver) pMCSolver_0.getSolvers().getSolver(S2sPMCRtPhysicsSolver.class));
s2sPMCRtPhysicsSolver_0.setNumRaysPerPatch(400);
PMCSolver pMCSolver_0 = ((PMCSolver) simulation.getSolverManager().getSolver(PMCSolver.class));
PMCRtPhysicsSolver pMCRtPhysicsSolver_0 =
    ((PMCRtPhysicsSolver) pMCSolver_0.getSolvers().getSolver(PMCRtPhysicsSolver.class));
pMCRtPhysicsSolver_0.setNumRaysPerPatch(400);

Eulerian Multiphase (EMP): Changes to Particle Induced Turbulence

In Version 2402, Eulerian multiphase mixture turbulence is now compatible with particle induced turbulence, resulting in changes to the macro code.

Previous Release Simcenter STAR-CCM+ 2402
phaseInteraction_0.enable(ParticleInducedTurbulenceGroup.class);

phaseInteraction_0.enable(TchenPitModel.class);

phaseInteraction_0.enable(VirtualMassCoefficientModel.class);

TchenPitModel tchenPitModel_0 = 
  phaseInteraction_0.getModelManager().getModel(TchenPitModel.class);

Units units_0 = 
  ((Units) simulation_0.getUnitsManager().getObject(""));

tchenPitModel_0.getTchenCDamp().setValueAndUnits(1.0, units_0);

tchenPitModel_0.getTchenC3().setValueAndUnits(1.44, units_0);

tchenPitModel_0.getTchenPrandtlNumber().setValueAndUnits(1.0, units_0);

tchenPitModel_0.getC_beta().setValueAndUnits(1.8, units_0);
phaseInteraction_0.enable(ParticleInducedTurbulenceSourceModel.class);

ParticleInducedTurbulenceSourceModel particleInducedTurbulenceSourceModel_0 = 
  phaseInteraction_0.getModelManager().getModel(ParticleInducedTurbulenceSourceModel.class);

particleInducedTurbulenceSourceModel_0.getPitSourceOption().setSelected(PitSourceOption.Type.TCHEN);

Units units_0 = 
  ((Units) simulation_0.getUnitsManager().getObject(""));

particleInducedTurbulenceSourceModel_0.getTchenC3().setValueAndUnits(1.44, units_0);

particleInducedTurbulenceSourceModel_0.getTchenCDamp().setValueAndUnits(1.0, units_0);

particleInducedTurbulenceSourceModel_0.getC_beta().setValueAndUnits(1.8, units_0);

particleInducedTurbulenceSourceModel_0.getTchenPrandtl().setValueAndUnits(1.0, units_0);
phaseInteraction_0.enable(ParticleInducedTurbulenceGroup.class);

phaseInteraction_0.enable(TroshkoHassanPITModel.class);
	
	phaseInteraction_0.enable(VirtualMassCoefficientModel.class);
	
Units units_0 = 
  ((Units) simulation_0.getUnitsManager().getObject(""));

TroshkoHassanPITModel troshkoHassanPITModel_0 = 
  phaseInteraction_0.getModelManager().getModel(TroshkoHassanPITModel.class);

troshkoHassanPITModel_0.getTroshkoHassanC3().setValueAndUnits(0.45, units_0);

troshkoHassanPITModel_0.getTroshkoHassanCDamp().setValueAndUnits(1.0, units_0);
phaseInteraction_0.enable(ParticleInducedTurbulenceSourceModel.class);

ParticleInducedTurbulenceSourceModel particleInducedTurbulenceSourceModel_0 = 
  phaseInteraction_0.getModelManager().getModel(ParticleInducedTurbulenceSourceModel.class);

particleInducedTurbulenceSourceModel_0.getPitSourceOption().setSelected(PitSourceOption.Type.TROSHKO_HASSAN);

Units units_0 = 
  ((Units) simulation_0.getUnitsManager().getObject(""));
   
particleInducedTurbulenceSourceModel_0.getTroshkoHassanC3().setValueAndUnits(0.45, units_0);

particleInducedTurbulenceSourceModel_0.getTroshkoHassanCDamp().setValueAndUnits(1.0, units_0);
phaseInteraction_0.enable(ParticleInducedMixingModel.class);

ParticleInducedMixingModel particleInducedMixingModel_0 = 
  phaseInteraction_0.getModelManager().getModel(ParticleInducedMixingModel.class);

SatoBubbleInducedViscosityMethod satoBubbleInducedViscosityMethod_0 = 
  particleInducedMixingModel_0.getParticleInducedViscosity().getMethod(SatoBubbleInducedViscosityMethod.class);

satoBubbleInducedViscosityMethod_0.setAPlusConstant(26.0);

satoBubbleInducedViscosityMethod_0.setCalibrationConstant(1.2);
   phaseInteraction_0.enable(ParticleInducedTurbulenceViscosityModel.class);

ParticleInducedTurbulenceViscosityModel particleInducedTurbulenceViscosityModel_0 = 
  phaseInteraction_0.getModelManager().getModel(ParticleInducedTurbulenceViscosityModel.class);

SatoBubbleInducedViscosityMethod satoBubbleInducedViscosityMethod_0 = 
  particleInducedTurbulenceViscosityModel_0.getParticleInducedViscosity().getMethod(SatoBubbleInducedViscosityMethod.class);

satoBubbleInducedViscosityMethod_0.setAPlusConstant(26.0);

satoBubbleInducedViscosityMethod_0.setCalibrationConstant(1.2);
phaseInteraction_0.enable(ParticleInducedTurbulenceGroup.class);

phaseInteraction_0.enable(VirtualMassCoefficientModel.class);
	
phaseInteraction_0.enable(TurbulentDispersionForceModel.class);

phaseInteraction_0.enable(GosmanPITModel.class);
phaseInteraction_0.enable(ParticleInducedTurbulenceSourceModel.class);

ParticleInducedTurbulenceSourceModel particleInducedTurbulenceSourceModel_0 = 
  phaseInteraction_0.getModelManager().getModel(ParticleInducedTurbulenceSourceModel.class);
 
 particleInducedTurbulenceSourceModel_0.getPitSourceOption().setSelected(PitSourceOption.Type.GOSMAN);

Battery Modeling: Changes to Thermal Runaway

Due to the introduction of Q tables in thermal runaway modeling, related macro code has changed.

Previous Release Simcenter STAR-CCM+ 2402
ThermalRunawayHeatReleaseModelDescription thermalRunawayHeatReleaseModelDescription_0 = 
      ((ThermalRunawayHeatReleaseModelDescription) userDefinedBatteryCell_0.getModelDescription(ModelType.TRHEAT));

thermalRunawayHeatReleaseModelDescription_0.setTable(fileTable_0);
thermalRunawayHeatReleaseModelDescription_0.setTemperature("Temperature");
thermalRunawayHeatReleaseModelDescription_0.setHeatRate("Heatrate");
thermalRunawayHeatReleaseModelDescription_0.setExtrapolateTable(true);
thermalRunawayHeatReleaseModelDescription_0.getInterpolationTypeOption().setSelected(InterpolationTypeOption.Type.BEZIER);

thermalRunawayHeatReleaseModelDescription_0.plotHeatRateTable();
ThermalRunawayHeatReleaseModelDescription thermalRunawayHeatReleaseModelDescription_0 = 
      ((ThermalRunawayHeatReleaseModelDescription) userDefinedBatteryCell_0.getModelDescription(ModelType.TRHEAT));

HeatRateByTemperatureTableMethod heatRateByTemperatureTableMethod_0 = 
      ((HeatRateByTemperatureTableMethod) thermalRunawayHeatReleaseModelDescription_0.getHeatRateMethods().getActiveMethod());

heatRateByTemperatureTableMethod_0.setTable(fileTable_0);
heatRateByTemperatureTableMethod_0.setTemperature("Temperature");
heatRateByTemperatureTableMethod_0.setHeatRate("Heatrate");
heatRateByTemperatureTableMethod_0.setExtrapolateTable(true);
heatRateByTemperatureTableMethod_0.getInterpolationTypeOption().setSelected(InterpolationTypeOption.Type.BEZIER);

thermalRunawayHeatReleaseModelDescription_0.getHeatRateMethods().plotHeatRateTable();

Post-Processing: Planned Removal of ChartStyle Class from Java Framework (2406)

The ChartStyle class is currently planned for removal from the plotting framework in version 2406, subject to further changes.

The following class structures, which may be present in older Java macros where .plt files were imported, are no longer supported:

  • star.common.graph.ChartStyle
  • star.common.graph.ChartStyleManager

An example of the earlier use of this class shows a dataset on an exampleXYPlot, whose ChartStyle is being updated:

DataSet dataSet = exampleXYPlot.getYAxes().getAxisType("Y Type 1").getDataSets().getDataSet("Temperature");
dataSet.getChartStyle().setSymbolShape(JCSymbolStyle.NONE);
dataSet.getChartStyle().setLinePattern(JCLineStyle.SOLID);
dataSet.getChartStyle().setLineColor(Color.red);
dataSet.getChartStyle().setLineWidth(4);

In recent years, Style has been managed on its own sub-objects, making ChartStyle unnecessary.

For version 2402, you will need to make two changes:

  • When applicable, update Style directly, instead of routing the request through ChartStyle.
  • When no direct change is possible, remove the calls altogether.

Specific Style-to-Type replacements:

  • Replace JCSymbolStyle with SymbolShapeOption.Type.
  • Replace JCLineStyle with LinePatternOption.Type.
  • Replace JCFillStyle with FillPatternOption.Type.

Detailed Instructions for Updating Code, with Examples

The following Line Style-related calls should be updated, as necessary:

  • ChartStyle.setLinePattern
  • ChartStyle.setLineColor
  • ChartStyle.setLineWidth

Examples of updates to API calls for Line Style:

// At the top of the macro
import star.common.LinePatternOption;
import star.common.LineStyle;
 
DataSet dataSet = exampleXYPlot.getYAxes().getAxisType("Y Type 1").getDataSets().getDataSet("Temperature");
 
// Step 1: Replace getChartStyle() calls with their direct 'set' calls.
// dataSet.getChartStyle().setLinePattern(JCLineStyle.SOLID);
dataSet.getLineStyle().setLinePatternOptionInput(LinePatternOption.Type.SOLID);          // (Step 2) replacement for JCLineStyle.SOLID
 
// dataSet.getChartStyle().setLineColor(Color.red);
dataSet.getLineStyle().setColor(Color.red);
 
// dataSet.getChartStyle().setLineWidth(4);
dataSet.getLineStyle().setLineWidth(4);

The following Symbol Style-related calls should be updated, as necessary:

  • ChartStyle.setSymbolShape
  • ChartStyle.setSymbolSize
  • ChartStyle.setSymbolStrokeWidth
  • ChartStyle.setSymbolColor

Examples of updates to API calls for Symbol Style:

// At the top of the macro
import star.common.SymbolShapeOption;
import star.common.SymbolStyle;
 
DataSet dataSet = exampleXYPlot.getYAxes().getAxisType("Y Type 1").getDataSets().getDataSet("Temperature");
 
// Step 1: Replace getChartStyle() calls with their direct 'set' calls. Calls
// dataSet.getChartStyle().setSymbolShape(JCSymbolStyle.NONE);
dataSet.getSymbolStyle().setSymbolShapeOptionInput(SymbolShapeOption.Type.NONE);            // (Step 2) replacement for JCSymbolStyle.NONE
 
// dataSet.getChartStyle().setSymbolSize(10);
dataSet.getSymbolStyle().setSize(10);
 
// dataSet.getChartStyle().setSymbolStrokeWidth(0.2);
dataSet.getSymbolStyle().setStrokeWidth(0.2);
 
// dataSet.getChartStyle().setSymbolColor(Color.red);
dataSet.getSymbolStyle().setColor(Color.red);

The following Fill Style-related calls should be updated, as necessary:

  • ChartStyle.setFillPattern
  • ChartStyle.setFillColor
  • ChartStyle.setFillBackground

Examples of updates to API calls for Fill Style:

// At the top of the macro
import star.common.FillPatternOption;
import star.common.FillStyle;
 
DataSet dataSet = exampleXYPlot.getYAxes().getAxisType("Y Type 1").getDataSets().getDataSet("Temperature");
 
// Step 1: Replace getChartStyle() calls with their direct 'set' calls.
// dataSet.getChartStyle().setFillPattern(JCFillStyle.SOLID);
dataSet.getFillStyle().setLinePatternOptionInput(FillPatternOption.Type.SOLID);             // (Step 2) replacement for JCFillStyle.SOLID
 
// dataSet.getChartStyle().setFillColor(Color.red);
dataSet.getFillStyle().setColor(Color.red);
 
// dataSet.getChartStyle().setFillBackground(Color.blue);
dataSet.getFillStyle().setBackgroundColor(Color.blue);

The following API calls shall be removed altogether. Their handling has been discontinued/internalized.

  • ChartStyle.setLineCap
  • ChartStyle.setLineJoin

Examples of removal of API calls for Line Style:

DataSet dataSet = exampleXYPlot.getYAxes().getAxisType("Y Type 1").getDataSets().getDataSet("Temperature");
dataSet.getChartStyle().setLineCap(0);
dataSet.getChartStyle().setLineJoin(0);

Replacements of Old Symbol, Line, and Fill Style with Current Supported Types

Symbol Style: import star.common.SymbolShapeOption;

Previous Release Simcenter STAR-CCM+ 2402
JCSymbolStyle.NONE
SymbolShapeOption.Type.NONE
JCSymbolStyle.DOT
SymbolShapeOption.Type.FILLED_CIRCLE
JCSymbolStyle.BOX
SymbolShapeOption.Type.FILLED_SQUARE
JCSymbolStyle.TRIANGLE
SymbolShapeOption.Type.FILLED_TRIANGLE
JCSymbolStyle.DIAMOND
SymbolShapeOption.Type.FILLED_DIAMOND
JCSymbolStyle.STAR
SymbolShapeOption.Type.STAR 
JCSymbolStyle.VERT_LINE
SymbolShapeOption.Type.VERTICAL_LINE
JCSymbolStyle.HORIZ_LINE
SymbolShapeOption.Type.HORIZONTAL_LINE
JCSymbolStyle.CROSS
SymbolShapeOption.Type.CROSS
JCSymbolStyle.CIRCLE
SymbolShapeOption.Type.EMPTY_CIRCLE
JCSymbolStyle.SQUARE
SymbolShapeOption.Type.EMPTY_SQUARE

Line Style: import star.common.LinePatternOption;

Previous Release Simcenter STAR-CCM+ 2402
JCLineStyle.NONE
LinePatternOption.Type.NONE
JCLineStyle.SOLID
LinePatternOption.Type.SOLID
JCLineStyle.LONG_DASH
LinePatternOption.Type.DASH
JCLineStyle.SHORT_DASH
LinePatternOption.Type.DOT
JCLineStyle.LSL_DASH
LinePatternOption.Type.DASH_DOT
JCLineStyle.DASH_DOT
LinePatternOption.Type.DASH_DOT

Fill Style: import star.common.FillPatternOption;

Previous Release Simcenter STAR-CCM+ 2402
JCFillStyle.NONE
FillPatternOption.Type.NONE
JCFillStyle.SOLID
FillPatternOption.Type.SOLID
JCFillStyle.PER_25
FillPatternOption.Type.DOT_25_PERCENT
JCFillStyle.PER_50
FillPatternOption.Type.DOT_50_PERCENT
JCFillStyle.PER_75
FillPatternOption.Type.DOT_75_PERCENT
JCFillStyle.HORIZ_STRIPE
FillPatternOption.Type.HORIZONTAL_STRIPE
JCFillStyle.VERT_STRIPE
FillPatternOption.Type.VERTICAL_STRIPE
JCFillStyle.STRIPE_45
FillPatternOption.Type.DEGREE_45_STRIPE
JCFillStyle.STRIPE_135
FillPatternOption.Type.DEGREE_135_STRIPE
JCFillStyle.DIAG_HATCHED
FillPatternOption.Type.DIAGONAL_HATCH
JCFillStyle.CROSS_HATCHED
FillPatternOption.Type.CROSS_HATCH
JCFillStyle.CUSTOM_FILL
FillPatternOption.Type.SOLID
JCFillStyle.CUSTOM_STACK
FillPatternOption.Type.SOLID

Style API Removal and Replacements

Line Style

Remove the following:

  • LineStyle.setVisible(boolean)
  • LineStyle.getJoin()
  • LineStyle.setJoin(int)
  • LineStyle.getCap()
  • LineStyle.setCap(int)

Replace code as follows:

Previous Release Simcenter STAR-CCM+ 2402
LineStyle.getStyle()
LinePatternOption.Type LineStyle.getLinePatternOption().getSelectedElement()
LineStyle.setStyle(int)
LineStyle.getLinePatternOption().setSelected(LinePatternOption.Type)

Symbol Style

Remove SymbolStyle.setVisible(boolean).

Replace code as follows:

Previous Release Simcenter STAR-CCM+ 2402
SymbolStyle.getStyle()
SymbolShapeOption.Type SymbolStyle.getSymbolShapeOption().getSelectedElement()
SymbolStyle.setStyle(int)
SymbolStyle.getSymbolShapeOption().setSelected(SymbolShapeOption.Type)

Fill Style

Remove FillStyle.setVisible(boolean).

Previous Release Simcenter STAR-CCM+ 2402
FillStyle.getPattern()
FillPatternOption.Type FillStyle.getFillPatternOption().getSelectedElement()
FillStyle.setPattern(int)
FillStyle.getFillPatternOption().setSelected(FillPatternOption.Type)

Design Manager: Changes to Output Tables and Default Views

In Design Manager output tables have been restructured, and the dashboard is now the default view when a study is run. These modifications have resulted in changes to the macro code.

There is a new class for the output table, and the class openTableView is now deprecated.

Previous Release Simcenter STAR-CCM+ 2402
MdxAllDesignSet mdxAllDesignSet_0 = 
  ((MdxAllDesignSet) mdxDesignStudy_0.getDesignSets().getDesignSet("All"));

mdxAllDesignSet_0.openTableView();
MdxAllDesignSet mdxAllDesignSet_0 = 
  ((MdxAllDesignSet) mdxDesignStudy_0.getDesignSets().getDesignSet("All"));

MdxDesignSetTable mdxDesignSetTable_0 = 
  mdxAllDesignSet_0.getDesignSetTable();

mdxDesignSetTable_0.openInteractive();

Design Manager dashboards were introduced in Version 2402. When a study is run, dashboards are displayed instead of the output table. Dashboards can also be opened manually.

You may want to open a dashboard instead of the output table. The following code opens a dashboard:

MdxDesignStudy mdxDesignStudy_0 = 
  mdxProject_0.getDesignStudyManager().getDesignStudy("Test");

LayoutView layoutView_0 = 
  mdxDesignStudy_0.openStudyDashboard();

The following table shows macro code recorded during the run of a design study in the previous release and Version 2402.

Previous Release Simcenter STAR-CCM+ 2402
MdxProject mdxProject_0 = 
  getActiveMdxProject();

MdxDesignStudy mdxDesignStudy_0 = 
  mdxProject_0.getDesignStudyManager().getDesignStudy("Design Study");

MdxAllDesignSet mdxAllDesignSet_0 = 
  ((MdxAllDesignSet) mdxDesignStudy_0.getDesignSets().getDesignSet("All"));

mdxAllDesignSet_0.openTableView();

mdxAllDesignSet_0.openTableView();

mdxDesignStudy_0.runDesignStudy();

MdxDesign mdxDesign_0 = 
  mdxDesignStudy_0.getDesigns().getDesign("Design 1");

mdxDesignStudy_0.getDesigns().setCurrentDesign(mdxDesign_0);
MdxProject mdxProject_0 = 
  getActiveMdxProject();

MdxDesignStudy mdxDesignStudy_0 = 
  mdxProject_0.getDesignStudyManager().getDesignStudy("Test");

mdxDesignStudy_0.runDesignStudy();

LayoutView layoutView_0 = 
  mdxDesignStudy_0.openStudyDashboard();

layoutView_0.openInteractive();

MdxDesignSceneView mdxDesignSceneView_0 = 
  ((MdxDesignSceneView) mdxProject_0.get(MdxDesignViewManager.class).getDesignView("Test - Snapshot"));

mdxDesignSceneView_0.initializeAndWait();