Macro API Changes 13.04

In Simcenter STAR-CCM+ 13.04, the macro API changed for surface preparation, radiation, reacting flows, Eulerian multiphase, multiphase segregated flow, DFBI, electromagnetics, Design Manager, and co-simulation.

Surface Preparation

Changes to Creation of Surfaces, Curves, and Points for Parts

The Imprint, Subtract, and Modify Selection tools have changed in the way they create a surface, curve, or point for a specified part with a user-specified name. Your existing macros will continue to work as expected, but for maximum reliability, it is recommended that you update your macro code as shown in the following example for part surfaces:

Previous Release Simcenter STAR-CCM+ v13.04
PartSurface partSurface = meshPart_0.getPartSurfaceManager().createEmptyPartSurface("New Part Surface Name");
PartSurface partSurface = partSurfaceMeshWidget_0.createEmptyPartSurfaceWithDependency("New Part Surface Name", meshPart_0);

Changes to Handling of Threshold Diagnostics for Surface Repair

Simcenter STAR-CCM+ no longer appends a 1 in the default name of the first instance of a surface repair threshold in a simulation. For example, when you create a Face Quality threshold, the default name is Face quality rather than Face quality 1. Subsequent thresholds still have numbers appended to their default names, such as Face quality 2.

If your macros include the creation of custom thresholds (for example Face Quality or Face Area), update them to avoid including 1 in the default name, as shown in the following example:

Previous Release Simcenter STAR-CCM+ v13.04
surfaceMeshWidgetDiagnosticsController_0.createDiagnosticThreshold("Face quality" ...)
getThresholdDiagnosticsManager().getObject("Face quality 1");
surfaceMeshWidgetDiagnosticsController_0.createDiagnosticThreshold("Face quality" ...)
getThresholdDiagnosticsManager().getObject("Face quality");

Changes to Tessellation Parameters Macro Recording

The technique for recording macros that involve Tessellation Parameters has changed.

Your existing macros are expected to work in most situations. However, if you attempt to record a macro through a batch command while executing another macro, Simcenter STAR-CCM+ may generate an error message. For maximum reliability, update your macro code as follows:

Previous Release Simcenter STAR-CCM+ v13.04
TessellationParameters tessellationParameters_0 = new TessellationParameters();
TessellationParameters tessellationParameters_0 = new TessellationParameters(getActiveSimulation());

Changes for Latest Mesh Description

The name for the latest surface mesh description has been changed from Latest to Latest Surface. In addition, the technique for getting the latest description has changed from using the object name to getting the latest description explicitly. Existing macros are expected to work unless the actions include obtaining the latest description by name.

Previous Release Simcenter STAR-CCM+ v13.04
CurrentDescriptionSource currentDescriptionSource_0 = ((CurrentDescriptionSource) simulation_0.get(SimulationMeshPartDescriptionSourceManager.class).getObject("Latest"));
CurrentDescriptionSource currentDescriptionSource_0 = simulation_0.get(SimulationMeshPartDescriptionSourceManager.class).getLatestSurfaceDescriptionSource();
if (currentDescriptionSource_0.getName() == "Latest")
if (currentDescriptionSource_0.getName() == "Latest Surface")

Radiation: Energy Model Now Prerequisite for Radiation Model

Due to restructuring, an energy model is now a prerequisite to the availability of radiation models. Consequently you must activate an energy model before a radiation model, not just along with it. This new requirement has resulted in changes to the macro code.

