在 Simcenter STAR-CCM+ 13.04 中,针对表面准备、辐射、反应流体、欧拉多相、多相分离流、DFBI、电磁、设计管理器和协同仿真更改了宏 API。
表面准备
对创建零部件表面、曲线及点的更改
“压印”、“减运算”和“修改选择”工具在为具有用户指定名称的指定零部件创建表面、曲线或点的方式上发生了更改。 预计现有的宏将继续正常工作,但为获得最大可靠性,建议您更新宏代码,如以下零部件表面示例所示:
以前发行版本 |
Simcenter STAR-CCM+ v13.04 |
PartSurface partSurface = meshPart_0.getPartSurfaceManager().createEmptyPartSurface("New Part Surface Name");
|
PartSurface partSurface = partSurfaceMeshWidget_0.createEmptyPartSurfaceWithDependency("New Part Surface Name", meshPart_0);
|
对表面修复用阈值诊断的处理的更改
Simcenter STAR-CCM+ 不再在模拟中表面修复阈值的第一个实例的默认名称中附加一个 1
。 例如,创建面质量阈值后,默认名称是面网格质量而非面网格质量 1。 随后的阈值仍在其默认名称中附加数字,例如面网格质量 2。
如果您的宏包含创建自定义阈值(例如“面网格质量”或“面面积”),请对其进行更新以避免在默认名称中包含 1
,如以下示例所示:
以前发行版本 |
Simcenter STAR-CCM+ v13.04 |
surfaceMeshWidgetDiagnosticsController_0.createDiagnosticThreshold("Face quality" ...)
getThresholdDiagnosticsManager().getObject("Face quality 1");
|
surfaceMeshWidgetDiagnosticsController_0.createDiagnosticThreshold("Face quality" ...)
getThresholdDiagnosticsManager().getObject("Face quality");
|
对网格化参数宏记录的更改
涉及网格化参数的宏记录方法已更改。
预计现有的宏在大多数情况下都能正常工作。 但是,如果您在执行另一个宏时尝试通过批处理命令记录宏,则 Simcenter STAR-CCM+ 可能会生成错误消息。 为确保最大可靠性,请按照以下方式更新宏代码:
以前发行版本 |
Simcenter STAR-CCM+ v13.04 |
TessellationParameters tessellationParameters_0 = new TessellationParameters();
|
TessellationParameters tessellationParameters_0 = new TessellationParameters(getActiveSimulation());
|
对最新网格描述的更改
最新表面网格描述的名称已由最新改为最新表面。 另外,获取最新描述的方法发生更改,从使用对象名称改为明确获取最新描述。 预计现有的宏将继续正常工作,除非操作中包括按名称获取最新描述。
以前发行版本 |
Simcenter STAR-CCM+ v13.04 |
CurrentDescriptionSource currentDescriptionSource_0 = ((CurrentDescriptionSource) simulation_0.get(SimulationMeshPartDescriptionSourceManager.class).getObject("Latest"));
|
CurrentDescriptionSource currentDescriptionSource_0 = simulation_0.get(SimulationMeshPartDescriptionSourceManager.class).getLatestSurfaceDescriptionSource();
|
if (currentDescriptionSource_0.getName() == "Latest")
|
if (currentDescriptionSource_0.getName() == "Latest Surface")
|
辐射:能量模型现在是辐射模型的先决条件
由于重构,能量模型现在是获得辐射模型的先决条件。 因此,您必须先激活能量模型才能激活辐射模型,而不能同时将其激活。 此项新要求导致宏代码更改。
以前发行版本 |
Simcenter STAR-CCM+ v13.04 |
public void execute() {
execute0();
}
private void execute0() {
Simulation simulation_0 =
getActiveSimulation();
PhysicsContinuum physicsContinuum_0 =
((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum("Physics 1"));
physicsContinuum_0.enable(RadiationModel.class);
physicsContinuum_0.enable(S2sModel.class);
physicsContinuum_0.enable(ViewfactorsCalculatorModel.class);
physicsContinuum_0.enable(GrayThermalRadiationModel.class);
physicsContinuum_0.enable(SegregatedFluidEnthalpyModel.class);
}
|
public void execute() {
execute0();
}
private void execute0() {
Simulation simulation_0 =
getActiveSimulation();
PhysicsContinuum physicsContinuum_0 =
((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum("Physics 1"));
physicsContinuum_0.enable(SegregatedFluidEnthalpyModel.class);
physicsContinuum_0.enable(RadiationModel.class);
physicsContinuum_0.enable(S2sModel.class);
physicsContinuum_0.enable(ViewfactorsCalculatorModel.class);
physicsContinuum_0.enable(GrayThermalRadiationModel.class);
}
|
反应流体:新增参数结构
作为重构的一部分,一些模型常数已升级为参数,从而导致宏代码更改。 具体来说,model.setConstant(value);
已改为 model.getConstant().setValue(value);
。 示例如下:
氮氧化物
以前发行版本 |
Simcenter STAR-CCM+ v13.04 |
NoxModel noxModel_0 = physicsContinuum_0.getModelManager().getModel(NoxModel.class);
noxModel_0.setThreshold(500);
|
import star.common.IntegerValue;
NoxModel noxModel_0 =
physicsContinuum_0.getModelManager().getModel(NoxModel.class);
IntegerValue integerValue_0 =
noxModel_0.getThresholdValue();
integerValue_0.getQuantity().setValue(500);
|
小火焰库生成器
以前发行版本 |
Simcenter STAR-CCM+ v13.04 |
FixedGridParameters fixedGridParameters_0 =
tableAxisParameters_0.getFixedGridParameters();
fixedGridParameters_0.setDimensionSize(hlrFixed);
AdaptiveGridParameters adaptiveGridParameters_0 =
tableAxisParameters_0.getAdaptiveGridParameters();
adaptiveGridParameters_0.setMaxDimensionSize(hlrAdaptive);
flameletNumericalSettings_0.setOdeTolAbs(1.0E-17);
flameletNumericalSettings_0.setOdeTolRel(1.0E-12);
flameletNumericalSettings_0.setFlmltRelTol(1.0E-8);
flameletNumericalSettings_0.setFlmltScalarDissipationMultiplier(1.1);
flameletNumericalSettings_0.setFlmltStartScalarDissipation(0.001);
flameletNumericalSettings_0.setFlmltMaxScalarDissipation(100000.0);
flameletTableParameters_0.setZGridStretchFac(1.1);
|
FixedGridParameters fixedGridParameters_0 =
tableAxisParameters_0.getFixedGridParameters();
IntegerValue integerValue_0 =
fixedGridParameters_0.getDimensionSizeValue();
integerValue_0.getQuantity().setValue(hlrFixed);
AdaptiveGridParameters adaptiveGridParameters_0 =
tableAxisParameters_0.getAdaptiveGridParameters();
IntegerValue integerValue_1 =
adaptiveGridParameters_0.getMaxDimensionSizeValue();
integerValue_1.getQuantity().setValue(hlrAdaptive);
flameletNumericalSettings_0.getOdeTolAbs().setValue(1.0E-17);
flameletNumericalSettings_0.getOdeTolRel().setValue(1.0E-12);
flameletNumericalSettings_0.getFlmltRelTol().setValue(1.0E-8);
flameletNumericalSettings_0.getFlmltScalarDissipationMultiplier().setValue(1.1);
flameletNumericalSettings_0.getFlmltStartScalarDissipation().setValue(0.001);
flameletNumericalSettings_0.getFlmltMaxScalarDissipation().setValue(100000.0);
flameletTableParameters_0.getZGridStretchFac().setValue(1.1);
|
点火器
以前发行版本 |
Simcenter STAR-CCM+ v13.04 |
pulseActivator_0.setBegin(100.0);
pulseActivator_0.setEnd(110.0);
|
pulseActivator_0.getBegin().setValue(100.0);
pulseActivator_0.getEnd().setValue(110.0);
|
拟序火焰模型
以前发行版本 |
Simcenter STAR-CCM+ v13.04 |
cfmCombustionModel_0.setAlphaCfm(2.1);
cfmCombustionModel_0.setBetaCfm(5.0);
cfmCombustionModel_0.setACfm(0.1);
cfmCombustionModel_0.setBCfm(1.2);
cfmCombustionModel_0.setCCfm(1.0);
cfmCombustionModel_0.setBUpperVal(1.0);
cfmCombustionModel_0.setBLowerVal(1.0);
|
cfmCombustionModel_0.getAlphaCfm().setValue(2.1);
cfmCombustionModel_0.getBetaCfm().setValue(5.0);
cfmCombustionModel_0.getACfm().setValue(0.1);
cfmCombustionModel_0.getBCfm().setValue(1.2);
cfmCombustionModel_0.getCCfm().setValue(1.0);
cfmCombustionModel_0.getBUpperVal().setValue(1.0);
cfmCombustionModel_0.getBLowerVal().setValue(1.0);
|
湍流火焰速度封闭 (TFC)
以前发行版本 |
Simcenter STAR-CCM+ v13.04 |
((TurbulentFlameSpeedZimontOption) tfcCombustionPartiallyPremixedModel_0.getTurbulentFlameSpeedOption()).setWallEffectConst(1.0);
((CriticalStrainRateChemScaleOption) flameStretchEffect_0.getCriticalStrainRateOption()).setBConst(501.0);
flameStretchEffect_0.setUstrConst(0.27);
((TurbulentFlameSpeedPetersOption) tfcCombustionPartiallyPremixedModel_0.getTurbulentFlameSpeedOption()).setWallEffectConst(1.1);
((TurbulentFlameSpeedPetersOption) tfcCombustionPartiallyPremixedModel_0.getTurbulentFlameSpeedOption()).setA1Constant(0.38);
((TurbulentFlameSpeedPetersOption) tfcCombustionPartiallyPremixedModel_0.getTurbulentFlameSpeedOption()).setA4Constant(0.78);
((TurbulentFlameSpeedPetersOption) tfcCombustionPartiallyPremixedModel_0.getTurbulentFlameSpeedOption()).setB1Constant(1.9);
((TurbulentFlameSpeedPetersOption) tfcCombustionPartiallyPremixedModel_0.getTurbulentFlameSpeedOption()).setB3Constant(1.1);
((TurbulentFlameSpeedPetersOption) tfcCombustionPartiallyPremixedModel_0.getTurbulentFlameSpeedOption()).setEwaldCorrector(1.1);
|
((TurbulentFlameSpeedZimontOption) tfcCombustionPartiallyPremixedModel_0.getTurbulentFlameSpeedOption()).getWallEffectConst().setValue(1.0);
((CriticalStrainRateChemScaleOption) flameStretchEffect_0.getCriticalStrainRateOption()).getBConst().setValue(501.0);
flameStretchEffect_0.getUstrConst().setValue(0.27);
((TurbulentFlameSpeedPetersOption) tfcCombustionPartiallyPremixedModel_0.getTurbulentFlameSpeedOption()).getWallEffectConst().setValue(1.1);
((TurbulentFlameSpeedPetersOption) tfcCombustionPartiallyPremixedModel_0.getTurbulentFlameSpeedOption()).getA1Constant().setValue(0.38);
((TurbulentFlameSpeedPetersOption) tfcCombustionPartiallyPremixedModel_0.getTurbulentFlameSpeedOption()).getA4Constant().setValue(0.78);
((TurbulentFlameSpeedPetersOption) tfcCombustionPartiallyPremixedModel_0.getTurbulentFlameSpeedOption()).getB1Constant().setValue(1.9);
((TurbulentFlameSpeedPetersOption) tfcCombustionPartiallyPremixedModel_0.getTurbulentFlameSpeedOption()).getB3Constant().setValue(1.1);
((TurbulentFlameSpeedPetersOption) tfcCombustionPartiallyPremixedModel_0.getTurbulentFlameSpeedOption()).getEwaldCorrector().setValue(1.1);
|
复杂化学
以前发行版本 |
Simcenter STAR-CCM+ v13.04 |
apAccelerationFactor_0.setApAccelerationFactor(1.0);
complexChemistryCombustionModel_0.setThreshold(51);
cvodeCalculationMethod_0.setATol(1.1E-10);
cvodeCalculationMethod_0.setRTol(1.1E-6);
complexChemistryDmr_0.setDmrErrorTolerance(0.1);
chemistryTimeStepAgglomerationComponent_0.setTol(0.1);
cvodeIsatCalculationMethod_0.setIsatAtol(1.0E-4);
cvodeIsatCalculationMethod_0.setIsatSize(1000.0);
cvodeIsatCalculationMethod_0.setSensAtol(1.0E-5);
cvodeIsatCalculationMethod_0.setSensRtol(0.001);
|
apAccelerationFactor_0.getApAccelerationFactor().setValue(1.0);
IntegerValue integerValue_0 = complexChemistryCombustionModel_0.getThresholdValue();
integerValue_0.getQuantity().setValue(51);
cvodeCalculationMethod_0.getATol().setValue(1.1E-10);
cvodeCalculationMethod_0.getRTol().setValue(1.1E-6);
complexChemistryDmr_0.getDmrErrorTolerance().setValue(0.1);
chemistryTimeStepAgglomerationComponent_0.getTol().setValue(0.1);
cvodeIsatCalculationMethod_0.getIsatAtol().setValue(1.0E-4);
cvodeIsatCalculationMethod_0.getIsatSize().setValue(1000.0);
cvodeIsatCalculationMethod_0.getSensAtol().setValue(1.0E-5);
cvodeIsatCalculationMethod_0.getSensRtol().setValue(0.001);
|
小火焰生成流形 (FGM)
以前发行版本 |
Simcenter STAR-CCM+ v13.04 |
fgmReactionModel_0.setDissipationConstant(2.0);
fgmCombustionModel_0.setAlphaFgm(1.0);
|
fgmReactionModel_0.getDissipationConstant().setValue(2.0);
fgmCombustionModel_0.getAlphaFgm().setValue(1.0);
|
稳态层流小火焰 (SLF)
以前发行版本 |
Simcenter STAR-CCM+ v13.04 |
ppdfFlameletModel_0.setDissipationConstant(2.0);
|
ppdfFlameletModel_0.getDissipationConstant().setValue(2.0);
|
涡破碎
以前发行版本 |
Simcenter STAR-CCM+ v13.04 |
ebuGasCombustionModel_0.setThreshold(0);
|
IntegerValue integerValue_0 =
ebuGasCombustionModel_0.getThresholdValue();
integerValue_0.getQuantity().setValue(0);
|
表面化学
以前发行版本 |
Simcenter STAR-CCM+ v13.04 |
surfaceGasInteractionModel_0.setThreshold(2);
|
IntegerValue integerValue_0 =
surfaceGasInteractionModel_0.getThresholdValue();
integerValue_0.getQuantity().setValue(2);
|
欧拉多相流
对相对区域距离的更改
VOF 中强迫长度的处理方法发生更改,从而导致宏代码更改。
以前发行版本 |
Simcenter STAR-CCM+ v13.04 |
Simulation simulation_0 =
getActiveSimulation();
Region region_0 =
simulation_0.getRegionManager().getRegion("Region");
Boundary boundary_0 =
region_0.getBoundaryManager().getBoundary("Boundary");
BoundaryForcingLength boundaryForcingLength_0 =
boundary_0.getValues().get(BoundaryForcingLength.class);
boundaryForcingLength_0.getBoundaryForcingLength().setValue(1.0);
|
Simulation simulation_0 =
getActiveSimulation();
Region region_0 =
simulation_0.getRegionManager().getRegion("Region");
Boundary boundary_0 =
region_0.getBoundaryManager().getBoundary("Boundary");
VofWaveForcingLength vofWaveForcingLength_0 =
boundary_0.getValues().get(VofWaveForcingLength.class);
vofWaveForcingLength_0.getMethod(ConstantScalarProfileMethod.class).getQuantity().setValue(1.0);
|
针对多组分液体的饱和温度属性的新方法
由于重构,用于指定多组分液体的饱和温度属性的方法已更改。 要更新您的宏,请用 IterativeSaturationTemperaturePropertyMethod
替换所有 MixtureSaturationTemperaturePropertyMethod
实例。
以前发行版本 |
Simcenter STAR-CCM+ v13.04 |
multiComponentDropletMaterial_0.getMaterialProperties().getMaterialProperty(SaturationTemperatureProperty.class).setMethod(MixtureSaturationTemperaturePropertyMethod.class);
|
multiComponentDropletMaterial_0.getMaterialProperties().getMaterialProperty(SaturationTemperatureProperty.class).setMethod(IterativeSaturationTemperaturePropertyMethod.class);
|
对湍流耗散力的更改
由于其卓越性能,湍流耗散力相间相互作用模型现在仅使用对数形式,不再使用基本形式。 因此,该模型的使用对数形式属性已被删除。 在先前版本的 Simcenter STAR-CCM+ 中保存的使用基本形式(即使用对数形式停用)的模拟文件,会以现在正在使用的对数形式在当前版本中打开。
删除使用对数形式选项导致宏代码发生更改,特别是省略了 lsiTurbulentDispersionForceModel_0.setUseLogForm(true);
和 turbulentDispersionForceModel_0.setUseLogForm(true);
等行。
以前发行版本 |
Simcenter STAR-CCM+ v13.04 |
LsiTurbulentDispersionForceModel lsiTurbulentDispersionForceModel_0 =
phaseInteraction_0.getModelManager().getModel(LsiTurbulentDispersionForceModel.class);
lsiTurbulentDispersionForceModel_0.setUseLogForm(true);
|
LsiTurbulentDispersionForceModel lsiTurbulentDispersionForceModel_0 =
phaseInteraction_0.getModelManager().getModel(LsiTurbulentDispersionForceModel.class);
|
PhaseInteraction phaseInteraction_0 =
((PhaseInteraction) multiPhaseInteractionModel_0.getPhaseInteractionManager().getPhaseInteraction("Water-Air"));
TurbulentDispersionForceModel turbulentDispersionForceModel_0 =
phaseInteraction_0.getModelManager().getModel(TurbulentDispersionForceModel.class);
turbulentDispersionForceModel_0.setUseLogForm(true);
|
PhaseInteraction phaseInteraction_0 =
((PhaseInteraction) multiPhaseInteractionModel_0.getPhaseInteractionManager().getPhaseInteraction("Water-Air"));
TurbulentDispersionForceModel turbulentDispersionForceModel_0 =
phaseInteraction_0.getModelManager().getModel(TurbulentDispersionForceModel.class);
|
多相分离流:对默认设置的更改
由于进行了有助于建模湍流耗散和中间区内升力效应的重构,某些默认设置已更改。
在多流体区相间相互作用模型中,不再默认激活大尺度界面湍流阻尼模型。 现在需要在宏中进行明确选择。 要执行此操作,请在宏中添加以下代码:
phaseInteraction_0.enable(LsiTurbDampingModel.class);
另外,您不再需要明确禁用它,因此可以从宏中删除以下代码:
LsiTurbDampingModel lsiTurbDampingModel_0 =
phaseInteraction_0.getModelManager().getModel(LsiTurbDampingModel.class);
phaseInteraction_0.disableModel(lsiTurbDampingModel_0);
中间区中曳力系数节点的方法属性的默认选择已由 Strubelj-Tiselj 改为 Blended。 因此,要选择 Strubelj-Tiselj 方法,请将以下代码添加到宏中(如果适用):
LsiDragForceModel lsiDragForceModel_0 =
phaseInteraction_0.getModelManager().getModel(LsiDragForceModel.class);
lsiDragForceModel_0.getLargeInterfaceEulerianDragCoefficientMethod().setMethod(StrubeljTiseljDragCoefficientMethod.class);
DFBI:对接触耦合的更改
接触耦合的切向力节点的摩擦系数属性已重命名为动态摩擦系数,从而与新引入的支持静态和动态摩擦的接触约束保持一致。 此新名称导致了宏代码更改。
预计现有的宏将继续正常工作,但为获得最大可靠性,建议您更新宏代码,如以下示例所示。
以前发行版本 |
Simcenter STAR-CCM+ v13.04 |
ContactCoupling contactCoupling_0 =
((ContactCoupling) simulation_0.get(SixDofBodyCouplingManager.class).getObject("Contact 1"));
TangentialContactForce tangentialContactForce_0 =
contactCoupling_0.getTangentialForce();
tangentialContactForce_0.getFrictionCoefficient().setValue(0.3);
|
ContactCoupling contactCoupling_0 =
((ContactCoupling) simulation_0.get(SixDofBodyCouplingManager.class).getObject("Contact 1"));
TangentialContactForce tangentialContactForce_0 =
contactCoupling_0.getTangentialForce();
tangentialContactForce_0.getDynamicFrictionCoefficient().setValue(0.3);
|
电磁
准非稳态损失已重命名为涡流抑制
准非稳态损失模型的名称已改为涡流抑制,并且此重命名的模型还包括零导电率材料属性方法。 这些修改导致宏代码发生更改。
以前发行版本 |
Simcenter STAR-CCM+ v13.04 |
import star.electromagnetism.ohmicheating.QuasiUnsteadyLossesModel;
PhysicsContinuum physicsContinuum_0 =
simulation_0.getContinuumManager().createContinuum(PhysicsContinuum.class);
physicsContinuum_0.enable(QuasiUnsteadyLossesModel.class);
|
import star.electromagnetism.ohmicheating.EddyCurrentSuppressionModel;
PhysicsContinuum physicsContinuum_0 =
simulation_0.getContinuumManager().createContinuum(PhysicsContinuum.class);
physicsContinuum_0.enable(EddyCurrentSuppressionModel.class);
|
MultiPartSolidModel multiPartSolidModel_0 =
physicsContinuum_0.getModelManager().getModel(MultiPartSolidModel.class);
MultiComponentSolidMaterial multiComponentSolidMaterial_0 =
((MultiComponentSolidMaterial) multiPartSolidModel_0.getMixture());
SolidComponent solidComponent_0 =
((SolidComponent) multiComponentSolidMaterial_0.getComponents().getComponent("Concrete"));
solidComponent_0.getMaterialProperties().getMaterialProperty(ElectricalConductivityProperty.class).setMethod(NullMaterialPropertyMethod.class);
|
MultiPartSolidModel multiPartSolidModel_0 =
physicsContinuum_0.getModelManager().getModel(MultiPartSolidModel.class);
MultiComponentSolidMaterial multiComponentSolidMaterial_0 =
((MultiComponentSolidMaterial) multiPartSolidModel_0.getMixture());
SolidComponent solidComponent_0 =
((SolidComponent) multiComponentSolidMaterial_0.getComponents().getComponent("Concrete"));
solidComponent_0.getMaterialProperties().getMaterialProperty(ElectricalConductivityProperty.class).setMethod(EddyCurrentSuppressionMethod.class);
|
对 FE 磁矢势求解器更新方法的更改
为适应非线性材料用 FE 磁矢势求解器的改进牛顿法选项,求解器计算方法经过调整,从而导致宏代码发生更改。
以前发行版本 |
Simcenter STAR-CCM+ v13.04 |
MatrixUpdateStrategy matrixUpdateStrategy = getActiveSimulation().getSolverManager().getSolver(FiniteElementMagneticVectorPotentialSolver.class)).getMatrixUpdateStrategy();
matrixUpdateStrategy.getMatrixUpdateStrategyOption().setSelected(MatrixUpdateStrategyOption.Type.REUSE);
|
MatrixUpdateStrategy matrixUpdateStrategy = getActiveSimulation().getSolverManager().getSolver(FiniteElementMagneticVectorPotentialSolver.class)).getMatrixUpdateStrategy();
matrixUpdateStrategy.getMatrixUpdateStrategyOption().setSelected(MatrixUpdateStrategyOption.Type.MODIFIED_NEWTON);
|
设计管理器
对场景功能的更改
设计管理器中的场景功能经过修改,从而导致宏代码的小幅改动。 在当前版本中,您无需任何参数即可使用基础类 open()
方法。
预计现有的宏将继续正常工作,但为获得最大可靠性,建议您更新宏代码,如以下示例所示。
以前发行版本 |
Simcenter STAR-CCM+ v13.04 |
MdxProject mdxProject_0 =
getActiveMdxProject();
MdxDesignSceneView mdxDesignSceneView_0 =
((MdxDesignSceneView) mdxProject_0.get(MdxDesignViewManager.class).getDesignView("WeightedOpt-Scalar"));
mdxDesignSceneView_0.initializeAndWait();
mdxDesignSceneView_0.open(true);
|
MdxProject mdxProject_0 =
getActiveMdxProject();
MdxDesignSceneView mdxDesignSceneView_0 =
((MdxDesignSceneView) mdxProject_0.get(MdxDesignViewManager.class).getDesignView("WeightedOpt-Scalar"));
mdxDesignSceneView_0.initializeAndWait();
mdxDesignSceneView_0.open();
|
对手动设计种子的更改
设计管理器中新增了对具有响应的手动设计种子的支持,从而导致宏代码发生更改。
手动研究中的手动设计表
以前发行版本 |
Simcenter STAR-CCM+ v13.04 |
MdxStudyParameter mdxStudyParameter_0 = ((MdxStudyParameter)mdxDesignStudy_0.getStudyParameters().getObject("depth"));
MdxStudyParameter mdxStudyParameter_1 = ((MdxStudyParameter) mdxDesignStudy_0.getStudyParameters().getObject("extrude"));
Units units_0 = ((Units) mdxProject_0.get(UnitsManager.class).getObject("m"));
MdxDesignTable mdxDesignTable_0 = mdxDesignStudy_0.getDesignTable();
mdxDesignTable_0.getDesignTableData();
mdxDesignTable_0.addRows(new StringVector(new String[] {"Manual Design 1"}), new Vector(Arrays.asList(new DoubleWithUnits(0.1, units_0), new DoubleWithUnits(0.6, units_0))));
mdxDesignTable_0.getDesignTableData();
mdxDesignTable_0.setDesignName(0, "ManualDesign1");
mdxDesignTable_0.getDesignTableData();
mdxDesignTable_0.setValue(0, 0, new DoubleWithUnits(0.11, units_0));
|
MdxStudyParameter mdxStudyParameter_0 = ((MdxStudyParameter) mdxDesignStudy_0.getStudyParameters().getObject("depth"));
MdxStudyParameter mdxStudyParameter_1 = ((MdxStudyParameter) mdxDesignStudy_0.getStudyParameters().getObject("extrude"));
Units units_0 = ((Units) mdxProject_0.get(UnitsManager.class).getObject("m"));
MdxDesignTable mdxDesignTable_0 = mdxDesignStudy_0.getDesignTable();
mdxDesignTable_0.addNewRows(new StringVector(new String[] {"Manual Design 1"}), new Vector(Arrays.asList(((MdxStudyParameterColumn) mdxDesignTable_0.getTableColumns().getDesignTableColumn("depth")), ((MdxStudyParameterColumn) mdxDesignTable_0.getTableColumns().getDesignTableColumn("extrude")))), new Vector(Arrays.asList(new DoubleWithUnits(0.1, units_0), new DoubleWithUnits(0.6, units_0))));
MdxDesignNameColumn mdxDesignNameColumn_0 =
((MdxDesignNameColumn) mdxDesignTable_0.getTableColumns().getDesignTableColumn("DesignName"));
mdxDesignTable_0.setDesignName(mdxDesignNameColumn_0, 0, "ManualDesign1");
MdxStudyParameterColumn mdxStudyParameterColumn_0 = ((MdxStudyParameterColumn) mdxDesignTable_0.getTableColumns().getDesignTableColumn("depth"));
mdxDesignTable_0.setValue(mdxStudyParameterColumn_0, 0, new DoubleWithUnits(0.11, units_0));
|
优化研究中的手动设计种子表
setDesignName
和 SetValue
除进行了相同的上述更改外,还添加了一行和一个布尔列,用于指示是否包含响应值并添加了响应列。
以前发行版本 |
Simcenter STAR-CCM+ v13.04 |
mdxDesignTable_1.addRows(new StringVector(new String[] {"Manual Design 1"}), new Vector(Arrays.asList(new DoubleWithUnits(0.1, units_0), new DoubleWithUnits(0.6, units_0))));
mdxDesignTable_1.getDesignTableData();
|
Units units_0 = ((Units) mdxProject_0.get(UnitsManager.class).getObject("m"));
Units units_1 = ((Units) mdxProject_0.get(UnitsManager.class).getObject("Pa"));
mdxDesignTable_1.addNewRows(new StringVector(new String[] {"Manual Design 1"}), new BooleanVector(new boolean[] {false}), new Vector(Arrays.asList(((MdxStudyParameterColumn) mdxDesignTable_1.getTableColumns().getDesignTableColumn("depth")), ((MdxStudyParameterColumn) mdxDesignTable_1.getTableColumns().getDesignTableColumn("extrude")), ((MdxStudyResponseColumn) mdxDesignTable_1.getTableColumns().getDesignTableColumn("InletPressure")))), new Vector(Arrays.asList(new DoubleWithUnits(0.1, units_0), new DoubleWithUnits(0.6, units_0), new DoubleWithUnits(0.0, units_1))));
|
协同仿真
结束对单精度 GT-SUITE 耦合库的支持
Simcenter STAR-CCM+ 不再支持单精度 GT-SUITE 耦合库 gtlink
协同仿真。 要更新您的宏,请删除所有包含 CouplingPrecisionOption
的行,例如:
import star.cosimulation.link.common.CouplingPrecisionOption;
coSimulation_0.getCoSimulationConditions().get(CouplingPrecisionOption.class).setSelected(CouplingPrecisionOption.Type.SINGLE);
删除了 Amesim 基于步的耦合选项
作为工作流改进的一部分,Amesim 基于步的耦合选项已被删除,导致宏代码发生更改。
要更新您的宏,请删除所有以下代码行实例:
import star.cosimulation.common.CoupleFromStep;
CoupleFromStep coupleFromStep_0 =
coSimulation_0.getCoSimulationValues().get(CoupleFromStep.class);
coupleFromStep_0.setCoupleFromStep(5);
对场指定的更改
由于场指定的重构,宏代码发生更改。
ConvectiveFluxImportSpecification
已替换为 ReferenceTemperatureImportSpecification
和 HeatTransferCoefficientImportSpecification
。
以前发行版本 |
Simcenter STAR-CCM+ v13.04 |
import star.cosimulation.common.ConvectiveFluxImportSpecification;
|
import star.cosimulation.common.HeatTransferCoefficientImportSpecification;
import star.cosimulation.common.ReferenceTemperatureImportSpecification;
|
ConvectiveFluxImportSpecification convectiveFluxImportSpecification_0 =
((ConvectiveFluxImportSpecification) coSimulationZone_0.getCoSimulationZoneConditions().get(ImportSpecificationManager.class).getObject("Convective Flux"));
|
HeatTransferCoefficientImportSpecification heatTransferCoefficientImportSpecification_0 =
((HeatTransferCoefficientImportSpecification) coSimulationZone_0.getCoSimulationZoneConditions().get(ImportSpecificationManager.class).getObject("Heat Transfer Coefficient"));
ReferenceTemperatureImportSpecification referenceTemperatureImportSpecification_0 =
((ReferenceTemperatureImportSpecification) coSimulationZone_0.getCoSimulationZoneConditions().get(ImportSpecificationManager.class).getObject("Reference Temperature"));
coSimulationZone_0.getCoSimulationZoneConditions().get(WallThermalManagementOption.class).setSelected(WallThermalManagementOption.Type.CONVECTION); // if the original import specification was managed
|
ConvectiveFluxImportSpecification convectiveFluxImportSpecification_1 =
((ConvectiveFluxImportSpecification) coSimulationZone_0.getCoSimulationZoneConditions().get(ImportSpecificationManager.class).getObject("Environmental Flux"));
|
HeatTransferCoefficientImportSpecification heatTransferCoefficientImportSpecification_0 =
((HeatTransferCoefficientImportSpecification) coSimulationZone_0.getCoSimulationZoneConditions().get(ImportSpecificationManager.class).getObject("Heat Transfer Coefficient"));
ReferenceTemperatureImportSpecification referenceTemperatureImportSpecification_0 =
((ReferenceTemperatureImportSpecification) coSimulationZone_0.getCoSimulationZoneConditions().get(ImportSpecificationManager.class).getObject("Reference Temperature"));
coSimulationZone_0.getCoSimulationZoneConditions().get(WallThermalManagementOption.class).setSelected(WallThermalManagementOption.Type.ENVIRONMENT); // if the original import specification was managed
|
TractionImportSpecification
已替换为 ReferenceTemperatureImportSpecification
和 HeatTransferCoefficientImportSpecification
。
以前发行版本 |
Simcenter STAR-CCM+ v13.04 |
import star.cosimulation.common.TractionImportSpecification;
|
import star.cosimulation.common.PressureImportSpecification;
import star.cosimulation.common.WallShearStressImportSpecification;
|
TractionImportSpecification tractionImportSpecification_0 =
((TractionImportSpecification) coSimulationZone_0.getCoSimulationZoneConditions().get(ImportSpecificationManager.class).getObject("Traction"));
|
PressureImportSpecification pressureImportSpecification_0 =
((PressureImportSpecification) coSimulationZone_0.getCoSimulationZoneConditions().get(ImportSpecificationManager.class).getObject("Pressure"));
WallShearStressImportSpecification wallShearStressImportSpecification_0 =
((WallShearStressImportSpecification) coSimulationZone_0.getCoSimulationZoneConditions().get(ImportSpecificationManager.class).getObject("Wall Shear Stress"));
|
ConvectiveFluxExportSpecification
已替换为 ReferenceTemperatureExportSpecification
和 HeatTransferCoefficientExportSpecification
。
以前发行版本 |
Simcenter STAR-CCM+ v13.04 |
import star.cosimulation.common.ConvectiveFluxExportSpecification;
|
import star.cosimulation.common.HeatTransferCoefficientExportSpecification;
import star.cosimulation.common.ReferenceTemperatureExportSpecification;
|
ConvectiveFluxExportSpecification convectiveFluxExportSpecification_0 =
((ConvectiveFluxExportSpecification) coSimulationZone_0.getCoSimulationZoneConditions().get(ExportSpecificationManager.class).getObject("Convective Flux"));
|
HeatTransferCoefficientExportSpecification heatTransferCoefficientExportSpecification_0 =
((HeatTransferCoefficientExportSpecification) coSimulationZone_0.getCoSimulationZoneConditions().get(ExportSpecificationManager.class).getObject("Heat Transfer Coefficient"));
ReferenceTemperatureExportSpecification referenceTemperatureExportSpecification_0 =
((ReferenceTemperatureExportSpecification) coSimulationZone_0.getCoSimulationZoneConditions().get(ExportSpecificationManager.class).getObject("Reference Temperature"));
|
convectiveFluxExportSpecification_0.setFieldFunction(primitiveFieldFunction_0, 0);
convectiveFluxExportSpecification_0.setFieldFunction(primitiveFieldFunction_1, 1);
|
heatTransferCoefficientExportSpecification_0.setFieldFunction(primitiveFieldFunction_0);
referenceTemperatureExportSpecification_0.setFieldFunction(primitiveFieldFunction_1);
|
TractionExportSpecification
已替换为 ReferenceTemperatureExportSpecification
和 HeatTransferCoefficientExportSpecification
。
以前发行版本 |
Simcenter STAR-CCM+ v13.04 |
import star.cosimulation.common.TractionExportSpecification;
|
import star.cosimulation.common.PressureExportSpecification;
import star.cosimulation.common.WallShearStressExportSpecification;
|
TractionExportSpecification tractionExportSpecification_0 =
((TractionExportSpecification) coSimulationZone_0.getCoSimulationZoneConditions().get(ExportSpecificationManager.class).getObject("Traction"));
|
PressureExportSpecification pressureExportSpecification_0 =
((PressureExportSpecification) coSimulationZone_0.getCoSimulationZoneConditions().get(ExportSpecificationManager.class).getObject("Pressure"));
WallShearStressExportSpecification wallShearStressExportSpecification_0 =
((WallShearStressExportSpecification) coSimulationZone_0.getCoSimulationZoneConditions().get(ExportSpecificationManager.class).getObject("Wall Shear Stress"));
|
tractionExportSpecification_0.setFieldFunction(primitiveFieldFunction_0, 0);
tractionExportSpecification_0.setFieldFunction(primitiveFieldFunction_1, 1);
|
pressureExportSpecification_0.setFieldFunction(primitiveFieldFunction_0);
wallShearStressExportSpecification_0.setFieldFunction(primitiveFieldFunction_1);
|
ConvectiveFluxMapper
已替换为 FieldMapper
。
以前发行版本 |
Simcenter STAR-CCM+ v13.04 |
import star.cosimulation.common.ConvectiveFluxMapper;
|
import star.cosimulation.common.FieldMapper;
|
ConvectiveFluxMapper convectiveFluxMapper_0 =
((ConvectiveFluxMapper) coSimulationZone_0.getCoSimulationZoneValues().get(ExportMapperManager.class).getObject("Convective Flux"));
convectiveFluxMapper_0.setHTCMapper(surfaceDataMapper_0);
convectiveFluxMapper_0.setRefTempMapper(surfaceDataMapper_0);
convectiveFluxMapper_0.setReferenceTemperatureMapper(surfaceDataMapper_0);
|
FieldMapper fieldMapper_0 =
((FieldMapper) coSimulationZone_0.getCoSimulationZoneValues().get(ExportMapperManager.class).getObject("Heat Transfer Coefficient"));
fieldMapper_0.setMapper(surfaceDataMapper_0);
FieldMapper fieldMapper_1 =
((FieldMapper) coSimulationZone_0.getCoSimulationZoneValues().get(ExportMapperManager.class).getObject("Reference Temperature"));
fieldMapper_1.setMapper(surfaceDataMapper_0);
|
TractionMapper
已替换为 FieldMapper
。
以前发行版本 |
Simcenter STAR-CCM+ v13.04 |
import star.cosimulation.common.TractionMapper;
|
import star.cosimulation.common.FieldMapper;
|
TractionMapper tractionMapper_0 =
((TractionMapper) coSimulationZone_0.getCoSimulationZoneValues().get(ExportMapperManager.class).getObject("Traction"));
tractionMapper_0.setPressureMapper(surfaceDataMapper_0);
tractionMapper_0.setWSSMapper(surfaceDataMapper_0);
|
FieldMapper fieldMapper_0 =
((FieldMapper) coSimulationZone_0.getCoSimulationZoneValues().get(ExportMapperManager.class).getObject("Pressure"));
fieldMapper_0.setMapper(surfaceDataMapper_0);
FieldMapper fieldMapper_1 =
((FieldMapper) coSimulationZone_0.getCoSimulationZoneValues().get(ExportMapperManager.class).getObject("Wall Shear Stress"));
fieldMapper_1.setMapper(surfaceDataMapper_0);
|
其他映射器已替换为 FieldMapper
:
以前发行版本 |
Simcenter STAR-CCM+ v13.04 |
import star.cosimulation.common.PressureMapper;
PressureMapper pressureMapper_0 =
((PressureMapper) coSimulationZone_0.getCoSimulationZoneValues().get(ExportMapperManager.class).getObject("Pressure"));
pressureMapper_0.setPressureMapper(surfaceDataMapper_0);
|
import star.cosimulation.common.FieldMapper;
FieldMapper fieldMapper_0 =
((FieldMapper) coSimulationZone_0.getCoSimulationZoneValues().get(ExportMapperManager.class).getObject("Pressure"));
fieldMapper_0.setMapper(surfaceDataMapper_0);
|
import star.cosimulation.common.TemperatureMapper;
TemperatureMapper temperatureMapper_0 =
((TemperatureMapper) coSimulationZone_0.getCoSimulationZoneValues().get(ExportMapperManager.class).getObject("Temperature"));
temperatureMapper_0.setTemperatureMapper(surfaceDataMapper_0);
|
import star.cosimulation.common.FieldMapper;
FieldMapper fieldMapper_0 =
((FieldMapper) coSimulationZone_0.getCoSimulationZoneValues().get(ExportMapperManager.class).getObject("Temperature"));
fieldMapper_0.setMapper(surfaceDataMapper_0);
|
import star.cosimulation.common.DisplacementMapper;
DisplacementMapper displacementMapper_0 =
((DisplacementMapper) coSimulationZone_0.getCoSimulationZoneValues().get(ExportMapperManager.class).getObject("Displacement"));
displacementMapper_0.setDisplacementMapper(surfaceDataMapper_0);
|
import star.cosimulation.common.FieldMapper;
FieldMapper fieldMapper_0 =
((FieldMapper) coSimulationZone_0.getCoSimulationZoneValues().get(ExportMapperManager.class).getObject("Displacement"));
fieldMapper_0.setMapper(surfaceDataMapper_0);
|
import star.cosimulation.common.AuxiliaryFieldMapper;
AuxiliaryFieldMapper auxiliaryFieldMapper_0 =
((AuxiliaryFieldMapper) coSimulationZone_0.getCoSimulationZoneValues().get(ExportMapperManager.class).getObject("Scalar Auxiliary Field 1"));
auxiliaryFieldMapper_0.setAuxiliaryFieldMapper(surfaceDataMapper_0);
|
import star.cosimulation.common.FieldMapper;
FieldMapper fieldMapper_0 =
((FieldMapper) coSimulationZone_0.getCoSimulationZoneValues().get(ExportMapperManager.class).getObject("Scalar Auxiliary Field 1"));
fieldMapper_0.setMapper(surfaceDataMapper_0);
|