Macro API Changes 2019.3
In Simcenter STAR-CCM+ 2019.3, the macro API changed for meshing, finite element models, overset, porous media, adjoint, DEM, Eulerian multiphase, VOF and N-Phase mixtures, electromagnetics, electrochemistry and plasma, Design Manager, co-simulation, and STAR-ICE (now Simcenter STAR-CCM+ In-cylinder).
Meshing: Changes to Model Selection for Solution Interpolation
The models related to solution interpolation have been refactored to simplify the workflow and user selection. This refactoring has resulted in changes to the macro code.
The following classes have been removed:
ProximityInterpolationModel.class
ConservativeInterpolationModel.class
To activate or deactivate solution
interpolation, use SolutionInterpolationModel.class
instead:
Previous Release | Simcenter STAR-CCM+ 2019.3 |
---|---|
|
|
|
|
The methods
getSolutionInterpolationMethod
and
setPerPartMapping
, which were previously available on
ProximityInterpolationModel
and
ConservativeInterpolationModel
, should now be called on
SolutionInterpolationModel
:
Previous Release | Simcenter STAR-CCM+ 2019.3 |
---|---|
|
|
|
|
The method
setPerPartConservation
, which was previously available on
ConservativeInterpolationModel
, has been moved to
ConservativeMappingModel
which is a child of
SolutionInterpolationModel
:
Previous Release | Simcenter STAR-CCM+ 2019.3 |
---|---|
|
|
Finite Element Models: Changes to Field Functions
For consistency, the following field functions in finite element solid stress and solid energy modeling have had their internal names, not their titles, changed as listed in the following table. Update all instances of these field functions in your macros.
UI Title | Internal Name in Previous Release | Internal Name in Simcenter STAR-CCM+ 2019.3 |
---|---|---|
Rigid Body Velocity | FeRigidBodyVelocityVar |
RigidBodyVelocity |
Rigid Body Acceleration | FeRigidBodyAccelerationVar |
RigidBodyAcceleration |
Temperature Time Derivative | FeSolidEnergyTemperatureTimeDerivative |
TemperatureTimeDerivative |
Overset Mesh: Overset Conservation Option Upgraded to Continuum Model
The Conservation Option sub-node of the Segregated Flow model node has been removed, and its functionality is now available in the new Overset Conservation model node, resulting in changes to the macro code.
Previous Release | Simcenter STAR-CCM+ 2019.3 |
---|---|
|
|
Porous Media
Changes to Porous Region Profiles
Profiles related to anisotropic resistance specifications in porous regions and porous media have been improved to simplify the workflow, and renamed to be consistent with other models.
Previous Release | Simcenter STAR-CCM+ 2019.3 |
---|---|
|
|
|
|
|
|
|
|
The spatial orientations of profiles are no longer specified at the profile level. New profiles have an independent Orientation property which can be re-used in other profiles.
Previous Release | Simcenter STAR-CCM+ 2019.3 |
---|---|
|
|
Changes to Anisotropic Solid Thermal Conductivity
To make the specification of anisotropic solid thermal conductivity simpler and less error-prone, this material property has been restructured, resulting in changes to the macro code.
Previous Release | Simcenter STAR-CCM+ 2019.3 |
---|---|
|
|
Efforts have been made to map old macro behavior automatically to the new API, but you are advised to inspect your profiles in the new version.
Adjoint: Changes to Cost Functions
In the current release of Simcenter STAR-CCM+, compute actions, stepping, and running can now be applied to individual cost functions, rather than simply to all cost functions.
The following example shows new macro code for the current release, running adjoint for individual Drag and Lift cost functions:
Simulation simulation_0 = getActiveSimulation();
AdjointSolver adjointSolver_0 = ((AdjointSolver) simulation_0.getSolverManager().getSolver(AdjointSolver.class));
ForceCostFunction forceCostFunction_0 = ((ForceCostFunction) simulation_0.getAdjointCostFunctionManager().getAdjointCostFunction("Drag"));
ForceCostFunction forceCostFunction_1 = ((ForceCostFunction) simulation_0.getAdjointCostFunctionManager().getAdjointCostFunction("Lift"));
adjointSolver_0.runAdjoint(Arrays.asList(forceCostFunction_0, forceCostFunction_1));
A new method
clearAdjoint()
has been introduced, to allow clearing the
adjoint solution of all cost functions or of a list of specific cost functions:
Simulation simulation = getActiveSimulation();
AdjointSolver adjointSolver = ((AdjointSolver) simulation.getSolverManager().getSolver(AdjointSolver.class));
// Clear adjoint of specific cost functions
ForceCostFunction forceCostFunction_0 = ((ForceCostFunction) simulation.getAdjointCostFunctionManager().getAdjointCostFunction("Drag"));
ForceCostFunction forceCostFunction_1 = ((ForceCostFunction) simulation.getAdjointCostFunctionManager().getAdjointCostFunction("Lift"));
adjointSolver.clearAdjoint(Arrays.asList(forceCostFunction_0, forceCostFunction_1));
// Clear adjoint of all cost functions
adjointSolver.clearAdjoint();
This improvement has also resulted in changes to the macro code.
n adjoint steps
Previous Release | Simcenter STAR-CCM+ 2019.3 |
---|---|
|
|
Computing mesh sensitivity
Previous Release | Simcenter STAR-CCM+ 2019.3 |
---|---|
|
|
Computing surface sensitivity
Previous Release | Simcenter STAR-CCM+ 2019.3 |
---|---|
|
|
Computing adjoint error estimates
Previous Release | Simcenter STAR-CCM+ 2019.3 |
---|---|
|
|
DEM: Changes to Strength Specification
The following DEM model parameters have been restructured to use methods that allow, for example, switching from a constant value to a field function:
- Simple Failure model parameters:
- Tensile Strength
- Shear Strength
- Constant Rate Damage model parameters:
- Bond Strength
- Initial Damage
This improvement has resulted in changes to the macro code. The following example shows selecting and setting the parameter for a uniformly distributed tensile strength in the Simple Failure model:
Previous Release | Simcenter STAR-CCM+ 2019.3 |
---|---|
|
|
Eulerian Multiphase: Changes to S-Gamma Breakup and Coalescence
Improvements have been implemented in the breakup and coalescence of the S-Gamma model, resulting in changes to the macro code.
Previous Release | Simcenter STAR-CCM+ 2019.3 |
---|---|
|
|
VOF / N-Phase Mixture
Restructuring of Convection Option
Due to improvements in consistency and labeling, the convection option has been reworked, resulting in changes to the macro code.
Example for VOF
Previous Release | Simcenter STAR-CCM+ 2019.3 |
---|---|
|
|
|
|
|
|
Example for Segregated N-Phase mixture
Previous Release | Simcenter STAR-CCM+ 2019.3 |
---|---|
|
|
|
|
|
|
Renaming of Default Convection Option
For the Volume of Fluid (VOF) model node, the default setting of the Convection property has been renamed for consistency. The 2nd-order setting is now HRIC (High-Resolution Interface Capturing), resulting in change to the macro code.
This name was changed for VOF, but not for N-Phase mixture. To update your macros, see the following example:
Previous Release | Simcenter STAR-CCM+ 2019.3 |
---|---|
|
|
Removal of Deprecated Classes
As part of restructuring of VOF, some classes that were deprecated in the past have been removed. This change is only relevant for macros recorded in Version 11.04 or earlier. These outdated classes do not appear in macros recorded with newer versions.
Replacement of SegregatedVofFlowModel
11.04 and Earlier Releases | Simcenter STAR-CCM+ 2019.3 |
---|---|
|
|
|
|
Replacement of SegregatedVofPhaseSpeciesModel
11.04 and Earlier Releases | Simcenter STAR-CCM+ 2019.3 |
---|---|
|
|
|
|
Replacement of SegregatedVofTemperatureModel
11.04 and Earlier Releases | Simcenter STAR-CCM+ 2019.3 |
---|---|
|
|
|
|
Replacement of VofPhaseEnergyModel
11.04 and Earlier Releases | Simcenter STAR-CCM+ 2019.3 |
---|---|
|
|
|
|
Electromagnetics
Change of Circuit Element
As a part of implementing the
excitation coil circuit model link, the class
ExcitationCoilCircuitElement
has been moved from
electromagnetism.common
to
electromagnetism.magneticpotential
.
Previous Release | Simcenter STAR-CCM+ 2019.3 |
---|---|
|
|
Changes to Nodal Force Calculation
In previous releases of Simcenter STAR-CCM+ nodal forces were calculated during every iteration even in cases when they were not used. For the current release, a dedicated model is provided for nodal forces that you must select in order to see these values. For backwards compatibility the model is activated when restoring old simulations. For macros that create new simulations in which nodal forces are required you must add the new model as shown below.
Previous Release | Simcenter STAR-CCM+ 2019.3 |
---|---|
|
|
Electrochemistry/Plasma: Transfer of Charge Number Material Property
Due to the introduction of ambipolar
diffusion, the ChargeNumberProperty
material property has moved
from electrochemicalspecies
to material
, resulting
in changes to the macro code. Your existing macros will continue to work as
expected, but if you have edited the automatically generated macro, it may no longer
compile properly, and you must modify the code as shown below.
Previous Release | Simcenter STAR-CCM+ 2019.3 |
---|---|
|
|
Design Manager: Transfer of Auto Save Option
The Auto
Save option in Design Manager has been moved from the
properties of the individual design study to those of the Design Manager project.
While the existing Java macro APIs have generally not changed, the methods
getAutoSaveOnDesignCompletion
and
setAutoSaveOnDesignCompletion
have been deprecated in the
MdxLaunchSettings
class and added to the
MdxProject
class.
These deprecated methods have not yet
been removed from the current release, but the MdxLaunchSettings
methods now refer to the MdxProject
class to get and set the value.
Because of this, playing back an older macro that uses these methods may result in
the project-level Auto Save option
not being set as intended. Therefore it is recommended that you prepare for the
change by updating your macros as shown in the following example.
Previous Release | Simcenter STAR-CCM+ 2019.3 |
---|---|
|
|
Co-Simulation: Changes of Field Specifications
Structural improvements in field specifications have resulted in changes to the macro code. Each set of changes is followed by an example of how macro code should be updated.
CoSimStencilOption
The
CoSimLocationOption
class was renamed to
CoSimStencilOption
.
Previous Release | Simcenter STAR-CCM+ 2019.3 |
---|---|
|
|
ScalarFieldSpecification
The following classes were replaced by
the class ScalarFieldSpecification
:
ScalarAuxiliaryExportSpecification
ScalarAuxiliaryImportSpecification
HeatTransferCoefficientExportSpecification
HeatTransferCoefficientImportSpecification
MassflowExportSpecification
MassflowImportSpecification
PressureExportSpecification
PressureImportSpecification
TemperatureExportSpecification
TemperatureImportSpecification
ReferenceTemperatureExportSpecification
ReferenceTemperatureImportSpecification
HeatFluxExportSpecification
HeatFluxImportSpecification
Previous Release | Simcenter STAR-CCM+ 2019.3 |
---|---|
|
|
VectorFieldSpecification
The following classes were replaced by
the class VectorFieldSpecification
:
VectorAuxiliaryExportSpecification
VectorAuxiliaryImportSpecification
DisplacementExportSpecification
DisplacementImportSpecification
VelocityExportSpecification
VelocityImportSpecification
WallShearStressExportSpecification
WallShearStressImportSpecification
Previous Release | Simcenter STAR-CCM+ 2019.3 |
---|---|
|
|
ValueSpecification
The classes
ExportScalarValueSpecification
and
ImportScalarValueSpecification
were replaced by
ScalarValueSpecification
.
The classes
ExportVectorValueSpecification
and
ImportVectorValueSpecification
were replaced by
VectorValueSpecification
.
The classes
ExportIntScalarValueSpecification
and
ImportIntScalarValueSpecification
were replaced by
IntScalarValueSpecification
.
The classes
ExportBoolScalarValueSpecification
and
ImportBoolScalarValueSpecification
were replaced by
BoolScalarValueSpecification
.
The classes
ExportEnumValueSpecification
and
ImportEnumValueSpecification
were replaced by
EnumValueSpecification
.
The classes
ExportStringValueSpecification
and
ImportStringValueSpecification
were replaced by
StringValueSpecification
.
Previous Release | Simcenter STAR-CCM+ 2019.3 |
---|---|
|
|
Simcenter STAR-CCM+ In-Cylinder: Changes Due to Renaming of STAR-ICE
3D-CAD models and scenes have been renamed from STAR-ICE to In-Cylinder, resulting in changes to the macro code.
Previous Release | Simcenter STAR-CCM+ 2019.3 |
---|---|
|
|