Previous Release Simcenter STAR-CCM+ v13.04
public void execute() {
  execute0();
}
private void execute0() {
  Simulation simulation_0 = 
    getActiveSimulation();
  PhysicsContinuum physicsContinuum_0 = 
    ((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum("Physics 1"));
  physicsContinuum_0.enable(RadiationModel.class);
  physicsContinuum_0.enable(S2sModel.class);
  physicsContinuum_0.enable(ViewfactorsCalculatorModel.class);
  physicsContinuum_0.enable(GrayThermalRadiationModel.class);
  physicsContinuum_0.enable(SegregatedFluidEnthalpyModel.class);
}
public void execute() {
  execute0();
}
private void execute0() {
  Simulation simulation_0 = 
    getActiveSimulation();
  PhysicsContinuum physicsContinuum_0 = 
    ((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum("Physics 1"));
  physicsContinuum_0.enable(SegregatedFluidEnthalpyModel.class);
  physicsContinuum_0.enable(RadiationModel.class);
  physicsContinuum_0.enable(S2sModel.class);
  physicsContinuum_0.enable(ViewfactorsCalculatorModel.class);
  physicsContinuum_0.enable(GrayThermalRadiationModel.class);
}

Reacting Flows: New Parameter Structure

As part of restructuring, some model constants have been upgraded to parameters, resulting in changes to the macro code. Specifically model.setConstant(value); has changed to model.getConstant().setValue(value);. Examples follow:

NOx

Previous Release Simcenter STAR-CCM+ v13.04
NoxModel noxModel_0 = physicsContinuum_0.getModelManager().getModel(NoxModel.class);
noxModel_0.setThreshold(500);
import star.common.IntegerValue;
 NoxModel noxModel_0 =
   physicsContinuum_0.getModelManager().getModel(NoxModel.class);
IntegerValue integerValue_0 =
  noxModel_0.getThresholdValue();
integerValue_0.getQuantity().setValue(500);

Flamelet Library Generator

Previous Release Simcenter STAR-CCM+ v13.04
FixedGridParameters fixedGridParameters_0 = 
   tableAxisParameters_0.getFixedGridParameters();
fixedGridParameters_0.setDimensionSize(hlrFixed);

AdaptiveGridParameters adaptiveGridParameters_0 = 
   tableAxisParameters_0.getAdaptiveGridParameters();
adaptiveGridParameters_0.setMaxDimensionSize(hlrAdaptive);
flameletNumericalSettings_0.setOdeTolAbs(1.0E-17);
flameletNumericalSettings_0.setOdeTolRel(1.0E-12);
flameletNumericalSettings_0.setFlmltRelTol(1.0E-8);
flameletNumericalSettings_0.setFlmltScalarDissipationMultiplier(1.1);
flameletNumericalSettings_0.setFlmltStartScalarDissipation(0.001);
flameletNumericalSettings_0.setFlmltMaxScalarDissipation(100000.0);
flameletTableParameters_0.setZGridStretchFac(1.1);
FixedGridParameters fixedGridParameters_0 = 
   tableAxisParameters_0.getFixedGridParameters();
IntegerValue integerValue_0 =
  fixedGridParameters_0.getDimensionSizeValue();
integerValue_0.getQuantity().setValue(hlrFixed);

AdaptiveGridParameters adaptiveGridParameters_0 = 
   tableAxisParameters_0.getAdaptiveGridParameters();
IntegerValue integerValue_1 =
  adaptiveGridParameters_0.getMaxDimensionSizeValue();
integerValue_1.getQuantity().setValue(hlrAdaptive);
flameletNumericalSettings_0.getOdeTolAbs().setValue(1.0E-17);
flameletNumericalSettings_0.getOdeTolRel().setValue(1.0E-12);
flameletNumericalSettings_0.getFlmltRelTol().setValue(1.0E-8);
flameletNumericalSettings_0.getFlmltScalarDissipationMultiplier().setValue(1.1);
flameletNumericalSettings_0.getFlmltStartScalarDissipation().setValue(0.001);
flameletNumericalSettings_0.getFlmltMaxScalarDissipation().setValue(100000.0);
flameletTableParameters_0.getZGridStretchFac().setValue(1.1);

Ignitors

Previous Release Simcenter STAR-CCM+ v13.04
pulseActivator_0.setBegin(100.0);
pulseActivator_0.setEnd(110.0);
pulseActivator_0.getBegin().setValue(100.0);
pulseActivator_0.getEnd().setValue(110.0);

Coherent Flame Model

Previous Release Simcenter STAR-CCM+ v13.04
cfmCombustionModel_0.setAlphaCfm(2.1);
cfmCombustionModel_0.setBetaCfm(5.0);
cfmCombustionModel_0.setACfm(0.1);
cfmCombustionModel_0.setBCfm(1.2);
cfmCombustionModel_0.setCCfm(1.0);
cfmCombustionModel_0.setBUpperVal(1.0);
cfmCombustionModel_0.setBLowerVal(1.0);
cfmCombustionModel_0.getAlphaCfm().setValue(2.1);
cfmCombustionModel_0.getBetaCfm().setValue(5.0);
cfmCombustionModel_0.getACfm().setValue(0.1);
cfmCombustionModel_0.getBCfm().setValue(1.2);
cfmCombustionModel_0.getCCfm().setValue(1.0);
cfmCombustionModel_0.getBUpperVal().setValue(1.0);
cfmCombustionModel_0.getBLowerVal().setValue(1.0);

Turbulent Flame Speed Closure (TFC)

Previous Release Simcenter STAR-CCM+ v13.04
((TurbulentFlameSpeedZimontOption) tfcCombustionPartiallyPremixedModel_0.getTurbulentFlameSpeedOption()).setWallEffectConst(1.0);
((CriticalStrainRateChemScaleOption) flameStretchEffect_0.getCriticalStrainRateOption()).setBConst(501.0);
flameStretchEffect_0.setUstrConst(0.27);
((TurbulentFlameSpeedPetersOption) tfcCombustionPartiallyPremixedModel_0.getTurbulentFlameSpeedOption()).setWallEffectConst(1.1);
((TurbulentFlameSpeedPetersOption) tfcCombustionPartiallyPremixedModel_0.getTurbulentFlameSpeedOption()).setA1Constant(0.38);
((TurbulentFlameSpeedPetersOption) tfcCombustionPartiallyPremixedModel_0.getTurbulentFlameSpeedOption()).setA4Constant(0.78);
((TurbulentFlameSpeedPetersOption) tfcCombustionPartiallyPremixedModel_0.getTurbulentFlameSpeedOption()).setB1Constant(1.9);
((TurbulentFlameSpeedPetersOption) tfcCombustionPartiallyPremixedModel_0.getTurbulentFlameSpeedOption()).setB3Constant(1.1);
((TurbulentFlameSpeedPetersOption) tfcCombustionPartiallyPremixedModel_0.getTurbulentFlameSpeedOption()).setEwaldCorrector(1.1);
((TurbulentFlameSpeedZimontOption) tfcCombustionPartiallyPremixedModel_0.getTurbulentFlameSpeedOption()).getWallEffectConst().setValue(1.0);
((CriticalStrainRateChemScaleOption) flameStretchEffect_0.getCriticalStrainRateOption()).getBConst().setValue(501.0);
flameStretchEffect_0.getUstrConst().setValue(0.27);
((TurbulentFlameSpeedPetersOption) tfcCombustionPartiallyPremixedModel_0.getTurbulentFlameSpeedOption()).getWallEffectConst().setValue(1.1);
((TurbulentFlameSpeedPetersOption) tfcCombustionPartiallyPremixedModel_0.getTurbulentFlameSpeedOption()).getA1Constant().setValue(0.38);
((TurbulentFlameSpeedPetersOption) tfcCombustionPartiallyPremixedModel_0.getTurbulentFlameSpeedOption()).getA4Constant().setValue(0.78);
((TurbulentFlameSpeedPetersOption) tfcCombustionPartiallyPremixedModel_0.getTurbulentFlameSpeedOption()).getB1Constant().setValue(1.9);
((TurbulentFlameSpeedPetersOption) tfcCombustionPartiallyPremixedModel_0.getTurbulentFlameSpeedOption()).getB3Constant().setValue(1.1);
((TurbulentFlameSpeedPetersOption) tfcCombustionPartiallyPremixedModel_0.getTurbulentFlameSpeedOption()).getEwaldCorrector().setValue(1.1);

Complex Chemistry

Previous Release Simcenter STAR-CCM+ v13.04
apAccelerationFactor_0.setApAccelerationFactor(1.0);
complexChemistryCombustionModel_0.setThreshold(51);
cvodeCalculationMethod_0.setATol(1.1E-10);
cvodeCalculationMethod_0.setRTol(1.1E-6);
complexChemistryDmr_0.setDmrErrorTolerance(0.1);
chemistryTimeStepAgglomerationComponent_0.setTol(0.1);
cvodeIsatCalculationMethod_0.setIsatAtol(1.0E-4);
cvodeIsatCalculationMethod_0.setIsatSize(1000.0);
cvodeIsatCalculationMethod_0.setSensAtol(1.0E-5);
cvodeIsatCalculationMethod_0.setSensRtol(0.001);
apAccelerationFactor_0.getApAccelerationFactor().setValue(1.0);
IntegerValue integerValue_0 = complexChemistryCombustionModel_0.getThresholdValue();
integerValue_0.getQuantity().setValue(51);
cvodeCalculationMethod_0.getATol().setValue(1.1E-10);
cvodeCalculationMethod_0.getRTol().setValue(1.1E-6);
complexChemistryDmr_0.getDmrErrorTolerance().setValue(0.1);
chemistryTimeStepAgglomerationComponent_0.getTol().setValue(0.1);
cvodeIsatCalculationMethod_0.getIsatAtol().setValue(1.0E-4);
cvodeIsatCalculationMethod_0.getIsatSize().setValue(1000.0);
cvodeIsatCalculationMethod_0.getSensAtol().setValue(1.0E-5);
cvodeIsatCalculationMethod_0.getSensRtol().setValue(0.001);

Flamelet Generated Manifold (FGM)

Previous Release Simcenter STAR-CCM+ v13.04
fgmReactionModel_0.setDissipationConstant(2.0);
fgmCombustionModel_0.setAlphaFgm(1.0);
fgmReactionModel_0.getDissipationConstant().setValue(2.0);
fgmCombustionModel_0.getAlphaFgm().setValue(1.0);

Steady Laminar Flamelet (SLF)

Previous Release Simcenter STAR-CCM+ v13.04
ppdfFlameletModel_0.setDissipationConstant(2.0);
ppdfFlameletModel_0.getDissipationConstant().setValue(2.0);

Eddy Break-Up

Previous Release Simcenter STAR-CCM+ v13.04
ebuGasCombustionModel_0.setThreshold(0);
IntegerValue integerValue_0 =
  ebuGasCombustionModel_0.getThresholdValue();
integerValue_0.getQuantity().setValue(0);

Surface Chemistry

Previous Release Simcenter STAR-CCM+ v13.04
surfaceGasInteractionModel_0.setThreshold(2);
IntegerValue integerValue_0 =
  surfaceGasInteractionModel_0.getThresholdValue();
integerValue_0.getQuantity().setValue(2);

Eulerian Multiphase

Changes to Relative Zone Distance

The technique for working with forcing length in VOF has changed, resulting in changes to the macro code.

Previous Release Simcenter STAR-CCM+ v13.04
Simulation simulation_0 = 
  getActiveSimulation();

Region region_0 = 
  simulation_0.getRegionManager().getRegion("Region");

Boundary boundary_0 = 
  region_0.getBoundaryManager().getBoundary("Boundary");

BoundaryForcingLength boundaryForcingLength_0 = 
  boundary_0.getValues().get(BoundaryForcingLength.class);

boundaryForcingLength_0.getBoundaryForcingLength().setValue(1.0);
Simulation simulation_0 = 
  getActiveSimulation();

Region region_0 = 
  simulation_0.getRegionManager().getRegion("Region");

Boundary boundary_0 = 
  region_0.getBoundaryManager().getBoundary("Boundary");

VofWaveForcingLength vofWaveForcingLength_0 = 
  boundary_0.getValues().get(VofWaveForcingLength.class);

vofWaveForcingLength_0.getMethod(ConstantScalarProfileMethod.class).getQuantity().setValue(1.0);

New Method for Saturation Temperature Property of Multi-Component Liquids

Due to restructuring, the method for specifying the Saturation Temperature property of multi-component liquids has been replaced. To update your macros, replace all instances of MixtureSaturationTemperaturePropertyMethod with IterativeSaturationTemperaturePropertyMethod.

Previous Release Simcenter STAR-CCM+ v13.04
multiComponentDropletMaterial_0.getMaterialProperties().getMaterialProperty(SaturationTemperatureProperty.class).setMethod(MixtureSaturationTemperaturePropertyMethod.class);
multiComponentDropletMaterial_0.getMaterialProperties().getMaterialProperty(SaturationTemperatureProperty.class).setMethod(IterativeSaturationTemperaturePropertyMethod.class);

Changes to Turbulent Dispersion Force

Due to its superior performance, the Turbulent Dispersion Force phase interaction model only uses the logarithmic form, while the basic form is no longer used. Therefore the Use Logarithmic Form property of this model has been removed. Simulation files saved in previous versions of Simcenter STAR-CCM+ with the basic form (that is, Use Logarithmic Form deactivated) are opened in the current version with the logarithmic form in use.

The removal of the Use Logarithmic Form option has resulted in changes to the macro code, specifically omitting lines such as lsiTurbulentDispersionForceModel_0.setUseLogForm(true); and turbulentDispersionForceModel_0.setUseLogForm(true);.

Previous Release Simcenter STAR-CCM+ v13.04
LsiTurbulentDispersionForceModel lsiTurbulentDispersionForceModel_0 = 
  phaseInteraction_0.getModelManager().getModel(LsiTurbulentDispersionForceModel.class);
lsiTurbulentDispersionForceModel_0.setUseLogForm(true);
LsiTurbulentDispersionForceModel lsiTurbulentDispersionForceModel_0 = 
  phaseInteraction_0.getModelManager().getModel(LsiTurbulentDispersionForceModel.class);
PhaseInteraction phaseInteraction_0 = 
  ((PhaseInteraction) multiPhaseInteractionModel_0.getPhaseInteractionManager().getPhaseInteraction("Water-Air"));
TurbulentDispersionForceModel turbulentDispersionForceModel_0 = 
  phaseInteraction_0.getModelManager().getModel(TurbulentDispersionForceModel.class);
turbulentDispersionForceModel_0.setUseLogForm(true);
PhaseInteraction phaseInteraction_0 = 
  ((PhaseInteraction) multiPhaseInteractionModel_0.getPhaseInteractionManager().getPhaseInteraction("Water-Air"));
TurbulentDispersionForceModel turbulentDispersionForceModel_0 = 
  phaseInteraction_0.getModelManager().getModel(TurbulentDispersionForceModel.class);

Multiphase Segregated Flow: Changes to Default Settings

Due to refactoring that facilitates modeling turbulence dispersion and lift effects in the intermediate regime, certain default settings have changed.

The Large Scale Interface Turbulence Damping model is no longer activated by default in the Multiple Flow Regime Phase Interaction model. It will need to be selected explicitly in a macro now. To do so add the following code in your macros:

phaseInteraction_0.enable(LsiTurbDampingModel.class);

Alternatively, you no longer need to deactivate it explicitly, so you can delete the following code from your macros:

LsiTurbDampingModel lsiTurbDampingModel_0 = 
  phaseInteraction_0.getModelManager().getModel(LsiTurbDampingModel.class);
phaseInteraction_0.disableModel(lsiTurbDampingModel_0);

The default selection for the Method property of the Drag Coefficient node, in the intermediate regime, has been changed from Strubelj-Tiselj to Blended. Therefore to select the Strubelj-Tiselj method, add the following code to your macros, if applicable:

LsiDragForceModel lsiDragForceModel_0 =
  phaseInteraction_0.getModelManager().getModel(LsiDragForceModel.class);
lsiDragForceModel_0.getLargeInterfaceEulerianDragCoefficientMethod().setMethod(StrubeljTiseljDragCoefficientMethod.class);

DFBI: Changes to Contact Couplings

To be consistent with the newly introduced contact constraint, which allows for both static and dynamic friction, the Friction Coefficient property of the Tangential Force node of the contact coupling has been renamed to Dynamic Friction Coefficient. This new designation has resulted in changes to the macro code.

Your existing macros are expected to work, but for maximum reliability, it is recommended that you update your macro code as shown in the following example.

Previous Release Simcenter STAR-CCM+ v13.04
ContactCoupling contactCoupling_0 = 
  ((ContactCoupling) simulation_0.get(SixDofBodyCouplingManager.class).getObject("Contact 1"));
TangentialContactForce tangentialContactForce_0 = 
  contactCoupling_0.getTangentialForce();
tangentialContactForce_0.getFrictionCoefficient().setValue(0.3);
ContactCoupling contactCoupling_0 = 
  ((ContactCoupling) simulation_0.get(SixDofBodyCouplingManager.class).getObject("Contact 1"));
TangentialContactForce tangentialContactForce_0 = 
  contactCoupling_0.getTangentialForce();
tangentialContactForce_0.getDynamicFrictionCoefficient().setValue(0.3);

Electromagnetics

Quasi Unsteady Losses Renamed to Eddy Current Suppression

The name of the Quasi Unsteady Losses model has been changed to Eddy Current Suppression, and this renamed model also incorporates the Null Electrical Conductivity material property method. These modifications have resulted in changes to the macro code.

Previous Release Simcenter STAR-CCM+ v13.04
import star.electromagnetism.ohmicheating.QuasiUnsteadyLossesModel;
 PhysicsContinuum physicsContinuum_0 = 
 simulation_0.getContinuumManager().createContinuum(PhysicsContinuum.class);
 physicsContinuum_0.enable(QuasiUnsteadyLossesModel.class);
import star.electromagnetism.ohmicheating.EddyCurrentSuppressionModel;
 PhysicsContinuum physicsContinuum_0 = 
 simulation_0.getContinuumManager().createContinuum(PhysicsContinuum.class);
 physicsContinuum_0.enable(EddyCurrentSuppressionModel.class);
MultiPartSolidModel multiPartSolidModel_0 = 
 physicsContinuum_0.getModelManager().getModel(MultiPartSolidModel.class);

MultiComponentSolidMaterial multiComponentSolidMaterial_0 = 
 ((MultiComponentSolidMaterial) multiPartSolidModel_0.getMixture());

SolidComponent solidComponent_0 = 
 ((SolidComponent) multiComponentSolidMaterial_0.getComponents().getComponent("Concrete"));

solidComponent_0.getMaterialProperties().getMaterialProperty(ElectricalConductivityProperty.class).setMethod(NullMaterialPropertyMethod.class);
MultiPartSolidModel multiPartSolidModel_0 = 
 physicsContinuum_0.getModelManager().getModel(MultiPartSolidModel.class);

MultiComponentSolidMaterial multiComponentSolidMaterial_0 = 
 ((MultiComponentSolidMaterial) multiPartSolidModel_0.getMixture());

SolidComponent solidComponent_0 = 
 ((SolidComponent) multiComponentSolidMaterial_0.getComponents().getComponent("Concrete"));

solidComponent_0.getMaterialProperties().getMaterialProperty(ElectricalConductivityProperty.class).setMethod(EddyCurrentSuppressionMethod.class);

Change to Update Method for FE Magnetic Vector Potential Solver

To accommodate the Modified Newton option of the FE Magnetic Vector Potential solver for non-linear material, the solver calculation techniques have been adjusted, resulting in changes to the macro code.

Previous Release Simcenter STAR-CCM+ v13.04
MatrixUpdateStrategy matrixUpdateStrategy = getActiveSimulation().getSolverManager().getSolver(FiniteElementMagneticVectorPotentialSolver.class)).getMatrixUpdateStrategy();
    matrixUpdateStrategy.getMatrixUpdateStrategyOption().setSelected(MatrixUpdateStrategyOption.Type.REUSE);
MatrixUpdateStrategy matrixUpdateStrategy = getActiveSimulation().getSolverManager().getSolver(FiniteElementMagneticVectorPotentialSolver.class)).getMatrixUpdateStrategy();
    matrixUpdateStrategy.getMatrixUpdateStrategyOption().setSelected(MatrixUpdateStrategyOption.Type.MODIFIED_NEWTON);

