宏 API 更改 2206

Simcenter STAR-CCM+ 2206 中,材料、热传递、伴随、反应流体、多相、欧拉多相流、DFBI、固体应力、电磁、电化学、后处理和 Simcenter STAR-CCM+ In-Cylinder 的宏 API 已更改。

材料:数据库属性的更改

如果任何现有宏使用材料数据库,则按如下方式更新这些数据库:

  • 添加 import star.material.backwardcompatibility.*;
  • 搜索以下字符串的实例并进行更正,如图所示。
    以前发行版本 Simcenter STAR-CCM+ 2206
    dataBaseMaterialPropertySutherLandLawMethod_0get...
    dataBaseMaterialPropertySutherLandLawMethod_0.get...
    dataBaseMaterialPropertyAlphaBetaScalingMethod_0get...
    dataBaseMaterialPropertyAlphaBetaScalingMethod_0.get...
    "MoleculeType"
    "LennardJonesMoleculeType"
    "ThermalExpansionSolids"
    "ThermalExpansion"
  • 移除以下属性及其相应方法的所有实例:
    • DataBaseMaterialPropertyEmissivity
    • DataBaseMaterialPropertyHeatTransferCoefficient
    • DataBaseMaterialPropertyThermalDiffusivity
    • DataBaseMaterialPropertyWettingAngle
    • DeadDataBaseMaterialPropertyLJPotential
  • <DataBasePropertyName>.class 更改为 "<DataBasePropertyName>" 格式。
    以前发行版本 Simcenter STAR-CCM+ 2206
    DataBaseMaterialPropertyPermeability dataBaseMaterialPropertyPermeability_2 =
                ((DataBaseMaterialPropertyPermeability) materialDataBaseSolid_2.getMaterialProperty(DataBaseMaterialPropertyPermeability.class));
    DataBaseMaterialPropertyPermeability dataBaseMaterialPropertyPermeability_2 =
                ((DataBaseMaterialPropertyPermeability) materialDataBaseSolid_2.getMaterialProperty("DataBaseMaterialPropertyPermeability"));
  • 更改表方法。
    • DataBaseMaterialTemperatureTablePropertyMethod 更改为 TemperatureTableMethod
      以前发行版本 Simcenter STAR-CCM+ 2206
      DataBaseMaterialTemperatureTablePropertyMethod dataBaseMaterialTemperatureTablePropertyMethod_0 =
        ((DataBaseMaterialTemperatureTablePropertyMethod)     dataBaseMaterialPropertyDensity_0.getMethod("DataBaseMaterialTemperatureTablePropertyMethod"));
             
      MaterialTable materialTable_0 = dataBaseMaterialTemperatureTablePropertyMethod_0.getTable();
       
      materialTable_0.extract(resolvePath("*.csv"));
      import star.energy.TemperatureTableMethod;
      FileTable fileTable_0 = (FileTable)simulation_0.getTableManager().createFromFile(resolvePath("*.csv"));
        
      TemperatureTableMethod temperaturTableMethod_0 =
       ((TemperatureTableMethod) dataBaseMaterialPropertyDensity_0.getMethod("TemperatureTableMethod"));
        
      temperaturTableMethod_0.getInterpolationTable().setTable(fileTable_0);
    • DataBaseMaterialTemperaturePressureTablePropertyMethod 更改为 TemperaturePressureTableMethod
      以前发行版本 Simcenter STAR-CCM+ 2206
      DataBaseMaterialTemperaturePressureTablePropertyMethod dataBaseMaterialTemperaturePressureTablePropertyMethod_0=
        ((DataBaseMaterialTemperaturePressureTablePropertyMethod)     dataBaseMaterialPropertyDensity_0.getMethod("DataBaseMaterialTemperaturePressureTablePropertyMethod"));
             
      MaterialTable materialTable_0 = dataBaseMaterialTemperaturePressureTablePropertyMethod_0.getTable();
       
      materialTable_0.extract(resolvePath("*.csv"));
      import star.energy.TemperaturePressureTableMethod;
      FileTable fileTable_0 = (FileTable)simulation_0.getTableManager().createFromFile(resolvePath("*.csv"));
        
      TemperaturePressureTableMethod temperaturPressureTableMethod_0 = ((TemperaturePressureTableMethod) dataBaseMaterialPropertyDensity_0.getMethod("TemperaturePressureTableMethod"));
        
      temperaturPressureTableMethod_0.getInterpolationTable().setTable(fileTable_0);
    • DataBaseMaterialTemperatureLiConcentrationTablePropertyMethod 更改为 TemperatureLiConcentrationTableMethod
      以前发行版本 Simcenter STAR-CCM+ 2206
      DataBaseMaterialTemperatureLiConcentrationTablePropertyMethod dataBaseMaterialTemperatureLiConcentrationTablePropertyMethod_0=
        ((DataBaseMaterialTemperatureLiConcentrationTablePropertyMethod)     dataBaseMaterialPropertyElectricalConductivity_0.getMethod("DataBaseMaterialTemperatureLiConcentrationTablePropertyMethod "));
             
      MaterialTable materialTable_0 = dataBaseMaterialPropertyElectricalConductivity_0.getTable();
       
      materialTable_0.extract(resolvePath("*.csv"));
      import star.liionbatterycell.TemperatureLiConcentrationTableMethod;
      FileTable fileTable_0 = (FileTable)simulation_0.getTableManager().createFromFile(resolvePath("*.csv"));
        
      TemperatureLiConcentrationTableMethod temperatureLiConcentrationTableMethod_0 =
       ((TemperatureLiConcentrationTableMethod) dataBaseMaterialPropertyElectricalConductivity_0.getMethod("TemperatureLiConcentrationTableMethod"));
        
      temperatureLiConcentrationTableMethod_0.getInterpolationTable().setTable(fileTable_0);
    • DataBaseMaterialMagneticSusceptibilityTemperatureTablePropertyMethod 更改为 MagneticSusceptibilityTemperatureTableMethod
      以前发行版本 Simcenter STAR-CCM+ 2206
      DataBaseMaterialMagneticSusceptibilityTemperatureTablePropertyMethod dataBaseMaterialMagneticSusceptibilityTemperatureTablePropertyMethod_0=
        ((DataBaseMaterialMagneticSusceptibilityTemperatureTablePropertyMethod)     dataBaseMaterialPropertyMagneticSusceptibilityTemperatureFactor_0.getMethod
      ("DataBaseMaterialMagneticSusceptibilityTemperatureTablePropertyMethod"));
             
      MaterialTable materialTable_0 = dataBaseMaterialMagneticSusceptibilityTemperatureTablePropertyMethod_0.getTable();
       
      materialTable_0.extract(resolvePath("*.csv"));
      import star.electromagnetism.common.MagneticSusceptibilityTemperatureTableMethod;
      FileTable fileTable_0 = (FileTable)simulation_0.getTableManager().createFromFile(resolvePath("*.csv"));
        
      MagneticSusceptibilityTemperatureTableMethod magneticSusceptibilityTemperatureTableMethod_0 = ((MagneticSusceptibilityTemperatureTableMethod ) dataBaseMaterialPropertyMagneticSusceptibilityTemperatureFactor_0
      .getMethod("MagneticSusceptibilityTemperatureTableMethod"));
        
      magneticSusceptibilityTemperatureTableMethod_0.getInterpolationTable().setTable(fileTable_0);
    • DataBaseMaterialBHCurveTablePropertyMethod 更改为 PermeabilityTableMethod
      以前发行版本 Simcenter STAR-CCM+ 2206
      DataBaseMaterialBHCurveTablePropertyMethod dataBaseMaterialBHCurveTablePropertyMethod_0=
        ((DataBaseMaterialBHCurveTablePropertyMethod)     dataBaseMaterialPropertyPermeability_0.getMethod("DataBaseMaterialBHCurveTablePropertyMethod"));
             
      MaterialTable materialTable_0 = dataBaseMaterialBHCurveTablePropertyMethod_0.getTable();
       
      materialTable_0.extract(resolvePath("*.csv"));
      import star.electromagnetism.common.PermeabilityTableMethod;
      FileTable fileTable_0 = (FileTable)simulation_0.getTableManager().createFromFile(resolvePath("*.csv"));
        
      PermeabilityTableMethod permeabilityTableMethod_0 = ((PermeabilityTableMethod) dataBaseMaterialPropertyPermeability_0.getMethod("PermeabilityTableMethod"));
        
      permeabilityTableMethod_0.getBandHInterpolationTable().setTable(fileTable_0);
    • DataBaseMaterialMagneticRemanenceFluxDensityTemperatureTablePropertyMethod 更改为 MagneticRemanenceFluxDensityTemperatureTableMethod
      以前发行版本 Simcenter STAR-CCM+ 2206
      DataBaseMaterialMagneticRemanenceFluxDensityTemperatureTablePropertyMethod dataBaseMaterialMagneticRemanenceFluxDensityTemperatureTablePropertyMethod_0=
        ((DataBaseMaterialMagneticRemanenceFluxDensityTemperatureTablePropertyMethod)     dataBaseMaterialPropertyMagneticRemanenceFluxDensity_0
      .getMethod("DataBaseMaterialMagneticRemanenceFluxDensityTemperatureTablePropertyMethod"));
             
      MaterialTable materialTable_0 = dataBaseMaterialMagneticRemanenceFluxDensityTemperatureTablePropertyMethod_0.getTable();
       
      materialTable_0.extract(resolvePath("*.csv"));
      import star.electromagnetism.common.MagneticRemanenceFluxDensityTemperatureTableMethod;
      FileTable fileTable_0 = (FileTable)simulation_0.getTableManager().createFromFile(resolvePath("*.csv"));
        
      MagneticRemanenceFluxDensityTemperatureTableMethod magneticRemanenceFluxDensityTemperatureTableMethod_0 = ((MagneticRemanenceFluxDensityTemperatureTableMethod) dataBaseMaterialPropertyMagneticRemanenceFluxDensity_0
      .getMethod("MagneticRemanenceFluxDensityTemperatureTableMethod"));
        
      magneticRemanenceFluxDensityTemperatureTableMethod_0.getInterpolationTable().setTable(fileTable_0);

