Macro API Changes 2310
In Simcenter STAR-CCM+ 2310, the macro API changed for tangential velocity specification, meshing, time, material properties, Lagrangian multiphase, Eulerian multiphase, DFBI, electromagnetism, post-processing, and CAE integration.
Parts-Based Support for Boundary Axis
Improvements to Tangential Velocity Specification allow you to define the axis with respect to the part surfaces of the boundary. This improvement has resulted in changes to the macro code.
Previous Release | Simcenter STAR-CCM+ 2310 |
---|---|
|
|
Meshing: Parallel Surface Wrapper
The new distributed memory (MPI) parallelization of the Surface Wrapper offers reduced CAD-to-mesh time. As a result, macro behavior has changed.
If you have a macro that creates a new wrap operation, that operation is created in the new MPI wrap mode rather than with the original (legacy) approach. That causes changes in wrap behavior and alters some of the options that you have (such as gap closure). If your macros that create wrap operations cause a noticeable difference and you would like to revert to the original behavior, you can set the wrapper macro to "legacy mode" as shown in the following example. However, note that the legacy mode will eventually be removed, so consider switching to the new MPI wrapper mode.
Previous Release | Simcenter STAR-CCM+ 2310 |
---|---|
|
|
Time: Changes to Time-Step Providers
The labels of some time-step providers have been simplified as follows:
Old Provider Name | Updated Provider Name (Simcenter STAR-CCM+ 2310) |
---|---|
Free Surface CFL Condition | Free Surface CFL |
LSI Smoothed Convective CFL Condition | LSI Smoothed CFL |
Smoothed Convective CFL Condition | Smoothed CFL |
Melting-Solidification Condition | Melting-Solidification |
Convective CFL Condition | CFL |
Thermal Diffusivity Condition | Thermal Diffusivity |
Solid Stress Time-Step Provider | Solid Stress |
Max Particle Packing Condition | Max Particle Packing |
In-Cylinder Time-Step Control | In-Cylinder |
This renaming has resulted in changes to the macro code.
For example, if a macro was getting the Solid Stress Time-Step Provider using:
FeSolidStressTimeStepProvider feSolidStressTimeStepProvider_0 =
((FeSolidStressTimeStepProvider) adaptiveTimeStepModel_0.getTimeStepProviderManager().getObject("Solid Stress Time-Step Provider"));
The code must be changed to:
FeSolidStressTimeStepProvider feSolidStressTimeStepProvider_0 =
((FeSolidStressTimeStepProvider) adaptiveTimeStepModel_0.getTimeStepProviderManager().getObject("Solid Stress"));
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 the Important Notes section of the 2310 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+ 2310 |
---|---|
AnisotropicElectricalConductivityMethodWithValues |
FullTensorElectricalConductivityMethodWithValues |
AnisotropicPermeabilityMethodWithValues |
FullTensorPermeabilityMethodWithValues |
AnisotropicPermittivityMethodWithValues |
FullTensorPermittivityMethodWithValues |
AnisotropicThermalConductivityMethodWithValues |
FullTensorThermalConductivityMethodWithValues |
AnisotropicThermalConductivityMethod |
FullTensorLegacyThermalConductivityMethod |
Lagrangian Multiphase: Changes to Interactions between Fluid Film and Lagrangian Phases
The workflow for the phase interactions between Fluid Film and Lagrangian phases has changed.
Previously, activation of interaction models was possible in Java macros without Lagrangian phases selected beforehand. However, improvements in Simcenter STAR-CCM+ 2310 introduced the separation of Lagrangian phases into free-stream and wall-bounded; this separation restricts the specific interaction models that may be activated.
Hence, for phase interaction between Fluid Film and Lagrangian phases, your Java macros must select the Lagrangian phase first, then the appropriate models are available for free-stream and wall-bound phases.
Previous Release | Simcenter STAR-CCM+ 2310 |
---|---|
|
|
|
|
|
|
|
|
Eulerian Multiphase (EMP): Changes for Large Interface Turbulence Damping Model
As part of the improvements to the Wall Type Turbulence Damping within the Large Scale Interface Turbulence Damping model, the property Turbulence Damping Constant under the turbulence damping parameters has been eliminated. The property Damping Calibration Factor has been added.
Because the
TurbulenceDampingConstant
CSO (Client-Server Object) has been
removed, you need to update any macros that use this CSO with one of the supported
types, as shown in the following examples.
K-Epsilon Turbulence Model
Previous Release | Simcenter STAR-CCM+ 2310 |
---|---|
|
|
K-Omega Turbulence Model
Previous Release | Simcenter STAR-CCM+ 2310 |
---|---|
|
|
DFBI: Change to DFBI Displayers
In the DFBI module, distance driver constraints have been introduced; these constraints can be visualized using DFBI displayers.
As a result, the Java methods that can be used to read or to set the size of coupling glyphs in DFBI displayers have been extended to work with constraint glyphs as well. The methods have been renamed accordingly.
Previous Release | Simcenter STAR-CCM+ 2310 |
---|---|
|
|
Although the old methods are deprecated, they are still available until further notice. Therefore, existing macros should still run as expected.
Electromagnetism: Change to Default Electric Potential Solver
With the simplified user setup
offering the automatic use of Hypre as the Electric Potential solver, macro codes
have changed. The API Java class
ElectricPotentialHypreIjIterativeSolver
has been removed and
the customization of the electric potential solver, which is now exclusively Hypre,
is done via the standard AMGLinearSolver.java
solver customization
API.
Specific changes are:
- The
LinearAlgebraSolverOption
is not exposed and Hypre is made the Electric Potential linear equations solver. - The
ElectricPotentialHypreIjIterativeSolver
Java class is made redundant and removed. - (Hypre) solver customization is done in the
AMGLinearSolver
class.
Previous Release | Simcenter STAR-CCM+ 2310 |
---|---|
|
|
Post-Processing: Planned Removal of ChartStyle Class from Java Framework (2402)
The ChartStyle
class
is planned for removal from the plotting framework in version 2402.
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 throughChartStyle
. - When no direct change is possible, remove the calls altogether.
Specific
Style
-to-Type
replacements:
- Replace
JCSymbolStyle
withSymbolShapeOption.Type
. - Replace
JCLineStyle
withLinePatternOption.Type
. - Replace
JCFillStyle
withFillPatternOption.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+ 2310 |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Line Style:
import star.common.LinePatternOption;
Previous Release | Simcenter STAR-CCM+ 2310 |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
Fill Style:
import star.common.FillPatternOption;
Previous Release | Simcenter STAR-CCM+ 2310 |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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+ 2310 |
---|---|
|
|
|
|
Symbol Style
Remove
SymbolStyle.setVisible(boolean)
.
Replace code as follows:
Previous Release | Simcenter STAR-CCM+ 2310 |
---|---|
|
|
|
|
Fill Style
Remove
FillStyle.setVisible(boolean)
.
Previous Release | Simcenter STAR-CCM+ 2310 |
---|---|
|
|
|
|
CAE Integration: Changes to CGNS Export
Improvements in exports from internal continua have resulted in changes to macro codes for activating models for CGNS file export.
Previous Release | Simcenter STAR-CCM+ 2310 |
---|---|
|
|