Design Manager

Changes to Scene Functionality

Scene functionality in Design Manager has been modified, resulting in a minor change to the macro code. In the current release you can use the base class open() method without any arguments.

Your existing macros are expected to work, but for maximum reliability, it is recommended that you update your macro code as shown in the following example.

Previous Release Simcenter STAR-CCM+ v13.04
MdxProject mdxProject_0 = 
  getActiveMdxProject();
MdxDesignSceneView mdxDesignSceneView_0 = 
  ((MdxDesignSceneView) mdxProject_0.get(MdxDesignViewManager.class).getDesignView("WeightedOpt-Scalar"));
mdxDesignSceneView_0.initializeAndWait();
mdxDesignSceneView_0.open(true);
MdxProject mdxProject_0 = 
  getActiveMdxProject();
MdxDesignSceneView mdxDesignSceneView_0 = 
  ((MdxDesignSceneView) mdxProject_0.get(MdxDesignViewManager.class).getDesignView("WeightedOpt-Scalar"));
mdxDesignSceneView_0.initializeAndWait();
mdxDesignSceneView_0.open();

Changes to Manual Design Seeds

Support has been added in Design Manager for manual design seeds with responses, resulting in changes to the macro code.

Manual Design Table in Manual Study

Previous Release Simcenter STAR-CCM+ v13.04
MdxStudyParameter mdxStudyParameter_0 = ((MdxStudyParameter)mdxDesignStudy_0.getStudyParameters().getObject("depth"));
MdxStudyParameter mdxStudyParameter_1 = ((MdxStudyParameter) mdxDesignStudy_0.getStudyParameters().getObject("extrude"));
Units units_0 = ((Units) mdxProject_0.get(UnitsManager.class).getObject("m"));
MdxDesignTable mdxDesignTable_0 = mdxDesignStudy_0.getDesignTable();
mdxDesignTable_0.getDesignTableData();