热传递:基于部件的支持现在可用于实际流双流体热交换器模型

实际流双流体热交换器模型的 UI 已显著更改,导致用户宏发生多处更改。当前支持七种热交换器数据规范选项:UAL 多项式、UAL 表、UAG 表、Q 表、Q Map、UAL Map 和体积 UAL 表。以下为一个选项 (Q Map) 的宏更改说明,该说明适用于所有七个选项。双流体热交换器报告宏也相应更改,其说明如下表所示。

以前发行版本 Simcenter STAR-CCM+ 2206
Simulation simulation_0 = getActiveSimulation();

Region region_0 = simulation_0.getRegionManager().getRegion("air-core");
Region region_1 = simulation_0.getRegionManager().getRegion("coolant-core");

DirectRegionInterface directRegionInterface_0 = 
  simulation_0.getInterfaceManager().createDirectRegionInterface(region_0, region_1, "Heat Exchanger");


directRegionInterface_0.getConditions().get(HeatExchangerMethod.class).setSelected(HeatExchangerMethod.ACTUAL_FLOW_DUAL_STREAM);

directRegionInterface_0.getConditions().get(HxActualFlowDataOption.class).setSelected(HxActualFlowDataOption.ACTUAL_FLOW_Q_MAP);

HeatExchangerFirstIteration heatExchangerFirstIteration_0 = 
  directRegionInterface_0.getValues().get(HeatExchangerFirstIteration.class);
