Macro API Changes 12.04

In Simcenter STAR-CCM+ 12.04, the macro API changed for surface preparation, part operations, dynamic queries, DFBI, finite element analysis, reacting flows, Eulerian multiphase, electromagnetics, electrochemistry, and co-simulation.

Surface Preparation

Changes to Extruder User Interface

The user interface of the Surface Extruder operation has changed to accommodate non-Cartesian coordinate systems, resulting in changes to the macro code.

Previous Release Simcenter STAR-CCM+ v12.04
surfaceExtruderOperation_0.getSurfaceExtruderControls().get(SurfaceExtruderDistance.class).setUnits(units_0);
surfaceExtruderOperation_0.getSurfaceExtruderControls().get(SurfaceExtruderDistance.class).setValue(0.1);
surfaceExtruderOperation_0.setOutputMode(SurfaceExtruderOperation.OutputMode.SINGLE_NEW_PART);
surfaceExtruderOperation_0.setPreExecuteMode(SurfaceExtruderOperation.PreExecuteMode.ALL_PERTINENT);
SurfaceExtruderDirection surfaceExtruderDirection_0 = 
  surfaceExtruderOperation_0.getSurfaceExtruderControls().get(SurfaceExtruderDirection.class);
surfaceExtruderDirection_0.setDirectionMode(SurfaceExtruderDirection.DirectionMode.SPECIFIED);
SurfaceExtruderUserSpecifiedDirection surfaceExtruderUserSpecifiedDirection_0 = 
  surfaceExtruderDirection_0.getUserSpecifiedDirection();
surfaceExtruderUserSpecifiedDirection_0.getDirection().setComponents(2.0, 3.0, 4.0);
SurfaceExtruderDirection surfaceExtruderDirection_0 = 
  surfaceExtruderOperation_0.getSurfaceExtruderControls().get(SurfaceExtruderDirection.class);
surfaceExtruderDirection_0.getExtrusionDistance().setUnits(units_0);
surfaceExtruderDirection_0.getExtrusionDistance().setValue(0.1);
surfaceExtruderOperation_0.setOutputMode(SurfaceExtruderOperation.OutputMode.SINGLE_NEW_PART);
surfaceExtruderOperation_0.setPreExecuteMode(SurfaceExtruderOperation.PreExecuteMode.ALL_PERTINENT);
surfaceExtruderDirection_0.setDirectionMode(SurfaceExtruderDirection.DirectionMode.SPECIFIED);
SurfaceExtruderUserSpecifiedDirection surfaceExtruderUserSpecifiedDirection_0 = 
  surfaceExtruderDirection_0.getUserSpecifiedDirection();
Coordinate coordinate_0 = 
  surfaceExtruderUserSpecifiedDirection_0.getDirection();
coordinate_0.setCoordinate(units_0, units_0, units_0, new DoubleVector(new double[] {2.0, 3.0, 4.0}));

Part Operations: Change to Duplication of Composite Parts

The Duplicate command on composite parts has been changed, resulting in changes to the macro code.

Previous Release Simcenter STAR-CCM+ v12.04
// Composite part "top" contains a nested composite part named "middle"
CompositePart compositePart_0 = 
  ((CompositePart) simulation_0.get(SimulationPartManager.class).getPart("top"));
CompositePart compositePart_1 = 
  ((CompositePart) compositePart_0.getChildParts().getPart("middle"));

// duplicate the entire assembly by duplicating "top"
CompositePart compositePart_2 = 
  (CompositePart) compositePart_0.duplicatePart(simulation_0.get(SimulationPartManager.class));

// The duplicatePart API has modified the nested composite part's name to "middle 1"
CompositePart compositePart_3 = 
  ((CompositePart) compositePart_2.getChildParts().getPart("middle 1"));
// Composite part "top" contains a nested composite part named "middle"
CompositePart compositePart_0 = 
  ((CompositePart) simulation_0.get(SimulationPartManager.class).getPart("top"));
CompositePart compositePart_1 = 
  ((CompositePart) compositePart_0.getChildParts().getPart("middle"));

// duplicate the entire assembly by duplicating "top"
CompositePart compositePart_2 = 
  (CompositePart) compositePart_0.duplicatePart(simulation_0.get(SimulationPartManager.class));

// The duplicatePart API no longer modifies the name of the nested composite part
CompositePart compositePart_3 = 
  ((CompositePart) compositePart_2.getChildParts().getPart("middle"));

Dynamic Queries: Changes to Region Assignments

Changes to dynamic queries in Simcenter STAR-CCM+ have resulted in changes to the macro code. If your macro includes the object ManagerWithQuery, update your macros as explained here.

When a dynamic query is set, ManagerWithQuery generates an exception when attempting to call the objects addObjects, removeObjects, or eraseObjects. When no query is set, these objects operate correctly.

As an example, assume you have a manager with a query set whose objects are currently A and B:

manager.getQuery(); // == true
manager.getObjects(); // == [A, B]

Calling addObjects, removeObjects, or eraseObjects in the previous version would not have changed the objects:

manager.addObjects(C); // or manager.removeObjects(B)
                       // or manager.eraseObjects(B)
manager.getObjects(); // == [A, B]

The current version generates the IllegalStateException error:

manager.addObjects(C); // IllegalStateException
manager.removeObjects(B); // IllegalStateException
manager.eraseObjects(B); // IllegalStateException

It is recommended that you either set the query to null explicitly, or check that no query is set before calling the objects:

manager.setQuery(null);
manager.addObjects(C); // objects will now be [A, B, C]

Alternatively:

