在 Simcenter STAR-CCM+ 12.04 中,针对表面准备、零部件操作、动态查询、DFBI、有限元分析、反应流体、欧拉多相、电磁、电化学和协同仿真进行了宏 API 的更改。
表面准备
对拉伸网格生成器用户界面的更改
为适应非笛卡尔坐标系,表面拉伸操作的用户界面已更改,导致宏代码更改。
以前发行版本 |
Simcenter STAR-CCM+ v12.04 |
surfaceExtruderOperation_0.getSurfaceExtruderControls().get(SurfaceExtruderDistance.class).setUnits(units_0);
surfaceExtruderOperation_0.getSurfaceExtruderControls().get(SurfaceExtruderDistance.class).setValue(0.1);
surfaceExtruderOperation_0.setOutputMode(SurfaceExtruderOperation.OutputMode.SINGLE_NEW_PART);
surfaceExtruderOperation_0.setPreExecuteMode(SurfaceExtruderOperation.PreExecuteMode.ALL_PERTINENT);
SurfaceExtruderDirection surfaceExtruderDirection_0 =
surfaceExtruderOperation_0.getSurfaceExtruderControls().get(SurfaceExtruderDirection.class);
surfaceExtruderDirection_0.setDirectionMode(SurfaceExtruderDirection.DirectionMode.SPECIFIED);
SurfaceExtruderUserSpecifiedDirection surfaceExtruderUserSpecifiedDirection_0 =
surfaceExtruderDirection_0.getUserSpecifiedDirection();
surfaceExtruderUserSpecifiedDirection_0.getDirection().setComponents(2.0, 3.0, 4.0);
|
SurfaceExtruderDirection surfaceExtruderDirection_0 =
surfaceExtruderOperation_0.getSurfaceExtruderControls().get(SurfaceExtruderDirection.class);
surfaceExtruderDirection_0.getExtrusionDistance().setUnits(units_0);
surfaceExtruderDirection_0.getExtrusionDistance().setValue(0.1);
surfaceExtruderOperation_0.setOutputMode(SurfaceExtruderOperation.OutputMode.SINGLE_NEW_PART);
surfaceExtruderOperation_0.setPreExecuteMode(SurfaceExtruderOperation.PreExecuteMode.ALL_PERTINENT);
surfaceExtruderDirection_0.setDirectionMode(SurfaceExtruderDirection.DirectionMode.SPECIFIED);
SurfaceExtruderUserSpecifiedDirection surfaceExtruderUserSpecifiedDirection_0 =
surfaceExtruderDirection_0.getUserSpecifiedDirection();
Coordinate coordinate_0 =
surfaceExtruderUserSpecifiedDirection_0.getDirection();
coordinate_0.setCoordinate(units_0, units_0, units_0, new DoubleVector(new double[] {2.0, 3.0, 4.0}));
|
零部件操作:复合零部件重复的更改
复合零部件上的重复命令已更改,导致宏代码更改。
以前发行版本 |
Simcenter STAR-CCM+ v12.04 |
// Composite part "top" contains a nested composite part named "middle"
CompositePart compositePart_0 =
((CompositePart) simulation_0.get(SimulationPartManager.class).getPart("top"));
CompositePart compositePart_1 =
((CompositePart) compositePart_0.getChildParts().getPart("middle"));
// duplicate the entire assembly by duplicating "top"
CompositePart compositePart_2 =
(CompositePart) compositePart_0.duplicatePart(simulation_0.get(SimulationPartManager.class));
// The duplicatePart API has modified the nested composite part's name to "middle 1"
CompositePart compositePart_3 =
((CompositePart) compositePart_2.getChildParts().getPart("middle 1"));
|
// Composite part "top" contains a nested composite part named "middle"
CompositePart compositePart_0 =
((CompositePart) simulation_0.get(SimulationPartManager.class).getPart("top"));
CompositePart compositePart_1 =
((CompositePart) compositePart_0.getChildParts().getPart("middle"));
// duplicate the entire assembly by duplicating "top"
CompositePart compositePart_2 =
(CompositePart) compositePart_0.duplicatePart(simulation_0.get(SimulationPartManager.class));
// The duplicatePart API no longer modifies the name of the nested composite part
CompositePart compositePart_3 =
((CompositePart) compositePart_2.getChildParts().getPart("middle"));
|
动态查询:区域分配的更改
Simcenter STAR-CCM+ 的动态查询更改,导致宏代码更改。 如果您的宏包括对象 ManagerWithQuery
,请按此处的说明更新宏。
如果设置了动态查询,在尝试调用对象 addObjects
、removeObjects
或 eraseObjects
时,ManagerWithQuery
会生成一个例外。 如果未设置查询,这些对象会正常运行。
例如,假设您有一个具有查询设置的管理器,其当前对象是 A
和 B
:
manager.getQuery(); // == true
manager.getObjects(); // == [A, B]
调用旧版本中的 addObjects
、removeObjects
或 eraseObjects
不会更改对象:
manager.addObjects(C); // or manager.removeObjects(B)
// or manager.eraseObjects(B)
manager.getObjects(); // == [A, B]
当前版本会生成 IllegalStateException
错误:
manager.addObjects(C); // IllegalStateException
manager.removeObjects(B); // IllegalStateException
manager.eraseObjects(B); // IllegalStateException
建议您要么将查询显式设置为 null
,要么在调用对象前检查并确认未设置查询:
manager.setQuery(null);
manager.addObjects(C); // objects will now be [A, B, C]
或者:
if (!manager.hasQuery() {
manager.removeObjects(B); // objects will now be [A]
DFBI
对体创建的更改
在引入 2D 体后,创建体的方式已更改。 在当前版本中,createBody
方法包含额外的布尔参数,如果新体是 3D,此参数为 true
。 为确保向后兼容,无任何参数的旧 createBody
方法仍能使用(它可创建 3D 体)。 以下示例显示了创建 3D 体的新旧方法间的变化:
以前发行版本 |
Simcenter STAR-CCM+ v12.04 |
star.sixdof.Body sixdofBody_0 =
simulation_0.get(star.sixdof.BodyManager.class).createBody();
|
star.sixdof.Body sixdofBody_0 =
simulation_0.get(star.sixdof.BodyManager.class).createBody(true);
|
对叠加运动的更改
已对 DFBI 叠加运动机制实施更改,导致宏代码更改。 为确保向后兼容,旧机制仍能在当前版本的 Simcenter STAR-CCM+ 中运行。
以前发行版本 |
Simcenter STAR-CCM+ v12.04 |
Simulation simulation_0 =
getActiveSimulation();
SixDofPlusRotatingMotion sixDofPlusRotatingMotion_0 =
simulation_0.get(MotionManager.class).createMotion(SixDofPlusRotatingMotion.class, "DFBI Superposed Rotation");
sixDofPlusRotatingMotion_0.getAxisVector().setComponents(1.0, 0.0, 0.0);
sixDofPlusRotatingMotion_0.getOriginVector().setComponents(0.0, 0.0, -0.1);
Units units_0 =
((Units) simulation_0.getUnitsManager().getObject("rps"));
superposingRotatingMotion_0.getRotationRate().setUnits(units_0);
sixDofPlusRotatingMotion_0.getRotationRate().setValue(20.0);
Region region_0 =
simulation_0.getRegionManager().getRegion("PropellerRegion");
MotionSpecification motionSpecification_0 =
region_0.getValues().get(MotionSpecification.class);
motionSpecification_0.setMotion(sixDofPlusRotatingMotion_0);
|
Simulation simulation_0 =
getActiveSimulation();
star.sixdof.Body sixdofBody_0 =
((star.sixdof.Body) simulation_0.get(star.sixdof.BodyManager.class).getObject("Body 1"));
SixDofBodyMotion sixDofBodyMotion_0 =
(SixDofBodyMotion) sixdofBody_0.createSixDofBodyMotion();
LabCoordinateSystem labCoordinateSystem_0 =
simulation_0.getCoordinateSystemManager().getLabCoordinateSystem();
CartesianCoordinateSystem cartesianCoordinateSystem_0 =
((CartesianCoordinateSystem) labCoordinateSystem_0.getLocalCoordinateSystemManager().getObject("Body 1-CSys"));
CartesianCoordinateSystem cartesianCoordinateSystem_1 =
cartesianCoordinateSystem_0.getLocalCoordinateSystemManager().createLocalCoordinateSystem(CartesianCoordinateSystem.class, "Cartesian");
SuperposingRotatingMotion superposingRotatingMotion_0 =
sixDofBodyMotion_0.getSuperposingMotionManager().createSuperposingMotion(SuperposingRotatingMotion.class, "Superposing Rotation");
superposingRotatingMotion_0.setCoordinateSystem(cartesianCoordinateSystem_1);
superposingRotatingMotion_0.getAxisDirection().setComponents(1.0, 0.0, 0.0);
superposingRotatingMotion_0.getAxisOrigin().setComponents(0.0, 0.0, -0.1);
Units units_0 =
((Units) simulation_0.getUnitsManager().getObject("rps"));
superposingRotatingMotion_0.getRotationRate().setUnits(units_0);
superposingRotatingMotion_0.getRotationRate().setValue(20.0);
Region region_0 =
simulation_0.getRegionManager().getRegion("PropellerRegion");
MotionSpecification motionSpecification_0 =
region_0.getValues().get(MotionSpecification.class);
motionSpecification_0.setMotion(superposingRotatingMotion_0);
|
有限元分析:对积分阶数选项的更改
有限元磁矢势模型的积分阶数选项已更改,导致宏代码更改。 类 star.electromagnetism.magneticpotential.fem.FeIntegrationOrderOption
已重命名为 star.fea.common.models.FeIntegrationOrderOption
。 例如,导入
语句更改如下:
以前发行版本 |
Simcenter STAR-CCM+ v12.04 |
import star.electromagnetism.magneticpotential.fem.FeIntegrationOrderOption
|
import star.fea.common.models.FeIntegrationOrderOption;
|
反应流体
对多相反应的更改
液-固界面和流体域体积的多相反应计算方法已更改,导致宏代码更改。 类 InterphaseReactionRateModel
已更改为 EmpInterphaseReactionModel
。
以前发行版本 |
Simcenter STAR-CCM+ v12.04 |
phaseInteraction_0.enable(InterphaseReactionRateModel.class);
|
phaseInteraction_0.enable(EmpInterphaseReactionModel.class);
|
InterphaseReactionRateModel interphaseReactionRateModel_0 =
phaseInteraction_0.getModelManager().getModel(InterphaseReactionRateModel.class);
|
EmpInterphaseReactionModel empInterphaseReactionModel_0 =
phaseInteraction_0.getModelManager().getModel(EmpInterphaseReactionModel.class);
|
((ReactionManager) interphaseReactionRateModel_0.getReactions()).createReaction();
|
((ReactionManager) empInterphaseReactionModel_0.getReactions()).createReaction();
|
对于采用连续-离散相互作用建模的欧拉多相,当使用的相间反应具有旧版本 Simcenter STAR-CCM+ 中的用户自定义的速率时,应更改场函数。 具体来说,早期的反应速率 [kmol/s]
现在应为 [kmol/m2/sec]
。
以下是宏代码的更改示例:
以前发行版本 |
Simcenter STAR-CCM+ v12.04 |
userFieldFunction_0.setFunctionName("ReactionRate");
userFieldFunction_0.setDefinition("($TemperatureAir>$TemperatureWater)?2.e-5*($TemperatureAir-$TemperatureWater):0");
|
userFieldFunction_0.setFunctionName("ReactionRate");
userFieldFunction_0.setDefinition("($TemperatureAir>$TemperatureWater)?2.e-5*($TemperatureAir-$TemperatureWater)/${InteractionAreaDensityPhase Interaction 1}:0");
|
对碳烟双方程模型的更改
碳烟建模方法已更改,导致下列宏代码更改:
以前发行版本 |
Simcenter STAR-CCM+ v12.04 |
sootTwoEquationModelProperties_0.getSootNucleationModelOption().setSelected(SootNucleationModelOption.PAH_BASED);
|
sootTwoEquationModelProperties_0.getSootNucleationModelOption().setSelected(SootTwoEquationNucleationOption.PAH_BASED);
|
欧拉多相
对离散多相 (DMP) 和流体域体积 (VOF) 的相间相互作用模型的更改
为适应新 DMP-VOF 相间相互作用模型结构,DispersedPhasePressureGradientModel
类已删除。
以前发行版本 |
Simcenter STAR-CCM+ v12.04 |
PhaseInteraction phaseInteraction_1 =
multiPhaseInteractionModel_0.createPhaseInteraction();
phaseInteraction_1.setPresentationName("DMP-Continuum");
phaseInteraction_1.enable(DispersedPhysicsContinuumInteractionModel.class);
phaseInteraction_1.enable(DispersedPhasePressureGradientModel.class);
phaseInteraction_1.enable(ParticleDiameterInteractionLengthScaleModel.class);
phaseInteraction_1.enable(DispersedPhaseHeatTransferModel.class);
phaseInteraction_1.enable(DispersedPhaseDragForceModel.class);
|
PhaseInteraction phaseInteraction_1 =
multiPhaseInteractionModel_0.createPhaseInteraction();
phaseInteraction_1.setPresentationName("DMP-Continuum");
phaseInteraction_1.enable(DispersedPhysicsContinuumInteractionModel.class);
phaseInteraction_1.enable(ParticleDiameterInteractionLengthScaleModel.class);
phaseInteraction_1.enable(DispersedPhaseHeatTransferModel.class);
phaseInteraction_1.enable(DispersedPhaseDragForceModel.class);
|
重命名 VOF 模型类
VofCavitationSingleComponentModel
类已重命名为 VofSchnerrSauerCavitationSingleComponentModel
,VofCavitationMultiComponentModel
类已重命名为 VofSchnerrSauerCavitationMultiComponentModel
。
以下示例显示了单组分类的更改:
以前发行版本 |
Simcenter STAR-CCM+ v12.04 |
phaseInteraction_0.enable(VofPhaseInteractionModel.class);
VofPhaseInteractionModel vofPhaseInteractionModel_0 =
phaseInteraction_0.getModelManager().getModel(VofPhaseInteractionModel.class);
EulerianMultiPhaseModel eulerianMultiPhaseModel_0 =
physicsContinuum_0.getModelManager().getModel(EulerianMultiPhaseModel.class);
EulerianPhase eulerianPhase_0 =
((EulerianPhase) eulerianMultiPhaseModel_0.getPhaseManager().getPhase("H2O"));
vofPhaseInteractionModel_0.setPrimaryPhase(eulerianPhase_0);
EulerianPhase eulerianPhase_1 =
((EulerianPhase) eulerianMultiPhaseModel_0.getPhaseManager().getPhase("H2O(G)"));
vofPhaseInteractionModel_0.setSecondaryPhase(eulerianPhase_1);
phaseInteraction_0.enable(VofCavitationSingleComponentModel.class);
phaseInteraction_0.enable(PhaseInteractionMaterialModel.class);
|
phaseInteraction_0.enable(VofPhaseInteractionModel.class);
VofPhaseInteractionModel vofPhaseInteractionModel_0 =
phaseInteraction_0.getModelManager().getModel(VofPhaseInteractionModel.class);
EulerianMultiPhaseModel eulerianMultiPhaseModel_0 =
physicsContinuum_0.getModelManager().getModel(EulerianMultiPhaseModel.class);
EulerianPhase eulerianPhase_0 =
((EulerianPhase) eulerianMultiPhaseModel_0.getPhaseManager().getPhase("H2O"));
vofPhaseInteractionModel_0.setPrimaryPhase(eulerianPhase_0);
EulerianPhase eulerianPhase_1 =
((EulerianPhase) eulerianMultiPhaseModel_0.getPhaseManager().getPhase("H2O(G)"));
vofPhaseInteractionModel_0.setSecondaryPhase(eulerianPhase_1);
phaseInteraction_0.enable(VofSchnerrSauerCavitationSingleComponentModel.class);
phaseInteraction_0.enable(PhaseInteractionMaterialModel.class);
|
与以上示例类似,需要为多组分液体与多组分气体间的空化更换相应的行:
以前发行版本 |
Simcenter STAR-CCM+ v12.04 |
phaseInteraction_0.enable(VofCavitationMultiComponentModel.class);
|
phaseInteraction_0.enable(VofSchnerrSauerCavitationMultiComponentModel.class);
|
对热传递系数法的更改
在多流体区相间相互作用的沸腾/冷凝模型中,内部热传递系数法管理器现在可用于一阶和二阶努塞尔数,导致宏代码更改。
对象 getPrimaryNusseltNumber()
现在是 getFirstRegimeExternalNuMethodManager()
,对象 getSecondaryNusseltNumber()
现在是 getSecondRegimeExternalNuMethodManager()
。 下列示例显示了这些更改的影响:
以前发行版本 |
Simcenter STAR-CCM+ v12.04 |
LsiBulkBoilingModel lsiBulkBoilingModel_0 =
phaseInteraction_0.getModelManager().getModel(LsiBulkBoilingModel.class);
ConstantInteractionCoefficientMethod constantInteractionCoefficientMethod_0 =
lsiBulkBoilingModel_0.getPrimaryNusseltNumber().getMethod(ConstantInteractionCoefficientMethod.class);
constantInteractionCoefficientMethod_0.getQuantity().setValue(2.0);
ConstantInteractionCoefficientMethod constantInteractionCoefficientMethod_1 =
lsiBulkBoilingModel_0.getSecondaryNusseltNumber().getMethod(ConstantInteractionCoefficientMethod.class);
constantInteractionCoefficientMethod_1.getQuantity().setValue(2.0);
|
LsiBulkBoilingModel lsiBulkBoilingModel_0 =
phaseInteraction_0.getModelManager().getModel(LsiBulkBoilingModel.class);
ConstantInteractionCoefficientMethod constantInteractionCoefficientMethod_0 =
lsiBulkBoilingModel_0.getFirstRegimeExternalNuMethodManager().getMethod(ConstantInteractionCoefficientMethod.class);
constantInteractionCoefficientMethod_0.getQuantity().setValue(2.0);
ConstantInteractionCoefficientMethod constantInteractionCoefficientMethod_1 =
lsiBulkBoilingModel_0.getSecondRegimeExternalNuMethodManager().getMethod(ConstantInteractionCoefficientMethod.class);
constantInteractionCoefficientMethod_1.getQuantity().setValue(2.0);
|
注 | 在 v12.02 和更早的版本中,多流体区相间相互作用的沸腾/冷凝模型使用的表达式内部热传递在 Simcenter STAR-CCM+ 内部评估。 在 v12.04 中,可使用内部热传递系数法管理器,您必须指定内部热传递的 Nu/HTC 值。 如果您想使用旧表达式指定内部热传递 Nu/HTC,可通过定义一个场函数完成指定,详情参见《用户指南》。 |
对象 star.multiphase.FunctionInterphaseHTCxAreaMethod
将不再可用。 在 v12.02 和更早的版本中,FunctionInterphaseHTCxAreaMethod
以单独场函数的形式与 HeatTransferCoefficient
和相互作用面积密度的乘积连用。 在 v12.04 中,新方法 star.multiphase.FunctionInterphaseHTCMethod
现在可用。 您可以将 HeatTransferCoefficient
指定为场函数,相互作用面积密度由相互作用面积密度模型计算。
对壁面沸腾的更改
壁面沸腾模型扩展后可与大尺度界面 (LSI) 模型连用,导致宏代码更改。
选择模型
以前发行版本 |
Simcenter STAR-CCM+ v12.04 |
PhysicsContinuum physicsContinuum_0 =
((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum("Coolant"));
MultiPhaseInteractionModel multiPhaseInteractionModel_0 =
physicsContinuum_0.getModelManager().getModel(MultiPhaseInteractionModel.class);
PhaseInteraction phaseInteraction_0 =
((PhaseInteraction) multiPhaseInteractionModel_0.getPhaseInteractionManager().getPhaseInteraction("Liquid Vapour Interface"));
phaseInteraction_0.enable(WallBoilingModel.class);
phaseInteraction_0.enable(LemmartChawlaNucleationSiteNumberDensityModel.class);
phaseInteraction_0.enable(KurulPodowskiBubbleInfluenceWallAreaFractionModel.class);
phaseInteraction_0.enable(DelValleKenningBubbleInducedQuenchingHeatTransferCoefficientModel.class);
phaseInteraction_0.enable(TolubinskyKonstanchukBubbleDepartureDiameterModel.class);
phaseInteraction_0.enable(ColeBubbleDepartureFrequencyModel.class);
phaseInteraction_0.enable(BasicWallDryoutAreaFractionModel.class);
|
PhysicsContinuum physicsContinuum_0 =
((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum("Coolant"));
MultiPhaseInteractionModel multiPhaseInteractionModel_0 =
physicsContinuum_0.getModelManager().getModel(MultiPhaseInteractionModel.class);
PhaseInteraction phaseInteraction_0 =
((PhaseInteraction) multiPhaseInteractionModel_0.getPhaseInteractionManager().getPhaseInteraction("Liquid Vapour Interface"));
phaseInteraction_0.enable(WallBoilingModel.class);
phaseInteraction_0.enable(BubbleNucleationModel.class);
phaseInteraction_0.enable(TransientConductionModel.class);
|
更改设置
以前发行版本 |
Simcenter STAR-CCM+ v12.04 |
WallBoilingModel wallBoilingModel_0 =
phaseInteraction_0.getModelManager().getModel(WallBoilingModel.class);
wallBoilingModel_0.getRelaxationFactor().setValue(0.4);
BasicWallDryoutAreaFractionModel basicWallDryoutAreaFractionModel_0 =
phaseInteraction_0.getModelManager().getModel(BasicWallDryoutAreaFractionModel.class);
//change the Bubbly Layer Relaxation Factor
basicWallDryoutAreaFractionModel_0.getRelaxationFactor().setValue(0.4);
//change the Bubbly Layer Option to Fixed Yplus and set the value to 150
basicWallDryoutAreaFractionModel_0.getBubblyLayerThicknessOption().setSelected(BubblyLayerThicknessOption.Type.FIXED_YPLUS);
BubblyLayerThicknessFixedYplus bubblyLayerThicknessFixedYplus_0 =
basicWallDryoutAreaFractionModel_0.getBubblyLayerThicknessFixedYplus();
bubblyLayerThicknessFixedYplus_0.setFixedYplus(150.0);
//change the Quenching Temperature Option to Fixed Yplus and set the value to 150
BubbleInducedQuenchingTemperatureModel bubbleInducedQuenchingTemperatureModel_0 =
phaseInteraction_0.getModelManager().getModel(BubbleInducedQuenchingTemperatureModel.class);
bubbleInducedQuenchingTemperatureModel_0.getBubbleInducedQuenchingTemperatureOption().setSelected(BubbleInducedQuenchingTemperatureOption.Type.FIXED_YPLUS);
BubbleInducedQuenchingFixedYplus bubbleInducedQuenchingFixedYplus_0 =
bubbleInducedQuenchingTemperatureModel_0.getBubbleInducedQuenchingFixedYplus();
bubbleInducedQuenchingFixedYplus_0.setFixedYplus(150.0);
|
WallBoilingModel wallBoilingModel_0 =
phaseInteraction_0.getModelManager().getModel(WallBoilingModel.class);
wallBoilingModel_0.getRelaxationFactor().setValue(0.4);
WallDryoutAreaFractionProfile wallDryoutAreaFractionProfile_0 =
wallBoilingModel_0.getWallDryoutAreaFractionProfile();
//change the Bubbly Layer Relaxation Factor
wallDryoutAreaFractionProfile_0.getBubblyLayerRelaxationFactor().setValue(0.4);
//change the Bubbly Layer Option to Fixed Yplus and set the value to 150
wallDryoutAreaFractionProfile_0.getBubblyLayerThicknessOption().setSelected(BubblyLayerThicknessOption.Type.FIXED_YPLUS);
BubblyLayerThicknessFixedYplus bubblyLayerThicknessFixedYplus_0 =
wallDryoutAreaFractionProfile_0.getBubblyLayerThicknessFixedYplus();
bubblyLayerThicknessFixedYplus_0.setFixedYplus(150.0);
//change the Quenching Temperature Option to Fixed Yplus and set the value to 150
TransientConductionModel transientConductionModel_0 =
phaseInteraction_0.getModelManager().getModel(TransientConductionModel.class);
transientConductionModel_0.getBubbleInducedQuenchingTemperatureOption().setSelected(BubbleInducedQuenchingTemperatureOption.Type.FIXED_YPLUS);
BubbleInducedQuenchingFixedYplus bubbleInducedQuenchingFixedYplus_0 =
transientConductionModel_0.getBubbleInducedQuenchingFixedYplus();
bubbleInducedQuenchingFixedYplus_0.setFixedYplus(150.0);
|
删除标准子模型并使用常数
此方法仅适用于指定常数方法。
以前发行版本 |
Simcenter STAR-CCM+ v12.04 |
PhaseInteraction phaseInteraction_0 =
((PhaseInteraction) multiPhaseInteractionModel_0.getPhaseInteractionManager().getPhaseInteraction("Liquid Vapour Interface"));
BasicWallDryoutAreaFractionModel basicWallDryoutAreaFractionModel_1 =
phaseInteraction_0.getModelManager().getModel(BasicWallDryoutAreaFractionModel.class);
phaseInteraction_0.disableModel(basicWallDryoutAreaFractionModel_1);
phaseInteraction_0.enable(UserDefinedWallDryoutAreaFractionModel.class);
UserDefinedWallDryoutAreaFractionModel userDefinedWallDryoutAreaFractionModel_0 =
phaseInteraction_0.getModelManager().getModel(UserDefinedWallDryoutAreaFractionModel.class);
WallDryoutAreaFractionProfile wallDryoutAreaFractionProfile_0 =
userDefinedWallDryoutAreaFractionModel_0.getWallDryoutAreaFractionProfile();
wallDryoutAreaFractionProfile_0.getMethod(ConstantScalarProfileMethod.class).getQuantity().setValue(1.0);
LemmartChawlaNucleationSiteNumberDensityModel lemmartChawlaNucleationSiteNumberDensityModel_1 =
phaseInteraction_0.getModelManager().getModel(LemmartChawlaNucleationSiteNumberDensityModel.class);
phaseInteraction_0.disableModel(lemmartChawlaNucleationSiteNumberDensityModel_1);
phaseInteraction_0.enable(UserDefinedNucleationSiteNumberDensityModel.class);
UserDefinedNucleationSiteNumberDensityModel userDefinedNucleationSiteNumberDensityModel_0 =
phaseInteraction_0.getModelManager().getModel(UserDefinedNucleationSiteNumberDensityModel.class);
NucleationSiteNumberDensityProfile nucleationSiteNumberDensityProfile_0 =
userDefinedNucleationSiteNumberDensityModel_0.getNucleationSiteNumberDensityProfile();
nucleationSiteNumberDensityProfile_0.getMethod(ConstantScalarProfileMethod.class).getQuantity().setValue(1.0);
TolubinskyKonstanchukBubbleDepartureDiameterModel tolubinskyKonstanchukBubbleDepartureDiameterModel_1 =
phaseInteraction_0.getModelManager().getModel(TolubinskyKonstanchukBubbleDepartureDiameterModel.class);
phaseInteraction_0.disableModel(tolubinskyKonstanchukBubbleDepartureDiameterModel_1);
phaseInteraction_0.enable(UserDefinedBubbleDepartureDiameterModel.class);
UserDefinedBubbleDepartureDiameterModel userDefinedBubbleDepartureDiameterModel_0 =
phaseInteraction_0.getModelManager().getModel(UserDefinedBubbleDepartureDiameterModel.class);
BubbleDepartureDiameterProfile bubbleDepartureDiameterProfile_0 =
userDefinedBubbleDepartureDiameterModel_0.getBubbleDepartureDiameterProfile();
bubbleDepartureDiameterProfile_0.getMethod(ConstantScalarProfileMethod.class).getQuantity().setValue(1.0);
ColeBubbleDepartureFrequencyModel coleBubbleDepartureFrequencyModel_1 =
phaseInteraction_0.getModelManager().getModel(ColeBubbleDepartureFrequencyModel.class);
phaseInteraction_0.disableModel(coleBubbleDepartureFrequencyModel_1);
phaseInteraction_0.enable(UserDefinedBubbleDepartureFrequencyModel.class);
UserDefinedBubbleDepartureFrequencyModel userDefinedBubbleDepartureFrequencyModel_0 =
phaseInteraction_0.getModelManager().getModel(UserDefinedBubbleDepartureFrequencyModel.class);
BubbleDepartureFrequencyProfile bubbleDepartureFrequencyProfile_0 =
userDefinedBubbleDepartureFrequencyModel_0.getBubbleDepartureFrequencyProfile();
bubbleDepartureFrequencyProfile_0.getMethod(ConstantScalarProfileMethod.class).getQuantity().setValue(1.0);
KurulPodowskiBubbleInfluenceWallAreaFractionModel kurulPodowskiBubbleInfluenceWallAreaFractionModel_1 =
phaseInteraction_0.getModelManager().getModel(KurulPodowskiBubbleInfluenceWallAreaFractionModel.class);
phaseInteraction_0.disableModel(kurulPodowskiBubbleInfluenceWallAreaFractionModel_1);
phaseInteraction_0.enable(UserDefinedBubbleInfluenceWallAreaFractionModel.class);
UserDefinedBubbleInfluenceWallAreaFractionModel userDefinedBubbleInfluenceWallAreaFractionModel_0 =
phaseInteraction_0.getModelManager().getModel(UserDefinedBubbleInfluenceWallAreaFractionModel.class);
BubbleInfluenceWallAreaFractionProfile bubbleInfluenceWallAreaFractionProfile_0 =
userDefinedBubbleInfluenceWallAreaFractionModel_0.getBubbleInfluenceWallAreaFractionProfile();
bubbleInfluenceWallAreaFractionProfile_0.getMethod(ConstantScalarProfileMethod.class).getQuantity().setValue(1.0);
DelValleKenningBubbleInducedQuenchingHeatTransferCoefficientModel delValleKenningBubbleInducedQuenchingHeatTransferCoefficientModel_1 =
phaseInteraction_0.getModelManager().getModel(DelValleKenningBubbleInducedQuenchingHeatTransferCoefficientModel.class);
phaseInteraction_0.disableModel(delValleKenningBubbleInducedQuenchingHeatTransferCoefficientModel_1);
phaseInteraction_0.enable(UserDefinedBubbleInducedQuenchingHeatTransferCoefficientModel.class);
UserDefinedBubbleInducedQuenchingHeatTransferCoefficientModel userDefinedBubbleInducedQuenchingHeatTransferCoefficientModel_0 =
phaseInteraction_0.getModelManager().getModel(UserDefinedBubbleInducedQuenchingHeatTransferCoefficientModel.class);
BubbleInducedQuenchingHeatTransferCoefficientProfile bubbleInducedQuenchingHeatTransferCoefficientProfile_0 =
userDefinedBubbleInducedQuenchingHeatTransferCoefficientModel_0.getBubbleInducedQuenchingHeatTransferCoefficientProfile();
bubbleInducedQuenchingHeatTransferCoefficientProfile_0.getMethod(ConstantScalarProfileMethod.class).getQuantity().setValue(1.0);
|
PhaseInteraction phaseInteraction_0 =
((PhaseInteraction) multiPhaseInteractionModel_0.getPhaseInteractionManager().getPhaseInteraction("Liquid Vapour Interface"));
WallBoilingModel wallBoilingModel_1 =
phaseInteraction_0.getModelManager().getModel(WallBoilingModel.class);
WallDryoutAreaFractionProfile wallDryoutAreaFractionProfile_0 =
wallBoilingModel_1.getWallDryoutAreaFractionProfile();
wallDryoutAreaFractionProfile_0.setMethod(ConstantScalarProfileMethod.class);
wallDryoutAreaFractionProfile_0.getMethod(ConstantScalarProfileMethod.class).getQuantity().setValue(1.0);
BubbleNucleationModel bubbleNucleationModel_1 =
phaseInteraction_0.getModelManager().getModel(BubbleNucleationModel.class);
NucleationSiteNumberDensityProfile nucleationSiteNumberDensityProfile_0 =
bubbleNucleationModel_1.getNucleationSiteNumberDensityProfile();
nucleationSiteNumberDensityProfile_0.setMethod(ConstantScalarProfileMethod.class);
nucleationSiteNumberDensityProfile_0.getMethod(ConstantScalarProfileMethod.class).getQuantity().setValue(1.0);
BubbleDepartureDiameterProfile bubbleDepartureDiameterProfile_0 =
bubbleNucleationModel_1.getBubbleDepartureDiameterProfile();
bubbleDepartureDiameterProfile_0.setMethod(ConstantScalarProfileMethod.class);
bubbleDepartureDiameterProfile_0.getMethod(ConstantScalarProfileMethod.class).getQuantity().setValue(1.0);
BubbleDepartureFrequencyProfile bubbleDepartureFrequencyProfile_0 =
bubbleNucleationModel_1.getBubbleDepartureFrequencyProfile();
bubbleDepartureFrequencyProfile_0.setMethod(ConstantScalarProfileMethod.class);
bubbleDepartureFrequencyProfile_0.getMethod(ConstantScalarProfileMethod.class).getQuantity().setValue(1.0);
TransientConductionModel transientConductionModel_1 =
phaseInteraction_0.getModelManager().getModel(TransientConductionModel.class);
BubbleInfluenceWallAreaFractionProfile bubbleInfluenceWallAreaFractionProfile_0 =
transientConductionModel_1.getBubbleInfluenceWallAreaFractionProfile();
bubbleInfluenceWallAreaFractionProfile_0.setMethod(ConstantScalarProfileMethod.class);
bubbleInfluenceWallAreaFractionProfile_0.getMethod(ConstantScalarProfileMethod.class).getQuantity().setValue(1.0);
TransientConductionHeatTransferCoefficientProfile transientConductionHeatTransferCoefficientProfile_0 =
transientConductionModel_1.getTransientConductionHeatTransferCoefficientProfile();
transientConductionHeatTransferCoefficientProfile_0.setMethod(ConstantScalarProfileMethod.class);
transientConductionHeatTransferCoefficientProfile_0.getMethod(ConstantScalarProfileMethod.class).getQuantity().setValue(1.0);
|
选择基本壁面干涸面积分数模型并更改其参数
以前发行版本 |
Simcenter STAR-CCM+ v12.04 |
PhysicsContinuum physicsContinuum_0 =
((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum("Coolant"));
MultiPhaseInteractionModel multiPhaseInteractionModel_0 =
physicsContinuum_0.getModelManager().getModel(MultiPhaseInteractionModel.class);
PhaseInteraction phaseInteraction_0 =
((PhaseInteraction) multiPhaseInteractionModel_0.getPhaseInteractionManager().getPhaseInteraction("Liquid Vapour Interface"));
phaseInteraction_0.enable(BasicWallDryoutAreaFractionModel.class);
BasicWallDryoutAreaFractionModel basicWallDryoutAreaFractionModel_1 =
phaseInteraction_0.getModelManager().getModel(BasicWallDryoutAreaFractionModel.class);
basicWallDryoutAreaFractionModel_1.getWallDryoutBreakpoint().setValue(0.8);
|
PhysicsContinuum physicsContinuum_0 =
((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum("Coolant"));
MultiPhaseInteractionModel multiPhaseInteractionModel_0 =
physicsContinuum_0.getModelManager().getModel(MultiPhaseInteractionModel.class);
PhaseInteraction phaseInteraction_0 =
((PhaseInteraction) multiPhaseInteractionModel_0.getPhaseInteractionManager().getPhaseInteraction("Liquid Vapour Interface"));
WallBoilingModel wallBoilingModel_0 =
phaseInteraction_0.getModelManager().getModel(WallBoilingModel.class);
WallDryoutAreaFractionProfile wallDryoutAreaFractionProfile_0 =
wallBoilingModel_0.getWallDryoutAreaFractionProfile();
wallDryoutAreaFractionProfile_0.setMethod(BasicWallDryOutAreaFractionProfileMethod.class);
wallDryoutAreaFractionProfile_0.getMethod(BasicWallDryOutAreaFractionProfileMethod.class).getWallDryoutBreakpoint().setValue(0.8);
|
选择科尔模型
以前发行版本 |
Simcenter STAR-CCM+ v12.04 |
PhysicsContinuum physicsContinuum_0 =
((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum("Coolant"));
MultiPhaseInteractionModel multiPhaseInteractionModel_0 =
physicsContinuum_0.getModelManager().getModel(MultiPhaseInteractionModel.class);
PhaseInteraction phaseInteraction_0 =
((PhaseInteraction) multiPhaseInteractionModel_0.getPhaseInteractionManager().getPhaseInteraction("Liquid Vapour Interface"));
phaseInteraction_0.enable(ColeBubbleDepartureFrequencyModel.class);
|
PhysicsContinuum physicsContinuum_0 =
((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum("Coolant"));
MultiPhaseInteractionModel multiPhaseInteractionModel_0 =
physicsContinuum_0.getModelManager().getModel(MultiPhaseInteractionModel.class);
PhaseInteraction phaseInteraction_0 =
((PhaseInteraction) multiPhaseInteractionModel_0.getPhaseInteractionManager().getPhaseInteraction("Liquid Vapour Interface"));
BubbleNucleationModel bubbleNucleationModel_0 =
phaseInteraction_0.getModelManager().getModel(BubbleNucleationModel.class);
BubbleDepartureFrequencyProfile bubbleDepartureFrequencyProfile_0 =
bubbleNucleationModel_0.getBubbleDepartureFrequencyProfile();
bubbleDepartureFrequencyProfile_0.setMethod(ColeBubbleDepartureFrequencyProfileMethod.class);
|
选择 Del Valle Kenning 并更改其参数
以前发行版本 |
Simcenter STAR-CCM+ v12.04 |
PhysicsContinuum physicsContinuum_0 =
((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum("Coolant"));
MultiPhaseInteractionModel multiPhaseInteractionModel_0 =
physicsContinuum_0.getModelManager().getModel(MultiPhaseInteractionModel.class);
PhaseInteraction phaseInteraction_0 =
((PhaseInteraction) multiPhaseInteractionModel_0.getPhaseInteractionManager().getPhaseInteraction("Liquid Vapour Interface"));
phaseInteraction_0.enable(DelValleKenningBubbleInducedQuenchingHeatTransferCoefficientModel.class);
DelValleKenningBubbleInducedQuenchingHeatTransferCoefficientModel delValleKenningBubbleInducedQuenchingHeatTransferCoefficientModel_1 =
phaseInteraction_0.getModelManager().getModel(DelValleKenningBubbleInducedQuenchingHeatTransferCoefficientModel.class);
delValleKenningBubbleInducedQuenchingHeatTransferCoefficientModel_1.getWaitCoefficient().setValue(0.800001);
|
PhysicsContinuum physicsContinuum_0 =
((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum("Coolant"));
MultiPhaseInteractionModel multiPhaseInteractionModel_0 =
physicsContinuum_0.getModelManager().getModel(MultiPhaseInteractionModel.class);
PhaseInteraction phaseInteraction_0 =
((PhaseInteraction) multiPhaseInteractionModel_0.getPhaseInteractionManager().getPhaseInteraction("Liquid Vapour Interface"));
TransientConductionModel transientConductionModel_0 =
phaseInteraction_0.getModelManager().getModel(TransientConductionModel.class);
TransientConductionHeatTransferCoefficientProfile transientConductionHeatTransferCoefficientProfile_0 =
transientConductionModel_0.getTransientConductionHeatTransferCoefficientProfile();
transientConductionHeatTransferCoefficientProfile_0.setMethod(DelValleKenningBubbleInducedQuenchingHeatTransferCoefficientProfileMethod.class);
transientConductionHeatTransferCoefficientProfile_0.getMethod(DelValleKenningBubbleInducedQuenchingHeatTransferCoefficientProfileMethod.class).getWaitCoefficient().setValue(0.800001);
|
选择 Hibiki Ishii 子模型并更改其参数
以前发行版本 |
Simcenter STAR-CCM+ v12.04 |
PhysicsContinuum physicsContinuum_0 =
((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum("Coolant"));
MultiPhaseInteractionModel multiPhaseInteractionModel_0 =
physicsContinuum_0.getModelManager().getModel(MultiPhaseInteractionModel.class);
PhaseInteraction phaseInteraction_0 =
((PhaseInteraction) multiPhaseInteractionModel_0.getPhaseInteractionManager().getPhaseInteraction("Liquid Vapour Interface"));
phaseInteraction_0.enable(HibikiIshiiNucleationSiteNumberDensityModel.class);
HibikiIshiiNucleationSiteNumberDensityModel hibikiIshiiNucleationSiteNumberDensityModel_0 =
phaseInteraction_0.getModelManager().getModel(HibikiIshiiNucleationSiteNumberDensityModel.class);
hibikiIshiiNucleationSiteNumberDensityModel_0.getAverageCavityDensity().setValue(472000.00001);
hibikiIshiiNucleationSiteNumberDensityModel_0.getWallContactAngle().setValue(0.7219999);
hibikiIshiiNucleationSiteNumberDensityModel_0.getWallContactAngleScale().setValue(0.7219999);
hibikiIshiiNucleationSiteNumberDensityModel_0.getCavityLengthScale().setValue(2.4999E-6);
hibikiIshiiNucleationSiteNumberDensityModel_0.getDensityFunctionConstantC0().setValue(-0.010639999);
hibikiIshiiNucleationSiteNumberDensityModel_0.getDensityFunctionConstantC1().setValue(0.482459999);
hibikiIshiiNucleationSiteNumberDensityModel_0.getDensityFunctionConstantC2().setValue(-0.227119999);
hibikiIshiiNucleationSiteNumberDensityModel_0.getDensityFunctionConstantC3().setValue(0.054679999);
hibikiIshiiNucleationSiteNumberDensityModel_0.getMaximumSuperheat().setValue(25.000001);
|
PhysicsContinuum physicsContinuum_0 =
((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum("Coolant"));
MultiPhaseInteractionModel multiPhaseInteractionModel_0 =
physicsContinuum_0.getModelManager().getModel(MultiPhaseInteractionModel.class);
PhaseInteraction phaseInteraction_0 =
((PhaseInteraction) multiPhaseInteractionModel_0.getPhaseInteractionManager().getPhaseInteraction("Liquid Vapour Interface"));
BubbleNucleationModel bubbleNucleationModel_0 =
phaseInteraction_0.getModelManager().getModel(BubbleNucleationModel.class);
NucleationSiteNumberDensityProfile nucleationSiteNumberDensityProfile_0 =
bubbleNucleationModel_0.getNucleationSiteNumberDensityProfile();
nucleationSiteNumberDensityProfile_0.setMethod(HibikiIshiiNucleationSiteNumberDensityProfileMethod.class);
nucleationSiteNumberDensityProfile_0.getMethod(HibikiIshiiNucleationSiteNumberDensityProfileMethod.class).getAverageCavityDensity().setValue(472000.00001);
nucleationSiteNumberDensityProfile_0.getMethod(HibikiIshiiNucleationSiteNumberDensityProfileMethod.class).getWallContactAngle().setValue(0.7219999);
nucleationSiteNumberDensityProfile_0.getMethod(HibikiIshiiNucleationSiteNumberDensityProfileMethod.class).getWallContactAngleScale().setValue(0.7219999);
nucleationSiteNumberDensityProfile_0.getMethod(HibikiIshiiNucleationSiteNumberDensityProfileMethod.class).getCavityLengthScale().setValue(2.4999E-6);
nucleationSiteNumberDensityProfile_0.getMethod(HibikiIshiiNucleationSiteNumberDensityProfileMethod.class).getDensityFunctionConstantC0().setValue(-0.010639999);
nucleationSiteNumberDensityProfile_0.getMethod(HibikiIshiiNucleationSiteNumberDensityProfileMethod.class).getDensityFunctionConstantC1().setValue(0.482459999);
nucleationSiteNumberDensityProfile_0.getMethod(HibikiIshiiNucleationSiteNumberDensityProfileMethod.class).getDensityFunctionConstantC2().setValue(-0.227119999);
nucleationSiteNumberDensityProfile_0.getMethod(HibikiIshiiNucleationSiteNumberDensityProfileMethod.class).getDensityFunctionConstantC3().setValue(0.054679999);
nucleationSiteNumberDensityProfile_0.getMethod(HibikiIshiiNucleationSiteNumberDensityProfileMethod.class).getMaximumSuperheat().setValue(25.000001);
|
选择 Kocamustafaogullari 模型并更改其参数
以前发行版本 |
Simcenter STAR-CCM+ v12.04 |
PhysicsContinuum physicsContinuum_0 =
((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum("Coolant"));
MultiPhaseInteractionModel multiPhaseInteractionModel_0 =
physicsContinuum_0.getModelManager().getModel(MultiPhaseInteractionModel.class);
PhaseInteraction phaseInteraction_0 =
((PhaseInteraction) multiPhaseInteractionModel_0.getPhaseInteractionManager().getPhaseInteraction("Liquid Vapour Interface"));
phaseInteraction_0.enable(KocamustafaogullariBubbleDepartureDiameterModel.class);
KocamustafaogullariBubbleDepartureDiameterModel kocamustafaogullariBubbleDepartureDiameterModel_0 =
phaseInteraction_0.getModelManager().getModel(KocamustafaogullariBubbleDepartureDiameterModel.class);
kocamustafaogullariBubbleDepartureDiameterModel_0.getCalibrationConstant().setValue(0.0015125999);
kocamustafaogullariBubbleDepartureDiameterModel_0.getWallContactAngle().setValue(0.72200001);
|
PhysicsContinuum physicsContinuum_0 =
((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum("Coolant"));
MultiPhaseInteractionModel multiPhaseInteractionModel_0 =
physicsContinuum_0.getModelManager().getModel(MultiPhaseInteractionModel.class);
PhaseInteraction phaseInteraction_0 =
((PhaseInteraction) multiPhaseInteractionModel_0.getPhaseInteractionManager().getPhaseInteraction("Liquid Vapour Interface"));
BubbleNucleationModel bubbleNucleationModel_0 =
phaseInteraction_0.getModelManager().getModel(BubbleNucleationModel.class);
BubbleDepartureDiameterProfile bubbleDepartureDiameterProfile_0 =
bubbleNucleationModel_0.getBubbleDepartureDiameterProfile();
bubbleDepartureDiameterProfile_0.setMethod(KocamustafaogullariBubbleDepartureDiameterProfileMethod.class);
bubbleDepartureDiameterProfile_0.getMethod(KocamustafaogullariBubbleDepartureDiameterProfileMethod.class).getCalibrationConstant().setValue(0.0015125999);
bubbleDepartureDiameterProfile_0.getMethod(KocamustafaogullariBubbleDepartureDiameterProfileMethod.class).getWallContactAngle().setValue(0.72200001);
|
选择 Kurul Podowski 模型并更改其参数
以前发行版本 |
Simcenter STAR-CCM+ v12.04 |
PhysicsContinuum physicsContinuum_0 =
((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum("Coolant"));
MultiPhaseInteractionModel multiPhaseInteractionModel_0 =
physicsContinuum_0.getModelManager().getModel(MultiPhaseInteractionModel.class);
PhaseInteraction phaseInteraction_0 =
((PhaseInteraction) multiPhaseInteractionModel_0.getPhaseInteractionManager().getPhaseInteraction("Liquid Vapour Interface"));
phaseInteraction_0.enable(KurulPodowskiBubbleInfluenceWallAreaFractionModel.class);
KurulPodowskiBubbleInfluenceWallAreaFractionModel kurulPodowskiBubbleInfluenceWallAreaFractionModel_1 =
phaseInteraction_0.getModelManager().getModel(KurulPodowskiBubbleInfluenceWallAreaFractionModel.class);
kurulPodowskiBubbleInfluenceWallAreaFractionModel_1.getAreaCoefficient().setValue(2.000001);
|
PhysicsContinuum physicsContinuum_0 =
((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum("Coolant"));
MultiPhaseInteractionModel multiPhaseInteractionModel_0 =
physicsContinuum_0.getModelManager().getModel(MultiPhaseInteractionModel.class);
PhaseInteraction phaseInteraction_0 =
((PhaseInteraction) multiPhaseInteractionModel_0.getPhaseInteractionManager().getPhaseInteraction("Liquid Vapour Interface"));
TransientConductionModel transientConductionModel_0 =
phaseInteraction_0.getModelManager().getModel(TransientConductionModel.class);
BubbleInfluenceWallAreaFractionProfile bubbleInfluenceWallAreaFractionProfile_0 =
transientConductionModel_0.getBubbleInfluenceWallAreaFractionProfile();
bubbleInfluenceWallAreaFractionProfile_0.setMethod(KurulPodowskiBubbleInfluenceWallAreaFractionProfileMethod.class);
bubbleInfluenceWallAreaFractionProfile_0.getMethod(KurulPodowskiBubbleInfluenceWallAreaFractionProfileMethod.class).getAreaCoefficient().setValue(2.000001);
|
选择 Lemmert Chawla 子模型并更改其参数
以前发行版本 |
Simcenter STAR-CCM+ v12.04 |
PhysicsContinuum physicsContinuum_0 =
((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum("Coolant"));
MultiPhaseInteractionModel multiPhaseInteractionModel_0 =
physicsContinuum_0.getModelManager().getModel(MultiPhaseInteractionModel.class);
PhaseInteraction phaseInteraction_0 =
((PhaseInteraction) multiPhaseInteractionModel_0.getPhaseInteractionManager().getPhaseInteraction("Liquid Vapour Interface"));
phaseInteraction_0.enable(LemmartChawlaNucleationSiteNumberDensityModel.class);
LemmartChawlaNucleationSiteNumberDensityModel lemmartChawlaNucleationSiteNumberDensityModel_1 =
phaseInteraction_0.getModelManager().getModel(LemmartChawlaNucleationSiteNumberDensityModel.class);
lemmartChawlaNucleationSiteNumberDensityModel_1.getCalibrationConstantN0().setValue(12366.448);
lemmartChawlaNucleationSiteNumberDensityModel_1.getCalibrationConstantDT0.setValue(1.0001);
lemmartChawlaNucleationSiteNumberDensityModel_1.getCalibrationConstantA().setValue(1.80499);
lemmartChawlaNucleationSiteNumberDensityModel_1.getCalibrationConstantB().setValue(1.0E-6);
lemmartChawlaNucleationSiteNumberDensityModel_1.getMaximumSuperheat().setValue(25.000001);
|
PhysicsContinuum physicsContinuum_0 =
((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum("Coolant"));
MultiPhaseInteractionModel multiPhaseInteractionModel_0 =
physicsContinuum_0.getModelManager().getModel(MultiPhaseInteractionModel.class);
PhaseInteraction phaseInteraction_0 =
((PhaseInteraction) multiPhaseInteractionModel_0.getPhaseInteractionManager().getPhaseInteraction("Liquid Vapour Interface"));
BubbleNucleationModel bubbleNucleationModel_0 =
phaseInteraction_0.getModelManager().getModel(BubbleNucleationModel.class);
NucleationSiteNumberDensityProfile nucleationSiteNumberDensityProfile_0 =
bubbleNucleationModel_0.getNucleationSiteNumberDensityProfile();
nucleationSiteNumberDensityProfile_0.setMethod(LemmartChawlaNucleationSiteNumberDensityProfileMethod.class);
nucleationSiteNumberDensityProfile_0.getMethod(LemmartChawlaNucleationSiteNumberDensityProfileMethod.class).getCalibrationConstantN0().setValue(12366.448);
nucleationSiteNumberDensityProfile_0.getMethod(LemmartChawlaNucleationSiteNumberDensityProfileMethod.class).getCalibrationConstantDT0().setValue(1.0001);
nucleationSiteNumberDensityProfile_0.getMethod(LemmartChawlaNucleationSiteNumberDensityProfileMethod.class).getCalibrationConstantA().setValue(1.80499);
nucleationSiteNumberDensityProfile_0.getMethod(LemmartChawlaNucleationSiteNumberDensityProfileMethod.class).getCalibrationConstantB().setValue(1.0E-6);
nucleationSiteNumberDensityProfile_0.getMethod(LemmartChawlaNucleationSiteNumberDensityProfileMethod.class).getMaximumSuperheat().setValue(25.000001);
|
选择 Tolubinsky Kostanchuk 模型并更改其参数
以前发行版本 |
Simcenter STAR-CCM+ v12.04 |
PhysicsContinuum physicsContinuum_0 =
((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum("Coolant"));
MultiPhaseInteractionModel multiPhaseInteractionModel_0 =
physicsContinuum_0.getModelManager().getModel(MultiPhaseInteractionModel.class);
PhaseInteraction phaseInteraction_0 =
((PhaseInteraction) multiPhaseInteractionModel_0.getPhaseInteractionManager().getPhaseInteraction("Liquid Vapour Interface"));
phaseInteraction_0.enable(TolubinskyKonstanchukBubbleDepartureDiameterModel.class);
TolubinskyKonstanchukBubbleDepartureDiameterModel tolubinskyKonstanchukBubbleDepartureDiameterModel_1 =
phaseInteraction_0.getModelManager().getModel(TolubinskyKonstanchukBubbleDepartureDiameterModel.class);
tolubinskyKonstanchukBubbleDepartureDiameterModel_1.getReferenceDiameter().setValue(6.000001E-4);
tolubinskyKonstanchukBubbleDepartureDiameterModel_1.getReferenceDiameterSubcooling().setValue(45.000001);
tolubinskyKonstanchukBubbleDepartureDiameterModel_1.getMinimumDiameter().setValue(2.500001E-5);
tolubinskyKonstanchukBubbleDepartureDiameterModel_1.getMaximumDiameter().setValue(0.001400001);
|
PhysicsContinuum physicsContinuum_0 =
((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum("Coolant"));
MultiPhaseInteractionModel multiPhaseInteractionModel_0 =
physicsContinuum_0.getModelManager().getModel(MultiPhaseInteractionModel.class);
PhaseInteraction phaseInteraction_0 =
((PhaseInteraction) multiPhaseInteractionModel_0.getPhaseInteractionManager().getPhaseInteraction("Liquid Vapour Interface"));
BubbleNucleationModel bubbleNucleationModel_0 =
phaseInteraction_0.getModelManager().getModel(BubbleNucleationModel.class);
BubbleDepartureDiameterProfile bubbleDepartureDiameterProfile_0 =
bubbleNucleationModel_0.getBubbleDepartureDiameterProfile();
bubbleDepartureDiameterProfile_0.setMethod(TolubinskyKostanchukBubbleDepartureDiameterProfileMethod.class);
bubbleDepartureDiameterProfile_0.getMethod(TolubinskyKostanchukBubbleDepartureDiameterProfileMethod.class).getReferenceDiameter().setValue(6.00001E-4);
bubbleDepartureDiameterProfile_0.getMethod(TolubinskyKostanchukBubbleDepartureDiameterProfileMethod.class).getReferenceDiameterSubcooling().setValue(45.00001);
bubbleDepartureDiameterProfile_0.getMethod(TolubinskyKostanchukBubbleDepartureDiameterProfileMethod.class).getMinimumDiameter().setValue(2.500001E-5);
bubbleDepartureDiameterProfile_0.getMethod(TolubinskyKostanchukBubbleDepartureDiameterProfileMethod.class).getMaximumDiameter().setValue(0.001400001);
|
电磁:对磁通量报告的更改
磁通量连接表面积分报告在 v12.04 中不可用。 所以,命令 createMagneticFluxLinkageReport
不再有效。
按以下说明更新宏:
- 对于有限元案例,可使用基于矢量积分的
MagneticFluxLinkageReport
。
- 对于有限体积案例,可使用场函数
SpecificMagneticFluxLinkage
的 VolumeIntegralReport
。
此外,要手动重建磁通量连接表面积分报告的原始行为,可使用表面积分报告,以及计算 MagneticFluxDensity
和单位面积元的点积的用户自定义场函数。
多孔介质:对剖面的更改
对于实现多孔介质模型的代码重构,ScalarVolumeFractionProfile
的位置已从 star.multiphase.ScalarVolumeFractionProfile
更改至 star.flow.ScalarVolumeFractionProfile
。 这会影响宏开始位置的导入
操作,如以下示例所示:
以前发行版本 |
Simcenter STAR-CCM+ v12.04 |
import star.multiphase.ScalarVolumeFractionProfile;
public void execute() {
|
import star.flow.ScalarVolumeFractionProfile;
public void execute() {
|
电化学:对 Tafel 斜率 (log 10) 反应法的更改
Tafel 斜率 (log10) 的输入参数已更改。 对于宏代码,在之前版本中,如果使用了 TafelSlopeReactionMethod
,就需要填充 UserSpecificExchangeCurrentMethod
。 此方法已替换为 SpecificExchangeCurrentLogMethod
。 为确保结果的一致性,应使用 UserSpecificExchangeCurrentMethod
的十进制对数值填充 SpecificExchangeCurrentLogMethod
的数值。
以前发行版本 |
Simcenter STAR-CCM+ v12.04 |
UserSpecificExchangeCurrentMethod iMethod =
reaction.getReactionProperties().get(SpecificExchangeCurrentProperty.class).getMethodObject(UserSpecificExchangeCurrentMethod.class);
UserSpecificExchangeCurrentProfile iProfile = iMethod.getUserSpecificExchangeCurrentProfile();
iProfile.getMethod(ConstantScalarProfileMethod.class).getQuantity().setValue(legacyValue);
|
SpecificExchangeCurrentLogMethod yilcMethod =
reaction.getReactionProperties().get(SpecificExchangeCurrentLogProperty.class).getMethodObject(SpecificExchangeCurrentLogMethod.class);
SpecificExchangeCurrentLogProfile yilcProfile = yilcMethod.getSpecificExchangeCurrentLogProfile();
yilcProfile.getMethod(ConstantScalarProfileMethod.class).getQuantity().setValue(Math.log10(legacyValue);
|
固体应力:新材料法则模型
在固体应力建模中已引入新材料法则模型。 因此,需要更新包含 FeSolidStressModel
的宏代码。 以下示例阐释了更改:
以前发行版本 |
Simcenter STAR-CCM+ v12.04 |
physicsContinuum_0.enable(SteadyModel.class);
physicsContinuum_0.enable(FeSolidStressModel.class);
physicsContinuum_0.enable(LinearIsotropicElasticModel.class);
SolidModel solidModel_0 = physicsContinuum_0.getModelManager().getModel(SolidModel.class);
Solid solid_0 = ((Solid) solidModel_0.getMaterial());
ConstantMaterialPropertyMethod constantMaterialPropertyMethod_0 =
((ConstantMaterialPropertyMethod) solid_0.getMaterialProperties().getMaterialProperty(ConstantDensityProperty.class).getMethod());
constantMaterialPropertyMethod_0.getQuantity().setValue(8000.0);
ConstantMaterialPropertyMethod constantMaterialPropertyMethod_1 =
((ConstantMaterialPropertyMethod) solid_0.getMaterialProperties().getMaterialProperty(PoissonRatioProperty.class).getMethod());
constantMaterialPropertyMethod_1.getQuantity().setValue(0.3);
ConstantMaterialPropertyMethod constantMaterialPropertyMethod_2 =
((ConstantMaterialPropertyMethod) solid_0.getMaterialProperties().getMaterialProperty(YoungsModulusProperty.class).getMethod());
constantMaterialPropertyMethod_2.getQuantity().setValue(200.0);
|
physicsContinuum_0.enable(SteadyModel.class);
physicsContinuum_0.enable(SolidModel.class);
physicsContinuum_0.enable(FeSolidStressModel.class);
physicsContinuum_0.enable(FeMaterialLawsModel.class);
FeMaterialLawsModel feMaterialLawsModel_1 =
physicsContinuum_0.getModelManager().getModel(FeMaterialLawsModel.class);
MaterialLaw materialLaw_0 = feMaterialLawsModel_1.createMaterialLaw();
materialLaw_0.enable(LinearElasticMaterialModel.class);
materialLaw_0.enable(IsotropicLinearElasticMaterialModel.class);
PhysicsContinuum physicsContinuum_0 = ((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum(getContinuumName()));
SolidModel solidModel_0 = physicsContinuum_0.getModelManager().getModel(SolidModel.class);
FeMaterialLawsModel feMaterialLawsModel_1 = physicsContinuum_0.getModelManager().getModel(FeMaterialLawsModel.class);
MaterialLaw materialLaw_0 = ((MaterialLaw)feMaterialLawsModel_1.getPhaseManager().getPhase("Material Law 1"));
Solid solid_0 = ((Solid) solidModel_0.getMaterial());
solid_0.getMaterialProperties().getMaterialProperty(MaterialLawProperty.class).setMaterialLaw(materialLaw_0);
ConstantMaterialPropertyMethod constantMaterialPropertyMethod_YoungsModulus =
((ConstantMaterialPropertyMethod) solid_0.getMaterialProperties().getMaterialProperty(YoungsModulusProperty.class).getMethod());
constantMaterialPropertyMethod_YoungsModulus.getQuantity().setValue(200.0);
ConstantMaterialPropertyMethod constantMaterialPropertyMethod_PoissonsRatio =
((ConstantMaterialPropertyMethod) solid_0.getMaterialProperties().getMaterialProperty(PoissonRatioProperty.class).getMethod());
constantMaterialPropertyMethod_PoissonsRatio.getQuantity().setValue(0.3);
ConstantMaterialPropertyMethod constantMaterialPropertyMethod_Density =
((ConstantMaterialPropertyMethod) solid_0.getMaterialProperties().getMaterialProperty(ConstantDensityProperty.class).getMethod());
constantMaterialPropertyMethod_Density.getQuantity().setValue(8000.0);
|
协同仿真
对 Java 类的更改
Java 类 StarccmplusCoSimulation
和 AbaqusCoSimulation
已被一个类 CoSimulation
取代。 在宏代码内,出现的所有这些类必须相应地重命名。
如果宏设置了新的协同仿真,协同仿真对象的默认名称现在是 Link 1
而非 STAR-CCM+ 协同仿真 1
或 Abaqus 协同仿真 1
。 如果在已设置协同仿真对象的模拟中使用宏,就没有这个必要。
以前发行版本 |
Simcenter STAR-CCM+ v12.04 |
StarccmplusCoSimulation abaqusCoSimulation_0 =
((StarccmplusCoSimulation) simulation_0.get(CoSimulationManager.class).getObject("STAR-CCM+ Co-Simulation 1"));
|
CoSimulation CoSimulation_0 =
((CoSimulation) simulation_0.get(CoSimulationManager.class).getObject("Link 1"));
|
AbaqusCoSimulation abaqusCoSimulation_0 =
((AbaqusCoSimulation) simulation_0.get(CoSimulationManager.class).getObject("Abaqus Co-Simulation 1"));
|
CoSimulation CoSimulation_0 =
((CoSimulation) simulation_0.get(CoSimulationManager.class).getObject("Link 1"));
|
对 1D 协同仿真的对象的更改
对象 star.cosimulation.onedcoupling
已重命名为 star.cosimulation.common
。 这会影响宏开始位置的导入操作,如以下示例所示:
以前发行版本 |
Simcenter STAR-CCM+ v12.04 |
import star.cosimulation.onedcoupling.OneDScalarFieldProfileMethod;
|
import star.cosimulation.common.OneDScalarFieldProfileMethod;
|
1D 协同仿真的软件包层级重构
1D 协同仿真的软件包的层级已重构,导致宏代码更改。
Amesim
对于任何包含 Amesim 协同仿真客户端-服务器对象的宏文件,必须包含下列行以导入它们:
import star.cosimulation.amesim.*;
此外,如果有特定的类导入,需要相应地更改它们。 以下是 AmesimModel
的示例:
以前发行版本 |
Simcenter STAR-CCM+ v12.04 |
import star.cosimulation.onedcoupling.AmesimModel;
|
import star.cosimulation.amesim.AmesimModel;
|
受影响的类:AmesimModel
、AmesimCoSimulationExplicitUnsteadyModel
、Amesim
、AmesimPortAssociationManager
和 AmesimSolver
。
GT-SUITE
对于任何包含 GT-SUITE 协同仿真客户端-服务器对象的宏文件,必须包含下列行以导入它们:
import star.cosimulation.gtpower.*;
此外,如果有特定的类导入,需要相应地更改它们。 以下是 GtVersion
的示例:
以前发行版本 |
Simcenter STAR-CCM+ v12.04 |
import star.cosimulation.onedcoupling.GtVersion;
|
import star.cosimulation.gtpower.GtVersion;
|
受影响的类:GtGasModel
、GtLiquidModel
、GtMultiComponentGasModel
、GtPowerCoSimulationExplicitUnsteadyModel
、GtSuiteLocalInputFile
、GtSuiteRemoteInputFile
、GtInformation
、GtPower
、GtSolver
、GtVersion
和 GtZoneData
。
OLGA
对于任何包含 OLGA 协同仿真客户端-服务器对象的宏文件,必须包含下列行以导入它们:
import star.cosimulation.olga.*;
此外,如果有特定的类导入,需要相应地更改它们。 以下是 OlgaVersion
的示例:
以前发行版本 |
Simcenter STAR-CCM+ v12.04 |
import star.cosimulation.onedcoupling.OlgaVersion;
|
import star.cosimulation.olga.OlgaVersion;
|
受影响的类:Olga
、Olga7Location
、Olga7LocationsManager
、OlgaAssumeCircularBoundaries
、OlgaCertRootDir
、OlgaCoSimulationExplicitUnsteadyModel
、OlgaCommunicationProtocol
、OlgaDensityMethod
、OlgaDrdpMethod
、OlgaDrdtMethod
、OlgaDynamicViscosityMethod
、OlgaEmpModel
、OlgaEmpPhaseModel
、OlgaEosModel
、OlgaLocalInputFile
、OlgaModelBase
、OlgaNodeType
、OlgaPhaseModel
、OlgaPositionName
、OlgaPropertiesFile
、OlgaPropertyMethods
、OlgaRemoteInputFile
、OlgaSnapFiles
、OlgaSolver
、OlgaSpecificHeatMethod
、OlgaSurfaceTensionMethod
、OlgaSurfaceTensionModel
、OlgaThermalConductivityMethod
、OlgaVersion
和 OlgaVofModel
。
对 WAVE 耦合对象的更改
当前版本的 WAVE 协同仿真已重构。
WAVE 客户端服务器对象 (CSO) 已移动
将类从 star.cosimulation.onedcoupling
移至 star.cosimulation.wave
导致了这些更改。
对于任何包含 WAVE 协同仿真客户端-服务器对象的宏文件,必须包含下列行以导入它们:
import star.cosimulation.wave.*;
此外,如果有特定的类导入,需要相应地更改它们。 以下是 WaveModel
的示例:
以前发行版本 |
Simcenter STAR-CCM+ v12.04 |
import star.cosimulation.onedcoupling.WaveModel;
|
import star.cosimulation.wave.WaveModel;
|
受影响的类:WaveModel.java
、WaveCoSimulationExplicitUnsteadyModel.java
和 WaveControlPinAssociationManager.java
。
删除 WaveNode
CSO WaveNode
已替换为 CoSimulation
类。
导入行:
以前发行版本 |
Simcenter STAR-CCM+ v12.04 |
import star.cosimulation.onedcoupling.*;
// or
import star.cosimulation.onedcoupling.WaveNode;
|
import star.cosimulation.common.*;
// or
import star.cosimulation.common.CoSimulation;
|
获取 WaveNode
替换为获取 CoSimulation
:
以前发行版本 |
Simcenter STAR-CCM+ v12.04 |
WaveNode waveNode_0 =
((WaveNode) simulation_0.get(CoSimulationManager.class).getObject("WAVE 1"));
|
CoSimulation coSimulation_0 =
((CoSimulation) simulation_0.get(CoSimulationManager.class).getObject("WAVE 1"));
|
编辑 WAVE 输入文件属性:
以前发行版本 |
Simcenter STAR-CCM+ v12.04 |
waveNode_0.setWaveCaseName("WaveFile");
|
WaveLocalInputFile waveLocalInputFile_0 =
coSimulation_0.getCoSimulationValues().get(WaveLocalInputFile.class);
waveLocalInputFile_0.setFilePath("sims/wave/tube/tubechild.wvm");
|
编辑 WAVE 可执行命令属性:
以前发行版本 |
Simcenter STAR-CCM+ v12.04 |
waveNode_0.setWaveCommand("wave");
|
CoSimCommandLine coSimCommandLine_0 =
coSimulation_0.getCoSimulationValues().get(CoSimCommandLine.class);
coSimCommandLine_0.setCommandLine("wave");
|
编辑 RSimlink
库路径属性:
以前发行版本 |
Simcenter STAR-CCM+ v12.04 |
waveNode_0.setWaveLibPath("RsimlinkLibraryPath");
|
RSimlinkLibPath rSimlinkLibPath_0 =
coSimulation_0.getCoSimulationValues().get(RSimlinkLibPath.class);
rSimlinkLibPath_0.setFilePath("RsimlinkLibraryPath");
|
删除 WaveSpecies
WaveSpecies
和 WaveSpeciesManager
CSO 类已替换为 CoupledSpeciesComponentMap
和 CoupledSpeciesManager
。
导入行:
以前发行版本 |
Simcenter STAR-CCM+ v12.04 |
import star.cosimulation.onedcoupling.*;
// or
import star.cosimulation.onedcoupling.WaveSpecies;
import star.cosimulation.onedcoupling.WaveSpeciesManager;
|
import star.cosimulation.common.*;
// or
import star.cosimulation.common.CoupledSpecies;
import star.cosimulation.common.CoupledSpeciesManager;
|
获取 WaveSpecies
替换为获取 CoupledSpeciesComponentMap
:
以前发行版本 |
Simcenter STAR-CCM+ v12.04 |
WaveSpecies waveSpecies_0 =
((WaveSpecies) waveNode_0.getWaveSpeciesManager().getObject("air"));
|
CoupledSpeciesComponentMap coupledSpeciesComponentMap_0 =
coSimulation_0.getCoSimulationValues().get(CoupledSpeciesManager.class).getCoupledSpeciesComponentMap("air");
|
设置耦合组分:
以前发行版本 |
Simcenter STAR-CCM+ v12.04 |
waveSpecies_0.setMaterialPropertiesHolder(passiveScalarMaterial_0);
|
coupledSpeciesComponentMap_0.setCoupledComponent(passiveScalarMaterial_0);
|
删除 WaveZones
WaveZone
和 WaveZoneManager
CSO 类已替换为 CoSimulationZone
和 CoSimulationZoneManager
。
导入行:
以前发行版本 |
Simcenter STAR-CCM+ v12.04 |
import star.cosimulation.onedcoupling.*;
// or
import star.cosimulation.onedcoupling.WaveZone;
import star.cosimulation.onedcoupling.WaveZoneManager;
|
import star.cosimulation.common.*;
// or
import star.cosimulation.common.CoSimulationZone;
import star.cosimulation.common.CoSimulationZoneManager;
|
获取 WaveZone
替换为获取 CoSimulationZone
:
以前发行版本 |
Simcenter STAR-CCM+ v12.04 |
WaveZone waveZone_0 =
((WaveZone) waveNode_0.getWaveZoneManager().getObject("WAVE-1"));
|
CoSimulationZone coSimulationZone_0 =
coSimulation_0.getCoSimulationZoneManager().getCoSimulationZone("WAVE-1");
|
将边界耦合至 WaveZone
(以前发行版本)和 CoSimulationZone
(当前发行版本):
以前发行版本 |
Simcenter STAR-CCM+ v12.04 |
boundary_0.getConditions().get(OneDOption.class).setSelected(OneDOption.Type.COUPLED);
waveZone_0.getCcmBoundaryPartGroup().setQuery(null);
waveZone_0.getCcmBoundaryPartGroup().setObjects(boundary_0);
|
CoupledParts coupledParts_0 =
coSimulationZone_0.getCoSimulationZoneConditions().get(CoupledParts.class);
coupledParts_0.clear();
coupledParts_0.add(boundary_0);
|
将边界从 WaveZone
(以前发行版本)和 CoSimulationZone
(当前发行版本)解耦:
以前发行版本 |
Simcenter STAR-CCM+ v12.04 |
boundary_0.getConditions().get(OneDOption.class).setSelected(OneDOption.Type.UNCOUPLED);
waveZone_0.getCcmBoundaryPartGroup().setQuery(null);
waveZone_0.getCcmBoundaryPartGroup().setObjects();
|
coupledParts_0.erase(boundary_0);
|
对耦合选项的更改
协同仿真耦合选项已重构,导致宏代码更改。
并发选项
ConcurrencyMethodManager
条件已替换为 CoSimulationConcurrencyOption
。
以前发行版本 |
Simcenter STAR-CCM+ v12.04 |
// get cosimulation
StarccmplusCoSimulation starccmplusCoSimulation_0 =
((StarccmplusCoSimulation) simulation_0.get(CoSimulationManager.class)
.getObject("STAR-CCM+ Co-Simulation 1"));
// Set this as leading cosimulation
starccmplusCoSimulation_0.getCoSimulationConditions()
.get(ConcurrencyMethodManager.class)
.setMethod(LeadMethod.class);
// Set this as lagging cosimulation
starccmplusCoSimulation_0.getCoSimulationConditions()
.get(ConcurrencyMethodManager.class)
.setMethod(LagMethod.class);
|
// get cosimulation
StarccmplusCoSimulation starccmplusCoSimulation_0 =
((StarccmplusCoSimulation) simulation_0.get(CoSimulationManager.class)
.getObject("STAR-CCM+ Co-Simulation 1"));
// Set this as leading cosimulation
starccmplusCoSimulation_0.getCoSimulationConditions()
.get(CoSimulationConcurrencyOption.class)
.setSelected(CoSimulationConcurrencyOption.Type.LEAD);
// Set this as lagging cosimulation
starccmplusCoSimulation_0.getCoSimulationConditions()
.get(CoSimulationConcurrencyOption.class)
.setSelected(CoSimulationConcurrencyOption.Type.LAG);
|
耦合选项
NegotiationMethodManager
条件已替换为 CoSimulationCouplingOption
。
以前发行版本 |
Simcenter STAR-CCM+ v12.04 |
// get cosimulation
StarccmplusCoSimulation starccmplusCoSimulation_0 =
((StarccmplusCoSimulation) simulation_0.get(CoSimulationManager.class)
.getObject("STAR-CCM+ Co-Simulation 1"));
//--------
// Set constant coupling method
starccmplusCoSimulation_0.getCoSimulationConditions()
.get(NegotiationMethodManager.class)
.setMethod(ConstantNegotiationMethod.class);
// set constant coupling timestep value to 0.1s
((ConstantNegotiationMethod) starccmplusCoSimulation_0.getCoSimulationConditions()
.get(NegotiationMethodManager.class).getMethod())
.getConstantTimeStep()
.setValue(0.1);
//--------
// Set minimum coupling method
starccmplusCoSimulation_0.getCoSimulationConditions()
.get(NegotiationMethodManager.class)
.setMethod(MinNegotiationMethod.class);
//--------
// Set maximum coupling method
starccmplusCoSimulation_0.getCoSimulationConditions()
.get(NegotiationMethodManager.class)
.setMethod(MaxNegotiationMethod.class);
//--------
// Set import coupling method
starccmplusCoSimulation_0.getCoSimulationConditions()
.get(NegotiationMethodManager.class)
.setMethod(ImportNegotiationMethod.class);
//--------
// Set export coupling method
starccmplusCoSimulation_0.getCoSimulationConditions()
.get(NegotiationMethodManager.class)
.setMethod(ExportNegotiationMethod.class);
//--------
// Set independent coupling method
starccmplusCoSimulation_0.getCoSimulationConditions()
.get(NegotiationMethodManager.class)
.setMethod(IndependentNegotiationMethod.class);
// set independent coupling timestep value to 0.1s
((IndependentNegotiationMethod) starccmplusCoSimulation_0.getCoSimulationConditions()
.get(NegotiationMethodManager.class).getMethod())
.getConstantTimeStep()
.setValue(0.1);
|
// get cosimulation
StarccmplusCoSimulation starccmplusCoSimulation_0 =
((StarccmplusCoSimulation) simulation_0.get(CoSimulationManager.class)
.getObject("STAR-CCM+ Co-Simulation 1"));
//--------
// Set constant coupling method
starccmplusCoSimulation_0.getCoSimulationConditions()
.get(CoSimulationCouplingOption.class)
.setSelected(CoSimulationCouplingOption.Type.CONSTANT);
// set constant coupling timestep value to 0.1s
starccmplusCoSimulation_0.getCoSimulationValues()
.get(CoSimCouplingTimeStep.class)
.getCouplingTimeStep()
.setValue(0.1);
//--------
// Set minimum coupling method
starccmplusCoSimulation_0.getCoSimulationConditions()
.get(CoSimulationCouplingOption.class)
.setSelected(CoSimulationCouplingOption.Type.MINIMUM);
//--------
// Set maximum coupling method
starccmplusCoSimulation_0.getCoSimulationConditions()
.get(CoSimulationCouplingOption.class)
.setSelected(CoSimulationCouplingOption.Type.MAXIMUM);
//--------
// Set import coupling method
starccmplusCoSimulation_0.getCoSimulationConditions()
.get(CoSimulationCouplingOption.class)
.setSelected(CoSimulationCouplingOption.Type.IMPORT);
//--------
// Set export coupling method
starccmplusCoSimulation_0.getCoSimulationConditions()
.get(CoSimulationCouplingOption.class)
.setSelected(CoSimulationCouplingOption.Type.EXPORT);
//--------
// Set independent coupling method
starccmplusCoSimulation_0.getCoSimulationConditions()
.get(CoSimulationCouplingOption.class)
.setSelected(CoSimulationCouplingOption.Type.INDEPENDENT);
// set independent coupling timestep value to 0.1s
starccmplusCoSimulation_0.getCoSimulationValues()
.get(CoSimCouplingTimeStep.class)
.getCouplingTimeStep()
.setValue(0.1);
|
映射选项
MappingMethodManager
条件已替换为使用预先存在的 MappingMethodOption
,而原来只由 Abaqus 协同仿真使用。
以前发行版本 |
Simcenter STAR-CCM+ v12.04 |
// get cosimulation
StarccmplusCoSimulation starccmplusCoSimulation_0 =
((StarccmplusCoSimulation) simulation_0.get(CoSimulationManager.class)
.getObject("STAR-CCM+ Co-Simulation 1"));
// Set Map Before Export
starccmplusCoSimulation_0.getCoSimulationConditions()
.get(MappingMethodManager.class)
.setMethod(Mode1MappingMethod.class);
// Set Map After Import
starccmplusCoSimulation_0.getCoSimulationConditions()
.get(MappingMethodManager.class)
.setMethod(Mode2MappingMethod.class);
// Set Map Both Directions
starccmplusCoSimulation_0.getCoSimulationConditions()
.get(MappingMethodManager.class)
.setMethod(Mode3MappingMethod.class);
// Set Partner Maps Both Directions
starccmplusCoSimulation_0.getCoSimulationConditions()
.get(MappingMethodManager.class)
.setMethod(Mode4MappingMethod.class);
|
// get cosimulation
StarccmplusCoSimulation starccmplusCoSimulation_0 =
((StarccmplusCoSimulation) simulation_0.get(CoSimulationManager.class)
.getObject("STAR-CCM+ Co-Simulation 1"));
// Set Map Before Export
starccmplusCoSimulation_0.getCoSimulationConditions()
.get(MappingMethodOption.class)
.setSelected(MappingMethodOption.Type.MAP_BEFORE_EXPORT);
// Set Map After Import
starccmplusCoSimulation_0.getCoSimulationConditions()
.get(MappingMethodOption.class)
.setSelected(MappingMethodOption.Type.MAP_AFTER_IMPORT);
// Set Map Both Directions
starccmplusCoSimulation_0.getCoSimulationConditions()
.get(MappingMethodOption.class)
.setSelected(MappingMethodOption.Type.MAP_BOTH_DIRECTIONS);
// Set Partner Maps Both Directions
starccmplusCoSimulation_0.getCoSimulationConditions()
.get(MappingMethodOption.class)
.setSelected(MappingMethodOption.Type.PARTNER_MAPS_BOTH_DIRECTIONS);
|