mdxDesignTable_0.addRows(new StringVector(new String[] {"Manual Design 1"}), new Vector(Arrays.asList(new DoubleWithUnits(0.1, units_0), new DoubleWithUnits(0.6, units_0))));
mdxDesignTable_0.getDesignTableData();

mdxDesignTable_0.setDesignName(0, "ManualDesign1");
mdxDesignTable_0.getDesignTableData();

mdxDesignTable_0.setValue(0, 0, new DoubleWithUnits(0.11, units_0));
MdxStudyParameter mdxStudyParameter_0 = ((MdxStudyParameter) mdxDesignStudy_0.getStudyParameters().getObject("depth"));
MdxStudyParameter mdxStudyParameter_1 = ((MdxStudyParameter) mdxDesignStudy_0.getStudyParameters().getObject("extrude"));
Units units_0 = ((Units) mdxProject_0.get(UnitsManager.class).getObject("m"));
MdxDesignTable mdxDesignTable_0 = mdxDesignStudy_0.getDesignTable();

mdxDesignTable_0.addNewRows(new StringVector(new String[] {"Manual Design 1"}), new Vector(Arrays.asList(((MdxStudyParameterColumn) mdxDesignTable_0.getTableColumns().getDesignTableColumn("depth")), ((MdxStudyParameterColumn) mdxDesignTable_0.getTableColumns().getDesignTableColumn("extrude")))), new Vector(Arrays.asList(new DoubleWithUnits(0.1, units_0), new DoubleWithUnits(0.6, units_0))));

