Macro API Changes 2306
In Simcenter STAR-CCM+ 2306, the macro API changed for 3D-CAD, material properties, heat transfer, reacting flow, solid stress, Eulerian multiphase, electromagnetism, post-processing, and Simcenter STAR-CCM+ In-cylinder.
3D-CAD: Changes Related to Parasolid Auto-Matching
Improvements in Boolean and imprinting features allow you to activate Parasolid's auto-matching capability. These improvements have resulted in changes to the macro code.
These changes provide continuity in use:
- The 3D-CAD features
UniteBodiesFeature
andIntersectBodiesFeature
did not previously use Parasolid's auto-matching capability, and in Simcenter STAR-CCM+ 2306 you can choose not to use Parasolid's auto-matching capability with them. - The 3D-CAD features
SubtractBodiesFeature
,Imprint
, andImprintFaces
previously used Parasolid's auto-matching option, and this enhancement allows you to continue doing so.
In Simcenter STAR-CCM+ 2306, the use of Parasolid's auto-matching option is activated
by default for all newly created instances of any of the five previously mentioned
types of features. For unite bodies and intersect bodies features, this is a change
from the previous release. Consequently, the following public member functions of
the class FeatureManager
of the package
star.cadmodeler
have been deprecated:
UniteBodiesFeature createUniteBodies(List<Body> bodies);
UniteBodiesFeature createUniteBodies();
IntersectBodiesFeature createIntersectBodies(List<Body> bodies);
IntersectBodiesFeature createIntersectBodies();
These functions have been superseded by the following public member functions of the same class:
UniteBodiesFeature createUniteBodies2(List<Body> bodies);
UniteBodiesFeature createUniteBodies2();
IntersectBodiesFeature createIntersectBodies2(List<Body> bodies);
IntersectBodiesFeature createIntersectBodies2();
The following pair of new public
member functions has been added to each of the feature classes
UniteBodiesFeature
, SubtractBodiesFeature
,
IntersectBodiesFeature
, Imprint
, and
ImprintFaces
.
void setUseAutoMatch(boolean mode);
boolean isUseAutoMatch();
The first of these functions allows you to specify whether or not an instance of the feature class should use Parasolid's auto-matching option. The second of these functions allows you to query whether or not an instance of the feature class is currently configured to use Parasolid's auto-matching option.
The following example shows how to
create a UniteBodiesFeature
and configure it so that it does not
use Parasolid's auto-matching option.
CadModel cadModel =
getActiveSimulation().get(SolidModelManager.class).createSolidModel();
UniteBodiesFeature uniteBodiesFeature =
cadModel.getFeatureManager().createUniteBodies2();
uniteBodiesFeature.setUseAutoMatch(false);
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 2306 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+ 2306 |
---|---|
AnisotropicElectricalConductivityMethodWithValues |
FullTensorElectricalConductivityMethodWithValues |
AnisotropicPermeabilityMethodWithValues |
FullTensorPermeabilityMethodWithValues |
AnisotropicPermittivityMethodWithValues |
FullTensorPermittivityMethodWithValues |
AnisotropicThermalConductivityMethodWithValues |
FullTensorThermalConductivityMethodWithValues |
AnisotropicThermalConductivityMethod |
FullTensorLegacyThermalConductivityMethod |
Heat Transfer: Physics Continuum Consolidation for Solid Energy Modeling
In Simcenter STAR-CCM+ 2306, you can use a single physics continuum to model solid energy in 3D and shell regions. Older simulation files that use separate physics continua for 3D regions and shell regions continue to work.
For simulation files created in Simcenter STAR-CCM+ 2306 and later, it is recommended to use a single physics continuum to model solid energy in 3D and shell regions. For continua whose domain includes shell topology regions (for fluid film or solid shell modeling), select the Three Dimensional space model. The Shell Three Dimensional space model is no longer available for selection.
Due to this workflow improvement, any macros created prior to Simcenter STAR-CCM+ 2306 need updates. Search for instances of affected strings and update them as indicated in the following table.
Previous Release | Simcenter STAR-CCM+ 2306 |
---|---|
|
|
|
|
|
|
Reacting Flow: Changes to Flamelet Solvers
Due to refactoring of the flamelet solvers, the macro code has changed.
The name of the field function
ScaledProgressVariable
has changed to
UnnormalizedProgressVariable
. This field function is created
when the Flamelet Generated Manifold (FGM) model is activated.
Previous Release | Simcenter STAR-CCM+ 2306 |
---|---|
|
|
The name of the field function
FuelMassFraction
has changed to
UnnormalizedProgressVariable
. This field function is created in
conjunction with any of the following model pairings: Coherent Flame Model (CFM) or
Turbulent Flame Speed Closure (TFC), in combination with either Chemical Equilibrium
(CE) or Steady Laminar Flamelet (SLF).
Previous Release | Simcenter STAR-CCM+ 2306 |
---|---|
|
|
In Simcenter STAR-CCM+ 2306, when the FGM is activated along with either the Coherent Flame Model (CFM) or the Turbulent Flame Speed Closure (TFC), the CFM Combustion and TFC Combustion solvers do not appear in the UI. The Under Relaxation Factor for the CFM Combustion or TFC Combustion solvers can now be set up under the FGM Combustion solver after Separate URF Numbers is activated under the FGM Combustion solver. This restructuring has also resulted in changes to the macro code.
Previous Release | Simcenter STAR-CCM+ 2306 |
---|---|
|
|
|
|
Solid Stress
Changes to Hyperelastic Material Input Table
Due to refactoring within the
star.solidstress
package, macro code has changed. Update your
macros as shown in the following table.
Previous Release | Simcenter STAR-CCM+ 2306 |
---|---|
|
|
|
|
|
|
Changes to Added Mass
To help improve the handling of
Fluid-Structure Interaction simulations, the classes
star.solidstress
, star.partitionedcoupling
,
and star.partitionedcoupling2
have been moved to a new package
called star.stabilization
.
Previous Release | Simcenter STAR-CCM+ 2306 |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
removed |
|
removed |
Changes to Contact Interfaces
Interface-based contact in Simcenter STAR-CCM+ has been refactored, resulting in changes to the macro code. The enum values for two options on interfaces between solid regions were modified.
For the
SolidSolidConstraintOption
, which is used to set constraint
mapping, the enum values have been renamed as follows:
SolidSolidConstraintOption | Old Value | New Value |
---|---|---|
Node to surface | Node_Surface |
NODE_TO_SURFACE |
Surface to surface | Surface_Surface |
SURFACE_TO_SURFACE |
The following example shows how the
SolidSolidConstraintOption
can be set on an interface called
"Solid 1/Solid 2"
:
Previous Release | Simcenter STAR-CCM+ 2306 |
---|---|
|
|
For the
SolidSolidContactOption
, which is used to set the type of
mechanical interaction on an interface, the enum value called
WELDED
was renamed to BONDED
.
The following example shows how the
SolidSolidContactOption
can be set to BONDED
on an interface called "Solid 1/Solid 2"
:
Previous Release | Simcenter STAR-CCM+ 2306 |
---|---|
|
|
Eulerian (EMP): Changes for AMUSIG Reports
The following classes have been moved
from multiphase
to emp
due to refactoring:
Previous Release | Simcenter STAR-CCM+ 2306 |
---|---|
|
|
|
|
|
|
|
|
|
|
Electromagnetism: Change to Eddy Current Suppress Option
Due to restructuring, changes occurred to the Eddy Current Suppress Option, including the macro code.
Previous Release | Simcenter STAR-CCM+ 2306 |
---|---|
|
|
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+ 2306 |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Line Style:
import star.common.LinePatternOption;
Previous Release | Simcenter STAR-CCM+ 2306 |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
Fill Style:
import star.common.FillPatternOption;
Previous Release | Simcenter STAR-CCM+ 2306 |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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+ 2306 |
---|---|
|
|
|
|
Symbol Style
Remove
SymbolStyle.setVisible(boolean)
.
Replace code as follows:
Previous Release | Simcenter STAR-CCM+ 2306 |
---|---|
|
|
|
|
Fill Style
Remove
FillStyle.setVisible(boolean)
.
Previous Release | Simcenter STAR-CCM+ 2306 |
---|---|
|
|
|
|
Simcenter STAR-CCM+ In-cylinder: Mesh Base Size Parameter Now Available for Cold Flow Simulations
The ${Mesh Base Size}
parameter is now created when you launch Simcenter STAR-CCM+
In-cylinder, resulting in changes to the macro code. The following
example involves a Base Size setting of 2 (when the Injection
model is not activated).
Previous Release | Simcenter STAR-CCM+ 2306 |
---|---|
|
|