在 Simcenter STAR-CCM+ 11.06 中,针对电化学、欧拉多相、反应流体、定向网格化、网格变形、客户端 - 服务器、标签和网格化进行了宏 API 的更改。
电化学:替换 Tafel 方法类
已修改电化学反应建模,以考虑参与反应的多组分气体成分的消耗。 在宏代码中,旧版本中的合并类别已被其对应的潜在类别替换:
Tafel
以前发行版本 |
Simcenter STAR-CCM+ v11.06 |
TafelCombinedReactionMethod.class
|
TafelPotentialReactionMethod.class
|
Tafel 斜率
以前发行版本 |
Simcenter STAR-CCM+ v11.06 |
TafelSlopeCombinedReactionMethod.class
|
TafelSlopePotentialReactionMethod.class
|
传输限制 Tafel 斜率
以前发行版本 |
Simcenter STAR-CCM+ v11.06 |
TransportLimitedTafelSlopeCombinedReactionMethod.class
|
TransportLimitedTafelSlopePotentialReactionMethod.class
|
必须用潜在变体替换出现的所有合并变体。 例如:
以前发行版本 |
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);
|
注 | 如果 Java 宏中存下列语句,应移除:import star.electrochemistry.electrochemicalreactions.TafelCombinedReactionMethod
import star.electrochemistry.electrochemicalreactions.TransportLimitedTafelSlopeCombinedReactionMethod
import star.electrochemistry.electrochemicalreactions.TafelSlopeCombinedReactionMethod
|
欧拉多相流
-
流体体积 (VOF) 对象与两相平衡模型已重构,导致输入的宏代码变化:
- 对于 VOF,star.vof.AlphaFilmBoilingProfile 已改为 star.mixturemultiphase.AlphaFilmBoilingProfile。
为适应宏中的这种变化,可以插入额外的导入语句:
import star.mixturemultiphase.AlphaFilmBoilingProfile;
注 | 如果宏中存在,则移除 import star.vof.AlphaFilmBoilingProfile。 |
- 对于两相平衡模型,mixturemultiphase 已改为 twophaseequilibrium。
为适应宏中的这种变化,可以插入额外的导入语句:
import star.twophaseequilibrium.AlphaFilmBoilingProfile;
-
为了确保向后兼容性,出现的所有 SegregatedVofPhaseSpeciesModel 都应改为 MmpPhaseSpeciesModel,出现的所有 VofPhaseEnergyModel 都应改为 MmpPhaseEnergyModel。 以下是宏代码的更改示例:
以前发行版本 |
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);
|
-
已移除用于宏观孔隙率(纯热)模型的两个场函数:Void Phase Source of XY(XY 的空隙相源) 和 Liquid Zone Volume Change Rate(液体区域体积变化率)。
旧版 Simcenter STAR-CCM+ 中激活宏观孔隙率(纯热)模型的宏必须选择用于固体网格单元指示器的场函数方法,以激活相同的行为,如下列新宏代码示例所示:
MacroPorosityPureThermalModel macroPorosityPureThermalModel_0 =
phaseInteraction_0.getModelManager().getModel(MacroPorosityPureThermalModel.class);
SolidCellIndicatorProfile solidCellIndicatorProfile_0 =
((SolidCellIndicatorProfile) macroPorosityPureThermalModel_0.getSolidCellIndicatorProfile());
solidCellIndicatorProfile_0.setMethod(FunctionScalarProfileMethod.class);
反应流体
更改烟气矩量模型
已扩展烟气矩量模型与复杂化学连用,从而导致宏代码更改。
以前发行版本 |
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();
|
移除 UnburntTemperatureControlOption
不再提供 UnburntTemperatureControlOption 对象。 因此移除如下所示的语句:
cfmCombustionModel_0.getUnburntTemperatureControlOption().setSelected(UnburntTemperatureControlOption.ISENTROPIC_RELATION);
新用户界面
关于 v11.06 更改的更多详细信息,请参见“新特征”>“物理”>“CFD”>“反应流体”。
类别已从:
PremixedCombustionFlameTypeModel
PartiallyPremixedCombustionFlameTypeModel
NonPremixedCombustionFlameTypeModel
更改为:
ReactingSpeciesTransportBasedModel
FlameletBasedModel
因此,当您的宏激活涡破碎、复杂化学或漩涡接触微观混合模型时,应在宏代码中做如下更改:
以前发行版本 |
Simcenter STAR-CCM+ v11.06 |
physicsContinuum_0.enable(NonPremixedCombustionFlameTypeModel.class);
physicsContinuum_0.enable(PartiallyPremixedCombustionFlameTypeModel.class);
|
physicsContinuum_0.enable(ReactingSpeciesTransportBasedModel.class);
|
当宏激活 PPDF 平衡(现为化学平衡)、PPDF 小火焰(现在为稳态层流火焰或 SLF)或小火焰生成流形 (FGM) 时,应在宏代码中做如下更改:
以前发行版本 |
Simcenter STAR-CCM+ v11.06 |
physicsContinuum_0.enable(NonPremixedCombustionFlameTypeModel.class);
physicsContinuum_0.enable(PartiallyPremixedCombustionFlameTypeModel.class);
|
physicsContinuum_0.enable(FlameletBasedModel.class);
|
小火焰生成更改
组分顺序已更改。 新组分列表按字母数字顺序排序。
以前发行版本 |
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}));
|
第三体系数对象的名称已更改。
以前发行版本 |
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);
|
启用热力型氮氧化物模型:以前的模型现在已弃用,只有一种氮氧化物模型为热力型氮氧化物建模:氮氧化物 Zeldovich (NoxThreeEquationZeldovichModel)。
以前发行版本 |
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);
|
化学平衡
对于化学平衡模型,您不必设置默认材料数据库。
以前发行版本 |
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);
|
对于化学平衡模型,平衡算法会自动选择。
以前发行版本 |
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);
|
下列示例显示了化学平衡组分的指定。
以前发行版本 |
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}));
|
表
在生成或使用小火焰时,包括 tablegenerator 和 ppdftable 软件包。
以前发行版本 |
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.*;
|
对象constructTable 已重命名为constructFlameletTable。
以前发行版本 |
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")}));
|
流体束
增厚火焰模型 (TFM) 需要额外的流体束命令。
以前发行版本 |
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);
|
现在通过EquilibriumTableGenerator、FlameletTableGenerator 和 FGMTableGenerator 对象访问流体束对象。 下列示例显示了流体温度指定:
以前发行版本 |
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);
|
下列流体束对象的示例显示了流体成分的指定:
以前发行版本 |
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}));
|
设置碳烟双方程模型的流体束:
以前发行版本 |
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");
|
惯性流处理:
以前发行版本 |
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 "));
|
增厚火焰模型更改
以前发行版本 |
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);
|
时间步控制:求解器重命名
时间步控制求解器已重命名,导致宏代码更改。
对流 CFL 时间步控制
以前发行版本 |
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"));
|
基于能量的时间步控制
以前发行版本 |
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"));
|
以下是对流 CFL 时间步控制求解器的代码示例:
以前发行版本 |
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);
|
定向网格化:闭环零部件集合的定义更改
在闭环零部件集合中,如包含多个零部件的环形几何,用于定义源网格的方法已更改,以确保准确度。 如果您使用旧版本中的模拟文件或 Java 宏,并发现网格定义不一致,请考虑记录新宏。
网格变形:将控制点更改为点集合
对于网格变形,点集合已代替控制点。 与控制点不同,点集合不连接区域。 下列示例显示了宏代码的更改类型。
创建每种类型的控制点/点集合
以前发行版本 |
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");
|
编辑栅格点生成器
以前发行版本 |
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();
|
编辑线点生成器
以前发行版本 |
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();
|
编辑零部件点生成器
以前发行版本 |
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();
|
编辑表格点生成器
以前发行版本 |
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();
|
激活/停用
以前发行版本 |
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
|
标签:不再支持自定义图标
在标签功能扩展到大多数模拟对象后,标签节点图标的自定义不再可用。 因此,star.common.UserTag
中的 getCustomizableIcon()
函数已停用。 从宏中移除此函数。
客户端 - 服务器:StarCommandParser API 更改
StarCommandParser 用于解析和修改用于启动 Simcenter STAR-CCM+ 服务器的命令行的实例。 以前,API 允许您修改 StarCommandParser 使用的内部容器。 在当前版本的 Simcenter STAR-CCM+ 中,更改的 API 会防止直接修改内部数据;但您仍能修改 StarCommandParser 管理的命令。
命令解析器实例化
StarCommandParser 以相同方式实例化:
StarCommandParser cmdParser = new StarCommandParser("starccm+ -server");
添加单独选项
命令
cmdParser.addLast("-cpubind");
已作废。 使用现有替代命令:
cmdParser.addOption("-cpubind");
添加选项和数值
下列语句
cmdParser.addLast("-licpath");
cmdParser.addLast("/my/license/path");
已被现有替代语句替换:
cmdParser.addOptionAndValue("-licpath","/my/license/path");
查询选项
命令
cmdParser.indexOf("-cpubind");
可替换为
cmdParser.hasOption("-cpubind");
移除单独选项
语句
int idx = cmdParser.indexOf("-cpubind");
if ( idx != -1 ) cmdParser.remove(idx);
可替换为
cmdParser.remove("-cpubind");
移除选项和数值
要从命令行中移除 -licpath <value> 的第一个实例,语句
int idx = cmdParser.indexOf("-licpath");
if ( idx != -1 ) {
cmdParser.remove(idx);
cmdParser.remove(idx);
}
可替换为
if ( cmdParser.hasOption("-licpath") ) {
cmdParser.remove("-licpath", cmdParser.getArg("-licpath"));
}
要从命令行中移除 -licpath <value> 的所有实例:
cmdParser.removeAll("-licpath");
替换选项
语句
int idx = cmdParser.indexOf("-licpath");
if ( idx != -1 ) {
cmdParser.set(idx+1, "/a/different/license/path");
}
可替换为
cmdParser.replaceOptionAndValue("-licpath", "/a/different/license/path");
网格化:更改表面准备宏
通过移除不必要的命令,并在必要时引入新命令,已缩短在启动表面修复和包面漏洞检测时产生的 Java 宏。 最终结果是这些宏更易读取和修改,同时仍保留原有宏的功能。
注 | 仍支持在旧版 Simcenter STAR-CCM+ 中使用的宏。 |
每种工具的更改摘要如下所示。
表面修复启动宏更改
已引入下列新命令:
partSurfaceMeshWidget_0.startSurfaceRepairControllers();
上述命令替换下列命令:
partSurfaceMeshWidget_0.startSurfaceMeshDiagnostics();
partSurfaceMeshWidget_0.startSurfaceMeshRepair();
partSurfaceMeshWidget_0.startMergeImprintController();
partSurfaceMeshWidget_0.startIntersectController();
partSurfaceMeshWidget_0.startLeakFinderController();
partSurfaceMeshWidget_0.startSurfaceMeshQueryController();
用于启动表面修复的宏中不再包括下列命令:
移除默认显示状态的特征诊断(原因:现在在服务器上完成)
SurfaceMeshWidgetDiagnosticsController surfaceMeshWidgetDiagnosticsController_0 = partSurfaceMeshWidget_0.getControllers().getController(SurfaceMeshWidgetDiagnosticsController.class);
surfaceMeshWidgetDiagnosticsController_0.setSoftFeatureErrorsActive(true);
surfaceMeshWidgetDiagnosticsController_0.setHardFeatureErrorsActive(true);
另请参见“两种工具通用的宏更改”。
包面漏洞检测启动宏更改
已引入下列新命令:
partSurfaceMeshWidget_0.startWrapperLeakDetectionControllers();
上述命令替换下列命令:
partSurfaceMeshWidget_0.startSurfaceMeshRepair();
partSurfaceMeshWidget_0.startMergeImprintController();
partSurfaceMeshWidget_0.startLeakFinderController();
partSurfaceMeshWidget_0.startSurfaceMeshDiagnostics();
用于启动包面漏洞检测的宏中不再包括下列命令:
移除网格覆盖模式(原因:重复)
scene_0.setMeshOverrideMode(2);
移除默认诊断禁用(原因:现在通过setCheckAll() 命令静默完成)
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);
注 | setCheckAll() 命令现在禁用所有all诊断,不只是默认诊断。 |
两种工具通用的宏更改
移除单位对象(原因:不使用)
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}));
移除显示器初始化(原因:无效果)
SurfaceMeshWidgetDisplayer surfaceMeshWidgetDisplayer_0 = ((SurfaceMeshWidgetDisplayer)scene_0.getDisplayerManager().getDisplayer("Widget displayer 1"));
surfaceMeshWidgetDisplayer_0.initialize();