MdxDesignNameColumn mdxDesignNameColumn_0 = 
      ((MdxDesignNameColumn) mdxDesignTable_0.getTableColumns().getDesignTableColumn("DesignName"));
mdxDesignTable_0.setDesignName(mdxDesignNameColumn_0, 0, "ManualDesign1");

MdxStudyParameterColumn mdxStudyParameterColumn_0 =  ((MdxStudyParameterColumn) mdxDesignTable_0.getTableColumns().getDesignTableColumn("depth"));
mdxDesignTable_0.setValue(mdxStudyParameterColumn_0, 0, new DoubleWithUnits(0.11, units_0));

Manual Design Seed Table in Optimization Study

For setDesignName and SetValue the changes are same as above, except for adding a row and a Boolean column indicating whether response values are included and response columns are added.

Previous Release Simcenter STAR-CCM+ v13.04
mdxDesignTable_1.addRows(new StringVector(new String[] {"Manual Design 1"}), new Vector(Arrays.asList(new DoubleWithUnits(0.1, units_0), new DoubleWithUnits(0.6, units_0))));
mdxDesignTable_1.getDesignTableData();
Units units_0 = ((Units) mdxProject_0.get(UnitsManager.class).getObject("m"));
Units units_1 = ((Units) mdxProject_0.get(UnitsManager.class).getObject("Pa"));
mdxDesignTable_1.addNewRows(new StringVector(new String[] {"Manual Design 1"}), new BooleanVector(new boolean[] {false}), new Vector(Arrays.asList(((MdxStudyParameterColumn) mdxDesignTable_1.getTableColumns().getDesignTableColumn("depth")), ((MdxStudyParameterColumn) mdxDesignTable_1.getTableColumns().getDesignTableColumn("extrude")), ((MdxStudyResponseColumn) mdxDesignTable_1.getTableColumns().getDesignTableColumn("InletPressure")))), new Vector(Arrays.asList(new DoubleWithUnits(0.1, units_0), new DoubleWithUnits(0.6, units_0), new DoubleWithUnits(0.0, units_1))));

