Macro API Changes 11.06

In Simcenter STAR-CCM+ 11.06, the macro API changed for electrochemistry, Eulerian multiphase, reacting flows, directed meshing, mesh deformation, client-server, tags, and meshing.

Electrochemistry: Replacement of Tafel Method Classes

Electrochemical reactions modeling has been modified to account for the consumption of multi-component gas species that are involved in reactions. In the macro code, the Combined classes in the previous version have been replaced by their corresponding Potential classes:

Tafel

Previous Release Simcenter STAR-CCM+ v11.06
TafelCombinedReactionMethod.class
TafelPotentialReactionMethod.class

Tafel Slope

Previous Release Simcenter STAR-CCM+ v11.06
TafelSlopeCombinedReactionMethod.class
TafelSlopePotentialReactionMethod.class

Transport Limited Tafel Slope

Previous Release Simcenter STAR-CCM+ v11.06
TransportLimitedTafelSlopeCombinedReactionMethod.class
TransportLimitedTafelSlopePotentialReactionMethod.class

All occurrences of the combined variant have to be replaced with the potential variant. For example:

Previous Release Simcenter STAR-CCM+ v11.06
TafelCombinedReactionMethod tafelReactionMethod =
rs0.getReactionProperties().get(ElectrochemistryReactionFormulationProperty.class).getMethodObject(TafelCombinedReactionMethod.class);
TafelPotentialReactionMethod tafelReactionMethod =
rs0.getReactionProperties().get(ElectrochemistryReactionFormulationProperty.class).getMethodObject(TafelPotentialReactionMethod.class);
NoteRemove the following statements if they are present in your Java macro:
import star.electrochemistry.electrochemicalreactions.TafelCombinedReactionMethod
import star.electrochemistry.electrochemicalreactions.TransportLimitedTafelSlopeCombinedReactionMethod
import star.electrochemistry.electrochemicalreactions.TafelSlopeCombinedReactionMethod

Eulerian Multiphase

  • The objects of the Volume of Fluid (VOF) and Two-Phase Equilibrium models have been restructured, resulting in changes to the macro code for importing:

    • For VOF, star.vof.AlphaFilmBoilingProfile has changed to star.mixturemultiphase.AlphaFilmBoilingProfile.

      To accommodate this change in your macro, you can insert an extra import statement:

      import star.mixturemultiphase.AlphaFilmBoilingProfile;
      NoteRemove import star.vof.AlphaFilmBoilingProfile if it is present in your macro.
    • For Two-Phase Equilibrium, mixturemultiphase has changed to twophaseequilibrium.

      To accommodate this change in your macro, you can insert an extra import statement:

      import star.twophaseequilibrium.AlphaFilmBoilingProfile;
    • To ensure backward compatibility, all occurrences of SegregatedVofPhaseSpeciesModel should be changed to MmpPhaseSpeciesModel, and all occurrences of VofPhaseEnergyModel should be changed to MmpPhaseEnergyModel. Examples of the changes to the macro code follow:

      Previous Release Simcenter STAR-CCM+ v11.06
      SegregatedVofPhaseSpeciesModel segregatedVofPhaseSpeciesModel_0 = 
        eulerianPhase_0.getModelManager().getModel(SegregatedVofPhaseSpeciesModel.class);
      segregatedVofPhaseSpeciesModel_0.getUpwindOption().setSelected(ConvectiveFluxOption.Type.MUSCL_3RD_ORDER);
      MmpPhaseSpeciesModel mmpPhaseSpeciesModel_0 = 
        eulerianPhase_0.getModelManager().getModel(MmpPhaseSpeciesModel.class);
      mmpPhaseSpeciesModel_0.getUpwindOption().setSelected(ConvectiveFluxOption.Type.MUSCL_3RD_ORDER);
      VofPhaseEnergyModel vofPhaseEnergyModel_0 = 
        eulerianPhase_0.getModelManager().getModel(VofPhaseEnergyModel.class);
      vofPhaseEnergyModel_0.getUpwindOption().setSelected(ConvectiveFluxOption.Type.MUSCL_3RD_ORDER);
      MmpPhaseEnergyModel mmpPhaseEnergyModel_0 = 
        eulerianPhase_0.getModelManager().getModel(MmpPhaseEnergyModel.class);
      mmpPhaseEnergyModel_0.getUpwindOption().setSelected(ConvectiveFluxOption.Type.MUSCL_3RD_ORDER);
  • Two field functions that were available with the Macro Porosity (pure thermal) model have been removed: Void Phase Source of XY and Liquid Zone Volume Change Rate.

    Macros from previous versions of Simcenter STAR-CCM+ that activate the Macro Porosity (pure thermal) model must select the Field Function method for the Solid Cell Indicator to achieve the same behavior, as shown in the following example of the new macro code:

    MacroPorosityPureThermalModel macroPorosityPureThermalModel_0 = 
        phaseInteraction_0.getModelManager().getModel(MacroPorosityPureThermalModel.class);
    SolidCellIndicatorProfile solidCellIndicatorProfile_0 = 
        ((SolidCellIndicatorProfile) macroPorosityPureThermalModel_0.getSolidCellIndicatorProfile());
    solidCellIndicatorProfile_0.setMethod(FunctionScalarProfileMethod.class);