if (!manager.hasQuery() {
    manager.removeObjects(B); // objects will now be [A]

DFBI

Changes to Creation of Bodies

With the introduction of 2D bodies, the way in which bodies are created has changed. In the current release, the createBody method takes an additional boolean argument which is true if the new body is 3D. For backward compatibility the old createBody method, without any argument, still works (it creates a 3D body). The following example shows the change between the previous and current techniques of creating a 3D body:

Previous Release Simcenter STAR-CCM+ v12.04
star.sixdof.Body sixdofBody_0 = 
  simulation_0.get(star.sixdof.BodyManager.class).createBody();
star.sixdof.Body sixdofBody_0 = 
  simulation_0.get(star.sixdof.BodyManager.class).createBody(true);

Change to Superposed Motion

A change was implemented to the mechanism of DFBI superposed motion, resulting in changes to the macro code. For backward compatibility, the old mechanism can still work in the current version of Simcenter STAR-CCM+.

Previous Release Simcenter STAR-CCM+ v12.04
Simulation simulation_0 = 
  getActiveSimulation();
SixDofPlusRotatingMotion sixDofPlusRotatingMotion_0 = 
  simulation_0.get(MotionManager.class).createMotion(SixDofPlusRotatingMotion.class, "DFBI Superposed Rotation");
sixDofPlusRotatingMotion_0.getAxisVector().setComponents(1.0, 0.0, 0.0);
sixDofPlusRotatingMotion_0.getOriginVector().setComponents(0.0, 0.0, -0.1);
Units units_0 =
  ((Units) simulation_0.getUnitsManager().getObject("rps"));
superposingRotatingMotion_0.getRotationRate().setUnits(units_0);
sixDofPlusRotatingMotion_0.getRotationRate().setValue(20.0);
Region region_0 = 
  simulation_0.getRegionManager().getRegion("PropellerRegion");
MotionSpecification motionSpecification_0 = 
  region_0.getValues().get(MotionSpecification.class);
motionSpecification_0.setMotion(sixDofPlusRotatingMotion_0);
Simulation simulation_0 = 
  getActiveSimulation();
star.sixdof.Body sixdofBody_0 = 
  ((star.sixdof.Body) simulation_0.get(star.sixdof.BodyManager.class).getObject("Body 1"));
SixDofBodyMotion sixDofBodyMotion_0 = 
  (SixDofBodyMotion) sixdofBody_0.createSixDofBodyMotion();
LabCoordinateSystem labCoordinateSystem_0 = 
  simulation_0.getCoordinateSystemManager().getLabCoordinateSystem();
CartesianCoordinateSystem cartesianCoordinateSystem_0 = 
  ((CartesianCoordinateSystem) labCoordinateSystem_0.getLocalCoordinateSystemManager().getObject("Body 1-CSys"));
CartesianCoordinateSystem cartesianCoordinateSystem_1 = 
  cartesianCoordinateSystem_0.getLocalCoordinateSystemManager().createLocalCoordinateSystem(CartesianCoordinateSystem.class, "Cartesian");
SuperposingRotatingMotion superposingRotatingMotion_0 = 
  sixDofBodyMotion_0.getSuperposingMotionManager().createSuperposingMotion(SuperposingRotatingMotion.class, "Superposing Rotation");
superposingRotatingMotion_0.setCoordinateSystem(cartesianCoordinateSystem_1);
superposingRotatingMotion_0.getAxisDirection().setComponents(1.0, 0.0, 0.0);
superposingRotatingMotion_0.getAxisOrigin().setComponents(0.0, 0.0, -0.1);
Units units_0 = 
  ((Units) simulation_0.getUnitsManager().getObject("rps"));
superposingRotatingMotion_0.getRotationRate().setUnits(units_0);
superposingRotatingMotion_0.getRotationRate().setValue(20.0);
Region region_0 = 
  simulation_0.getRegionManager().getRegion("PropellerRegion");
MotionSpecification motionSpecification_0 = 
  region_0.getValues().get(MotionSpecification.class);
motionSpecification_0.setMotion(superposingRotatingMotion_0);

Finite Element Analysis: Changes to Integration Order Option

The Integration Order Option property of the Finite Element Magnetic Vector Potential model has been refactored, resulting in changes to the macro code. The class star.electromagnetism.magneticpotential.fem.FeIntegrationOrderOption has been renamed to star.fea.common.models.FeIntegrationOrderOption. So, for example, the import statement changes as follows:

Previous Release Simcenter STAR-CCM+ v12.04
import star.electromagnetism.magneticpotential.fem.FeIntegrationOrderOption
import star.fea.common.models.FeIntegrationOrderOption;

Reacting Flows

Changes to Multiphase Reactions

The techniques for calculating multiphase reactions for liquid-solid interfaces and volume of fluid have changed, resulting in changes to the macro code. The class InterphaseReactionRateModel has changed to EmpInterphaseReactionModel.

Previous Release Simcenter STAR-CCM+ v12.04
phaseInteraction_0.enable(InterphaseReactionRateModel.class);
phaseInteraction_0.enable(EmpInterphaseReactionModel.class);
InterphaseReactionRateModel interphaseReactionRateModel_0 = 
phaseInteraction_0.getModelManager().getModel(InterphaseReactionRateModel.class);
EmpInterphaseReactionModel empInterphaseReactionModel_0 = 
phaseInteraction_0.getModelManager().getModel(EmpInterphaseReactionModel.class);
((ReactionManager) interphaseReactionRateModel_0.getReactions()).createReaction();
((ReactionManager) empInterphaseReactionModel_0.getReactions()).createReaction();

For Eulerian multiphase modeling with continuous-dispersed interaction, when using an interphase reaction with a user-defined reaction rate from a previous version of Simcenter STAR-CCM+, change the field function. Specifically, the earlier reaction rate [kmol/s] should now be [kmol/m2/sec].

An example of the changes to the macro code follows:

Previous Release Simcenter STAR-CCM+ v12.04
userFieldFunction_0.setFunctionName("ReactionRate");
userFieldFunction_0.setDefinition("($TemperatureAir>$TemperatureWater)?2.e-5*($TemperatureAir-$TemperatureWater):0");
userFieldFunction_0.setFunctionName("ReactionRate");
userFieldFunction_0.setDefinition("($TemperatureAir>$TemperatureWater)?2.e-5*($TemperatureAir-$TemperatureWater)/${InteractionAreaDensityPhase Interaction 1}:0");

Changes to Soot Two-Equation Model

The techniques of soot modeling have changed, resulting in the following change to the macro code:

Previous Release Simcenter STAR-CCM+ v12.04
sootTwoEquationModelProperties_0.getSootNucleationModelOption().setSelected(SootNucleationModelOption.PAH_BASED);
sootTwoEquationModelProperties_0.getSootNucleationModelOption().setSelected(SootTwoEquationNucleationOption.PAH_BASED);

Eulerian Multiphase

Changes to Phase Interaction Model for Dispersed Multiphase (DMP) and Volume of Fluid (VOF)

To accommodate the new DMP-VOF Phase Interaction Model structure, the DispersedPhasePressureGradientModel class has been removed.

Previous Release Simcenter STAR-CCM+ v12.04
PhaseInteraction phaseInteraction_1 = 
multiPhaseInteractionModel_0.createPhaseInteraction();
phaseInteraction_1.setPresentationName("DMP-Continuum");
phaseInteraction_1.enable(DispersedPhysicsContinuumInteractionModel.class);
phaseInteraction_1.enable(DispersedPhasePressureGradientModel.class);
phaseInteraction_1.enable(ParticleDiameterInteractionLengthScaleModel.class);
phaseInteraction_1.enable(DispersedPhaseHeatTransferModel.class);
phaseInteraction_1.enable(DispersedPhaseDragForceModel.class);
PhaseInteraction phaseInteraction_1 = 
multiPhaseInteractionModel_0.createPhaseInteraction();
phaseInteraction_1.setPresentationName("DMP-Continuum");
phaseInteraction_1.enable(DispersedPhysicsContinuumInteractionModel.class);
phaseInteraction_1.enable(ParticleDiameterInteractionLengthScaleModel.class);
phaseInteraction_1.enable(DispersedPhaseHeatTransferModel.class);
phaseInteraction_1.enable(DispersedPhaseDragForceModel.class);

Renaming of VOF Model Classes

The VofCavitationSingleComponentModel class has been renamed to VofSchnerrSauerCavitationSingleComponentModel, and the VofCavitationMultiComponentModel class has been renamed to VofSchnerrSauerCavitationMultiComponentModel.

The following example shows the change to the single-component class:

Previous Release Simcenter STAR-CCM+ v12.04
phaseInteraction_0.enable(VofPhaseInteractionModel.class);
VofPhaseInteractionModel vofPhaseInteractionModel_0 = 
phaseInteraction_0.getModelManager().getModel(VofPhaseInteractionModel.class);
EulerianMultiPhaseModel eulerianMultiPhaseModel_0 = 
physicsContinuum_0.getModelManager().getModel(EulerianMultiPhaseModel.class);
EulerianPhase eulerianPhase_0 = 
((EulerianPhase) eulerianMultiPhaseModel_0.getPhaseManager().getPhase("H2O"));
vofPhaseInteractionModel_0.setPrimaryPhase(eulerianPhase_0);
EulerianPhase eulerianPhase_1 = 
((EulerianPhase) eulerianMultiPhaseModel_0.getPhaseManager().getPhase("H2O(G)"));
vofPhaseInteractionModel_0.setSecondaryPhase(eulerianPhase_1);
phaseInteraction_0.enable(VofCavitationSingleComponentModel.class);
phaseInteraction_0.enable(PhaseInteractionMaterialModel.class);
phaseInteraction_0.enable(VofPhaseInteractionModel.class);
VofPhaseInteractionModel vofPhaseInteractionModel_0 = 
phaseInteraction_0.getModelManager().getModel(VofPhaseInteractionModel.class);
EulerianMultiPhaseModel eulerianMultiPhaseModel_0 = 
physicsContinuum_0.getModelManager().getModel(EulerianMultiPhaseModel.class);
EulerianPhase eulerianPhase_0 = 
((EulerianPhase) eulerianMultiPhaseModel_0.getPhaseManager().getPhase("H2O"));
vofPhaseInteractionModel_0.setPrimaryPhase(eulerianPhase_0);
EulerianPhase eulerianPhase_1 = 
((EulerianPhase) eulerianMultiPhaseModel_0.getPhaseManager().getPhase("H2O(G)"));
vofPhaseInteractionModel_0.setSecondaryPhase(eulerianPhase_1);
phaseInteraction_0.enable(VofSchnerrSauerCavitationSingleComponentModel.class);
phaseInteraction_0.enable(PhaseInteractionMaterialModel.class);

Similar to the previous example, the corresponding lines would need to be replaced for cavitation between Multi-Component Liquid and Multi-Component Gas:

Previous Release Simcenter STAR-CCM+ v12.04
phaseInteraction_0.enable(VofCavitationMultiComponentModel.class);
phaseInteraction_0.enable(VofSchnerrSauerCavitationMultiComponentModel.class);

Changes to Heat Transfer Coefficient Method

In the Boiling/Condensation model of a Multiple Flow Regime Phase Interaction, the internal heat transfer coefficient method manager is now accessible for the first and second regime Nusselt number, resulting in changes to the macro code.

The object getPrimaryNusseltNumber() is now getFirstRegimeExternalNuMethodManager(), and the object getSecondaryNusseltNumber() is now getSecondRegimeExternalNuMethodManager(). The following example shows the effects of these changes:

Previous Release Simcenter STAR-CCM+ v12.04
LsiBulkBoilingModel lsiBulkBoilingModel_0 = 
  phaseInteraction_0.getModelManager().getModel(LsiBulkBoilingModel.class);
ConstantInteractionCoefficientMethod constantInteractionCoefficientMethod_0 = 
  lsiBulkBoilingModel_0.getPrimaryNusseltNumber().getMethod(ConstantInteractionCoefficientMethod.class);
constantInteractionCoefficientMethod_0.getQuantity().setValue(2.0);
ConstantInteractionCoefficientMethod constantInteractionCoefficientMethod_1 = 
  lsiBulkBoilingModel_0.getSecondaryNusseltNumber().getMethod(ConstantInteractionCoefficientMethod.class);
constantInteractionCoefficientMethod_1.getQuantity().setValue(2.0);
LsiBulkBoilingModel lsiBulkBoilingModel_0 = 
  phaseInteraction_0.getModelManager().getModel(LsiBulkBoilingModel.class);
ConstantInteractionCoefficientMethod constantInteractionCoefficientMethod_0 = 
  lsiBulkBoilingModel_0.getFirstRegimeExternalNuMethodManager().getMethod(ConstantInteractionCoefficientMethod.class);
constantInteractionCoefficientMethod_0.getQuantity().setValue(2.0);
ConstantInteractionCoefficientMethod constantInteractionCoefficientMethod_1 = 
  lsiBulkBoilingModel_0.getSecondRegimeExternalNuMethodManager().getMethod(ConstantInteractionCoefficientMethod.class);
constantInteractionCoefficientMethod_1.getQuantity().setValue(2.0);
NoteIn v12.02 and earlier, the expression internal heat transfer used in the Boiling/Condensation model of a Multiple Flow Regime Phase Interaction was evaluated within Simcenter STAR-CCM+. With v12.04, the internal heat transfer coefficient method manager is accessible and you have to specify the Nu / HTC value for internal heat transfer. In the likely scenario where you want to use the old expression for the specification of internal heat transfer, Nu / HTC, you may do so by defining a field function, the details of which are provided in the User Guide.

The object star.multiphase.FunctionInterphaseHTCxAreaMethod is no longer available. In v12.02 and earlier, the FunctionInterphaseHTCxAreaMethod worked with the product of the HeatTransferCoefficient and the interaction area density as a single field function. In v12.04, a new method, star.multiphase.FunctionInterphaseHTCMethod, is now available. You can specify HeatTransferCoefficient as a field function and the interaction area density is calculated by the Interaction Area Density model.

Changes to Wall Boiling

The Wall Boiling model has been extended to work with Large Scale Interface (LSI) models, resulting in changes to the macro code.

Select the Model

Previous Release Simcenter STAR-CCM+ v12.04
PhysicsContinuum physicsContinuum_0 = 
  ((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum("Coolant"));
MultiPhaseInteractionModel multiPhaseInteractionModel_0 = 
  physicsContinuum_0.getModelManager().getModel(MultiPhaseInteractionModel.class);
PhaseInteraction phaseInteraction_0 = 
  ((PhaseInteraction) multiPhaseInteractionModel_0.getPhaseInteractionManager().getPhaseInteraction("Liquid Vapour Interface"));
phaseInteraction_0.enable(WallBoilingModel.class);
phaseInteraction_0.enable(LemmartChawlaNucleationSiteNumberDensityModel.class);
phaseInteraction_0.enable(KurulPodowskiBubbleInfluenceWallAreaFractionModel.class);
phaseInteraction_0.enable(DelValleKenningBubbleInducedQuenchingHeatTransferCoefficientModel.class);
phaseInteraction_0.enable(TolubinskyKonstanchukBubbleDepartureDiameterModel.class);
phaseInteraction_0.enable(ColeBubbleDepartureFrequencyModel.class);
phaseInteraction_0.enable(BasicWallDryoutAreaFractionModel.class);
PhysicsContinuum physicsContinuum_0 = 
  ((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum("Coolant"));
MultiPhaseInteractionModel multiPhaseInteractionModel_0 = 
  physicsContinuum_0.getModelManager().getModel(MultiPhaseInteractionModel.class);
PhaseInteraction phaseInteraction_0 = 
  ((PhaseInteraction) multiPhaseInteractionModel_0.getPhaseInteractionManager().getPhaseInteraction("Liquid Vapour Interface"));
phaseInteraction_0.enable(WallBoilingModel.class);
phaseInteraction_0.enable(BubbleNucleationModel.class);
phaseInteraction_0.enable(TransientConductionModel.class);

Changing Settings

Previous Release Simcenter STAR-CCM+ v12.04
WallBoilingModel wallBoilingModel_0 = 
  phaseInteraction_0.getModelManager().getModel(WallBoilingModel.class);
wallBoilingModel_0.getRelaxationFactor().setValue(0.4);
BasicWallDryoutAreaFractionModel basicWallDryoutAreaFractionModel_0 = 
  phaseInteraction_0.getModelManager().getModel(BasicWallDryoutAreaFractionModel.class);

//change the Bubbly Layer Relaxation Factor
basicWallDryoutAreaFractionModel_0.getRelaxationFactor().setValue(0.4);

//change the Bubbly Layer Option to Fixed Yplus and set the value to 150
basicWallDryoutAreaFractionModel_0.getBubblyLayerThicknessOption().setSelected(BubblyLayerThicknessOption.Type.FIXED_YPLUS);
BubblyLayerThicknessFixedYplus bubblyLayerThicknessFixedYplus_0 = 
  basicWallDryoutAreaFractionModel_0.getBubblyLayerThicknessFixedYplus();
bubblyLayerThicknessFixedYplus_0.setFixedYplus(150.0);

//change the Quenching Temperature Option to Fixed Yplus and set the value to 150
BubbleInducedQuenchingTemperatureModel bubbleInducedQuenchingTemperatureModel_0 = 
  phaseInteraction_0.getModelManager().getModel(BubbleInducedQuenchingTemperatureModel.class);
bubbleInducedQuenchingTemperatureModel_0.getBubbleInducedQuenchingTemperatureOption().setSelected(BubbleInducedQuenchingTemperatureOption.Type.FIXED_YPLUS);
BubbleInducedQuenchingFixedYplus bubbleInducedQuenchingFixedYplus_0 = 
  bubbleInducedQuenchingTemperatureModel_0.getBubbleInducedQuenchingFixedYplus();
bubbleInducedQuenchingFixedYplus_0.setFixedYplus(150.0);
WallBoilingModel wallBoilingModel_0 = 
  phaseInteraction_0.getModelManager().getModel(WallBoilingModel.class);
wallBoilingModel_0.getRelaxationFactor().setValue(0.4);
WallDryoutAreaFractionProfile wallDryoutAreaFractionProfile_0 = 
  wallBoilingModel_0.getWallDryoutAreaFractionProfile();
  
//change the Bubbly Layer Relaxation Factor
wallDryoutAreaFractionProfile_0.getBubblyLayerRelaxationFactor().setValue(0.4);

//change the Bubbly Layer Option to Fixed Yplus and set the value to 150
wallDryoutAreaFractionProfile_0.getBubblyLayerThicknessOption().setSelected(BubblyLayerThicknessOption.Type.FIXED_YPLUS);
BubblyLayerThicknessFixedYplus bubblyLayerThicknessFixedYplus_0 = 
  wallDryoutAreaFractionProfile_0.getBubblyLayerThicknessFixedYplus();
bubblyLayerThicknessFixedYplus_0.setFixedYplus(150.0);
   
//change the Quenching Temperature Option to Fixed Yplus and set the value to 150
TransientConductionModel transientConductionModel_0 = 
  phaseInteraction_0.getModelManager().getModel(TransientConductionModel.class);
transientConductionModel_0.getBubbleInducedQuenchingTemperatureOption().setSelected(BubbleInducedQuenchingTemperatureOption.Type.FIXED_YPLUS);
BubbleInducedQuenchingFixedYplus bubbleInducedQuenchingFixedYplus_0 = 
  transientConductionModel_0.getBubbleInducedQuenchingFixedYplus();
bubbleInducedQuenchingFixedYplus_0.setFixedYplus(150.0);

Remove Standard Submodels and Use Constants

This technique applies to the specification of Constant methods only.

Previous Release Simcenter STAR-CCM+ v12.04
PhaseInteraction phaseInteraction_0 = 
  ((PhaseInteraction) multiPhaseInteractionModel_0.getPhaseInteractionManager().getPhaseInteraction("Liquid Vapour Interface"));
BasicWallDryoutAreaFractionModel basicWallDryoutAreaFractionModel_1 = 
  phaseInteraction_0.getModelManager().getModel(BasicWallDryoutAreaFractionModel.class);
phaseInteraction_0.disableModel(basicWallDryoutAreaFractionModel_1);
phaseInteraction_0.enable(UserDefinedWallDryoutAreaFractionModel.class);
UserDefinedWallDryoutAreaFractionModel userDefinedWallDryoutAreaFractionModel_0 = 
  phaseInteraction_0.getModelManager().getModel(UserDefinedWallDryoutAreaFractionModel.class);
WallDryoutAreaFractionProfile wallDryoutAreaFractionProfile_0 = 
  userDefinedWallDryoutAreaFractionModel_0.getWallDryoutAreaFractionProfile();
wallDryoutAreaFractionProfile_0.getMethod(ConstantScalarProfileMethod.class).getQuantity().setValue(1.0);
LemmartChawlaNucleationSiteNumberDensityModel lemmartChawlaNucleationSiteNumberDensityModel_1 = 
  phaseInteraction_0.getModelManager().getModel(LemmartChawlaNucleationSiteNumberDensityModel.class);
phaseInteraction_0.disableModel(lemmartChawlaNucleationSiteNumberDensityModel_1);
phaseInteraction_0.enable(UserDefinedNucleationSiteNumberDensityModel.class);
UserDefinedNucleationSiteNumberDensityModel userDefinedNucleationSiteNumberDensityModel_0 = 
  phaseInteraction_0.getModelManager().getModel(UserDefinedNucleationSiteNumberDensityModel.class);
NucleationSiteNumberDensityProfile nucleationSiteNumberDensityProfile_0 = 
  userDefinedNucleationSiteNumberDensityModel_0.getNucleationSiteNumberDensityProfile();
nucleationSiteNumberDensityProfile_0.getMethod(ConstantScalarProfileMethod.class).getQuantity().setValue(1.0);
TolubinskyKonstanchukBubbleDepartureDiameterModel tolubinskyKonstanchukBubbleDepartureDiameterModel_1 = 
  phaseInteraction_0.getModelManager().getModel(TolubinskyKonstanchukBubbleDepartureDiameterModel.class);
phaseInteraction_0.disableModel(tolubinskyKonstanchukBubbleDepartureDiameterModel_1);
phaseInteraction_0.enable(UserDefinedBubbleDepartureDiameterModel.class);
UserDefinedBubbleDepartureDiameterModel userDefinedBubbleDepartureDiameterModel_0 = 
  phaseInteraction_0.getModelManager().getModel(UserDefinedBubbleDepartureDiameterModel.class);
BubbleDepartureDiameterProfile bubbleDepartureDiameterProfile_0 = 
  userDefinedBubbleDepartureDiameterModel_0.getBubbleDepartureDiameterProfile();
bubbleDepartureDiameterProfile_0.getMethod(ConstantScalarProfileMethod.class).getQuantity().setValue(1.0);
ColeBubbleDepartureFrequencyModel coleBubbleDepartureFrequencyModel_1 = 
  phaseInteraction_0.getModelManager().getModel(ColeBubbleDepartureFrequencyModel.class);
phaseInteraction_0.disableModel(coleBubbleDepartureFrequencyModel_1);
phaseInteraction_0.enable(UserDefinedBubbleDepartureFrequencyModel.class);
UserDefinedBubbleDepartureFrequencyModel userDefinedBubbleDepartureFrequencyModel_0 = 
  phaseInteraction_0.getModelManager().getModel(UserDefinedBubbleDepartureFrequencyModel.class);
BubbleDepartureFrequencyProfile bubbleDepartureFrequencyProfile_0 = 
  userDefinedBubbleDepartureFrequencyModel_0.getBubbleDepartureFrequencyProfile();
bubbleDepartureFrequencyProfile_0.getMethod(ConstantScalarProfileMethod.class).getQuantity().setValue(1.0);
KurulPodowskiBubbleInfluenceWallAreaFractionModel kurulPodowskiBubbleInfluenceWallAreaFractionModel_1 = 
  phaseInteraction_0.getModelManager().getModel(KurulPodowskiBubbleInfluenceWallAreaFractionModel.class);
phaseInteraction_0.disableModel(kurulPodowskiBubbleInfluenceWallAreaFractionModel_1);
phaseInteraction_0.enable(UserDefinedBubbleInfluenceWallAreaFractionModel.class);
UserDefinedBubbleInfluenceWallAreaFractionModel userDefinedBubbleInfluenceWallAreaFractionModel_0 = 
  phaseInteraction_0.getModelManager().getModel(UserDefinedBubbleInfluenceWallAreaFractionModel.class);
BubbleInfluenceWallAreaFractionProfile bubbleInfluenceWallAreaFractionProfile_0 = 
  userDefinedBubbleInfluenceWallAreaFractionModel_0.getBubbleInfluenceWallAreaFractionProfile();
bubbleInfluenceWallAreaFractionProfile_0.getMethod(ConstantScalarProfileMethod.class).getQuantity().setValue(1.0);
DelValleKenningBubbleInducedQuenchingHeatTransferCoefficientModel delValleKenningBubbleInducedQuenchingHeatTransferCoefficientModel_1 = 
  phaseInteraction_0.getModelManager().getModel(DelValleKenningBubbleInducedQuenchingHeatTransferCoefficientModel.class);
phaseInteraction_0.disableModel(delValleKenningBubbleInducedQuenchingHeatTransferCoefficientModel_1);
phaseInteraction_0.enable(UserDefinedBubbleInducedQuenchingHeatTransferCoefficientModel.class);
UserDefinedBubbleInducedQuenchingHeatTransferCoefficientModel userDefinedBubbleInducedQuenchingHeatTransferCoefficientModel_0 = 
  phaseInteraction_0.getModelManager().getModel(UserDefinedBubbleInducedQuenchingHeatTransferCoefficientModel.class);
BubbleInducedQuenchingHeatTransferCoefficientProfile bubbleInducedQuenchingHeatTransferCoefficientProfile_0 = 
  userDefinedBubbleInducedQuenchingHeatTransferCoefficientModel_0.getBubbleInducedQuenchingHeatTransferCoefficientProfile();
bubbleInducedQuenchingHeatTransferCoefficientProfile_0.getMethod(ConstantScalarProfileMethod.class).getQuantity().setValue(1.0);
PhaseInteraction phaseInteraction_0 = 
  ((PhaseInteraction) multiPhaseInteractionModel_0.getPhaseInteractionManager().getPhaseInteraction("Liquid Vapour Interface"));
WallBoilingModel wallBoilingModel_1 = 
  phaseInteraction_0.getModelManager().getModel(WallBoilingModel.class);
WallDryoutAreaFractionProfile wallDryoutAreaFractionProfile_0 = 
  wallBoilingModel_1.getWallDryoutAreaFractionProfile();
wallDryoutAreaFractionProfile_0.setMethod(ConstantScalarProfileMethod.class);
wallDryoutAreaFractionProfile_0.getMethod(ConstantScalarProfileMethod.class).getQuantity().setValue(1.0);
BubbleNucleationModel bubbleNucleationModel_1 = 
  phaseInteraction_0.getModelManager().getModel(BubbleNucleationModel.class);
NucleationSiteNumberDensityProfile nucleationSiteNumberDensityProfile_0 = 
  bubbleNucleationModel_1.getNucleationSiteNumberDensityProfile();
nucleationSiteNumberDensityProfile_0.setMethod(ConstantScalarProfileMethod.class);
nucleationSiteNumberDensityProfile_0.getMethod(ConstantScalarProfileMethod.class).getQuantity().setValue(1.0);
BubbleDepartureDiameterProfile bubbleDepartureDiameterProfile_0 = 
  bubbleNucleationModel_1.getBubbleDepartureDiameterProfile();
bubbleDepartureDiameterProfile_0.setMethod(ConstantScalarProfileMethod.class);
bubbleDepartureDiameterProfile_0.getMethod(ConstantScalarProfileMethod.class).getQuantity().setValue(1.0);
BubbleDepartureFrequencyProfile bubbleDepartureFrequencyProfile_0 = 
  bubbleNucleationModel_1.getBubbleDepartureFrequencyProfile();
bubbleDepartureFrequencyProfile_0.setMethod(ConstantScalarProfileMethod.class);
bubbleDepartureFrequencyProfile_0.getMethod(ConstantScalarProfileMethod.class).getQuantity().setValue(1.0);
TransientConductionModel transientConductionModel_1 = 
  phaseInteraction_0.getModelManager().getModel(TransientConductionModel.class);
BubbleInfluenceWallAreaFractionProfile bubbleInfluenceWallAreaFractionProfile_0 = 
  transientConductionModel_1.getBubbleInfluenceWallAreaFractionProfile();
bubbleInfluenceWallAreaFractionProfile_0.setMethod(ConstantScalarProfileMethod.class);
bubbleInfluenceWallAreaFractionProfile_0.getMethod(ConstantScalarProfileMethod.class).getQuantity().setValue(1.0);
TransientConductionHeatTransferCoefficientProfile transientConductionHeatTransferCoefficientProfile_0 = 
  transientConductionModel_1.getTransientConductionHeatTransferCoefficientProfile();
transientConductionHeatTransferCoefficientProfile_0.setMethod(ConstantScalarProfileMethod.class);
transientConductionHeatTransferCoefficientProfile_0.getMethod(ConstantScalarProfileMethod.class).getQuantity().setValue(1.0);

Select Basic Wall Dryout Area Fraction Model and Change Its Parameters

Previous Release Simcenter STAR-CCM+ v12.04
PhysicsContinuum physicsContinuum_0 = 
  ((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum("Coolant"));
MultiPhaseInteractionModel multiPhaseInteractionModel_0 = 
  physicsContinuum_0.getModelManager().getModel(MultiPhaseInteractionModel.class);
PhaseInteraction phaseInteraction_0 = 
  ((PhaseInteraction) multiPhaseInteractionModel_0.getPhaseInteractionManager().getPhaseInteraction("Liquid Vapour Interface"));
phaseInteraction_0.enable(BasicWallDryoutAreaFractionModel.class);
BasicWallDryoutAreaFractionModel basicWallDryoutAreaFractionModel_1 = 
  phaseInteraction_0.getModelManager().getModel(BasicWallDryoutAreaFractionModel.class);
basicWallDryoutAreaFractionModel_1.getWallDryoutBreakpoint().setValue(0.8);
PhysicsContinuum physicsContinuum_0 = 
  ((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum("Coolant"));
MultiPhaseInteractionModel multiPhaseInteractionModel_0 = 
  physicsContinuum_0.getModelManager().getModel(MultiPhaseInteractionModel.class);
PhaseInteraction phaseInteraction_0 = 
  ((PhaseInteraction) multiPhaseInteractionModel_0.getPhaseInteractionManager().getPhaseInteraction("Liquid Vapour Interface"));
WallBoilingModel wallBoilingModel_0 = 
  phaseInteraction_0.getModelManager().getModel(WallBoilingModel.class);
WallDryoutAreaFractionProfile wallDryoutAreaFractionProfile_0 = 
  wallBoilingModel_0.getWallDryoutAreaFractionProfile();
wallDryoutAreaFractionProfile_0.setMethod(BasicWallDryOutAreaFractionProfileMethod.class);
wallDryoutAreaFractionProfile_0.getMethod(BasicWallDryOutAreaFractionProfileMethod.class).getWallDryoutBreakpoint().setValue(0.8);

Select Cole Model

Previous Release Simcenter STAR-CCM+ v12.04
PhysicsContinuum physicsContinuum_0 = 
  ((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum("Coolant"));
MultiPhaseInteractionModel multiPhaseInteractionModel_0 = 
  physicsContinuum_0.getModelManager().getModel(MultiPhaseInteractionModel.class);
PhaseInteraction phaseInteraction_0 = 
  ((PhaseInteraction) multiPhaseInteractionModel_0.getPhaseInteractionManager().getPhaseInteraction("Liquid Vapour Interface"));
phaseInteraction_0.enable(ColeBubbleDepartureFrequencyModel.class);
PhysicsContinuum physicsContinuum_0 = 
  ((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum("Coolant"));
MultiPhaseInteractionModel multiPhaseInteractionModel_0 = 
  physicsContinuum_0.getModelManager().getModel(MultiPhaseInteractionModel.class);
PhaseInteraction phaseInteraction_0 = 
  ((PhaseInteraction) multiPhaseInteractionModel_0.getPhaseInteractionManager().getPhaseInteraction("Liquid Vapour Interface"));
BubbleNucleationModel bubbleNucleationModel_0 = 
  phaseInteraction_0.getModelManager().getModel(BubbleNucleationModel.class);
BubbleDepartureFrequencyProfile bubbleDepartureFrequencyProfile_0 = 
  bubbleNucleationModel_0.getBubbleDepartureFrequencyProfile();
bubbleDepartureFrequencyProfile_0.setMethod(ColeBubbleDepartureFrequencyProfileMethod.class);

Select Del Valle Kenning and Change Its Parameters

Previous Release Simcenter STAR-CCM+ v12.04
PhysicsContinuum physicsContinuum_0 = 
  ((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum("Coolant"));
MultiPhaseInteractionModel multiPhaseInteractionModel_0 = 
  physicsContinuum_0.getModelManager().getModel(MultiPhaseInteractionModel.class);
PhaseInteraction phaseInteraction_0 = 
  ((PhaseInteraction) multiPhaseInteractionModel_0.getPhaseInteractionManager().getPhaseInteraction("Liquid Vapour Interface"));
phaseInteraction_0.enable(DelValleKenningBubbleInducedQuenchingHeatTransferCoefficientModel.class);
DelValleKenningBubbleInducedQuenchingHeatTransferCoefficientModel delValleKenningBubbleInducedQuenchingHeatTransferCoefficientModel_1 = 
  phaseInteraction_0.getModelManager().getModel(DelValleKenningBubbleInducedQuenchingHeatTransferCoefficientModel.class);
delValleKenningBubbleInducedQuenchingHeatTransferCoefficientModel_1.getWaitCoefficient().setValue(0.800001);
PhysicsContinuum physicsContinuum_0 = 
  ((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum("Coolant"));
MultiPhaseInteractionModel multiPhaseInteractionModel_0 = 
  physicsContinuum_0.getModelManager().getModel(MultiPhaseInteractionModel.class);
PhaseInteraction phaseInteraction_0 = 
  ((PhaseInteraction) multiPhaseInteractionModel_0.getPhaseInteractionManager().getPhaseInteraction("Liquid Vapour Interface"));
TransientConductionModel transientConductionModel_0 = 
  phaseInteraction_0.getModelManager().getModel(TransientConductionModel.class);
TransientConductionHeatTransferCoefficientProfile transientConductionHeatTransferCoefficientProfile_0 = 
  transientConductionModel_0.getTransientConductionHeatTransferCoefficientProfile();
transientConductionHeatTransferCoefficientProfile_0.setMethod(DelValleKenningBubbleInducedQuenchingHeatTransferCoefficientProfileMethod.class);
transientConductionHeatTransferCoefficientProfile_0.getMethod(DelValleKenningBubbleInducedQuenchingHeatTransferCoefficientProfileMethod.class).getWaitCoefficient().setValue(0.800001);

Select Hibiki Ishii Submodel and Change Its Parameters

Previous Release Simcenter STAR-CCM+ v12.04
PhysicsContinuum physicsContinuum_0 = 
  ((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum("Coolant"));
MultiPhaseInteractionModel multiPhaseInteractionModel_0 = 
  physicsContinuum_0.getModelManager().getModel(MultiPhaseInteractionModel.class);
PhaseInteraction phaseInteraction_0 = 
  ((PhaseInteraction) multiPhaseInteractionModel_0.getPhaseInteractionManager().getPhaseInteraction("Liquid Vapour Interface"));
phaseInteraction_0.enable(HibikiIshiiNucleationSiteNumberDensityModel.class);
HibikiIshiiNucleationSiteNumberDensityModel hibikiIshiiNucleationSiteNumberDensityModel_0 = 
  phaseInteraction_0.getModelManager().getModel(HibikiIshiiNucleationSiteNumberDensityModel.class);
hibikiIshiiNucleationSiteNumberDensityModel_0.getAverageCavityDensity().setValue(472000.00001);
hibikiIshiiNucleationSiteNumberDensityModel_0.getWallContactAngle().setValue(0.7219999);
hibikiIshiiNucleationSiteNumberDensityModel_0.getWallContactAngleScale().setValue(0.7219999);
hibikiIshiiNucleationSiteNumberDensityModel_0.getCavityLengthScale().setValue(2.4999E-6);
hibikiIshiiNucleationSiteNumberDensityModel_0.getDensityFunctionConstantC0().setValue(-0.010639999);
hibikiIshiiNucleationSiteNumberDensityModel_0.getDensityFunctionConstantC1().setValue(0.482459999);
hibikiIshiiNucleationSiteNumberDensityModel_0.getDensityFunctionConstantC2().setValue(-0.227119999);
hibikiIshiiNucleationSiteNumberDensityModel_0.getDensityFunctionConstantC3().setValue(0.054679999);
hibikiIshiiNucleationSiteNumberDensityModel_0.getMaximumSuperheat().setValue(25.000001);
PhysicsContinuum physicsContinuum_0 = 
  ((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum("Coolant"));
MultiPhaseInteractionModel multiPhaseInteractionModel_0 = 
  physicsContinuum_0.getModelManager().getModel(MultiPhaseInteractionModel.class);
PhaseInteraction phaseInteraction_0 = 
  ((PhaseInteraction) multiPhaseInteractionModel_0.getPhaseInteractionManager().getPhaseInteraction("Liquid Vapour Interface"));
BubbleNucleationModel bubbleNucleationModel_0 = 
  phaseInteraction_0.getModelManager().getModel(BubbleNucleationModel.class);
NucleationSiteNumberDensityProfile nucleationSiteNumberDensityProfile_0 = 
  bubbleNucleationModel_0.getNucleationSiteNumberDensityProfile();
nucleationSiteNumberDensityProfile_0.setMethod(HibikiIshiiNucleationSiteNumberDensityProfileMethod.class);
nucleationSiteNumberDensityProfile_0.getMethod(HibikiIshiiNucleationSiteNumberDensityProfileMethod.class).getAverageCavityDensity().setValue(472000.00001);
nucleationSiteNumberDensityProfile_0.getMethod(HibikiIshiiNucleationSiteNumberDensityProfileMethod.class).getWallContactAngle().setValue(0.7219999);
nucleationSiteNumberDensityProfile_0.getMethod(HibikiIshiiNucleationSiteNumberDensityProfileMethod.class).getWallContactAngleScale().setValue(0.7219999);
nucleationSiteNumberDensityProfile_0.getMethod(HibikiIshiiNucleationSiteNumberDensityProfileMethod.class).getCavityLengthScale().setValue(2.4999E-6);
nucleationSiteNumberDensityProfile_0.getMethod(HibikiIshiiNucleationSiteNumberDensityProfileMethod.class).getDensityFunctionConstantC0().setValue(-0.010639999);
nucleationSiteNumberDensityProfile_0.getMethod(HibikiIshiiNucleationSiteNumberDensityProfileMethod.class).getDensityFunctionConstantC1().setValue(0.482459999);
nucleationSiteNumberDensityProfile_0.getMethod(HibikiIshiiNucleationSiteNumberDensityProfileMethod.class).getDensityFunctionConstantC2().setValue(-0.227119999);
nucleationSiteNumberDensityProfile_0.getMethod(HibikiIshiiNucleationSiteNumberDensityProfileMethod.class).getDensityFunctionConstantC3().setValue(0.054679999);
nucleationSiteNumberDensityProfile_0.getMethod(HibikiIshiiNucleationSiteNumberDensityProfileMethod.class).getMaximumSuperheat().setValue(25.000001);

Select Kocamustafaogullari Model and Change Its Parameters

Previous Release Simcenter STAR-CCM+ v12.04
PhysicsContinuum physicsContinuum_0 = 
  ((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum("Coolant"));
MultiPhaseInteractionModel multiPhaseInteractionModel_0 = 
  physicsContinuum_0.getModelManager().getModel(MultiPhaseInteractionModel.class);
PhaseInteraction phaseInteraction_0 = 
  ((PhaseInteraction) multiPhaseInteractionModel_0.getPhaseInteractionManager().getPhaseInteraction("Liquid Vapour Interface"));
phaseInteraction_0.enable(KocamustafaogullariBubbleDepartureDiameterModel.class);
KocamustafaogullariBubbleDepartureDiameterModel kocamustafaogullariBubbleDepartureDiameterModel_0 = 
  phaseInteraction_0.getModelManager().getModel(KocamustafaogullariBubbleDepartureDiameterModel.class);
kocamustafaogullariBubbleDepartureDiameterModel_0.getCalibrationConstant().setValue(0.0015125999);
kocamustafaogullariBubbleDepartureDiameterModel_0.getWallContactAngle().setValue(0.72200001);
PhysicsContinuum physicsContinuum_0 = 
  ((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum("Coolant"));
MultiPhaseInteractionModel multiPhaseInteractionModel_0 = 
  physicsContinuum_0.getModelManager().getModel(MultiPhaseInteractionModel.class);
PhaseInteraction phaseInteraction_0 = 
  ((PhaseInteraction) multiPhaseInteractionModel_0.getPhaseInteractionManager().getPhaseInteraction("Liquid Vapour Interface"));
BubbleNucleationModel bubbleNucleationModel_0 = 
  phaseInteraction_0.getModelManager().getModel(BubbleNucleationModel.class);
BubbleDepartureDiameterProfile bubbleDepartureDiameterProfile_0 = 
  bubbleNucleationModel_0.getBubbleDepartureDiameterProfile();
bubbleDepartureDiameterProfile_0.setMethod(KocamustafaogullariBubbleDepartureDiameterProfileMethod.class);
bubbleDepartureDiameterProfile_0.getMethod(KocamustafaogullariBubbleDepartureDiameterProfileMethod.class).getCalibrationConstant().setValue(0.0015125999);
bubbleDepartureDiameterProfile_0.getMethod(KocamustafaogullariBubbleDepartureDiameterProfileMethod.class).getWallContactAngle().setValue(0.72200001);

Select Kurul Podowski Model and Change Its Parameters

Previous Release Simcenter STAR-CCM+ v12.04
PhysicsContinuum physicsContinuum_0 = 
  ((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum("Coolant"));
MultiPhaseInteractionModel multiPhaseInteractionModel_0 = 
  physicsContinuum_0.getModelManager().getModel(MultiPhaseInteractionModel.class);
PhaseInteraction phaseInteraction_0 = 
  ((PhaseInteraction) multiPhaseInteractionModel_0.getPhaseInteractionManager().getPhaseInteraction("Liquid Vapour Interface"));
phaseInteraction_0.enable(KurulPodowskiBubbleInfluenceWallAreaFractionModel.class);
KurulPodowskiBubbleInfluenceWallAreaFractionModel kurulPodowskiBubbleInfluenceWallAreaFractionModel_1 = 
  phaseInteraction_0.getModelManager().getModel(KurulPodowskiBubbleInfluenceWallAreaFractionModel.class);
kurulPodowskiBubbleInfluenceWallAreaFractionModel_1.getAreaCoefficient().setValue(2.000001);
PhysicsContinuum physicsContinuum_0 = 
  ((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum("Coolant"));
MultiPhaseInteractionModel multiPhaseInteractionModel_0 = 
  physicsContinuum_0.getModelManager().getModel(MultiPhaseInteractionModel.class);
PhaseInteraction phaseInteraction_0 = 
  ((PhaseInteraction) multiPhaseInteractionModel_0.getPhaseInteractionManager().getPhaseInteraction("Liquid Vapour Interface"));
TransientConductionModel transientConductionModel_0 = 
  phaseInteraction_0.getModelManager().getModel(TransientConductionModel.class);
BubbleInfluenceWallAreaFractionProfile bubbleInfluenceWallAreaFractionProfile_0 = 
  transientConductionModel_0.getBubbleInfluenceWallAreaFractionProfile();
bubbleInfluenceWallAreaFractionProfile_0.setMethod(KurulPodowskiBubbleInfluenceWallAreaFractionProfileMethod.class);
bubbleInfluenceWallAreaFractionProfile_0.getMethod(KurulPodowskiBubbleInfluenceWallAreaFractionProfileMethod.class).getAreaCoefficient().setValue(2.000001);

Select Lemmert Chawla Submodel and Change Its Parameters

Previous Release Simcenter STAR-CCM+ v12.04
PhysicsContinuum physicsContinuum_0 = 
  ((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum("Coolant"));
MultiPhaseInteractionModel multiPhaseInteractionModel_0 = 
  physicsContinuum_0.getModelManager().getModel(MultiPhaseInteractionModel.class);
PhaseInteraction phaseInteraction_0 = 
  ((PhaseInteraction) multiPhaseInteractionModel_0.getPhaseInteractionManager().getPhaseInteraction("Liquid Vapour Interface"));
phaseInteraction_0.enable(LemmartChawlaNucleationSiteNumberDensityModel.class);
LemmartChawlaNucleationSiteNumberDensityModel lemmartChawlaNucleationSiteNumberDensityModel_1 = 
  phaseInteraction_0.getModelManager().getModel(LemmartChawlaNucleationSiteNumberDensityModel.class);
lemmartChawlaNucleationSiteNumberDensityModel_1.getCalibrationConstantN0().setValue(12366.448);
lemmartChawlaNucleationSiteNumberDensityModel_1.getCalibrationConstantDT0.setValue(1.0001);
lemmartChawlaNucleationSiteNumberDensityModel_1.getCalibrationConstantA().setValue(1.80499);
lemmartChawlaNucleationSiteNumberDensityModel_1.getCalibrationConstantB().setValue(1.0E-6);
lemmartChawlaNucleationSiteNumberDensityModel_1.getMaximumSuperheat().setValue(25.000001);
PhysicsContinuum physicsContinuum_0 = 
  ((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum("Coolant"));
MultiPhaseInteractionModel multiPhaseInteractionModel_0 = 
  physicsContinuum_0.getModelManager().getModel(MultiPhaseInteractionModel.class);
PhaseInteraction phaseInteraction_0 = 
  ((PhaseInteraction) multiPhaseInteractionModel_0.getPhaseInteractionManager().getPhaseInteraction("Liquid Vapour Interface"));
BubbleNucleationModel bubbleNucleationModel_0 = 
  phaseInteraction_0.getModelManager().getModel(BubbleNucleationModel.class);
NucleationSiteNumberDensityProfile nucleationSiteNumberDensityProfile_0 = 
  bubbleNucleationModel_0.getNucleationSiteNumberDensityProfile();
nucleationSiteNumberDensityProfile_0.setMethod(LemmartChawlaNucleationSiteNumberDensityProfileMethod.class);
nucleationSiteNumberDensityProfile_0.getMethod(LemmartChawlaNucleationSiteNumberDensityProfileMethod.class).getCalibrationConstantN0().setValue(12366.448);
nucleationSiteNumberDensityProfile_0.getMethod(LemmartChawlaNucleationSiteNumberDensityProfileMethod.class).getCalibrationConstantDT0().setValue(1.0001);
nucleationSiteNumberDensityProfile_0.getMethod(LemmartChawlaNucleationSiteNumberDensityProfileMethod.class).getCalibrationConstantA().setValue(1.80499);
nucleationSiteNumberDensityProfile_0.getMethod(LemmartChawlaNucleationSiteNumberDensityProfileMethod.class).getCalibrationConstantB().setValue(1.0E-6);
nucleationSiteNumberDensityProfile_0.getMethod(LemmartChawlaNucleationSiteNumberDensityProfileMethod.class).getMaximumSuperheat().setValue(25.000001);

Select Tolubinsky Kostanchuk Model and Change Its Parameters

Previous Release Simcenter STAR-CCM+ v12.04
PhysicsContinuum physicsContinuum_0 = 
  ((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum("Coolant"));
MultiPhaseInteractionModel multiPhaseInteractionModel_0 = 
  physicsContinuum_0.getModelManager().getModel(MultiPhaseInteractionModel.class);
PhaseInteraction phaseInteraction_0 = 
  ((PhaseInteraction) multiPhaseInteractionModel_0.getPhaseInteractionManager().getPhaseInteraction("Liquid Vapour Interface"));
phaseInteraction_0.enable(TolubinskyKonstanchukBubbleDepartureDiameterModel.class);
TolubinskyKonstanchukBubbleDepartureDiameterModel tolubinskyKonstanchukBubbleDepartureDiameterModel_1 = 
  phaseInteraction_0.getModelManager().getModel(TolubinskyKonstanchukBubbleDepartureDiameterModel.class);
tolubinskyKonstanchukBubbleDepartureDiameterModel_1.getReferenceDiameter().setValue(6.000001E-4);
tolubinskyKonstanchukBubbleDepartureDiameterModel_1.getReferenceDiameterSubcooling().setValue(45.000001);
tolubinskyKonstanchukBubbleDepartureDiameterModel_1.getMinimumDiameter().setValue(2.500001E-5);
tolubinskyKonstanchukBubbleDepartureDiameterModel_1.getMaximumDiameter().setValue(0.001400001);
PhysicsContinuum physicsContinuum_0 = 
  ((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum("Coolant"));
MultiPhaseInteractionModel multiPhaseInteractionModel_0 = 
  physicsContinuum_0.getModelManager().getModel(MultiPhaseInteractionModel.class);
PhaseInteraction phaseInteraction_0 = 
  ((PhaseInteraction) multiPhaseInteractionModel_0.getPhaseInteractionManager().getPhaseInteraction("Liquid Vapour Interface"));
BubbleNucleationModel bubbleNucleationModel_0 = 
  phaseInteraction_0.getModelManager().getModel(BubbleNucleationModel.class);
BubbleDepartureDiameterProfile bubbleDepartureDiameterProfile_0 = 
  bubbleNucleationModel_0.getBubbleDepartureDiameterProfile();
bubbleDepartureDiameterProfile_0.setMethod(TolubinskyKostanchukBubbleDepartureDiameterProfileMethod.class);
bubbleDepartureDiameterProfile_0.getMethod(TolubinskyKostanchukBubbleDepartureDiameterProfileMethod.class).getReferenceDiameter().setValue(6.00001E-4);
bubbleDepartureDiameterProfile_0.getMethod(TolubinskyKostanchukBubbleDepartureDiameterProfileMethod.class).getReferenceDiameterSubcooling().setValue(45.00001);
bubbleDepartureDiameterProfile_0.getMethod(TolubinskyKostanchukBubbleDepartureDiameterProfileMethod.class).getMinimumDiameter().setValue(2.500001E-5);
bubbleDepartureDiameterProfile_0.getMethod(TolubinskyKostanchukBubbleDepartureDiameterProfileMethod.class).getMaximumDiameter().setValue(0.001400001);

Electromagnetics: Changes to Magnetic Flux Reporting

The Magnetic Flux Linkage Surface Integral report is not available in v12.04. As a result, the command createMagneticFluxLinkageReport is no longer valid.

Update your macros as follows:

  • For Finite Element cases, use the MagneticFluxLinkageReport based on a vector integral.
  • For Finite Volume cases, use the VolumeIntegralReport of the field function SpecificMagneticFluxLinkage.

Alternatively, to recreate the original behavior of the Magnetic Flux Linkage Surface Integral report manually, use a Surface Integral report and a user-defined field function that calculates the dot product of the MagneticFluxDensity and the unit surface element.

Porous Media: Changes to Profile

With the code-restructuring involved in the implementation of Porous Media model, the location of ScalarVolumeFractionProfile has changed from star.multiphase.ScalarVolumeFractionProfile to star.flow.ScalarVolumeFractionProfile. This affects the import action near the beginning of a macro, as shown in the following example:

Previous Release Simcenter STAR-CCM+ v12.04
import star.multiphase.ScalarVolumeFractionProfile;

public void execute() {
import star.flow.ScalarVolumeFractionProfile;

public void execute() {

Electrochemistry: Changes to Tafel Slope (log 10) Reacting Method

Input parameters for Tafel Slope (log10) have been changed. For the macro code, in the previous version, if the TafelSlopeReactionMethod was used, a UserSpecificExchangeCurrentMethod needed to be populated. This method has been replaced with a SpecificExchangeCurrentLogMethod. For consistent results, feed the value for the SpecificExchangeCurrentLogMethod with the decadic logarithm of the value of the UserSpecificExchangeCurrentMethod.

Previous Release Simcenter STAR-CCM+ v12.04
UserSpecificExchangeCurrentMethod iMethod =
  reaction.getReactionProperties().get(SpecificExchangeCurrentProperty.class).getMethodObject(UserSpecificExchangeCurrentMethod.class);
 
UserSpecificExchangeCurrentProfile iProfile = iMethod.getUserSpecificExchangeCurrentProfile();
iProfile.getMethod(ConstantScalarProfileMethod.class).getQuantity().setValue(legacyValue);
SpecificExchangeCurrentLogMethod yilcMethod =
 reaction.getReactionProperties().get(SpecificExchangeCurrentLogProperty.class).getMethodObject(SpecificExchangeCurrentLogMethod.class);

SpecificExchangeCurrentLogProfile yilcProfile = yilcMethod.getSpecificExchangeCurrentLogProfile();
yilcProfile.getMethod(ConstantScalarProfileMethod.class).getQuantity().setValue(Math.log10(legacyValue);

Solid Stress: New Material Law Model

A new material law model has been introduced in solid stress modeling. As a result, macro code that includes FeSolidStressModel needs updating. The following example illustrates the changes:

Previous Release Simcenter STAR-CCM+ v12.04
physicsContinuum_0.enable(SteadyModel.class);
physicsContinuum_0.enable(FeSolidStressModel.class);
physicsContinuum_0.enable(LinearIsotropicElasticModel.class);
SolidModel solidModel_0 = physicsContinuum_0.getModelManager().getModel(SolidModel.class);
Solid solid_0 = ((Solid) solidModel_0.getMaterial());
ConstantMaterialPropertyMethod constantMaterialPropertyMethod_0 = 
  ((ConstantMaterialPropertyMethod) solid_0.getMaterialProperties().getMaterialProperty(ConstantDensityProperty.class).getMethod());
constantMaterialPropertyMethod_0.getQuantity().setValue(8000.0);
ConstantMaterialPropertyMethod constantMaterialPropertyMethod_1 = 
  ((ConstantMaterialPropertyMethod) solid_0.getMaterialProperties().getMaterialProperty(PoissonRatioProperty.class).getMethod());
constantMaterialPropertyMethod_1.getQuantity().setValue(0.3);
ConstantMaterialPropertyMethod constantMaterialPropertyMethod_2 = 
  ((ConstantMaterialPropertyMethod) solid_0.getMaterialProperties().getMaterialProperty(YoungsModulusProperty.class).getMethod());
constantMaterialPropertyMethod_2.getQuantity().setValue(200.0);
physicsContinuum_0.enable(SteadyModel.class);
physicsContinuum_0.enable(SolidModel.class);
physicsContinuum_0.enable(FeSolidStressModel.class);
physicsContinuum_0.enable(FeMaterialLawsModel.class);
FeMaterialLawsModel feMaterialLawsModel_1 =
  physicsContinuum_0.getModelManager().getModel(FeMaterialLawsModel.class);
MaterialLaw materialLaw_0 = feMaterialLawsModel_1.createMaterialLaw();
materialLaw_0.enable(LinearElasticMaterialModel.class);
materialLaw_0.enable(IsotropicLinearElasticMaterialModel.class);
PhysicsContinuum physicsContinuum_0 = ((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum(getContinuumName()));
SolidModel solidModel_0 = physicsContinuum_0.getModelManager().getModel(SolidModel.class);
FeMaterialLawsModel feMaterialLawsModel_1 = physicsContinuum_0.getModelManager().getModel(FeMaterialLawsModel.class);
MaterialLaw materialLaw_0 = ((MaterialLaw)feMaterialLawsModel_1.getPhaseManager().getPhase("Material Law 1"));
Solid solid_0 = ((Solid) solidModel_0.getMaterial());
solid_0.getMaterialProperties().getMaterialProperty(MaterialLawProperty.class).setMaterialLaw(materialLaw_0);
ConstantMaterialPropertyMethod constantMaterialPropertyMethod_YoungsModulus = 
  ((ConstantMaterialPropertyMethod) solid_0.getMaterialProperties().getMaterialProperty(YoungsModulusProperty.class).getMethod());
constantMaterialPropertyMethod_YoungsModulus.getQuantity().setValue(200.0);
ConstantMaterialPropertyMethod constantMaterialPropertyMethod_PoissonsRatio = 
  ((ConstantMaterialPropertyMethod) solid_0.getMaterialProperties().getMaterialProperty(PoissonRatioProperty.class).getMethod());
constantMaterialPropertyMethod_PoissonsRatio.getQuantity().setValue(0.3);
ConstantMaterialPropertyMethod constantMaterialPropertyMethod_Density = 
  ((ConstantMaterialPropertyMethod) solid_0.getMaterialProperties().getMaterialProperty(ConstantDensityProperty.class).getMethod());
constantMaterialPropertyMethod_Density.getQuantity().setValue(8000.0);

Co-Simulation

Changes to Java Classes

The Java classes StarccmplusCoSimulation and AbaqusCoSimulation have both been replaced by a single class, CoSimulation. Within macro code, all occurrences of these classes must be renamed accordingly.

If the macro is setting up a new co-simulation, the default name for the co-simulation object will now be Link 1 instead of STAR-CCM+ Co-Simulation 1 or Abaqus Co-Simulation 1. This is not needed if the macro is used on a simulation that had the co-simulation object already set up.

Previous Release Simcenter STAR-CCM+ v12.04
StarccmplusCoSimulation abaqusCoSimulation_0 =
((StarccmplusCoSimulation) simulation_0.get(CoSimulationManager.class).getObject("STAR-CCM+ Co-Simulation 1"));
CoSimulation CoSimulation_0 =
((CoSimulation) simulation_0.get(CoSimulationManager.class).getObject("Link 1"));
AbaqusCoSimulation abaqusCoSimulation_0 =
((AbaqusCoSimulation) simulation_0.get(CoSimulationManager.class).getObject("Abaqus Co-Simulation 1"));
CoSimulation CoSimulation_0 =
((CoSimulation) simulation_0.get(CoSimulationManager.class).getObject("Link 1"));

Change to Object for 1D Co-Simulation

The object star.cosimulation.onedcoupling has been renamed to star.cosimulation.common. This affects the import action near the beginning of a macro, as shown in the following example:

Previous Release Simcenter STAR-CCM+ v12.04
import star.cosimulation.onedcoupling.OneDScalarFieldProfileMethod;
import star.cosimulation.common.OneDScalarFieldProfileMethod;

Package Hierarchy Restructured for 1D Co-Simulations

The package hierarchy for 1D co-simulations has been restructured, resulting in changes to the macro code.

Amesim

For any macro files containing Amesim co-simulation client-server objects the following line must be included to import them:

import star.cosimulation.amesim.*;

Alternatively, if there are specific class imports, they need to be changed accordingly. The following example is for AmesimModel:

Previous Release Simcenter STAR-CCM+ v12.04
import star.cosimulation.onedcoupling.AmesimModel;
import star.cosimulation.amesim.AmesimModel;

Affected classes: AmesimModel, AmesimCoSimulationExplicitUnsteadyModel, Amesim, AmesimPortAssociationManager, and AmesimSolver.

GT-SUITE

For any macro files containing GT-SUITE co-simulation client-server objects the following line must be included to import them:

import star.cosimulation.gtpower.*;

Alternatively, if there are specific class imports, they need to be changed accordingly. The following example is for GtVersion:

Previous Release Simcenter STAR-CCM+ v12.04
import star.cosimulation.onedcoupling.GtVersion;
import star.cosimulation.gtpower.GtVersion;

Affected classes: GtGasModel, GtLiquidModel, GtMultiComponentGasModel, GtPowerCoSimulationExplicitUnsteadyModel, GtSuiteLocalInputFile, GtSuiteRemoteInputFile, GtInformation, GtPower, GtSolver, GtVersion, and GtZoneData.

OLGA

For any macro files containing OLGA co-simulation client-server objects the following line must be included to import them:

import star.cosimulation.olga.*;

Alternatively, if there are specific class imports, they need to be changed accordingly. The following example is for OlgaVersion:

Previous Release Simcenter STAR-CCM+ v12.04
import star.cosimulation.onedcoupling.OlgaVersion;
import star.cosimulation.olga.OlgaVersion;

Affected classes: Olga, Olga7Location, Olga7LocationsManager, OlgaAssumeCircularBoundaries, OlgaCertRootDir, OlgaCoSimulationExplicitUnsteadyModel, OlgaCommunicationProtocol, OlgaDensityMethod, OlgaDrdpMethod, OlgaDrdtMethod, OlgaDynamicViscosityMethod, OlgaEmpModel, OlgaEmpPhaseModel, OlgaEosModel, OlgaLocalInputFile, OlgaModelBase, OlgaNodeType, OlgaPhaseModel, OlgaPositionName, OlgaPropertiesFile, OlgaPropertyMethods, OlgaRemoteInputFile, OlgaSnapFiles, OlgaSolver, OlgaSpecificHeatMethod, OlgaSurfaceTensionMethod, OlgaSurfaceTensionModel, OlgaThermalConductivityMethod, OlgaVersion, and OlgaVofModel.

Changes to WAVE Coupling Objects

WAVE co-simulation has been refactored for the current release.

WAVE Client Server Objects (CSOs) Moved

These are changes due to moving classes from star.cosimulation.onedcoupling to star.cosimulation.wave.

For any macro files containing WAVE co-simulation client-server objects the following line must be included to import them:

import star.cosimulation.wave.*;

Alternatively, if there are specific class imports, they need to be changed accordingly. The following example is for WaveModel:

Previous Release Simcenter STAR-CCM+ v12.04
import star.cosimulation.onedcoupling.WaveModel;
import star.cosimulation.wave.WaveModel;

Affected classes: WaveModel.java, WaveCoSimulationExplicitUnsteadyModel.java, and WaveControlPinAssociationManager.java.

WaveNode Removed

The CSO WaveNode has been replaced with the CoSimulation class.

Import line:

Previous Release Simcenter STAR-CCM+ v12.04
import star.cosimulation.onedcoupling.*;
// or
import star.cosimulation.onedcoupling.WaveNode;
import star.cosimulation.common.*;
// or
import star.cosimulation.common.CoSimulation;

Getting the WaveNode replaced by getting the CoSimulation:

Previous Release Simcenter STAR-CCM+ v12.04
WaveNode waveNode_0 =
  ((WaveNode) simulation_0.get(CoSimulationManager.class).getObject("WAVE 1"));
CoSimulation coSimulation_0 =
  ((CoSimulation) simulation_0.get(CoSimulationManager.class).getObject("WAVE 1"));

Editing the WAVE input file property:

Previous Release Simcenter STAR-CCM+ v12.04
waveNode_0.setWaveCaseName("WaveFile");
WaveLocalInputFile waveLocalInputFile_0 =
  coSimulation_0.getCoSimulationValues().get(WaveLocalInputFile.class);
waveLocalInputFile_0.setFilePath("sims/wave/tube/tubechild.wvm");

Editing the WAVE executable command property:

Previous Release Simcenter STAR-CCM+ v12.04
waveNode_0.setWaveCommand("wave");
CoSimCommandLine coSimCommandLine_0 =
  coSimulation_0.getCoSimulationValues().get(CoSimCommandLine.class);
coSimCommandLine_0.setCommandLine("wave");

Editing the RSimlink libraries path property:

Previous Release Simcenter STAR-CCM+ v12.04
waveNode_0.setWaveLibPath("RsimlinkLibraryPath");
RSimlinkLibPath rSimlinkLibPath_0 =
  coSimulation_0.getCoSimulationValues().get(RSimlinkLibPath.class);
rSimlinkLibPath_0.setFilePath("RsimlinkLibraryPath");

WaveSpecies Removed

WaveSpecies and WaveSpeciesManager CSO classes were replaced with CoupledSpeciesComponentMap and CoupledSpeciesManager.

Import line:

Previous Release Simcenter STAR-CCM+ v12.04
import star.cosimulation.onedcoupling.*;
// or
import star.cosimulation.onedcoupling.WaveSpecies;
import star.cosimulation.onedcoupling.WaveSpeciesManager;
import star.cosimulation.common.*;
// or
import star.cosimulation.common.CoupledSpecies;
import star.cosimulation.common.CoupledSpeciesManager;

Getting a WaveSpecies replaced by getting a CoupledSpeciesComponentMap:

Previous Release Simcenter STAR-CCM+ v12.04
WaveSpecies waveSpecies_0 =
  ((WaveSpecies) waveNode_0.getWaveSpeciesManager().getObject("air"));
CoupledSpeciesComponentMap coupledSpeciesComponentMap_0 =
  coSimulation_0.getCoSimulationValues().get(CoupledSpeciesManager.class).getCoupledSpeciesComponentMap("air");

Setting a coupled species:

Previous Release Simcenter STAR-CCM+ v12.04
waveSpecies_0.setMaterialPropertiesHolder(passiveScalarMaterial_0);
coupledSpeciesComponentMap_0.setCoupledComponent(passiveScalarMaterial_0);

WaveZones Removed

WaveZone and WaveZoneManager CSO classes were replaced with CoSimulationZone and CoSimulationZoneManager.

Import line:

Previous Release Simcenter STAR-CCM+ v12.04
import star.cosimulation.onedcoupling.*;
// or
import star.cosimulation.onedcoupling.WaveZone;
import star.cosimulation.onedcoupling.WaveZoneManager;
import star.cosimulation.common.*;
// or
import star.cosimulation.common.CoSimulationZone;
import star.cosimulation.common.CoSimulationZoneManager;

Getting the WaveZone replaced by getting the CoSimulationZone:

Previous Release Simcenter STAR-CCM+ v12.04
WaveZone waveZone_0 =
  ((WaveZone) waveNode_0.getWaveZoneManager().getObject("WAVE-1"));
CoSimulationZone coSimulationZone_0 =
  coSimulation_0.getCoSimulationZoneManager().getCoSimulationZone("WAVE-1");

Coupling a boundary to a WaveZone (previous release) and to a CoSimulationZone (current release):

Previous Release Simcenter STAR-CCM+ v12.04
boundary_0.getConditions().get(OneDOption.class).setSelected(OneDOption.Type.COUPLED);
waveZone_0.getCcmBoundaryPartGroup().setQuery(null);
waveZone_0.getCcmBoundaryPartGroup().setObjects(boundary_0);
CoupledParts coupledParts_0 =
  coSimulationZone_0.getCoSimulationZoneConditions().get(CoupledParts.class);
coupledParts_0.clear();
coupledParts_0.add(boundary_0);

Uncoupling a boundary from a WaveZone (previous release) and from a CoSimulationZone (current release):

Previous Release Simcenter STAR-CCM+ v12.04
boundary_0.getConditions().get(OneDOption.class).setSelected(OneDOption.Type.UNCOUPLED);
waveZone_0.getCcmBoundaryPartGroup().setQuery(null);
waveZone_0.getCcmBoundaryPartGroup().setObjects();
coupledParts_0.erase(boundary_0);

Changes to Coupling Options

Co-simulation coupling options have been refactored, resulting in changes to the macro code.

Concurrency Option

The ConcurrencyMethodManager condition has been replaced by the CoSimulationConcurrencyOption.

Previous Release Simcenter STAR-CCM+ v12.04
// get cosimulation
StarccmplusCoSimulation starccmplusCoSimulation_0 =
    ((StarccmplusCoSimulation) simulation_0.get(CoSimulationManager.class)
                                           .getObject("STAR-CCM+ Co-Simulation 1"));

// Set this as leading cosimulation
starccmplusCoSimulation_0.getCoSimulationConditions()
                         .get(ConcurrencyMethodManager.class)
                         .setMethod(LeadMethod.class);

// Set this as lagging cosimulation
starccmplusCoSimulation_0.getCoSimulationConditions()
                         .get(ConcurrencyMethodManager.class)
                         .setMethod(LagMethod.class);
// get cosimulation
StarccmplusCoSimulation starccmplusCoSimulation_0 =
    ((StarccmplusCoSimulation) simulation_0.get(CoSimulationManager.class)
                                           .getObject("STAR-CCM+ Co-Simulation 1"));

// Set this as leading cosimulation
starccmplusCoSimulation_0.getCoSimulationConditions()
                         .get(CoSimulationConcurrencyOption.class)
                         .setSelected(CoSimulationConcurrencyOption.Type.LEAD);
                         
// Set this as lagging cosimulation
starccmplusCoSimulation_0.getCoSimulationConditions()
                         .get(CoSimulationConcurrencyOption.class)
                         .setSelected(CoSimulationConcurrencyOption.Type.LAG);

Coupling Option

The NegotiationMethodManager condition has been replaced by the CoSimulationCouplingOption.

Previous Release Simcenter STAR-CCM+ v12.04
// get cosimulation
StarccmplusCoSimulation starccmplusCoSimulation_0 =
    ((StarccmplusCoSimulation) simulation_0.get(CoSimulationManager.class)
                                           .getObject("STAR-CCM+ Co-Simulation 1"));
//--------
// Set constant coupling method
starccmplusCoSimulation_0.getCoSimulationConditions()
                         .get(NegotiationMethodManager.class)
                         .setMethod(ConstantNegotiationMethod.class);
// set constant coupling timestep value to 0.1s
((ConstantNegotiationMethod) starccmplusCoSimulation_0.getCoSimulationConditions()
                                                      .get(NegotiationMethodManager.class).getMethod())
                                                      .getConstantTimeStep()
                                                      .setValue(0.1);
//--------
// Set minimum coupling method
starccmplusCoSimulation_0.getCoSimulationConditions()
                         .get(NegotiationMethodManager.class)
                         .setMethod(MinNegotiationMethod.class);
//--------
// Set maximum coupling method
starccmplusCoSimulation_0.getCoSimulationConditions()
                         .get(NegotiationMethodManager.class)
                         .setMethod(MaxNegotiationMethod.class);
//--------
// Set import coupling method
starccmplusCoSimulation_0.getCoSimulationConditions()
                         .get(NegotiationMethodManager.class)
                         .setMethod(ImportNegotiationMethod.class);
//--------
// Set export coupling method
starccmplusCoSimulation_0.getCoSimulationConditions()
                         .get(NegotiationMethodManager.class)
                         .setMethod(ExportNegotiationMethod.class);
//--------
// Set independent coupling method
starccmplusCoSimulation_0.getCoSimulationConditions()
                         .get(NegotiationMethodManager.class)
                         .setMethod(IndependentNegotiationMethod.class);
// set independent coupling timestep value to 0.1s
((IndependentNegotiationMethod) starccmplusCoSimulation_0.getCoSimulationConditions()
                                                         .get(NegotiationMethodManager.class).getMethod())
                                                         .getConstantTimeStep()
                                                         .setValue(0.1);
// get cosimulation
StarccmplusCoSimulation starccmplusCoSimulation_0 =
    ((StarccmplusCoSimulation) simulation_0.get(CoSimulationManager.class)
                                           .getObject("STAR-CCM+ Co-Simulation 1"));
//--------
// Set constant coupling method
starccmplusCoSimulation_0.getCoSimulationConditions()
                         .get(CoSimulationCouplingOption.class)
                         .setSelected(CoSimulationCouplingOption.Type.CONSTANT);
// set constant coupling timestep value to 0.1s
starccmplusCoSimulation_0.getCoSimulationValues()
                         .get(CoSimCouplingTimeStep.class)
                         .getCouplingTimeStep()
                         .setValue(0.1);
//--------
// Set minimum coupling method
starccmplusCoSimulation_0.getCoSimulationConditions()
                         .get(CoSimulationCouplingOption.class)
                         .setSelected(CoSimulationCouplingOption.Type.MINIMUM);
//--------
// Set maximum coupling method
starccmplusCoSimulation_0.getCoSimulationConditions()
                         .get(CoSimulationCouplingOption.class)
                         .setSelected(CoSimulationCouplingOption.Type.MAXIMUM);
//--------
// Set import coupling method
starccmplusCoSimulation_0.getCoSimulationConditions()
                         .get(CoSimulationCouplingOption.class)
                         .setSelected(CoSimulationCouplingOption.Type.IMPORT);
//--------
// Set export coupling method
starccmplusCoSimulation_0.getCoSimulationConditions()
                         .get(CoSimulationCouplingOption.class)
                         .setSelected(CoSimulationCouplingOption.Type.EXPORT);
//--------
// Set independent coupling method
starccmplusCoSimulation_0.getCoSimulationConditions()
                         .get(CoSimulationCouplingOption.class)
                         .setSelected(CoSimulationCouplingOption.Type.INDEPENDENT);
// set independent coupling timestep value to 0.1s
starccmplusCoSimulation_0.getCoSimulationValues()
                         .get(CoSimCouplingTimeStep.class)
                         .getCouplingTimeStep()
                         .setValue(0.1);

Mapping Option

The MappingMethodManager condition has been replaced by the use of the pre-existing MappingMethodOption, originally only used by Abaqus co-simulations.

Previous Release Simcenter STAR-CCM+ v12.04
// get cosimulation
StarccmplusCoSimulation starccmplusCoSimulation_0 =
    ((StarccmplusCoSimulation) simulation_0.get(CoSimulationManager.class)
                                           .getObject("STAR-CCM+ Co-Simulation 1"));

// Set Map Before Export
starccmplusCoSimulation_0.getCoSimulationConditions()
                         .get(MappingMethodManager.class)
                         .setMethod(Mode1MappingMethod.class);

// Set Map After Import
starccmplusCoSimulation_0.getCoSimulationConditions()
                         .get(MappingMethodManager.class)
                         .setMethod(Mode2MappingMethod.class);

// Set Map Both Directions
starccmplusCoSimulation_0.getCoSimulationConditions()
                         .get(MappingMethodManager.class)
                         .setMethod(Mode3MappingMethod.class);

// Set Partner Maps Both Directions
starccmplusCoSimulation_0.getCoSimulationConditions()
                         .get(MappingMethodManager.class)
                         .setMethod(Mode4MappingMethod.class);
// get cosimulation
StarccmplusCoSimulation starccmplusCoSimulation_0 =
    ((StarccmplusCoSimulation) simulation_0.get(CoSimulationManager.class)
                                           .getObject("STAR-CCM+ Co-Simulation 1"));

// Set Map Before Export
starccmplusCoSimulation_0.getCoSimulationConditions()
                         .get(MappingMethodOption.class)
                         .setSelected(MappingMethodOption.Type.MAP_BEFORE_EXPORT);

// Set Map After Import
starccmplusCoSimulation_0.getCoSimulationConditions()
                         .get(MappingMethodOption.class)
                         .setSelected(MappingMethodOption.Type.MAP_AFTER_IMPORT);

// Set Map Both Directions
starccmplusCoSimulation_0.getCoSimulationConditions()
                         .get(MappingMethodOption.class)
                         .setSelected(MappingMethodOption.Type.MAP_BOTH_DIRECTIONS);

// Set Partner Maps Both Directions
starccmplusCoSimulation_0.getCoSimulationConditions()
                         .get(MappingMethodOption.class)
                         .setSelected(MappingMethodOption.Type.PARTNER_MAPS_BOTH_DIRECTIONS);