Co-Simulation

End of Support for Single-Precision GT-SUITE Coupling Library

Simcenter STAR-CCM+ no longer supports co-simulation with the single-precision GT-SUITE coupling library, gtlink. To update your macros, delete all lines that contain CouplingPrecisionOption, for example:

  • import star.cosimulation.link.common.CouplingPrecisionOption;
  • coSimulation_0.getCoSimulationConditions().get(CouplingPrecisionOption.class).setSelected(CouplingPrecisionOption.Type.SINGLE);

Removal of Amesim Couple from Step Option

As part of workflow improvements, the Amesim Couple from Step option has been removed, resulting in changes to the macro code.

To update your macros, remove all instances of the following lines of code:

import star.cosimulation.common.CoupleFromStep;
CoupleFromStep coupleFromStep_0 = 
  coSimulation_0.getCoSimulationValues().get(CoupleFromStep.class);
coupleFromStep_0.setCoupleFromStep(5);

Changes to Field Specifications

Due to refactoring of field specifications, the macro code has changed.

ConvectiveFluxImportSpecification has been replaced by ReferenceTemperatureImportSpecification and HeatTransferCoefficientImportSpecification.

Previous Release Simcenter STAR-CCM+ v13.04
import star.cosimulation.common.ConvectiveFluxImportSpecification;
import star.cosimulation.common.HeatTransferCoefficientImportSpecification;
import star.cosimulation.common.ReferenceTemperatureImportSpecification;
ConvectiveFluxImportSpecification convectiveFluxImportSpecification_0 =
  ((ConvectiveFluxImportSpecification) coSimulationZone_0.getCoSimulationZoneConditions().get(ImportSpecificationManager.class).getObject("Convective Flux"));
HeatTransferCoefficientImportSpecification heatTransferCoefficientImportSpecification_0 =
  ((HeatTransferCoefficientImportSpecification) coSimulationZone_0.getCoSimulationZoneConditions().get(ImportSpecificationManager.class).getObject("Heat Transfer Coefficient"));