Reacting Flows

Changes to Soot Moment Model

The Soot Moment model has been extended to work with complex chemistry, resulting in changes to the macro code.

Previous Release Simcenter STAR-CCM+ v11.06
  physicsContinuum_0.enable(SootModel.class);
     physicsContinuum_0.enable(SootMomentModel.class);
     physicsContinuum_0.enable(RadiationModel.class);
@@ -174,8 +174,8 @@ public class CoppalleFlameletMomentSoot extends Soot {
     constantMaterialPropertyMethod_0.getQuantity().setValue(0.1);
     SootMomentModel sootMomentModel_0 = 
       physicsContinuum_0.getModelManager().getModel(SootMomentModel.class);
  ppdfSootFlameletTable_0.importTable(resolveDataPath("case/sootC2H2FlameletLibrary.tbl"));
  SootMomentModelProperties sootMomentModelProperties_0 =
  sootMomentModel_0.getSootMomentModelProperties();
  physicsContinuum_0.enable(SootModel.class);
     physicsContinuum_0.enable(SootMomentTableModel.class);
     physicsContinuum_0.enable(RadiationModel.class);
@@ -174,8 +174,8 @@ public class CoppalleFlameletMomentSoot extends Soot {
     constantMaterialPropertyMethod_0.getQuantity().setValue(0.1);
     SootMomentTableModel sootMomentModel_0 = 
       physicsContinuum_0.getModelManager().getModel(SootMomentTableModel.class);
  ppdfSootFlameletTable_0.importTable(resolveDataPath("case/sootC2H2FlameletLibrary.tbl"));
  SootMomentTableModelProperties sootMomentModelProperties_0 =
  sootMomentModel_0.getSootMomentTableModelProperties();

Removal of UnburntTemperatureControlOption

The UnburntTemperatureControlOption object is no longer available. Therefore remove statements such as the following:

cfmCombustionModel_0.getUnburntTemperatureControlOption().setSelected(UnburntTemperatureControlOption.ISENTROPIC_RELATION);

New User Interface

For further details about the v11.06 changes, see New Features > Physics > CFD > Reacting Flows.

The classifications have been changed from:

PremixedCombustionFlameTypeModel
PartiallyPremixedCombustionFlameTypeModel
NonPremixedCombustionFlameTypeModel

to:

ReactingSpeciesTransportBasedModel
FlameletBasedModel

Therefore when your macro activates the Eddy Break-Up, Complex Chemistry, or Eddy Contact Micromixing model, make the following change in your macro code:

Previous Release Simcenter STAR-CCM+ v11.06
physicsContinuum_0.enable(NonPremixedCombustionFlameTypeModel.class);
physicsContinuum_0.enable(PartiallyPremixedCombustionFlameTypeModel.class);
physicsContinuum_0.enable(ReactingSpeciesTransportBasedModel.class);

When your macro activates the PPDF Equilibrium (now Chemical Equilibrium), PPDF Flamelet (now Steady Laminar Flame, or SLF), or Flamelet Generated Manifold (FGM), make the following change in your macro code:

Previous Release Simcenter STAR-CCM+ v11.06
physicsContinuum_0.enable(NonPremixedCombustionFlameTypeModel.class);
physicsContinuum_0.enable(PartiallyPremixedCombustionFlameTypeModel.class);
physicsContinuum_0.enable(FlameletBasedModel.class);

Changes to Flamelet Generation

The species order has been changed. The new species list is sorted alphanumerically.

Previous Release Simcenter STAR-CCM+ v11.06
MassFractionProfile massFractionProfile_2 = boundary_1.getValues().get(MassFractionProfile.class);
((ConstantArrayProfileMethod) massFractionProfile_2.getMethod()).getQuantity().setArray(new DoubleVector(new double[] {0.667, 0.0, 0.0,  0.0, 0.0, 0.0, 0.0,  0.0, 0.0,0.0, 0.333}));
MassFractionProfile massFractionProfile_2 = boundary_1.getValues().get(MassFractionProfile.class);
((ConstantArrayProfileMethod) massFractionProfile_2.getMethod()).getQuantity().setArray(new DoubleVector(new double[] {0.333, 0.0, 0.0,  0.0, 0.0, 0.0, 0.0,  0.0, 0.667,0.0, 0}));

The name of the Third Body Coefficient object has changed.

Previous Release Simcenter STAR-CCM+ v11.06
ThirdBodyCoefficient thirdBodyCoefficient_0 = reaction_0.getReactionProperties().get(ThirdBodyCoefficients.class).addThirdBodyCoefficient(CH4);
thirdBodyCoefficient_0.setValue(1.0);
ThirdBodyCoefficientMixtureComponent thirdBodyCoefficient_0 = reaction_0.getReactionProperties().get(ThirdBodyCoefficients.class).addThirdBodyCoefficient(CH4);
thirdBodyCoefficient_0.setValue(1.0);

Enabling the Thermal NOx model: previous models are now obsolete and there is only one Nox model that models thermal nox, Nox Zeldovich (NoxThreeEquationZeldovichModel).

Previous Release Simcenter STAR-CCM+ v11.06
physicsContinuum_0.enable(ThermalNoxModel.class);
physicsContinuum_0.enable(NoxPpdfEquilibriumModel.class);
physicsContinuum_0.enable(EmissionsPpdfCombustionModel.class);
physicsContinuum_0.enable(ThermalNoxModel.class);
physicsContinuum_0.enable(NoxThreeEquationZeldovichModel.class);

Chemical Equilibrium

For the Chemical Equilibrium model, you do not need to set the default material database.

Previous Release Simcenter STAR-CCM+ v11.06
PpdfFlameletTable ppdfFlameletTable_0 =
((PpdfFlameletTable) ppdfFlameletModel_0.getPpdfFlameletTable());
 ppdfFlameletTable_0.setDefaultMdb(materialDataBase_0);
PpdfTableAxis ppdfTableAxis_0 =((PpdfTableAxis) ((PpdfTableAxisManager) ppdfFlameletTable_0.getPpdfTableAxisManager()).getComponent("Mixture Fraction 0"));
ppdfTableAxis_0.setDimensionSize(20);
PpdfFlameletTable ppdfFlameletTable_0 =
((PpdfFlameletTable) ppdfFlameletModel_0.getPpdfFlameletTable());

PpdfTableAxis ppdfTableAxis_0 =((PpdfTableAxis) ((PpdfTableAxisManager) ppdfFlameletTable_0.getPpdfTableAxisManager()).getComponent("Mixture Fraction 0"));
ppdfTableAxis_0.setDimensionSize(20);

For the Chemical Equilibrium model, the equilibrium algorithm selection is automated.

Previous Release Simcenter STAR-CCM+ v11.06
 PpdfEquilibriumTable ppdfEquilibriumTable_0 =((PpdfEquilibriumTable) ppdfEquilibriumModel_0.getPpdfEquilibriumTable());
ppdfEquilibriumTable_0.getAlgorithmTypeOption().setSelected(PpdfEquilibriumAlgorithmType.DARS);
ppdfEquilibriumTable_0.setDeleteNonExistSpecEntries(true);
ppdfEquilibriumTable_0.setNumExtra(11);
 PpdfEquilibriumTable ppdfEquilibriumTable_0 =((PpdfEquilibriumTable) ppdfEquilibriumModel_0.getPpdfEquilibriumTable());

ppdfEquilibriumTable_0.setNumExtra(11);

The following example shows the specification of species for Chemical Equilibrium.

Previous Release Simcenter STAR-CCM+ v11.06
MultiComponentGasModel multiComponentGasModel_0 =((MultiComponentGasModel)  physicsContinuum_0.getModelManager().getModel(MultiComponentGasModel.class));
MixtureComponent CH4 = createMixtureComponent(multiComponentGasModel_0, "CH4");
MixtureComponent O2 = createMixtureComponent(multiComponentGasModel_0, "O2");
MixtureComponent N2 = createMixtureComponent(multiComponentGasModel_0, "N2");
EquilibriumTableGenerator equilibriumTableGenerator_0 =physicsContinuum_0.get(EquilibriumTableGenerator.class);
TableChemistryDefinition tableChemistryDefinition_0 =
((TableChemistryDefinition) equilibriumTableGenerator_0.getTableChemistryDefinition());
MaterialDataBase materialDataBase_0 = simulation_0.get(MaterialDataBaseManager.class).getMaterialDataBase("props");
DataBaseMaterialManager dataBaseMaterialManager_0 =materialDataBase_0.getFolder("Gases");
DataBaseGas dataBaseGas_0 =((DataBaseGas) dataBaseMaterialManager_0.getMaterial("N2_Gas"));
tableChemistryDefinition_0.addComponents(new NeoObjectVector(new Object[] {dataBaseGas_0}));

Tables

When generating or using flamelets, include tablegenerator and ppdftable packages.

Previous Release Simcenter STAR-CCM+ v11.06
import star.combustion.*;

import star.common.*;
import star.combustion.*;
import star.combustion.ppdftable.*;
import star.combustion.tablegenerators.*;
import star.common.*;

The object constructTable has been renamed to constructFlameletTable.

Previous Release Simcenter STAR-CCM+ v11.06
PpdfFlameletModel ppdfFlameletModel_0 = ((PpdfFlameletModel) physicsContinuum_0.getModelManager().getModel(PpdfFlameletModel.class));
PpdfFlameletTable ppdfFlameletTable_ = ((PpdfFlameletTable) ppdfFlameletModel_0.getPpdfFlameletTable());
ppdfFlameletTable_0.constructTable(new StringVector(new String[]{resolvePath(path + "flamelet01.lib01"), resolvePath(path + "flamelet02.lib01"), resolvePath(path + "flamelet03.lib01")}));
PpdfFlameletModel ppdfFlameletModel_0 = ((PpdfFlameletModel) physicsContinuum_0.getModelManager().getModel(PpdfFlameletModel.class));
PpdfFlameletTable ppdfFlameletTable_ = ((PpdfFlameletTable) ppdfFlameletModel_0.getPpdfFlameletTable());
ppdfFlameletTable_0.constructFlameletTable(new StringVector(new String[]{resolvePath(path + "flamelet01.lib01"), resolvePath(path + "flamelet02.lib01"), resolvePath(path + "flamelet03.lib01")}));

Fluid Streams

The Thickened Flame Model (TFM) requires additional commands for fluid streams.

Previous Release Simcenter STAR-CCM+ v11.06
physicsContinuum_0.get(FluidStreamManager.class).createFluidStream();
FluidStream fluidStream_0 = ((FluidStream)fluidStreamManager.getFluidStream("Fluid Stream 1"));
fluidStream_0.getTemperature().setValue(314.0);
TfmCombustionModel tfmCombustionModel_0 =((TfmCombustionModel) physicsContinuum_0.getModelManager().getModel(TfmCombustionModel.class));
FluidStreamManager fluidStreamManager = tfmCombustionModel_0.getFluidStreamManager();
fluidStreamManager.createFluidStream();
 FluidStream fluidStream_0 = ((FluidStream)fluidStreamManager.getFluidStream("Fluid Stream 1"));
fluidStream_0.getTemperature().setValue(314.0);

Fluid stream objects are now accessed through the EquilibriumTableGenerator, FlameletTableGenerator and FGMTableGenerator objects. The following example shows the specification of stream temperature:

Previous Release Simcenter STAR-CCM+ v11.06
FluidStream fluidStream_0 =((FluidStream) physicsContinuum_0.get(FluidStreamManager.class).getFluidStream("Fuel Stream"));
fluidStream_0.getTemperature().setValue(314.0);
EquilibriumTableGenerator equilibriumTableGenerator_0 =physicsContinuum_0.get(EquilibriumTableGenerator.class);
TableFluidStreamCollection tableFluidStreams_0 =((TableFluidStreamCollection) equilibriumTableGenerator_0.getTableFluidStreamCollection());
TableFluidStream tableFluidStream_1 =((TableFluidStream) tableFluidStreams_0.getFuelStream());
tableFluidStream_1.getTemperature().setValue(314.0);

The following example of fluid stream objects shows the specification of stream compositions:

Previous Release Simcenter STAR-CCM+ v11.06
FluidStreamManager fsm = ((FluidStreamManager) physicsContinuum_0.get(FluidStreamManager.class));
MultiComponentGasModel multiComponentGasModel_0 =((MultiComponentGasModel) physicsContinuum_0.getModelManager().getModel(MultiComponentGasModel.class));
GasMixture gasMixture_0 =((GasMixture) multiComponentGasModel_0.getMixture());
GasComponent N2 =(GasComponent) gasMixture_0.getComponents().getComponent("N2");
FluidStream str2 = fsm.getFluidStream("Oxidizer Stream");
FluidStreamComponent oxidizerO2 = str2.getFluidStreamComponentManager().addFluidStreamComponent(O2);
oxidizerO2.setMassFraction(0.233);
EquilibriumTableGenerator equilibriumTableGenerator_0 =	physicsContinuum_0.get(EquilibriumTableGenerator.class);
TableFluidStreamCollection tableFluidStreams_0 =((TableFluidStreamCollection) equilibriumTableGenerator_0.getTableFluidStreamCollection());
TableFluidStream tableFluidStream_1 =((TableFluidStream) tableFluidStreams_0.getiOxidizerStream());
tableFluidStream_1.getFluidStreamComposition().setArray(new DoubleVector(new double[] {0.0, 0.233, 0.0, 0.0, 0.0, 0.0, 0.767,, 0.0}));

Setting the fluid stream for the Soot Two-Equation model:

Previous Release Simcenter STAR-CCM+ v11.06
FluidStreamManager fsm = ((FluidStreamManager) physicsContinuum_0.get(FluidStreamManager.class));

 FluidStream str1 = fsm.getFluidStream("Fuel Stream");
SootTwoEquationModel sootTwoEquationModel_0 =
((SootTwoEquationModel)  physicsContinuum_0.getModelManager().getModel(SootTwoEquationModel.class));
FluidStreamManager fsm = sootTwoEquationModel_0.getFluidStreamManager();
 FluidStream str1 = fsm.getFluidStream("Fuel Stream");

Inert Stream manipulation:

Previous Release Simcenter STAR-CCM+ v11.06
FluidStream fluidStream_0 =((FluidStream) physicsContinuum_0.get(FluidStreamManager.class).getFluidStream("Inert Stream "));
InertStreamModel inertStreamModel_0 =((InertStreamModel) physicsContinuum_0.getModelManager().getModel(InertStreamModel.class));
FluidStreamManager fsm = inertStreamModel_0.getFluidStreamManager();
FluidStream fluidStream_0 =((FluidStream) fsm.getFluidStream("Inert Stream "));

Changes to Thickened Flame Model

Previous Release Simcenter STAR-CCM+ v11.06
physicsContinuum_0.enable(NonPremixedCombustionFlameTypeModel.class);
  physicsContinuum_0.enable(TfmNotPremixedCombustionModel.class);
physicsContinuum_0.enable(ReactingSpeciesTransportBasedModel.class);
  physicsContinuum_0.enable(TfmCombustionModel.class);
physicsContinuum_0.enable(PremixedCombustionFlameTypeModel.class);
  physicsContinuum_0.enable(TfmPremixedCombustionModel.class);
physicsContinuum_0.enable(ReactingSpeciesTransportBasedModel.class);
  physicsContinuum_0.enable(TfmCombustionModel.class);

Time-Step Control: Renaming of Solvers

The Time-Step Control solvers have been renamed, resulting in changes to the macro code.

Convective CFL Time-Step Control

Previous Release Simcenter STAR-CCM+ v11.06
ConvectiveCflTimeStepControlSolver convectiveCflTimeStepControlSolver = ((ConvectiveCflTimeStepControlSolver) ((TimeStepControlSubSolverManager) timeStepControlSolver.getTimeStepControlSubSolverManager()).getSolver("Convective CFL Time Step Control"));
ConvectiveCflTimeStepControlSolver convectiveCflTimeStepControlSolver = ((ConvectiveCflTimeStepControlSolver) ((TimeStepControlSubSolverManager) timeStepControlSolver.getTimeStepControlSubSolverManager()).getSolver("Convective CFL Time-Step Control"));

Energy-Based Time-Step Control

Previous Release Simcenter STAR-CCM+ v11.06
((EnergyBasedTimeStepControlSolver) ((TimeStepControlSubSolverManager) timeStepControlSolver.getTimeStepControlSubSolverManager()).getSolver("Energy Based Time Step Control"));
((EnergyBasedTimeStepControlSolver) ((TimeStepControlSubSolverManager) timeStepControlSolver.getTimeStepControlSubSolverManager()).getSolver("Energy-Based Time-Step Control"));

The following code example is for the Convective CFL Time-Step Control solver:

Previous Release Simcenter STAR-CCM+ v11.06
TimeStepControlSolver timeStepControlSolver = ((TimeStepControlSolver)getSimulation().getSolverManager().getSolver(TimeStepControlSolver.class));
timeStepControlSolver.getMinTimeStep().setValue(0.0005);
timeStepControlSolver.setVerbose(true);

ConvectiveCflTimeStepControlSolver convectiveCflTimeStepControlSolver = ((ConvectiveCflTimeStepControlSolver) ((TimeStepControlSubSolverManager) timeStepControlSolver.getTimeStepControlSubSolverManager()).getSolver("Convective CFL Time Step Control"));
convectiveCflTimeStepControlSolver.getTargetMeanCfl().setValue(1.0);
convectiveCflTimeStepControlSolver.getTargetMaxCfl().setValue(1.5);
TimeStepControlSolver timeStepControlSolver = ((TimeStepControlSolver)getSimulation().getSolverManager().getSolver(TimeStepControlSolver.class));
timeStepControlSolver.getMinTimeStep().setValue(0.0005);
timeStepControlSolver.setVerbose(true);

ConvectiveCflTimeStepControlSolver convectiveCflTimeStepControlSolver = ((ConvectiveCflTimeStepControlSolver) ((TimeStepControlSubSolverManager) timeStepControlSolver.getTimeStepControlSubSolverManager()).getSolver("Convective CFL Time-Step Control"));
convectiveCflTimeStepControlSolver.getTargetMeanCfl().setValue(1.0);
convectiveCflTimeStepControlSolver.getTargetMaxCfl().setValue(1.5);

Directed Meshing: Changes to Definitions of Closed-Loop Part Collections

In closed-loop part collections, for example toroidal geometry with multiple parts, the technique for defining the source mesh has changed to ensure accuracy. If you use a simulation file or a Java macro from a previous version and notice inconsistency in the mesh definition, consider recording a new macro.

Mesh Deformation: Change from Control Points to Point Sets

For mesh deformation, point sets have replaced control points. Unlike control points, point sets are not linked to regions. The following examples show the types of changes to the macro code.

Create Each Type of Control Point/Point Set

Previous Release Simcenter STAR-CCM+ v11.06
Simulation simulation_0 =
      getActiveSimulation();
ControlPointRegion controlPointRegion_0 =
      simulation_0.get(ControlPointRegionManager.class).createLatticeControlPoint("Lattice Control Points", new DoubleVector(new double[] {1.5, 2.4843961000442505E-5, 0.49999989196658134}), new DoubleVector(new double[] {3.0, 0.1973467841744423, 1.1979536786675453}), new DoubleVector(new double[] {0.0, 0.0, 1.0}), 0.0, 2, 2, 2);
ControlPointRegion controlPointRegion_1 =
      simulation_0.get(ControlPointRegionManager.class).createLineControlPoint("Line Control Points", new DoubleVector(new double[] {0.0, 0.0, 0.0}), new DoubleVector(new double[] {1.0, 0.0, 0.0}), 20);
Region region_0 =
      simulation_0.getRegionManager().getRegion("Region");
Boundary boundary_0 =
      region_0.getBoundaryManager().getBoundary("Wall");
FvRepresentation fvRepresentation_0 =
      ((FvRepresentation) simulation_0.getRepresentationManager().getObject("Volume Mesh"));
ControlPointRegion controlPointRegion_2 =
      simulation_0.get(ControlPointRegionManager.class).createPartControlPoint("Part Control Points", new NeoObjectVector(new Object[] {boundary_0}), 0.1, 1000, false, 0.0, fvRepresentation_0);
Table cpTable_0 =
  simulation_0.getTableManager().getTable("ControlPoints");
ControlPointRegion controlPointRegion_4 =         
simulation_0.get(ControlPointRegionManager.class).createTableControlPoint("Table Control Points", cpTable_0, "X", "Y", "Z");
Simulation simulation_0 =
      getActiveSimulation();
PointSet pointSet_0 =
      simulation_0.get(PointSetManager.class).createLatticePointSet("Lattice Control Points", new DoubleVector(new double[] {1.5, 2.4843961000442505E-5, 0.49999989196658134}), new DoubleVector(new double[] {3.0, 0.1973467841744423, 1.1979536786675453}), new DoubleVector(new double[] {0.0, 0.0, 1.0}), 0.0, 2, 2, 2);
PointSet pointSet_1 =
      simulation_0.get(PointSetManager.class).createLinePointSet("Line Control Points", new DoubleVector(new double[] {0.0, 0.0, 0.0}), new DoubleVector(new double[] {1.0, 0.0, 0.0}), 20);
Region region_0 =
      simulation_0.getRegionManager().getRegion("Region");
Boundary boundary_0 =
      region_0.getBoundaryManager().getBoundary("Wall");
FvRepresentation fvRepresentation_0 =
      ((FvRepresentation) simulation_0.getRepresentationManager().getObject("Volume Mesh"));
PointSet pointSet_2 =
      simulation_0.get(PointSetManager.class).createPartPointSet("Part Control Points", new NeoObjectVector(new Object[] {boundary_0}), 0.1, 1000, false, 0.0, fvRepresentation_0);
Table cpTable_0 =
  simulation_0.getTableManager().getTable("ControlPoints");
PointSet pointSet_3 =
      simulation_0.get(PointSetManager.class).createTablePointSet("Table Control Points", cpTable_0, "X", "Y", "Z");

Edit Lattice Point Generator

Previous Release Simcenter STAR-CCM+ v11.06
ControlPointRegion controlPointRegion_0 =
    ((ControlPointRegion) simulation_0.get(ControlPointRegionManager.class).getObject("Lattice Control Point Region"));
LatticePointGenerator latticePointGenerator_0 =
    ((LatticePointGenerator) controlPointRegion_0.getPointGenerator());
latticePointGenerator_0.setNumberX(5);
latticePointGenerator_0.regenerateControlPoints();
PointSet pointSet_0 =
      ((PointSet) simulation_0.get(PointSetManager.class).getObject("Lattice Point Set"));
LatticePointGenerator latticePointGenerator_0 =
      ((LatticePointGenerator) pointSet_0.getPointGenerator());
latticePointGenerator_0.setNumberX(5);
latticePointGenerator_0.regeneratePointSet();

Edit Line Point Generator

Previous Release Simcenter STAR-CCM+ v11.06
ControlPointRegion controlPointRegion_1 =
      ((ControlPointRegion) simulation_0.get(ControlPointRegionManager.class).getObject("Line Control Point Region"));
LinePointGenerator linePointGenerator_0 =
      ((LinePointGenerator) controlPointRegion_1.getPointGenerator());
linePointGenerator_0.setNumber(50);
linePointGenerator_0.regenerateControlPoints();
PointSet pointSet_1 =
      ((PointSet) simulation_0.get(PointSetManager.class).getObject("Line Point Set"));
LinePointGenerator linePointGenerator_0 =
      ((LinePointGenerator) pointSet_1.getPointGenerator());
linePointGenerator_0.setNumber(50);
linePointGenerator_0.regeneratePointSet();

Edit Part Point Generator

Previous Release Simcenter STAR-CCM+ v11.06
ControlPointRegion controlPointRegion_2 =
      ((ControlPointRegion) simulation_0.get(ControlPointRegionManager.class).getObject("Part Control Point Region"));
PartPointGenerator partPointGenerator_0 =
      ((PartPointGenerator) controlPointRegion_2.getPointGenerator());
partPointGenerator_0.getSize().setValue(0.5);
partPointGenerator_0.regenerateControlPoints();
PointSet pointSet_2 = ((PointSet) simulation_0.get(PointSetManager.class).getObject("Part Point Set"));
PartPointGenerator partPointGenerator_0 =
     ((PartPointGenerator) pointSet_2.getPointGenerator());
partPointGenerator_0.getSize().setValue(0.5);
partPointGenerator_0.regeneratePointSet();

Edit Table Point Generator

Previous Release Simcenter STAR-CCM+ v11.06
ControlPointRegion controlPointRegion_3 =
      ((ControlPointRegion) simulation_0.get(ControlPointRegionManager.class).getObject("Table Control Point Region"));
TablePointGenerator tablePointGenerator_0 =
      ((TablePointGenerator) controlPointRegion_3.getPointGenerator());
Table newTable_0 =
     simulation_0.getTableManager().getTable("NewControlPoints"));
tablePointGenerator_0.setTable(newTable_0);
tablePointGenerator_0.regenerateControlPoints();
PointSet pointSet_3 = ((PointSet) simulation_0.get(PointSetManager.class).getObject("Table Point Set"));
TablePointGenerator tablePointGenerator_0 =
      ((TablePointGenerator) pointSet_3.getPointGenerator());
Table newTable_0 =
     simulation_0.getTableManager().getTable("NewControlPoints"));