heatExchangerFirstIteration_0.setHxFirstIteration(10);
Simulation simulation_0 = getActiveSimulation();

Region region_0 = simulation_0.getRegionManager().getRegion("air-core");
Region region_1 = simulation_0.getRegionManager().getRegion("coolant-core");

DirectRegionInterface directRegionInterface_0 = 
  simulation_0.getInterfaceManager().createDirectRegionInterface(region_0, region_1, "Heat Exchanger", true); // true for Region-Mode HX and false for Contact-Mode HX

directRegionInterface_0.getConditions().get(HeatExchangerMethod.class).setSelected(HeatExchangerMethod.Type.ACTUAL_FLOW_DUAL_STREAM);

directRegionInterface_0.getConditions().get(HxActualFlowDataOption.class).setSelected(HxActualFlowDataOption.Type.ACTUAL_FLOW_Q_MAP);

HeatExchangerFirstIteration heatExchangerFirstIteration_0 = 
  directRegionInterface_0.getValues().get(HeatExchangerFirstIteration.class);
heatExchangerFirstIteration_0.setHxFirstIteration(10);
HxActualFlowQMapEval hxActualFlowQMapEval_0 = directRegionInterface_0.getValues().get(HxActualFlowQMapEval.class);

hxActualFlowQMapEval_0.setTableMQ(fileTable_0);
hxActualFlowQMapEval_0.setTableMCold("mCold");
hxActualFlowQMapEval_0.setTableMHot("mHot");
hxActualFlowQMapEval_0.setTableQ("Q");

hxActualFlowQMapEval_0.getQMapInletTemperatureAveragingOption().setSelected(HxInletTemperatureAveragingOption.Type.MASS_FLOW_AVERAGED);

hxActualFlowQMapEval_0.getColdInletTemperature().setValue(293.0);
hxActualFlowQMapEval_0.getHotInletTemperature().setValue(373.0);
HxActualFlowQMapEval hxActualFlowQMapEval_0 = 
directRegionInterface_0.getValues().get(HxActualFlowQMapEval.class);

HxActualFlowQMapEvalLeaf hxActualFlowQMapEvalLeaf_0 = 
 hxActualFlowQMapEval_0.getModelPartValue();

hxActualFlowQMapEvalLeaf_0.setInputTable(fileTable_0);
hxActualFlowQMapEvalLeaf_0.setTableMColdField("mCold");
hxActualFlowQMapEvalLeaf_0.setTableMHotField("mHot");
hxActualFlowQMapEvalLeaf_0.setTableInputField("Q");

hxActualFlowQMapEvalLeaf_0.getQMapInletTemperatureAveragingOption().setSelected(HxInletTemperatureAveragingOption.Type.MASS_FLOW_AVERAGED);

hxActualFlowQMapEvalLeaf_0.getColdInletTemperature().setValue(293.0);
hxActualFlowQMapEvalLeaf_0.getHotInletTemperature().setValue(373.0);
hxActualFlowQMapEval_0.getColdUpstreamBoundaries().setObjects(directBoundaryInterfaceBoundary_0);

hxActualFlowQMapEval_0.getHotUpstreamBoundaries().setObjects(directBoundaryInterfaceBoundary_1, directBoundaryInterfaceBoundary_2);
HxUpstreamParts hxUpstreamParts_0 = 
directRegionInterface_0.getValues().get(HxUpstreamParts.class);

hxUpstreamParts_0.getColdUpstreamParts().setObjects(directBoundaryInterfaceBoundary_0);