ReferenceTemperatureImportSpecification referenceTemperatureImportSpecification_0 =
  ((ReferenceTemperatureImportSpecification) coSimulationZone_0.getCoSimulationZoneConditions().get(ImportSpecificationManager.class).getObject("Reference Temperature"));

coSimulationZone_0.getCoSimulationZoneConditions().get(WallThermalManagementOption.class).setSelected(WallThermalManagementOption.Type.CONVECTION); // if the original import specification was managed
ConvectiveFluxImportSpecification convectiveFluxImportSpecification_1 =
  ((ConvectiveFluxImportSpecification) coSimulationZone_0.getCoSimulationZoneConditions().get(ImportSpecificationManager.class).getObject("Environmental Flux"));
HeatTransferCoefficientImportSpecification heatTransferCoefficientImportSpecification_0 =
  ((HeatTransferCoefficientImportSpecification) coSimulationZone_0.getCoSimulationZoneConditions().get(ImportSpecificationManager.class).getObject("Heat Transfer Coefficient"));

ReferenceTemperatureImportSpecification referenceTemperatureImportSpecification_0 =
  ((ReferenceTemperatureImportSpecification) coSimulationZone_0.getCoSimulationZoneConditions().get(ImportSpecificationManager.class).getObject("Reference Temperature"));

coSimulationZone_0.getCoSimulationZoneConditions().get(WallThermalManagementOption.class).setSelected(WallThermalManagementOption.Type.ENVIRONMENT); // if the original import specification was managed

TractionImportSpecification has been replaced by ReferenceTemperatureImportSpecification and HeatTransferCoefficientImportSpecification.

Previous Release Simcenter STAR-CCM+ v13.04
import star.cosimulation.common.TractionImportSpecification;
import star.cosimulation.common.PressureImportSpecification;
import star.cosimulation.common.WallShearStressImportSpecification;
TractionImportSpecification tractionImportSpecification_0 =
  ((TractionImportSpecification) coSimulationZone_0.getCoSimulationZoneConditions().get(ImportSpecificationManager.class).getObject("Traction"));
PressureImportSpecification pressureImportSpecification_0 =
  ((PressureImportSpecification) coSimulationZone_0.getCoSimulationZoneConditions().get(ImportSpecificationManager.class).getObject("Pressure"));

WallShearStressImportSpecification wallShearStressImportSpecification_0 =
  ((WallShearStressImportSpecification) coSimulationZone_0.getCoSimulationZoneConditions().get(ImportSpecificationManager.class).getObject("Wall Shear Stress"));

ConvectiveFluxExportSpecification has been replaced by ReferenceTemperatureExportSpecification and HeatTransferCoefficientExportSpecification.

Previous Release Simcenter STAR-CCM+ v13.04
import star.cosimulation.common.ConvectiveFluxExportSpecification;
import star.cosimulation.common.HeatTransferCoefficientExportSpecification;
import star.cosimulation.common.ReferenceTemperatureExportSpecification;
ConvectiveFluxExportSpecification convectiveFluxExportSpecification_0 =
  ((ConvectiveFluxExportSpecification) coSimulationZone_0.getCoSimulationZoneConditions().get(ExportSpecificationManager.class).getObject("Convective Flux"));
HeatTransferCoefficientExportSpecification heatTransferCoefficientExportSpecification_0 =
  ((HeatTransferCoefficientExportSpecification) coSimulationZone_0.getCoSimulationZoneConditions().get(ExportSpecificationManager.class).getObject("Heat Transfer Coefficient"));

ReferenceTemperatureExportSpecification referenceTemperatureExportSpecification_0 =
  ((ReferenceTemperatureExportSpecification) coSimulationZone_0.getCoSimulationZoneConditions().get(ExportSpecificationManager.class).getObject("Reference Temperature"));
convectiveFluxExportSpecification_0.setFieldFunction(primitiveFieldFunction_0, 0);
convectiveFluxExportSpecification_0.setFieldFunction(primitiveFieldFunction_1, 1);
heatTransferCoefficientExportSpecification_0.setFieldFunction(primitiveFieldFunction_0);
referenceTemperatureExportSpecification_0.setFieldFunction(primitiveFieldFunction_1);

TractionExportSpecification has been replaced by ReferenceTemperatureExportSpecification and HeatTransferCoefficientExportSpecification.

Previous Release Simcenter STAR-CCM+ v13.04
import star.cosimulation.common.TractionExportSpecification;
import star.cosimulation.common.PressureExportSpecification;
import star.cosimulation.common.WallShearStressExportSpecification;
TractionExportSpecification tractionExportSpecification_0 =
  ((TractionExportSpecification) coSimulationZone_0.getCoSimulationZoneConditions().get(ExportSpecificationManager.class).getObject("Traction"));
PressureExportSpecification pressureExportSpecification_0 =
  ((PressureExportSpecification) coSimulationZone_0.getCoSimulationZoneConditions().get(ExportSpecificationManager.class).getObject("Pressure"));

WallShearStressExportSpecification wallShearStressExportSpecification_0 =
  ((WallShearStressExportSpecification) coSimulationZone_0.getCoSimulationZoneConditions().get(ExportSpecificationManager.class).getObject("Wall Shear Stress"));
