In
Simcenter STAR-CCM+ 10.06, the macro API changed for units, shell thickness, simple shape parts, combustion, material properties, turbulence, and heat transfer.
Units: Replacement of Special Character
The special character for Angstroms,
Å, has been replaced with
Ang in the
Simcenter STAR-CCM+ interface, resulting in changes to the macro code.
Previous Release
|
Simcenter STAR-CCM+ v10.06
|
Simulation simulation_0 = getActiveSimulation();
MaxReport maxReport_0 = ((MaxReport) simulation_0.getReportManager().getReport("Maximum 1"));
Units units_0 = ((Units) simulation_0.getUnitsManager().getObject("\u212B"));
maxReport_0.setUnits(units_0);
|
Simulation simulation_0 = getActiveSimulation();
MaxReport maxReport_0 = ((MaxReport) simulation_0.getReportManager().getReport("Maximum 1"));
Units units_0 = ((Units) simulation_0.getUnitsManager().getObject("Ang"));
maxReport_0.setUnits(units_0);
|
Change for Shell Thickness
The way in which
Simcenter STAR-CCM+ handles shell thickness has changed. Modify your existing macros accordingly.
Previous Release
|
Simcenter STAR-CCM+ v10.06
|
PrimitiveFieldFunction primitiveFieldFunction_0 =
((PrimitiveFieldFunction) simulation_0.getFieldFunctionManager().getFunction("ShellThickness"));
|
PrimitiveFieldFunction primitiveFieldFunction_0 =
((PrimitiveFieldFunction) simulation_0.getFieldFunctionManager().getFunction("SolidShellThickness"));
|
Changes for Simple Shape Parts
The macro code for simple shape parts has changed.
Examples of macro steps follow for a block part, a cone, a cylinder, and a sphere.
Block Part
Previous Release
|
Simcenter STAR-CCM+ v10.06
|
SimpleBlockPart simpleBlockPart_0 =
meshPartFactory_0.createNewBlockPart(simulation_0.get(SimulationPartManager.class));
simpleBlockPart_0.setDoNotRetessellate(true);
LabCoordinateSystem labCoordinateSystem_0 =
simulation_0.getCoordinateSystemManager().getLabCoordinateSystem();
simpleBlockPart_0.setCoordinateSystem(labCoordinateSystem_0);
Coordinate coordinate_0 =
simpleBlockPart_0.getCorner1();
coordinate_0.setCoordinateSystem(labCoordinateSystem_0);
coordinate_0.setCoordinate(units_0, units_0, units_0, new DoubleVector(new double[] {-1.0, -1.0, -1.0}));
coordinate_0.setValue(new DoubleVector(new double[] {0.0, 0.0, 4.0}));
Coordinate coordinate_1 =
simpleBlockPart_0.getCorner2();
coordinate_1.setCoordinateSystem(labCoordinateSystem_0);
coordinate_1.setCoordinate(units_0, units_0, units_0, new DoubleVector(new double[] {1.0, 1.0, 1.0}));
coordinate_1.setValue(new DoubleVector(new double[] {1.0, 1.0, 5.0}));
simpleBlockPart_0.rebuildSimpleShapePart();
simpleBlockPart_0.setDoNotRetessellate(false);
|
SimpleBlockPart simpleBlockPart_0 =
meshPartFactory_0.createNewBlockPart(simulation_0.get(SimulationPartManager.class));
simpleBlockPart_0.setDoNotRetessellate(true);
LabCoordinateSystem labCoordinateSystem_0 =
simulation_0.getCoordinateSystemManager().getLabCoordinateSystem();
simpleBlockPart_0.setCoordinateSystem(labCoordinateSystem_0);
Coordinate coordinate_0 =
simpleBlockPart_0.getCorner1();
coordinate_0.setCoordinateSystem(labCoordinateSystem_0);
coordinate_0.setCoordinate(units_0, units_0, units_0, new DoubleVector(new double[] {0.0, 0.0, 4.0}));
Coordinate coordinate_1 =
simpleBlockPart_0.getCorner2();
coordinate_1.setCoordinateSystem(labCoordinateSystem_0);
coordinate_1.setCoordinate(units_0, units_0, units_0, new DoubleVector(new double[] {1.0, 1.0, 5.0}));
simpleBlockPart_0.rebuildSimpleShapePart();
simpleBlockPart_0.setDoNotRetessellate(false);
|
Cone
Previous Release
|
Simcenter STAR-CCM+ v10.06
|
SimpleConePart simpleConePart_0 =
meshPartFactory_0.createNewConePart(simulation_0.get(SimulationPartManager.class));
simpleConePart_0.setDoNotRetessellate(true);
simpleConePart_0.setCoordinateSystem(labCoordinateSystem_0);
Coordinate coordinate_2 =
simpleConePart_0.getStartCoordinate();
coordinate_2.setCoordinateSystem(labCoordinateSystem_0);
coordinate_2.setCoordinate(units_0, units_0, units_0, new DoubleVector(new double[] {0.0, 0.0, 1.0}));
coordinate_2.setValue(new DoubleVector(new double[] {0.0, 0.0, 3.0}));
simpleConePart_0.getStartRadius().setUnits(units_0);
simpleConePart_0.getStartRadius().setValue(1.0);
Coordinate coordinate_3 =
simpleConePart_0.getEndCoordinate();
coordinate_3.setCoordinateSystem(labCoordinateSystem_0);
coordinate_3.setCoordinate(units_0, units_0, units_0, new DoubleVector(new double[] {0.0, 0.0, 0.0}));
coordinate_3.setValue(new DoubleVector(new double[] {0.0, 0.0, 4.0}));
simpleConePart_0.getEndRadius().setUnits(units_0);
simpleConePart_0.getEndRadius().setValue(1.0);
simpleConePart_0.getTessellationDensityOption().setSelected(TessellationDensityOption.MEDIUM);
simpleConePart_0.rebuildSimpleShapePart();
simpleConePart_0.setDoNotRetessellate(false);
|
SimpleConePart simpleConePart_0 =
meshPartFactory_0.createNewConePart(simulation_0.get(SimulationPartManager.class));
simpleConePart_0.setDoNotRetessellate(true);
simpleConePart_0.setCoordinateSystem(labCoordinateSystem_0);
Coordinate coordinate_0 =
simpleConePart_0.getStartCoordinate();
coordinate_0.setCoordinateSystem(labCoordinateSystem_0);
coordinate_0.setCoordinate(units_0, units_0, units_0, new DoubleVector(new double[] {0.0, 0.0, 3.0}));
simpleConePart_0.getStartRadius().setUnits(units_0);
simpleConePart_0.getStartRadius().setValue(1.0);
Coordinate coordinate_1 =
simpleConePart_0.getEndCoordinate();
coordinate_1.setCoordinateSystem(labCoordinateSystem_0);
coordinate_1.setCoordinate(units_0, units_0, units_0, new DoubleVector(new double[] {0.0, 0.0, 4.0}));
simpleConePart_0.getEndRadius().setUnits(units_0);
simpleConePart_0.getEndRadius().setValue(1.0);
simpleConePart_0.getTessellationDensityOption().setSelected(TessellationDensityOption.Type.MEDIUM);
simpleConePart_0.rebuildSimpleShapePart();
simpleConePart_0.setDoNotRetessellate(false);
|
Cylinder
Previous Release
|
Simcenter STAR-CCM+ v10.06
|
SimpleCylinderPart simpleCylinderPart_0 =
meshPartFactory_0.createNewCylinderPart(simulation_0.get(SimulationPartManager.class));
simpleCylinderPart_0.setDoNotRetessellate(true);
simpleCylinderPart_0.setCoordinateSystem(labCoordinateSystem_0);
Coordinate coordinate_4 =
simpleCylinderPart_0.getStartCoordinate();
coordinate_4.setCoordinateSystem(labCoordinateSystem_0);
coordinate_4.setCoordinate(units_0, units_0, units_0, new DoubleVector(new double[] {0.0, 0.0, 1.0}));
coordinate_4.setValue(new DoubleVector(new double[] {0.0, 0.0, 6.0}));
Coordinate coordinate_5 =
simpleCylinderPart_0.getEndCoordinate();
coordinate_5.setCoordinateSystem(labCoordinateSystem_0);
coordinate_5.setCoordinate(units_0, units_0, units_0, new DoubleVector(new double[] {0.0, 0.0, 0.0}));
coordinate_5.setValue(new DoubleVector(new double[] {0.0, 0.0, 7.0}));
simpleCylinderPart_0.getRadius().setUnits(units_0);
simpleCylinderPart_0.getRadius().setValue(1.0);
simpleCylinderPart_0.getTessellationDensityOption().setSelected(TessellationDensityOption.MEDIUM);
simpleCylinderPart_0.rebuildSimpleShapePart();
simpleCylinderPart_0.setDoNotRetessellate(false);
|
SimpleCylinderPart simpleCylinderPart_0 =
meshPartFactory_0.createNewCylinderPart(simulation_0.get(SimulationPartManager.class));
simpleCylinderPart_0.setDoNotRetessellate(true);
simpleCylinderPart_0.setCoordinateSystem(labCoordinateSystem_0);
Coordinate coordinate_2 =
simpleCylinderPart_0.getStartCoordinate();
coordinate_2.setCoordinateSystem(labCoordinateSystem_0);
coordinate_2.setCoordinate(units_0, units_0, units_0, new DoubleVector(new double[] {0.0, 0.0, 6.0}));
Coordinate coordinate_3 =
simpleCylinderPart_0.getEndCoordinate();
coordinate_3.setCoordinateSystem(labCoordinateSystem_0);
coordinate_3.setCoordinate(units_0, units_0, units_0, new DoubleVector(new double[] {0.0, 0.0, 7.0}));
simpleCylinderPart_0.getRadius().setUnits(units_0);
simpleCylinderPart_0.getRadius().setValue(1.0);
simpleCylinderPart_0.getTessellationDensityOption().setSelected(TessellationDensityOption.Type.MEDIUM);
simpleCylinderPart_0.rebuildSimpleShapePart();
simpleCylinderPart_0.setDoNotRetessellate(false);
|
Sphere
Previous Release
|
Simcenter STAR-CCM+ v10.06
|
SimpleSpherePart simpleSpherePart_0 =
meshPartFactory_0.createNewSpherePart(simulation_0.get(SimulationPartManager.class));
simpleSpherePart_0.setDoNotRetessellate(true);
LabCoordinateSystem labCoordinateSystem_0 =
simulation_0.getCoordinateSystemManager().getLabCoordinateSystem();
simpleSpherePart_0.setCoordinateSystem(labCoordinateSystem_0);
Coordinate coordinate_0 =
simpleSpherePart_0.getOrigin();
coordinate_0.setCoordinateSystem(labCoordinateSystem_0);
coordinate_0.setCoordinate(units_0, units_0, units_0, new DoubleVector(new double[] {0.0, 0.0, 0.0}));
coordinate_0.setValue(new DoubleVector(new double[] {0.0, 0.0, 9.0}));
simpleSpherePart_0.getRadius().setUnits(units_0);
simpleSpherePart_0.getRadius().setValue(1.0);
simpleSpherePart_0.getTessellationDensityOption().setSelected(TessellationDensityOption.MEDIUM);
simpleSpherePart_0.rebuildSimpleShapePart();
simpleSpherePart_0.setDoNotRetessellate(false);
|
SimpleSpherePart simpleSpherePart_0 =
meshPartFactory_0.createNewSpherePart(simulation_0.get(SimulationPartManager.class));
simpleSpherePart_0.setDoNotRetessellate(true);
LabCoordinateSystem labCoordinateSystem_0 =
simulation_0.getCoordinateSystemManager().getLabCoordinateSystem();
simpleSpherePart_0.setCoordinateSystem(labCoordinateSystem_0);
Coordinate coordinate_0 =
simpleSpherePart_0.getOrigin();
coordinate_0.setCoordinateSystem(labCoordinateSystem_0);
coordinate_0.setCoordinate(units_0, units_0, units_0, new DoubleVector(new double[] {0.0, 0.0, 9.0}));
simpleSpherePart_0.getRadius().setUnits(units_0);
simpleSpherePart_0.getRadius().setValue(1.0);
simpleSpherePart_0.getTessellationDensityOption().setSelected(TessellationDensityOption.Type.MEDIUM);
simpleSpherePart_0.rebuildSimpleShapePart();
simpleSpherePart_0.setDoNotRetessellate(false);
|
Combustion: Changes in PPDF and Nox
The following changes have been made to PPDF and Prompt Nox models, resulting in changes to the macro code:
- Removal of PPDF update options
- Change in use of Weighted Sum of Gray Gases (WSGG) method
- Replacement of PPDF_TABLE with SPECIES LIST for the following: OxygenAtomModelOption, OHGroupModelOption, and AcetyleneModelOption
- Removal of the redundant Prompt Nox Species Model option
Examples of macro steps follow for these changes.
PPDF Update
Previous Release
|
Simcenter STAR-CCM+ v10.06
|
PpdfNonAdiabaticFlameletPartiallyPremixedModel ppdfFlameletPartiallyPremixedModel_0 =
continuum.getModelManager().getModel(PpdfNonAdiabaticFlameletPartiallyPremixedModel.class);
PpdfSpeciesUpdate ppdfSpeciesUpdate_0 =
ppdfFlameletPartiallyPremixedModel_0.getPpdfSpeciesUpdate();
PpdfSpeciesUpdateFrequency ppdfSpeciesUpdateFrequency_0 =
ppdfSpeciesUpdate_0.getPpdfSpeciesUpdateFrequency();
ppdfSpeciesUpdateFrequency_0.setThreshold(100);
PpdfFlameletTable ppdfFlameletTable_0 =
((PpdfFlameletTable) ppdfFlameletPartiallyPremixedModel_0.getPpdfFlameletTable());
ppdfFlameletTable_0.importTable(resolveDataPath("case/PpdfFlameletDropComb.tbl"));
|
PpdfNonAdiabaticFlameletPartiallyPremixedModel ppdfFlameletPartiallyPremixedModel_0 =
continuum.getModelManager().getModel(PpdfNonAdiabaticFlameletPartiallyPremixedModel.class);
PpdfFlameletTable ppdfFlameletTable_0 =
((PpdfFlameletTable) ppdfFlameletPartiallyPremixedModel_0.getPpdfFlameletTable());
ppdfFlameletTable_0.importTable(resolveDataPath("case/PpdfFlameletDropComb.tbl"));
|
WSGG
Previous Release
|
Simcenter STAR-CCM+ v10.06
|
gasMixture_0.getMaterialProperties().getMaterialProperty(AbsorptionCoefficientProperty.class).setMethod(PpdfWsggMethod.class);
|
gasMixture_0.getMaterialProperties().getMaterialProperty(AbsorptionCoefficientProperty.class).setMethod(WsggMethod.class);
|
SPECIES LIST
Previous Release
|
Simcenter STAR-CCM+ v10.06
|
noxGeneralZeldovichModel_0.getOHGroupModelOption().setSelected(OHGroupModelOption.PPDF_TABLE);
noxGeneralZeldovichModel_0.getOxygenAtomModelOption().setSelected(OxygenAtomModelOption.PPDF_TABLE);
|
noxGeneralZeldovichModel_0.getOHGroupModelOption().setSelected(OHGroupModelOption.SPECIES_LIST);
noxGeneralZeldovichModel_0.getOxygenAtomModelOption().setSelected(OxygenAtomModelOption.SPECIES_LIST);
|
speciesConcentrationForSoot_0.getAcetyleneModelOption().setSelected(AcetyleneModelOption.PPDF_TABLE);
|
speciesConcentrationForSoot_0.getOxygenAtomModelOption().setSelected(OxygenAtomModelOption.SPECIES_LIST);
|
Species Model
Previous Release
|
Simcenter STAR-CCM+ v10.06
|
PhysicsContinuum physicsContinuum_0 =
((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum("Physics 1"));
PromptNoxModel promptNoxModel_0 =
physicsContinuum_0.getModelManager().getModel(PromptNoxModel.class);
promptNoxModel_0.getPromptNoxSpeciesModelOption().setSelected(PromptNoxSpeciesModelOption.PPDF_TABLE);
promptNoxModel_0.setCorrectionFactor(2.43);
|
PhysicsContinuum physicsContinuum_0 =
((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum("Physics 1"));
PromptNoxModel promptNoxModel_0 =
physicsContinuum_0.getModelManager().getModel(PromptNoxModel.class);
promptNoxModel_0.setCorrectionFactor(2.43);
|
Combustion: Changes in Specific Heat Method Registration
The macro code has changed for setting the method of the
Specific Heat material property to
PPDF Flamelet Table.
Note | You cannot select this method unless you have constructed or imported a PPDF table.
|
Previous Release
|
Simcenter STAR-CCM+ v10.06
|
PpdfAdiabaticFlameletPartiallyPremixedModel PpdfAdiabaticFlameletPartiallyPremixedModel_0 =
physicsContinuum_0.getModelManager().getModel(PpdfAdiabaticFlameletPartiallyPremixedModel.class);
PpdfFlameletTable ppdfFlameletTable_0 =
((PpdfFlameletTable) PpdfAdiabaticFlameletPartiallyPremixedModel_0.getPpdfFlameletTable());
MultiComponentGasModel multiComponentGasModel_0 =
((MultiComponentGasModel) physicsContinuum_0.getModelManager().getModel(MultiComponentGasModel.class));
((SpecificHeatProperty) gasComponent_0.getMaterialProperties().getMaterialProperty(SpecificHeatProperty.class)).setMethod
(PpdfFlameletSpecificHeatMethod.class);
ppdfFlameletTable_0.importTable(resolveDataPath("case/CH4_Flamelet_29_16.tbl"));
|
PpdfAdiabaticFlameletPartiallyPremixedModel PpdfAdiabaticFlameletPartiallyPremixedModel_0 =
physicsContinuum_0.getModelManager().getModel(PpdfAdiabaticFlameletPartiallyPremixedModel.class);
PpdfFlameletTable ppdfFlameletTable_0 =
((PpdfFlameletTable) PpdfAdiabaticFlameletPartiallyPremixedModel_0.getPpdfFlameletTable());
ppdfFlameletTable_0.importTable(resolveDataPath("case/CH4_Flamelet_29_16.tbl"));
MultiComponentGasModel multiComponentGasModel_0 =
((MultiComponentGasModel) physicsContinuum_0.getModelManager().getModel(MultiComponentGasModel.class));
((SpecificHeatProperty) gasComponent_0.getMaterialProperties().getMaterialProperty(SpecificHeatProperty.class)).setMethod
(PpdfFlameletSpecificHeatMethod.class);
|
Material Properties: Change to Lennard-Jones Material Property
The
Lennard-Jones Potential material property has been divided into the
Lennard-Jones Energy and
Lennard-Jones Characteristic Length material properties, resulting in changes to the macro code.
Previous Release
|
Simcenter STAR-CCM+ v10.06
|
ConstantLennardJonesPotentialMethod constantLennardJonesPotentialMethod_0 =
((ConstantLennardJonesPotentialMethod) gas_0.getMaterialProperties().getMaterialProperty(LennardJonesPotentialProperty.class).getMethod());
constantLennardJonesPotentialMethod_0.getSigmaQuantity().setValue(5.0);
constantLennardJonesPotentialMethod_0.getEpsilonQuantity().setValue(100.0);
|
ConstantMaterialPropertyMethod constantMaterialPropertyMethod_0 =
((ConstantMaterialPropertyMethod) gas_0.getMaterialProperties().getMaterialProperty(LennardJonesCharacteristicLengthProperty.class).getMethod());
constantMaterialPropertyMethod_0.getQuantity().setValue(5.0);
ConstantMaterialPropertyMethod constantMaterialPropertyMethod_1 =
((ConstantMaterialPropertyMethod) gas_0.getMaterialProperties().getMaterialProperty(LennardJonesCharacteristicEnergyProperty.class).getMethod());
constantMaterialPropertyMethod_1.getQuantity().setValue(100.0);
|
Turbulence Response Models: Change to Phase Interaction
The Turbulence Response models now select a reference phase interaction in their properties instead of a reference continuous phase.
The following example uses the Tchen Turbulence Response model. However, similar macro changes apply to the Issa and user-defined Turbulence Response models.
Previous Release
|
Simcenter STAR-CCM+ v10.06
|
tchenTurbulenceResponseModel_1.setReferencePhase(eulerianPhase_0);
|
MultiPhaseInteractionModel multiPhaseInteractionModel_0 = physicsContinuum_0.getModelManager().getModel(MultiPhaseInteractionModel.class);
PhaseInteraction phaseInteraction_0 = ((PhaseInteraction) multiPhaseInteractionModel_0.getPhaseInteractionManager().getPhaseInteraction("solid-water"));
tchenTurbulenceResponseModel_1.setReferencePhaseInteraction(phaseInteraction_0);
|
Material Properties: Change in Molecular Weight Material Property Method
The
Read-only constant method of the
Molecular Weight material property has been renamed, resulting in changes to the macro code.
Previous Release
|
Simcenter STAR-CCM+ v10.06
|
GasComponent gasComponent_0 =
((GasComponent) gasMixture_0.getComponents().getComponent("CH4"));
gasComponent_0.getMaterialProperties().getMaterialProperty(MolecularWeightProperty.class).setMethod(ElementalCompositionMolecularWeightMethod.class);
gasComponent_0.getMaterialProperties().getMaterialProperty(MolecularWeightProperty.class).setMethod(ReadOnlyConstantMolecularWeightMethod.class);
|
GasComponent gasComponent_0 =
((GasComponent) gasMixture_0.getComponents().getComponent("CH4"));
gasComponent_0.getMaterialProperties().getMaterialProperty(MolecularWeightProperty.class).setMethod(ElementalCompositionMolecularWeightMethod.class);
gasComponent_0.getMaterialProperties().getMaterialProperty(MolecularWeightProperty.class).setMethod(ReadOnlyConstantMaterialPropertyMethod.class);
|
Heat Transfer: Change to Heat Transfer Coefficient Field Function
The Heat Transfer Coefficient field function has been changed to work more reliably with harmonic balance and co-simulation. This change affects the macro code.
Previous Release
|
Simcenter STAR-CCM+ v10.06
|
HeatTransferCoefficientFunction heatTransferCoefficientFunction_0 =
((HeatTransferCoefficientFunction) simulation_0.getFieldFunctionManager().getFunction("HeatTransferCoefficient"));
HeatTransferCoefficientUserYPlusFunction heatTransferCoefficientUserYPlusFunction_0 = ((HeatTransferCoefficientUserYPlusFunction) sim.getFieldFunctionManager().getFunction("HeatTransferCoefficientUserYPlus"));
|
HtcFunction htcFunction_0 =
((HtcFunction) simulation_0.getFieldFunctionManager().getFunction("HeatTransferCoefficient"));
HtcUserYPlusFunction htcUserYPlusFunction_0 =
((HtcUserYPlusFunction) simulation_0.getFieldFunctionManager().getFunction("HeatTransferCoefficientUserYPlus"));
|