hxUpstreamParts_0.getHotUpstreamParts().setObjects(directBoundaryInterfaceBoundary_1, directBoundaryInterfaceBoundary_2);
HeatExchangerReport heatExchangerReport_0 = 
simulation_0.getReportManager().createReport(HeatExchangerReport.class);

heatExchangerReport_0.setPresentationName("hxReport");
heatExchangerReport_0.setHeatExchanger(directRegionInterface_0);

heatExchangerReport_0.getColdDownstreamBoundaries().setObjects(directBoundaryInterfaceBoundary_3);

heatExchangerReport_0.getHotDownstreamBoundaries().setObjects(directBoundaryInterfaceBoundary_4, directBoundaryInterfaceBoundary_5);
HeatExchangerReport heatExchangerReport_0 = 
simulation_0.getReportManager().createReport(HeatExchangerReport.class);

heatExchangerReport_0.setPresentationName("hxReport");
heatExchangerReport_0.setHeatExchanger(directRegionInterface_0);

heatExchangerReport_0.getColdDownstreamParts().setObjects(directBoundaryInterfaceBoundary_3);

heatExchangerReport_0.getHotDownstreamParts().setObjects(directBoundaryInterfaceBoundary_4, directBoundaryInterfaceBoundary_5);

伴随:拓扑优化求解器的更改

作为拓扑优化求解器改进的一部分,用户定义约束子节点(拓扑优化 > 约束 > 用户定义约束)和体积比约束子节点(拓扑优化 > 约束 > 体积比约束)的属性选项已更改。

在此节点的类型属性中,消除了最小值/最大值选项。添加了相等选项。新的增广拉格朗日公式本身就可用于这种特定类型的约束。

每个选项都对应特定 CSO(客户端-服务器对象)的选择。类型属性的更改意味着 MinMaxConstraintType CSO 不再存在,并由此引入了新的 EqualityConstraintType CSO。

由于 MinMaxConstraintType CSO 已移除,因此需要使用受支持类型之一(EqualityConstraintTypeMinimumConstraintTypeMaximumConstraintType)来更新使用此 CSO 的任何宏,如以下示例所示。

以前发行版本 Simcenter STAR-CCM+ 2206
TopologyOptimizationSolver topologyOptimizationSolver_0 =
  ((TopologyOptimizationSolver) simulation_0.getSolverManager().getSolver(TopologyOptimizationSolver.class));
VolumeRatioConstraint volumeRatioConstraint_0 =
  ((VolumeRatioConstraint) topologyOptimizationSolver_0.getConstraintManager().getObject("Volume Ratio Constraint"));
volumeRatioConstraint_0.setType(MinMaxConstraintType.class);
TopologyOptimizationSolver topologyOptimizationSolver_0 =
  ((TopologyOptimizationSolver) simulation_0.getSolverManager().getSolver(TopologyOptimizationSolver.class));
VolumeRatioConstraint volumeRatioConstraint_0 =
  ((VolumeRatioConstraint) topologyOptimizationSolver_0.getConstraintManager().getObject("Volume Ratio Constraint"));
volumeRatioConstraint_0.setType(EqualityConstraintType.class);

反应流体:ECFM 表生成器更改

修改了 ECFM 表生成器的工作流,从而导致宏代码的更改。

以前发行版本 Simcenter STAR-CCM+ 2206
Simulation simulation_0 = 
  getActiveSimulation();