tractionExportSpecification_0.setFieldFunction(primitiveFieldFunction_0, 0);
tractionExportSpecification_0.setFieldFunction(primitiveFieldFunction_1, 1);
pressureExportSpecification_0.setFieldFunction(primitiveFieldFunction_0);
wallShearStressExportSpecification_0.setFieldFunction(primitiveFieldFunction_1);

ConvectiveFluxMapper has been replaced by FieldMapper.

Previous Release Simcenter STAR-CCM+ v13.04
import star.cosimulation.common.ConvectiveFluxMapper;
import star.cosimulation.common.FieldMapper;
ConvectiveFluxMapper convectiveFluxMapper_0 =
  ((ConvectiveFluxMapper) coSimulationZone_0.getCoSimulationZoneValues().get(ExportMapperManager.class).getObject("Convective Flux"));

convectiveFluxMapper_0.setHTCMapper(surfaceDataMapper_0);
convectiveFluxMapper_0.setRefTempMapper(surfaceDataMapper_0);
convectiveFluxMapper_0.setReferenceTemperatureMapper(surfaceDataMapper_0);
FieldMapper fieldMapper_0 =
  ((FieldMapper) coSimulationZone_0.getCoSimulationZoneValues().get(ExportMapperManager.class).getObject("Heat Transfer Coefficient"));

fieldMapper_0.setMapper(surfaceDataMapper_0);

FieldMapper fieldMapper_1 =
  ((FieldMapper) coSimulationZone_0.getCoSimulationZoneValues().get(ExportMapperManager.class).getObject("Reference Temperature"));

fieldMapper_1.setMapper(surfaceDataMapper_0);

TractionMapper has been replaced by FieldMapper.

Previous Release Simcenter STAR-CCM+ v13.04
import star.cosimulation.common.TractionMapper;
import star.cosimulation.common.FieldMapper;
TractionMapper tractionMapper_0 =
  ((TractionMapper) coSimulationZone_0.getCoSimulationZoneValues().get(ExportMapperManager.class).getObject("Traction"));

tractionMapper_0.setPressureMapper(surfaceDataMapper_0);
tractionMapper_0.setWSSMapper(surfaceDataMapper_0);
FieldMapper fieldMapper_0 =
  ((FieldMapper) coSimulationZone_0.getCoSimulationZoneValues().get(ExportMapperManager.class).getObject("Pressure"));

fieldMapper_0.setMapper(surfaceDataMapper_0);

FieldMapper fieldMapper_1 =
  ((FieldMapper) coSimulationZone_0.getCoSimulationZoneValues().get(ExportMapperManager.class).getObject("Wall Shear Stress"));

fieldMapper_1.setMapper(surfaceDataMapper_0);

Other mappers replaced by FieldMapper:

Previous Release Simcenter STAR-CCM+ v13.04
import star.cosimulation.common.PressureMapper;

PressureMapper pressureMapper_0 =
  ((PressureMapper) coSimulationZone_0.getCoSimulationZoneValues().get(ExportMapperManager.class).getObject("Pressure"));

pressureMapper_0.setPressureMapper(surfaceDataMapper_0);
import star.cosimulation.common.FieldMapper;

FieldMapper fieldMapper_0 =
      ((FieldMapper) coSimulationZone_0.getCoSimulationZoneValues().get(ExportMapperManager.class).getObject("Pressure"));

fieldMapper_0.setMapper(surfaceDataMapper_0);
import star.cosimulation.common.TemperatureMapper;

TemperatureMapper temperatureMapper_0 =
  ((TemperatureMapper) coSimulationZone_0.getCoSimulationZoneValues().get(ExportMapperManager.class).getObject("Temperature"));

temperatureMapper_0.setTemperatureMapper(surfaceDataMapper_0);
import star.cosimulation.common.FieldMapper;

FieldMapper fieldMapper_0 =
  ((FieldMapper) coSimulationZone_0.getCoSimulationZoneValues().get(ExportMapperManager.class).getObject("Temperature"));

fieldMapper_0.setMapper(surfaceDataMapper_0);
import star.cosimulation.common.DisplacementMapper;

DisplacementMapper displacementMapper_0 =
  ((DisplacementMapper) coSimulationZone_0.getCoSimulationZoneValues().get(ExportMapperManager.class).getObject("Displacement"));

displacementMapper_0.setDisplacementMapper(surfaceDataMapper_0);
import star.cosimulation.common.FieldMapper;

FieldMapper fieldMapper_0 =
  ((FieldMapper) coSimulationZone_0.getCoSimulationZoneValues().get(ExportMapperManager.class).getObject("Displacement"));

fieldMapper_0.setMapper(surfaceDataMapper_0);
import star.cosimulation.common.AuxiliaryFieldMapper;

AuxiliaryFieldMapper auxiliaryFieldMapper_0 =
  ((AuxiliaryFieldMapper) coSimulationZone_0.getCoSimulationZoneValues().get(ExportMapperManager.class).getObject("Scalar Auxiliary Field 1"));

auxiliaryFieldMapper_0.setAuxiliaryFieldMapper(surfaceDataMapper_0);
import star.cosimulation.common.FieldMapper;

FieldMapper fieldMapper_0 =
  ((FieldMapper) coSimulationZone_0.getCoSimulationZoneValues().get(ExportMapperManager.class).getObject("Scalar Auxiliary Field 1"));

fieldMapper_0.setMapper(surfaceDataMapper_0);