tablePointGenerator_0.setTable(newTable_0);
tablePointGenerator_0.regeneratePointSet();

Activate/Deactivate

Previous Release Simcenter STAR-CCM+ v11.06
ControlPointRegion controlPointRegion_3 =
      ((ControlPointRegion) simulation_0.get(ControlPointRegionManager.class).getObject("Table Control Point Region"));
controlPointRegion_3.setIsActive(false); //Deactivate
controlPointRegion_3.setIsActive(true); //Activate
PhysicsContinuum physicsContinuum_0 =
      ((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum("Physics 1"));
PointSet pointSet_3 =
      ((PointSet) simulation_0.get(PointSetManager.class).getObject("Table Point Set"));
physicsContinuum_0.erase(pointSet_3); //Deactivate by removing from continuum
physicsContinuum_0.add(pointSet_3); // Activate by adding to continuum

Tags: Custom Icons No Longer Supported

With the extension of the tags feature to most simulation objects, the customization of the tag node icon is no longer available. Therefore the getCustomizableIcon() function in star.common.UserTag has been deprecated. Remove the use of this function from your macros.

Client-Server: Changes to StarCommandParser API

The StarCommandParser is used to parse and modify an instance of a command line used to start the Simcenter STAR-CCM+ server. Previously the API permitted you to modify the internal container that the StarCommandParser uses. In the current version of Simcenter STAR-CCM+, changes to the API prevent you from directly modifying the internal data; however you may still modify the command that the StarCommandParser manages.

Instantiating the Command Parser

The StarCommandParser is instantiated in the same way:

StarCommandParser cmdParser = new StarCommandParser("starccm+ -server");

Adding a Single Option

The command

cmdParser.addLast("-cpubind");

has been deprecated. Use the existing alternative:

cmdParser.addOption("-cpubind");

Adding an Option and a Value

The following statement

cmdParser.addLast("-licpath");
cmdParser.addLast("/my/license/path");

has been replaced with the existing alternative:

cmdParser.addOptionAndValue("-licpath","/my/license/path");

Query Option

The command

cmdParser.indexOf("-cpubind");

can be replaced with

cmdParser.hasOption("-cpubind");

Removing a Single Option

The statement

int idx = cmdParser.indexOf("-cpubind");
if ( idx != -1 ) cmdParser.remove(idx);

can be replaced with

cmdParser.remove("-cpubind");

Removing an Option and a Value

To remove the first instance of -licpath <value> from the command line, the statement

int idx = cmdParser.indexOf("-licpath");
if ( idx != -1 ) {
  cmdParser.remove(idx);
  cmdParser.remove(idx);
}

can be replaced with

if ( cmdParser.hasOption("-licpath") ) {
  cmdParser.remove("-licpath", cmdParser.getArg("-licpath"));
}

To remove all instances of -licpath <value> from the command line:

cmdParser.removeAll("-licpath");

Replacing an Option

The statement

int idx = cmdParser.indexOf("-licpath");
if ( idx != -1 ) {
  cmdParser.set(idx+1, "/a/different/license/path");
}

can be replaced with

cmdParser.replaceOptionAndValue("-licpath", "/a/different/license/path");

Meshing: Changes to Surface Preparation Macros

The Java macros produced when launching surface repair and wrapper leak detection have been shortened by removing unnecessary commands and introducing new commands where appropriate. The end result is that these macros are easier to read and modify while still maintaining functionality for older macros.

NoteMacros that worked in the previous version of Simcenter STAR-CCM+ are still supported.

A summary of the changes for each tool is provided below.

Surface Repair Launch Macro Changes

The following new command has been introduced:

partSurfaceMeshWidget_0.startSurfaceRepairControllers();

The above command replaces the following commands:

partSurfaceMeshWidget_0.startSurfaceMeshDiagnostics();
partSurfaceMeshWidget_0.startSurfaceMeshRepair();
partSurfaceMeshWidget_0.startMergeImprintController();
partSurfaceMeshWidget_0.startIntersectController();
partSurfaceMeshWidget_0.startLeakFinderController();
partSurfaceMeshWidget_0.startSurfaceMeshQueryController();

The following commands are no longer included in the macro for launching surface repair:

Removal of Feature Diagnostics Default Display State (Reason: Now Done on Server)

SurfaceMeshWidgetDiagnosticsController surfaceMeshWidgetDiagnosticsController_0 = partSurfaceMeshWidget_0.getControllers().getController(SurfaceMeshWidgetDiagnosticsController.class);
surfaceMeshWidgetDiagnosticsController_0.setSoftFeatureErrorsActive(true);
surfaceMeshWidgetDiagnosticsController_0.setHardFeatureErrorsActive(true);

See also Macro Changes Common to Both Tools.

Wrapper Leak Detection Launch Macro Changes

The following new command has been introduced:

partSurfaceMeshWidget_0.startWrapperLeakDetectionControllers();

The above command replaces the following commands:

partSurfaceMeshWidget_0.startSurfaceMeshRepair();
partSurfaceMeshWidget_0.startMergeImprintController();
partSurfaceMeshWidget_0.startLeakFinderController();
partSurfaceMeshWidget_0.startSurfaceMeshDiagnostics();

The following commands are no longer included in the macro for launching wrapper leak detection:

Removal of Mesh Override Mode (Reason: Duplicate)

scene_0.setMeshOverrideMode(2);

Removal of Disabling of Default Diagnostics (Reason: Now Done Silently via the setCheckAll() Command)

PiercedFacesThreshold piercedFacesThreshold_0 = 
      ((PiercedFacesThreshold) surfaceMeshWidgetDiagnosticsController_0.getOptions().getThresholdDiagnosticsManager().getObject("Pierced faces (default) 1"));
piercedFacesThreshold_0.setIsEnabled(false);
FaceQualityThreshold faceQualityThreshold_0 = 
      ((FaceQualityThreshold) surfaceMeshWidgetDiagnosticsController_0.getOptions().getThresholdDiagnosticsManager().getObject("Face quality (default) 1"));
faceQualityThreshold_0.setIsEnabled(false);
FaceProximityThreshold faceProximityThreshold_0 = 
      ((FaceProximityThreshold) surfaceMeshWidgetDiagnosticsController_0.getOptions().getThresholdDiagnosticsManager().getObject("Face proximity (default) 1"));
faceProximityThreshold_0.setIsEnabled(false);
FreeEdgesThreshold freeEdgesThreshold_0 = 
      ((FreeEdgesThreshold) surfaceMeshWidgetDiagnosticsController_0.getOptions().getThresholdDiagnosticsManager().getObject("Free edges (default) 1"));
freeEdgesThreshold_0.setIsEnabled(false);
NonManifoldEdgesThreshold nonManifoldEdgesThreshold_0 = 
      ((NonManifoldEdgesThreshold) surfaceMeshWidgetDiagnosticsController_0.getOptions().getThresholdDiagnosticsManager().getObject("Non-manifold edges (default) 1"));
nonManifoldEdgesThreshold_0.setIsEnabled(false);
NonManifoldVerticesThreshold nonManifoldVerticesThreshold_0 = 
      ((NonManifoldVerticesThreshold) surfaceMeshWidgetDiagnosticsController_0.getOptions().getThresholdDiagnosticsManager().getObject("Non-manifold vertices (default) 1"));
nonManifoldVerticesThreshold_0.setIsEnabled(false);
NoteThe setCheckAll() command now disables all diagnostics, not just the default ones.

Macro Changes Common to Both Tools

Removal of Units Objects (Reason: Not Used)

Units units_0 = simulation_0.getUnitsManager().getPreferredUnits(new IntVector(new int[]{0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}));
Units units_1 = simulation_0.getUnitsManager().getPreferredUnits(new IntVector(new int[]{0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}));

Removal of Displayer Initialization (Reason: Has No Effect)

SurfaceMeshWidgetDisplayer surfaceMeshWidgetDisplayer_0 = ((SurfaceMeshWidgetDisplayer)scene_0.getDisplayerManager().getDisplayer("Widget displayer 1"));
surfaceMeshWidgetDisplayer_0.initialize();