PhysicsContinuum physicsContinuum_0 = 
  ((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum("Default Gases"));
EcfmClehModel ecfmClehModel_0 = 
  physicsContinuum_0.getModelManager().getModel(EcfmClehModel.class);
EquilTable equilTable_0 = 
  ecfmClehModel_0.getEquilTable();
equilTable_0.importTable(resolvePath("/u/user1/work/project1/eq.tbl"));
Simulation simulation_0 = 
  getActiveSimulation();
PhysicsContinuum physicsContinuum_0 = 
  ((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum("Default Gases"));
EcfmEquilTableGenerator ecfmEquilTableGenerator_0 = 
  ((EcfmEquilTableGenerator) physicsContinuum_0.get(EcfmTableGeneratorManager.class).getObject("ECFM-CLEH Equilibrium Table Generator"));
EcfmEquilTableCollection ecfmEquilTableCollection_0 = 
  ((EcfmEquilTableCollection) ecfmEquilTableGenerator_0.getEcfmEquilTableCollection());
ecfmEquilTableCollection_0.importTable(resolvePath("/u/user1/work/project1/eq.tbl"));
Simulation simulation_0 = 
  getActiveSimulation();
PhysicsContinuum physicsContinuum_0 = 
  ((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum("Default Gases"));
SootSectionalEcfmModel sootSectionalEcfmModel_0 = 
  physicsContinuum_0.getModelManager().getModel(SootSectionalEcfmModel.class);
SootEcfmTable sootEcfmTable_0 = 
  sootSectionalEcfmModel_0.getSootEcfmTable();
sootEcfmTable_0.importTable(resolvePath("/u/user1/work/project1/soot.tbl"));
Simulation simulation_0 = 
  getActiveSimulation();
PhysicsContinuum physicsContinuum_0 = 
  ((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum("Default Gases"));
SootEcfmTableGenerator sootEcfmTableGenerator_0 = 
  ((SootEcfmTableGenerator) physicsContinuum_0.get(EcfmTableGeneratorManager.class).getObject("ECFM Soot Table Generator"));
SootEcfmTable sootEcfmTable_0 = 
  ((SootEcfmTable) sootEcfmTableGenerator_0.getSootEcfmTable());
sootEcfmTable_0.importTable(resolvePath("/u/user1/work/project1/soot.tbl"));
Simulation simulation_0 = 
  getActiveSimulation();
PhysicsContinuum physicsContinuum_0 = 
  ((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum("Default Gases"));
TkiAutoIgnitionModel tkiAutoIgnitionModel_0 = 
  physicsContinuum_0.getModelManager().getModel(TkiAutoIgnitionModel.class);
TkiTable tkiTable_0 = 
  ((TkiTable) tkiAutoIgnitionModel_0.getTkiTable());
tkiTable_0.importTable(resolvePath("/u/user1/work/project1/tki.tbl"));
Simulation simulation_0 = 
  getActiveSimulation();
PhysicsContinuum physicsContinuum_0 = 
  ((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum("Default Gases"));
TkiTableGenerator tkiTableGenerator_0 = 
  ((TkiTableGenerator) physicsContinuum_0.get(EcfmTableGeneratorManager.class).getObject("TKI Table Generator"));
TkiTable tkiTable_0 = 
  ((TkiTable) tkiTableGenerator_0.getTkiTable());
tkiTable_0.importTable(resolvePath("/u/user1/work/project1/tki.tbl"));

多相

磨损边界物理值的更改

由于重构,对磨损边界物理值的 Archard 方法的宏代码进行了更改。

具体而言:

abrasiveWearProfile_0.setMethod(ArchardAbrasiveWearMethod.class);

已更改为

abrasiveWearProfile_0.setMethod(GranularArchardAbrasiveWearMethod.class);

液膜蒸发的更改

液膜蒸发模型的新模型要求导致相间相互作用行为的更改。要将这些对象的行为恢复到上一版本的行为,可将 RaoultActivityCoefficientModel 添加到先前保存的宏,如以下示例所示。

以前发行版本 Simcenter STAR-CCM+ 2206
PhaseInteraction phaseInteraction_0 = multiPhaseInteractionModel_0.createPhaseInteraction();
phaseInteraction_0.enable(FilmEulerianPhaseInteractionModel.class);
FilmEulerianPhaseInteractionModel filmEulerianPhaseInteractionModel_0 =
phaseInteraction_0.getModelManager().getModel(FilmEulerianPhaseInteractionModel.class);
FluidFilmPhase fluidFilmPhase_0 = getFilm1Phase();
filmEulerianPhaseInteractionModel_0.setFilmPhase(fluidFilmPhase_0);
phaseInteraction_0.enable(FilmEvaporationModel.class);
phaseInteraction_0.enable(PhaseInteractionMaterialModel.class);
FilmEvaporationModel filmEvaporationModel_0 = phaseInteraction_0.getModelManager().getModel(FilmEvaporationModel.class);
filmEvaporationModel_0.setMixtureComponentPairListInput(new StringVector(new String[] {"C8H18", "C8H18", "C7H16", "C7H16"}));
filmEvaporationModel_0.setImplicitCoupling(solveImplicitly());
PhaseInteraction phaseInteraction_0 = multiPhaseInteractionModel_0.createPhaseInteraction();
phaseInteraction_0.enable(FilmEulerianPhaseInteractionModel.class);
FilmEulerianPhaseInteractionModel filmEulerianPhaseInteractionModel_0 =
phaseInteraction_0.getModelManager().getModel(FilmEulerianPhaseInteractionModel.class);
FluidFilmPhase fluidFilmPhase_0 = getFilm1Phase();
filmEulerianPhaseInteractionModel_0.setFilmPhase(fluidFilmPhase_0);
phaseInteraction_0.enable(FilmEvaporationModel.class);

phaseInteraction_0.enable(RaoultActivityCoefficientModel.class);

phaseInteraction_0.enable(PhaseInteractionMaterialModel.class);
FilmEvaporationModel filmEvaporationModel_0 = phaseInteraction_0.getModelManager().getModel(FilmEvaporationModel.class);
filmEvaporationModel_0.setMixtureComponentPairListInput(new StringVector(new String[] {"C8H18", "C8H18", "C7H16", "C7H16"}));
filmEvaporationModel_0.setImplicitCoupling(solveImplicitly());

因解析的欧拉-拉格朗日转换发生的更改

由于解析的欧拉-拉格朗日转换模型和混合多相 (MMP) 模型的 Blob 检测方面有所改进,因此宏代码已更改。具体来说,类已按以下方式重命名:

以前发行版本 Simcenter STAR-CCM+ 2206
star.lagrangian.voflagrangian.BlobDiameterVofLagrangianTransitionCriterion
star.lagrangian.eulerianlagrangian.BlobDiameterTransitionCriterion
star.lagrangian.voflagrangian.BlobShapeVofLagrangianTransitionCriterion
star.lagrangian.eulerianlagrangian.BlobShapeTransitionCriterion

star.lagrangian.voflagrangian.MinimumBlobVolumeFractionTransitionCriterion
star.lagrangian.eulerianlagrangian.MinimumBlobVolumeFractionTransitionCriterion 

star.lagrangian.voflagrangian.ResolvedVofLagrangianTransitiomodel

star.lagrangian.eulerianlagrangian.ResolvedEulerianLagrangianTransitionModel 
star.lagrangian.voflagrangian.UserDefinedTransitionCriterionProfile

star.lagrangian.eulerianlagrangian.UserDefinedTransitionCriterionProfile

star.lagrangian.voflagrangian.UserDefinedVofLagrangianTransitionCriterion

star.lagrangian.eulerianlagrangian.UserDefinedTransitionCriterion 
star.lagrangian.voflagrangian.VofLagrangianTransitionCriterion
star.lagrangian.eulerianlagrangian.EulerianLagrangianTransitionCriterion 
star.lagrangian.voflagrangian.VofLagrangianTransitionCriterionManager

star.lagrangian.eulerianlagrangian.EulerianLagrangianTransitionCriterionManager 

star.vof.BlobCloud
star.multiphase.blobdetection.BlobCloud

star.vof.BlobCloudManager

star.multiphase.blobdetection.BlobCloudManager 

star.vof.BlobDetectionBaseModel

// merged to the class "star.multiphase.blobdetection.BlobDetectionModel"

star.vof.BlobDetectionDataSource

star.multiphase.blobdetection.BlobDetectionDataSource 
star.vof.BlobDetectionDataSourceCreator
star.multiphase.blobdetection.BlobDetectionDataSourceCreator 

star.vof.BlobDetectionModel
star.multiphase.blobdetection.BlobDetectionModel 
star.vof.BlobDetectionOption
star.multiphase.blobdetection.BlobDetectionOption

欧拉多相流 (EMP):普朗特数分布的更改

S-Gamma 和自适应多尺寸组 (AMUSIG) 模型使用普朗特数分布的方式已更改,导致宏代码发生更改。

  • S-Gamma 模型(预积分 S-Gamma 模型和离散求积 S-Gamma 模型)

    以前发行版本 Simcenter STAR-CCM+ 2206
    SgammaTurbulentPrandtlNumberProfile sgammaTurbulentPrandtlNumberProfile_0 =
    sgammaModel_0.getSgammaTurbulentPrandtlNumberProfile();
    TurbulentPrandtlNumberProfile turbulentPrandtlNumberProfile_0 =
    sgammaModel_0.getTurbulentPrandtlNumberProfile();
  • 自适应多尺寸组模型

    以前发行版本 Simcenter STAR-CCM+ 2206
    NumberDensityTurbulentPrandtlNumberProfile numberDensityTurbulentPrandtlNumberProfile_0 =
    amusigModel_0.getNumberDensityTurbulentPrandtlNumberProfile();
    TurbulentPrandtlNumberProfile turbulentPrandtlNumberProfile_0 =
    amusigModel_0.getTurbulentPrandtlNumberProfile();

DFBI:欧拉角可用性更高

要使基于欧拉角的计算在运动模拟中的可用范围更加广泛,EulerAngleOption 类已从 star.sixdof 模块移动到 star.motion 模块。如果任何现有 DFBI 宏使用 EulerAngleOption 类,则需要按以下示例更新这些宏。

以前发行版本 Simcenter STAR-CCM+ 2206
import star.sixdof.EulerAngleOption;
import star.motion.EulerAngleOption;
import star.sixdof.*;
// somewhere in the file, class EulerAngleOption is used
import star.sixdof.*;
import star.motion.EulerAngleOption;

固体应力:求解器的更改

由于发生重构,以帮助改进声学模态求解器,固体应力求解器的求解视图和特征模式的宏代码已更改:

  • NormalModesSolutionView 已重命名为 FeSolidStressNormalModesSolutionView
  • NormalModesSolutionViewEigenMode 已重命名为 FeSolidStressNormalModesSolutionViewEigenMode
以前发行版本 Simcenter STAR-CCM+ 2206
private void execute0() {
    Simulation simulation_0 = 
      getActiveSimulation();
    FeSolidStressNormalModesSolver feSolidStressNormalModesSolver_0 = 
      ((FeSolidStressNormalModesSolver) simulation_0.getSolverManager().getSolver(FeSolidStressNormalModesSolver.class));
    NormalModesSolutionView normalModesSolutionView_0 = 
      (NormalModesSolutionView) simulation_0.get(SolutionViewManager.class).createNormalModesSolutionView(feSolidStressNormalModesSolver_0);
    normalModesSolutionView_0.setPresentationName("Normal Modes View 1");
    NormalModesSolutionView normalModesSolutionView_1 = 
      (NormalModesSolutionView) simulation_0.get(SolutionViewManager.class).createNormalModesSolutionView(feSolidStressNormalModesSolver_0);
    normalModesSolutionView_1.setPresentationName("Normal Modes View 2");
    NormalModesSolutionViewEigenMode normalModesSolutionViewEigenMode_0 = 
      normalModesSolutionView_1.getEigenMode();
private void execute0() {
    Simulation simulation_0 = 
      getActiveSimulation();
    FeSolidStressNormalModesSolver feSolidStressNormalModesSolver_0 = 
      ((FeSolidStressNormalModesSolver) simulation_0.getSolverManager().getSolver(FeSolidStressNormalModesSolver.class));
    FeSolidStressNormalModesSolutionView normalModesSolutionView_0 = 
      (FeSolidStressNormalModesSolutionView) simulation_0.get(SolutionViewManager.class).createNormalModesSolutionView(feSolidStressNormalModesSolver_0);
    normalModesSolutionView_0.setPresentationName("Normal Modes View 1");
    FeSolidStressNormalModesSolutionView normalModesSolutionView_1 = 
      (FeSolidStressNormalModesSolutionView) simulation_0.get(SolutionViewManager.class).createNormalModesSolutionView(feSolidStressNormalModesSolver_0);
    normalModesSolutionView_1.setPresentationName("Normal Modes View 2");
    FeSolidStressNormalModesSolutionViewEigenMode normalModesSolutionViewEigenMode_0 = 
      normalModesSolutionView_1.getEigenMode();
import star.modalharmonic.NormalModesSolutionView;
import star.modalharmonic.NormalModesSolutionViewEigenMode;
 public class VisualizingTheNormalModes extends StarMacro {
        @Override
        public void execute() {
            Simulation simulation_0
                    = getActiveSimulation();
            FeSolidStressNormalModesSolver feSolidStressNormalModesSolver_0
                    = ((FeSolidStressNormalModesSolver) simulation_0.getSolverManager().getSolver(FeSolidStressNormalModesSolver.class));
            NormalModesSolutionView normalModesSolutionView_0
                    = (NormalModesSolutionView) simulation_0.get(SolutionViewManager.class).createNormalModesSolutionView(feSolidStressNormalModesSolver_0);
            NormalModesSolutionViewEigenMode normalModesSolutionViewEigenMode_0
                    = normalModesSolutionView_0.getEigenMode();
import star.solidstress.FeSolidStressNormalModesSolutionView;
import star.solidstress.FeSolidStressNormalModesSolutionViewEigenMode;
    public class VisualizingTheNormalModes extends StarMacro {
        @Override
        public void execute() {
            Simulation simulation_0
                    = getActiveSimulation();
            FeSolidStressNormalModesSolver feSolidStressNormalModesSolver_0
                    = ((FeSolidStressNormalModesSolver) simulation_0.getSolverManager().getSolver(FeSolidStressNormalModesSolver.class));
            FeSolidStressNormalModesSolutionView normalModesSolutionView_0
                    = (FeSolidStressNormalModesSolutionView) simulation_0.get(SolutionViewManager.class).createNormalModesSolutionView(feSolidStressNormalModesSolver_0);
            FeSolidStressNormalModesSolutionViewEigenMode normalModesSolutionViewEigenMode_0
                    = normalModesSolutionView_0.getEigenMode();

电磁

励磁线圈和相关模型的更改

由于重构,已对励磁线圈模型和相关模型的宏代码进行更改。按以下说明更新宏代码:

具有 2D 横向磁势模型的励磁线圈模型

以前发行版本 Simcenter STAR-CCM+ 2206
localDirectionFieldDirectionLeaf_0.getDirectionOption().setSelected(LocalDirectionFieldFeatureCurveFlipOption.Type.BACKWARD);
localDirectionFieldDirectionLeaf_0.getDirectionOption().setSelected(LocalDirectionFieldFeatureCurveFlipOption.Type.FORWARD);
localDirectionFieldDirectionLeaf_0.getDirectionOption().setSelected(LocalDirectionFieldFeatureCurveFlipOption.Type.GO);
localDirectionFieldDirectionLeaf_0.getDirectionOption().setSelected(LocalDirectionFieldFeatureCurveFlipOption.Type.RETURN);

有限元励磁线圈模型

以前发行版本 Simcenter STAR-CCM+ 2206
localDirectionFieldDirectionLeaf_0.getDirectionOption().setSelected(LocalDirectionFieldFeatureCurveFlipOption.Type.BACKWARD);
localDirectionFieldDirectionLeaf_0.getDirectionOption().setSelected(LocalDirectionFieldFeatureCurveFlipOption.Type.FORWARD);
localDirectionFieldDirectionLeaf_0.getDirectionOption().setSelected(LocalDirectionFieldFeatureCurveFlipOption.Type.ORIGINAL);
localDirectionFieldDirectionLeaf_0.getDirectionOption().setSelected(LocalDirectionFieldFeatureCurveFlipOption.Type.FLIPPED);
具有 3D 的励磁线圈模型的以下宏代码未更改:
localDirectionFieldProfile_0.getMethod(LocalDirectionFieldFeatureCurveMethod.class).getFlipOption().setSelected(LocalDirectionFieldFeatureCurveFlipOption.Type.BACKWARD);
localDirectionFieldProfile_0.getMethod(LocalDirectionFieldFeatureCurveMethod.class).getFlipOption().setSelected(LocalDirectionFieldFeatureCurveFlipOption.Type.FORWARD);

新磁通量连接报告导致的更改

随着横向磁势模型的磁通量连接报告的引入,宏代码也已更改。

以前发行版本 Simcenter STAR-CCM+ 2206
import star.electromagnetism.magneticpotential.fem.MagneticFluxLinkageReport;
import star.electromagnetism.magneticpotential.fem.RegularizedMagneticFluxLinkageReport;
MagneticFluxLinkageReport magneticFluxLinkageReport_0 = simulation_0.getReportManager().createReport(MagneticFluxLinkageReport.class);
RegularizedMagneticFluxLinkageReport regularizedMagneticFluxLinkageReport_1 = simulation_0.getReportManager().createReport(RegularizedMagneticFluxLinkageReport.class);

对材料属性默认值的更改

已修正的 Steinmetz 模型的以下材料属性的默认值已更改:

  • 涡流损耗系数
  • 磁滞损耗系数
  • Steinmetz 系数 A
  • Steinmetz 系数 B

默认值现在设为零,而不是非零。

要恢复之前的默认值,使用配合涡流损耗系数使用的以下示例中所示的宏代码:

import star.common.*;
import star.base.neo.*;
import star.material.*;
import star.electromagnetism.common.*;
import star.electromagnetism.ohmicheating.*;
    PhysicsContinuum physicsContinuum_0 = 
      ((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum("Physics 1"));
    SolidModel solidModel_0 = 
      physicsContinuum_0.getModelManager().getModel(SolidModel.class);
    Solid solid_0 = 
      ((Solid) solidModel_0.getMaterial());
    ConstantMaterialPropertyMethod constantMaterialPropertyMethod_0 = 
      ((ConstantMaterialPropertyMethod) solid_0.getMaterialProperties().getMaterialProperty(EddyCurrentLossCoefficientProperty.class).getMethod());
    Units units_0 = 
      ((Units) simulation_0.getUnitsManager().getObject("W/kg"));
    constantMaterialPropertyMethod_0.getQuantity().setValueAndUnits(1.0626E-5, units_0);

电化学:摩尔浓度处理的更改

随着引入以摩尔浓度单位输入初始条件和边界条件的功能,宏代码也已更改。具体来说,MolarConcentrationProfile 已移至 species 文件夹,对于 Java 宏文件,要继续工作,应进行以下更改:

以前发行版本 Simcenter STAR-CCM+ 2206
import star.electrochemicalspecies.MolarConcentrationProfile;
import star.species.MolarConcentrationProfile;

后处理:场景和绘图的打开和关闭的更改

由于场景和绘图显示处理改进,宏代码也已更改。open() 的实例应更改为 openInteractive()close() 的实例应更改为 closeInteractive()

要改进批处理运行时,从宏中移除这些调用,因为在 Simcenter STAR-CCM+ 批量运行时会忽略这些调用。

Simcenter STAR-CCM+ In-cylinder

表生成器更改

由于新功能和重构,宏代码也已更改。如果宏引用了先前版本的以下代码中包含的任何表,则需要更新这些宏。

以前发行版本 Simcenter STAR-CCM+ 2206
((EcfmEquilTableGenerator) pc.get(EcfmTableGeneratorManager.class).getObject("Equilibrium Table Generator"));
((EcfmEquilTableGenerator) pc.get(EcfmTableGeneratorManager.class).getObject("ECFM-CLEH Equilibrium Table Generator"));
SootEcfmTableGenerator sootEcfmTblGen = ((SootEcfmTableGenerator) pc.get(EcfmTableGeneratorManager.class).getObject("Soot Table Generator"));
SootEcfmTableGenerator sootEcfmTblGen = ((SootEcfmTableGenerator) pc.get(EcfmTableGeneratorManager.class).getObject("ECFM Soot Table Generator"));

显示器使用的更改

一些冗余标量显示器已更改为部件显示器。因此,Simcenter STAR-CCM+ 2206 中的宏录制中,scalarDisplayer_XX 现记录为 partDisplayer_XX。受影响显示器的示例包括:

  • 进气阀 <N> 显示器 1
  • 排气阀 <N> 显示器 1
  • 气缸显示器 1
  • 气缸活塞表面显示器 1
  • 气缸扇区显示器 1

预计现有的宏将继续正常工作,但为获得最大可靠性,建议更新宏代码,如以下示例所示:

以前发行版本 Simcenter STAR-CCM+ 2206
ScalarDisplayer scalarDisplayer_4
        = ((ScalarDisplayer) scene_2.getDisplayerManager().getObject("Cylinder Sector Displayer 1"));
scalarDisplayer_4.initialize();
PartDisplayer partDisplayer_4
        = ((PartDisplayer) scene_2.getDisplayerManager().getObject("Cylinder Sector Displayer 1"));
partDisplayer_4.initialize();