在 Simcenter STAR-CCM+ 11.04 中,针对电化学、模拟检索、服务器连接、协同仿真、VOF、DEM、分离时间步、材料模型、燃烧、网格化和变形进行了宏 API 的更改。
电化学:电化学组分求解器重命名
java 类 ElectrochemicalSpeciesSolver 已重命名为 SegregatedElectrochemicalSpeciesSolver。
在宏代码内,出现的所有 ElectrochemicalSpeciesSolver 必须相应地重命名。 例如:
以前发行版本 |
Simcenter STAR-CCM+ v11.04 |
import star.electrochemicalspecies.ElectrochemicalSpeciesSolver;
ElectrochemicalSpeciesSolver echemSolver =
_sim.getSolverManager()
.getSolver(ElectrochemicalSpeciesSolver.class);
|
import star.electrochemicalspecies.SegregatedElectrochemicalSpeciesSolver;
SegregatedElectrochemicalSpeciesSolver echemSolver =
_sim.getSolverManager()
.getSolver(SegregatedElectrochemicalSpeciesSolver.class);
|
电化学:默认电中和选项更改
电化学组分模型的电中和选项的新默认设置是比例缩放。 因此,之前已将 ElectroneutralityOption 设为 ENFORCED 的宏必须设为 SCALED。 例如:
以前发行版本 |
Simcenter STAR-CCM+ v11.04 |
Simulation simulation_0 = getActiveSimulation();
PhysicsContinuum physicsContinuum_0 =
((PhysicsContinuum) simulation_0.getContinuumManager()
.getContinuum("Physics 1"));
ElectrochemicalSpeciesModel electrochemicalSpeciesModel_0 =
physicsContinuum_0.getModelManager()
.getModel(ElectrochemicalSpeciesModel.class);
electrochemicalSpeciesModel_0
.getElectroneutralityOption()
.setSelected(ElectroneutralityOption.Type.ENFORCED);
|
Simulation simulation_0 = getActiveSimulation();
PhysicsContinuum physicsContinuum_0 =
((PhysicsContinuum) simulation_0.getContinuumManager()
.getContinuum("Physics 1"));
ElectrochemicalSpeciesModel electrochemicalSpeciesModel_0 =
physicsContinuum_0.getModelManager()
.getModel(ElectrochemicalSpeciesModel.class);
electrochemicalSpeciesModel_0
.getElectroneutralityOption()
.setSelected(ElectroneutralityOption.Type.SCALED);
|
模拟:采用新方法检索多个模拟
可采用一种最新的便捷方法检索多个模拟。
以前发行版本 |
Simcenter STAR-CCM+ v11.04 |
Set<Simulation> sl =
ApplicationManager.getSingleton()
.getApplicationAs(SimulationApplication.class, SimulationApplication.APPLICATION_TYPE).getRootObjects()
|
Collection<Simulation> sl =
SimulationApplication.getSimulations()
|
服务器连接:方法升级
为确保兼容,以前发行版本的方法仍然可用,但标记为失效。 建议利用最新版本的方法升级宏,以确保长期可靠性。
以前发行版本 |
Simcenter STAR-CCM+ v11.04 |
static String ServerConnection.getRshCommand()
static void ServerConnection.setRshCommand(String rshCommand)
|
String StarSettings.getSingleton()
.getGenericRemoteShellSettings()
.getRemoteShell().getCommandAndOptions()
void StarSettings.getSingleton()
.getGenericRemoteShellSettings().setRemoteShell(String)
|
static String ServerConnection.getServerCmd()
static String ServerConnection.getServerCmd(String sessionFile)
static void
ServerConnection.setServerCmd(String cmd)
|
static String ServerProcess.getServerCommand()
static String ServerProcess.getServerCommand(String sessionFile)
static void
ServerProcess.setServerCommand(String cmd)
|
static boolean ServerConnection.submitBatchJob()
static boolean ServerConnection.submitBatchJob(String command)
|
static boolean ServerProcess.isWindowsHpcServerSubmission()
static boolean ServerProcess.isWindowsHpcServerSubmission(String command)
|
static String ServerConnection.getDefaultRemoteShellOptions(String rshCmd)
|
static String RemoteShellFactory.getRemoteShell(String rshCmd).getOptions()
|
static String ServerConnection.getRemoteCommand(String host, String user, String command)
|
static ServerProcess.getRemoteCommand(String host, String user, String command)
|
static String ServerConnection.getDefaultHost()
static void ServerConnection.setDefaultHost(String host)
|
static String ServerProcess.getDefaultHost()
static void ServerProcess.setDefaultHost(String host)
|
static String ServerConnection.getDefaultUser()
static void ServerConnection.setDefaultUser(String user)
|
static String ServerProcess.getDefaultUser()
static void ServerProcess.setDefaultUser(String user)
|
static String ServerConnection.getSimFile()
static void ServerConnection.setSimFile(String file)
|
static String ServerProcess.getSimFile()
static void ServerProcess.setSimFile(String file)
|
协同仿真:引入显式与隐式协同仿真模型
为便于重用代码和执行耦合策略,已实施一组显式与隐式协同仿真模型,结果导致了宏代码的更改。
以下是 Abaqus 协同仿真的代码示例。
以前发行版本 |
Simcenter STAR-CCM+ v11.04 |
physicsContinuum_0.enable(CoSimulationModel.class);
physicsContinuum_0.enable(AbaqusCoSimulationModel.class);
|
physicsContinuum_0.enable(CoSimulationOptionModel.class);
physicsContinuum_0.enable(AbaqusCoSimulationModel.class);
physicsContinuum_0.enable(AbaqusCoSimulationImplicitModel.class);
|
VOF:兼容燃烧模型导致更改
流体体积 (VOF) 模型现在兼容燃烧模型,因而可使用 NonReactingModel.class。 例如:
以前发行版本 |
Simcenter STAR-CCM+ v11.04 |
EulerianPhase eulerianPhase =
getEulerianMultiPhaseModel().createPhase();
eulerianPhase.enable(SinglePhaseMultiComponentGasModel.class);
eulerianPhase.enable(SegregatedVofPhaseSpeciesModel.class);
|
EulerianPhase eulerianPhase =
getEulerianMultiPhaseModel().createPhase();
eulerianPhase.enable(SinglePhaseMultiComponentGasModel.class);
eulerianPhase.enable(NonReactingModel.class);
eulerianPhase.enable(SegregatedVofPhaseSpeciesModel.class);
|
DEM:颗粒尺寸场函数重命名为粒子束尺寸
场函数 ParticleSize(颗粒尺寸) 已重命名为 ParcelSize(粒子束尺寸)。 以前仅当离散元方法 (DEM) 连续体模型激活时,ParticleSize(颗粒尺寸) 场函数才可用。 现在 ParcelSize(粒子束尺寸) 可同时用于拉格朗日和 DEM 相。
以前发行版本 |
Simcenter STAR-CCM+ v11.04 |
PrimitiveFieldFunction primitiveFieldFunction_1 =
((PrimitiveFieldFunction) simulation_0
.getFieldFunctionManager().getFunction("ParticleSize"));
|
PrimitiveFieldFunction primitiveFieldFunction_1 =
((PrimitiveFieldFunction) simulation_0
.getFieldFunctionManager().getFunction("ParcelSize"));
|
分离时间步模型:重构导致更改
分离时间步模型的对象已重构,结果导致了宏代码的更改。
以前发行版本 |
Simcenter STAR-CCM+ v11.04 |
import star.casting.*;
import star.common.*;
public void execute() {
Simulation simulation_0 =
getActiveSimulation();
PhysicsContinuum physicsContinuum_0 =
((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum("Physics 1"));
SegregatedFluidTimeStepModel segregatedFluidTimeStepModel_0 =
physicsContinuum_0.getModelManager().getModel(SegregatedFluidTimeStepModel.class);
segregatedFluidTimeStepModel_0.setVerbose(true);
SegregatedFluidTimeStepControl segregatedFluidTimeStepControl_0 =
(SegregatedFluidTimeStepControl) ((SegregatedFluidTimeStepControlManager) segregatedFluidTimeStepModel_0.getControlManager()).createControl();
segregatedFluidTimeStepControl_0.getStartTime().setValue(0.0);
segregatedFluidTimeStepControl_0.getEndTime().setValue(0.0);
segregatedFluidTimeStepControl_0.getStartTimeStep().setValue(5.0E-5);
segregatedFluidTimeStepControl_0.getMinTimeStep().setValue(5.0E-6);
segregatedFluidTimeStepControl_0.setMaxTimeStepChangeFactor(1.5);
}
|
import star.base.neo.*;
import star.casting.*;
import star.common.*;
public void execute() {
Simulation simulation_0 =
getActiveSimulation();
PhysicsContinuum physicsContinuum_0 =
((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum("Physics 1"));
SegregatedFluidTimeStepModel segregatedFluidTimeStepModel_0 =
physicsContinuum_0.getModelManager().getModel(SegregatedFluidTimeStepModel.class);
segregatedFluidTimeStepModel_0.setVerboseFlag(true);
segregatedFluidTimeStepModel_0.getStartTime().setValue(0.0);
segregatedFluidTimeStepModel_0.getEndTime().setValue(0.0);
segregatedFluidTimeStepModel_0.getStartTimeStep().setValue(5.0E-5);
segregatedFluidTimeStepModel_0.getMinTimeStep().setValue(5.0E-6);
segregatedFluidTimeStepModel_0.setMaxTimeStepChangeFactors(new DoubleVector(new double[] {1.5}));
}
|
最新的分离时间步方法如下所示:
- SegregatedFlowTimeStepMethod
- SegregatedVofTimeStepMethod
- SegregatedEnergyTimeStepMethod
- EnthalpyMeltingTimeStepMethod
通过模型提供的 getMethod 函数和宏可使用这些方法,例如:
SegregatedFlowTimeStepMethod segregatedFlowTimeStepMethod_0 =
segregatedFluidTimeStepModel_0.getMethod(SegregatedFlowTimeStepMethod.class));
通过如下所示的步骤可访问方法的共享属性:
segregatedFlowTimeStepMethod_0.getMaxConditionLimit().setValue(0.6);
segregatedFlowTimeStepMethod_0.getSmoothingSteps().setValue(3.0);
材料模型:多部件固体模型的激活更改
在多组分固体选项中,除了多部件固体模型外,现在还可使用多层固体模型。 这种新选项已导致激活多部件固体模型的宏代码的更改。
以前发行版本 |
Simcenter STAR-CCM+ v11.04 |
physicsContinuum_0.enable(MultiPartSolidModel.class);
|
physicsContinuum_0.enable(MultiComponentSolidMaterialModel.class);
physicsContinuum_0.enable(MultiPartSolidModel.class);
|
反应:从复杂化学中移除化学 ADI
当前版本的 STAR-CCM+ 中不能使用化学 ADI。
要更新宏,必须移除 complexChemistryModel_0.getChemistrySolverOption().setSelected(ComplexChemistrySolverOption.CADI); 实例。
反应:利用 ISAT 扩展求解器选项
ISAT 现在能与 CVODE 求解器连用,复杂化学用户界面已更新,结果导致下列情况下的宏代码更改:
激活 ISAT
以前发行版本 |
Simcenter STAR-CCM+ v11.04 |
PhysicsContinuum physicsContinuum_0 =
((PhysicsContinuum) simulation_0
.getContinuumManager()
.getContinuum("Physics 1"));
ComplexChemistryCombustionModel complexChemistryModel_0 =
((ComplexChemistryCombustionModel) physicsContinuum_0.getModelManager().getModel(ComplexChemistryCombustionModel.class));
complexChemistryModel_0.getIsatOption().setSelected(IsatOrEqTsmOption.ISAT);
DarsCfdIsatCalculationMethod darsCfdIsatCalculationMethod_0 = complexChemistryModel_0.getDarsCfdIsatCalculationMethod();
darsCfdIsatCalculationMethod_0.getIsatPressureSpecificationOption().setSelected(IsatPressureSpecificationOption.CONST);
|
PhysicsContinuum physicsContinuum_0 =
((PhysicsContinuum) simulation_0.getContinuumManager().getContinuum("Physics 1"));
ComplexChemistryCombustionModel complexChemistryModel_0 =
((ComplexChemistryCombustionModel) physicsContinuum_0.getModelManager().getModel(ComplexChemistryCombustionModel.class));
ChemistryAccelerationOptions chemistryAccelerationOptions_0 =
complexChemistryModel_0.getChemistryAccelerationOptions();
chemistryAccelerationOptions_0.setIsat(true);
DarsCfdIsatCalculationMethod darsCfdIsatCalculationMethod_0 = complexChemistryModel_0.getDarsCfdIsatCalculationMethod();
darsCfdIsatCalculationMethod_0.getIsatPressureSpecificationOption().setSelected(IsatPressureSpecificationOption.CONST);
|
禁用聚类
以前发行版本 |
Simcenter STAR-CCM+ v11.04 |
ComplexChemistryCombustionModel complexChemistryModel_0 =
((ComplexChemistryCombustionModel) physicsContinuum_0.getModelManager().getModel(ComplexChemistryCombustionModel.class));
complexChemistryModel_0.getComplexChemistryOdeSolverOption().setSelected(OdeSolverOption.DARSCFD);
complexChemistryModel_0.setClustering(false);
|
ComplexChemistryCombustionModel complexChemistryModel_0 =
((ComplexChemistryCombustionModel) physicsContinuum_0.getModelManager().getModel(ComplexChemistryCombustionModel.class));
complexChemistryModel_0.getComplexChemistryOdeSolverOption().setSelected(OdeSolverOption.DARSCFD);
ChemistryAccelerationOptions chemistryAccelerationOptions_0 =
complexChemistryModel_0.getChemistryAccelerationOptions();
chemistryAccelerationOptions_0.setClustering(false);
|
激活平衡时间尺度模型
以前发行版本 |
Simcenter STAR-CCM+ v11.04 |
ComplexChemistryCombustionModel complexChemistryCombustionModel_0 =
physicsContinuum_0.getModelManager().getModel(ComplexChemistryCombustionModel.class);
complexChemistryCombustionModel_0.getDarsCfdLibrary().importCase("darscfdstarccm+ch4sk30", resolveDataPath(""));
complexChemistryCombustionModel_0.getComplexChemistryOdeSolverOption().setSelected(OdeSolverOption.Type.DARSCFD);
complexChemistryCombustionModel_0.getIsatOption().setSelected(IsatOrEqTsmOption.Type.EQTSM);
|
ComplexChemistryCombustionModel complexChemistryCombustionModel_0 =
physicsContinuum_0.getModelManager().getModel(ComplexChemistryCombustionModel.class);
complexChemistryCombustionModel_0.getDarsCfdLibrary().importCase("darscfdstarccm+ch4sk30", resolveDataPath(""));
complexChemistryCombustionModel_0.getComplexChemistryOdeSolverOption().setSelected(OdeSolverOption.Type.DARSCFD);
ChemistryApproximationOptions chemistryApproximationOptions_0 =
complexChemistryCombustionModel_0.getChemistryApproximationOptions();
chemistryApproximationOptions_0.setEqTsm(true);
|
燃烧:移除 EBU 和 FGM 的预混变体
涡破碎 (EBU) 模型和小火焰生成流形 (FGM) 模型的预混变体已停用。 当选择“预混燃烧 > 涡破碎”或“预混燃烧 > 小火焰生成流形”时,STAR-CCM+ v11.04 会使用部分预混变体。
以下是已更改的宏代码行的示例:
将预混 EBU 转换成 EBU
以前发行版本 |
Simcenter STAR-CCM+ v11.04 |
physicsContinuum_0.enable(PebuCombustionModel.class);
physicsContinuum_0.enable(PebuReactionModel.class);
physicsContinuum_0.enable(IdealGasModel.class);
|
physicsContinuum_0.enable(EbuGasCombustionModel.class);
physicsContinuum_0.enable(SegregatedSpeciesModel.class);
physicsContinuum_0.enable(IdealGasModel.class);
|
将预混 FGM(原名为 PPVM)转换成 FGM
以前发行版本 |
Simcenter STAR-CCM+ v11.04 |
physicsContinuum_0.enable(PpvmCombustionModel.class);
physicsContinuum_0.enable(PpvmReactionModel.class);
physicsContinuum_0.enable(PpvmIdealGasModel.class);
|
physicsContinuum_0.enable(FgmCombustionModel.class);
physicsContinuum_0.enable(FgmReactionModel.class);
physicsContinuum_0.enable(FgmIdealGasModel.class);
physicsContinuum_0.enable(FgmFiniteRateChemistryModel.class);
|
PPDF 燃烧:模型选择更改
绝热与非绝热 PPDF 模型之间的选择已从非预混燃烧模型选项的顶层下移。 首先,PPDF 平衡模型与小火焰模型之间的选择与其他燃烧模型一同出现,然后可选择绝热或非绝热 PPDF 模型。 后者是自动选择的,因为大部分实际案例都是非绝热模型。 但如果需要,仍可停用自动选择,再选择绝热模型。
以下是已更改的宏代码行的示例:
PPDF 平衡、非绝热案例
以前发行版本 |
Simcenter STAR-CCM+ v11.04 |
physicsContinuum_0.enable(NonAdiabaticPpdfCombustionModel.class);
physicsContinuum_0.enable(PpdfEquilibriumModel.class);
|
physicsContinuum_0.enable(PpdfEquilibriumModel.class);
physicsContinuum_0.enable(NonAdiabaticPpdfCombustionModel.class);
|
PPDF 平衡、绝热案例
以前发行版本 |
Simcenter STAR-CCM+ v11.04 |
physicsContinuum_0.enable(AdiabaticPpdfCombustionModel.class);
physicsContinuum_0.enable(PpdfEquilibriumModel.class);
|
physicsContinuum_0.enable(PpdfEquilibriumModel.class);
physicsContinuum_0.enable(AdiabaticPpdfCombustionModel.class);
|
PPDF 小火焰、非绝热案例
以前发行版本 |
Simcenter STAR-CCM+ v11.04 |
physicsContinuum_0.enable(NonAdiabaticPpdfCombustionModel.class);
physicsContinuum_0.enable(PpdfFlameletModel.class);
|
physicsContinuum_0.enable(PpdfNonAdiabaticFlameletModel.class);
physicsContinuum_0.enable(NonAdiabaticPpdfCombustionModel.class);
|
PPDF 小火焰、绝热案例
以前发行版本 |
Simcenter STAR-CCM+ v11.04 |
physicsContinuum_0.enable(AdiabaticPpdfCombustionModel.class);
physicsContinuum_0.enable(PpdfFlameletModel.class);
|
physicsContinuum_0.enable(PpdfAdiabaticFlameletModel.class);
physicsContinuum_0.enable(AdiabaticPpdfCombustionModel.class);
|
网格化:分割操作导致的零部件表面和零部件曲线的创建更改
为进行分割操作(通过用户界面内的右键菜单执行),创建零部件表面和零部件曲线的顺序已更改。 因此,用于在宏内引用这些实体的名称也已更改。 需要更新宏代码,以使用零部件表面和零部件曲线的新名称进行网格化。
以下是已更改的宏代码行的示例:
零部件表面 > 根据非连续分割
以前发行版本 |
Simcenter STAR-CCM+ v11.04 |
MeshPart meshPart_0 =
((MeshPart) simulation_0.get(SimulationPartManager.class).getPart("Part"));
PartSurface partSurface_0 =
((PartSurface) meshPart_0.getPartSurfaceManager().getPartSurface("Surface"));
meshPart_0.getPartSurfaceManager().splitNonContiguousPartSurfaces(new NeoObjectVector(new Object[] {partSurface_0}));
partSurface_0.setPresentationName("Special Surface");
|
MeshPart meshPart_0 =
((MeshPart) simulation_0.get(SimulationPartManager.class).getPart("Part"));
PartSurface partSurface_0 =
((PartSurface) meshPart_0.getPartSurfaceManager().getPartSurface("Surface"));
meshPart_0.getPartSurfaceManager().splitNonContiguousPartSurfaces(new NeoObjectVector(new Object[] {partSurface_0}));
PartSurface partSurface_1 =
((PartSurface) meshPart_0.getPartSurfaceManager().getPartSurface("Surface 2"));
partSurface_1.setPresentationName("Special Surface");
|
零部件表面 > 根据零部件曲线分割
以前发行版本 |
Simcenter STAR-CCM+ v11.04 |
MeshPart meshPart_0 =
((MeshPart) simulation_0.get(SimulationPartManager.class).getPart("Part"));
PartSurface partSurface_0 =
((PartSurface) meshPart_0.getPartSurfaceManager().getPartSurface("Surface"));
PartCurve partCurve_0 =
meshPart_0.getPartCurveManager().getPartCurve("Curve");
meshPart_0.getPartSurfaceManager().splitPartSurfacesByPartCurves(new NeoObjectVector(new Object[] {partSurface_0}), new NeoObjectVector(new Object[] {partCurve_0}));
PartSurface partSurface_1 =
((PartSurface) meshPart_0.getPartSurfaceManager().getPartSurface("Surface 6"));
partSurface_1.setPresentationName("Special Surface");
|
MeshPart meshPart_0 =
((MeshPart) simulation_0.get(SimulationPartManager.class).getPart("Part"));
PartSurface partSurface_0 =
((PartSurface) meshPart_0.getPartSurfaceManager().getPartSurface("Surface"));
PartCurve partCurve_0 =
meshPart_0.getPartCurveManager().getPartCurve("Curve");
meshPart_0.getPartSurfaceManager().splitPartSurfacesByPartCurves(new NeoObjectVector(new Object[] {partSurface_0}), new NeoObjectVector(new Object[] {partCurve_0}));
PartSurface partSurface_1 =
((PartSurface) meshPart_0.getPartSurfaceManager().getPartSurface("Surface 4"));
partSurface_1.setPresentationName("Special Surface");
|
零部件表面 > 根据角度分割
以前发行版本 |
Simcenter STAR-CCM+ v11.04 |
MeshPart meshPart_0 =
((MeshPart) simulation_0.get(SimulationPartManager.class).getPart("Part"));
PartSurface partSurface_0 =
((PartSurface) meshPart_0.getPartSurfaceManager().getPartSurface("Surface"));
meshPart_0.getPartSurfaceManager().splitPartSurfacesByAngle(new NeoObjectVector(new Object[] {partSurface_0}), 89.0);
PartSurface partSurface_1 =
((PartSurface) meshPart_0.getPartSurfaceManager().getPartSurface("Surface 7"));
partSurface_1.setPresentationName("Special Surface");
|
MeshPart meshPart_0 =
((MeshPart) simulation_0.get(SimulationPartManager.class).getPart("Part"));
PartSurface partSurface_0 =
((PartSurface) meshPart_0.getPartSurfaceManager().getPartSurface("Surface"));
meshPart_0.getPartSurfaceManager().splitPartSurfacesByAngle(new NeoObjectVector(new Object[] {partSurface_0}), 89.0);
PartSurface partSurface_1 =
((PartSurface) meshPart_0.getPartSurfaceManager().getPartSurface("Surface 2"));
partSurface_1.setPresentationName("Special Surface");
|
零部件曲线 > 根据非连续分割
以前发行版本 |
Simcenter STAR-CCM+ v11.04 |
MeshPart meshPart_0 =
((MeshPart) simulation_0.get(SimulationPartManager.class).getPart("Part"));
PartCurve partCurve_0 =
meshPart_0.getPartCurveManager().getPartCurve("Curve");
meshPart_0.getPartCurveManager().splitNonContiguousPartCurves(new NeoObjectVector(new Object[] {partCurve_0}));
PartCurve partCurve_1 =
meshPart_0.getPartCurveManager().getPartCurve("Curve 3");
partCurve_1.setPresentationName("Special Curve");
|
MeshPart meshPart_0 =
((MeshPart) simulation_0.get(SimulationPartManager.class).getPart("Part"));
PartCurve partCurve_0 =
meshPart_0.getPartCurveManager().getPartCurve("Curve");
meshPart_0.getPartCurveManager().splitNonContiguousPartCurves(new NeoObjectVector(new Object[] {partCurve_0}));
PartCurve partCurve_1 =
meshPart_0.getPartCurveManager().getPartCurve("Curve 2");
partCurve_1.setPresentationName("Special Curve");
|
定向网格化:块节点和块曲线的顺序更改
在定向网格操作中,在块网格化中创建块节点和块曲线的顺序已更改。 因此,用于在宏内引用这些实体的名称也已更改。 需要更新宏代码,以使用新的块节点和块曲线名称进行块网格化。 在更复杂的块网格中,应考虑为块网格化记录全新的宏。 在对零部件几何进行基于管道的更改时,要提高稳健性,应使用自动源网格而非块网格作为源网格类型。
以下是之前版本的 Simcenter STAR-CCM+ 中已失效的宏代码行示例:
- 按名称引用块节点和块曲线的代码:
PatchVertex patchVertex_3 = ((PatchVertex)
directedPatchSourceMesh_0.getPatchVertexManager().getObject("PatchVertex 99"));
PatchCurve patchCurve_36 = ((PatchCurve)
directedPatchSourceMesh_0.getPatchCurveManager().getObject("PatchCurve 177"));
- 在这些实体上运行的代码:
directedPatchSourceMesh_0.splitPatchCurve(patchCurve_31, new DoubleVector(new double[]
{-0.008895140013122065, 0.024398976690245322, -0.025}));
定向网格化:源网格节点命名更改
在以前版本的 Simcenter STAR-CCM+ 中,定向网格操作利用零部件或零部件集合名称命名新的源网格节点。 现在源网格节点能用于多个零部件集合,所以默认为每个源网格节点提供的名称也已更改。 现在,新的源网格节点以源网格类型(使用现有网格、自动源网格或块网格)命名,同时添加序号以保持唯一性。 这种命名方法与用于网格操作的命名方法类似。 源网格节点仍能重命名。 要了解此发行版本中的定向网格化更改,请参见新体网格特征列表中的“定向网格化改进”。
当使用旧命名约定按名称引用源网格节点时,更新宏代码:
以前发行版本 |
Simcenter STAR-CCM+ v11.04 |
DirectedAutoSourceMesh directedAutoSourceMesh_0 = ((DirectedAutoSourceMesh)
directedMeshOperation_0.getGuidedSurfaceMeshBaseManager().
getObject("Connected Part"));
|
DirectedAutoSourceMesh directedAutoSourceMesh_0 = ((DirectedAutoSourceMesh)
directedMeshOperation_0.getGuidedSurfaceMeshBaseManager().
getObject("Auto Mesh"));
|
变形:边界条件更改
变形边界条件已重构,结果导致宏代码更改。
MovingMeshOption
类 MovingMeshOption 已重命名为 MorpherSpecification。
以前发行版本 |
Simcenter STAR-CCM+ v11.04 |
boundary_0.getConditions().get(MovingMeshOption.class).
setSelected(MovingMeshOption.DISPLACEMENT);
|
boundary_0.getConditions().get(MorpherSpecification.class).
setSelected(MorpherSpecification.Type.DISPLACEMENT);
|
相关元素的更改如下所示:
以前发行版本 |
Simcenter STAR-CCM+ v11.04 |
MovingMeshOption |
MorpherSpecification |
FIXED |
无更改 |
FLOATING |
DISPLACEMENT |
将 DisplacementSpecification 添加到“物理”条件管理器中 |
GRID_VELOCITY |
移至 DisplacementSpecification |
INTERNAL |
SOLIDSTRESS |
IN_PLANE |
移至 ConstraintSpecification |
FIXEDPLANE |
SLIDE_ON_SURFACE |
RESTRAINED |
重命名为 CONSTRAINT。 将 ConstraintSpecification 添加到“物理”条件管理器中
|
DofMorpherOption
同样,类 DofMorpherOption 移至 DofMorpherSpecification。
以前发行版本 |
Simcenter STAR-CCM+ v11.04 |
import star.sixdof.DofMorpherOption;
boundary_1.getConditions().get(DofMorpherOption.class).
setSelected(DofMorpherOption.Type.SIXDOFBODY);
|
import star.sixdof.DofMorpherSpecification;
boundary_1.getConditions().get(DofMorpherSpecification.class).
setSelected(DofMorpherSpecification.Type.SIXDOFBODY);
|
MorphPlanef
类 MorphPlanef 现在的名称是 MorpherPlaneOptions。
以前发行版本 |
Simcenter STAR-CCM+ v11.04 |
import star.morpher.MorphPlanef;
MorphPlanef morphPlanef_0 =
boundary_0.getValues().get(MorphPlanef.class);
|
import star.morpher.MorpherPlaneOptions;
MorpherPlaneOptions morphPlaneOpt_0 =
boundary_0.getValues().get(MorpherPlaneOptions.class);
morphPlaneOpt_0.getDampFactor().setValue(0.01);
|
DisplacementOption
类 DisplacementOption 重命名为 DisplacementSpecification。
以前发行版本 |
Simcenter STAR-CCM+ v11.04 |
boundary_0.getConditions().get(DisplacementOption.class).
setSelected(DisplacementOption.Type.INCREMENTAL);
|
boundary_0.getConditions().get(DisplacementSpecification.class).
setSelected(DisplacementSpecification.Type.INCREMENTAL);
|
相关元素的更改如下所示:
以前发行版本 |
Simcenter STAR-CCM+ v11.04 |
DisplacementOption |
DisplacementSpecification |
TOTAL |
无更改 |
INCREMENTAL |
新元素 |
GRID_VELOCITY |
SOLID_STRESS |
INTERNAL |
COORDINATE_OFFSET |
ConstraintSpecification
新类 ConstraintSpecification 会为之前位于 MovingMeshOption 内的所有约束方法分组。
以前发行版本 |
Simcenter STAR-CCM+ v11.04 |
boundary_2.getConditions().get(MovingMeshOption.class).
setSelected(MovingMeshOption.Type.FIXEDPLANE);
|
boundary_2.getConditions().get(MorpherSpecification.class).
setSelected(MorpherSpecification.Type.CONSTRAINT);
boundary_2.getConditions().get(ConstraintSpecification.class).
setSelected(ConstraintSpecification.Type.FIXEDPLANE);
|
相关元素的更改如下所示:
以前发行版本 |
Simcenter STAR-CCM+ v11.04 |
MovingMeshOption |
ConstraintSpecification |
IN_PLANE |
无更改 |
FIXEDPLANE |
SLIDE_ON_SURFACE 与 GuideSurfaceOption.Type.ExternalFile |
SLIDE_ON_STL_SURFACE |
SLIDE_ON_SURFACE 与 GuideSurfaceOption.Type.InitialSurface |
SLIDE_ON_INITIAL_BOUNDARY |
SLIDE_ON_SURFACE 与 GuideSurfaceOption.Type.StayPlanar |
IN_PLANE 与 PlaneConstraintSpecification.setTriangulatedPlane(true) |
下表包含这些更改元素的示例:
以前发行版本 |
Simcenter STAR-CCM+ v11.04 |
boundary_0.getConditions().get(MovingMeshOption.class).
setSelected(MovingMeshOption.Type.SLIDE_ON_SURFACE);
boundary_0.getConditions().get(GuideSurfaceSettings).getSurfaceOption().
setSelected(GuideSurfaceOption.Type.ExternalFile);
|
boundary_0.getConditions().get(MorpherSpecification.class).
setSelected(MorpherSpecification.Type.CONSTRAINT);
boundary_0.getConditions().get(MovingMeshOption.class).
setSelected(MovingMeshOption.Type.SLIDE_ON_STL_SURFACE);
|
boundary_0.getConditions().get(MovingMeshOption.class).
setSelected(MovingMeshOption.Type.SLIDE_ON_SURFACE);
boundary_0.getConditions().get(GuideSurfaceSettings).getSurfaceOption().
setSelected(GuideSurfaceOption.Type.InitialSurface);
|
boundary_0.getConditions().get(MorpherSpecification.class).
setSelected(MorpherSpecification.Type.CONSTRAINT);
boundary_0.getConditions().get(MovingMeshOption.class).
setSelected(MovingMeshOption.Type.SLIDE_ON_INITIAL_SURFACE);
|
boundary_0.getConditions().get(MovingMeshOption.class).
setSelected(MovingMeshOption.Type.SLIDE_ON_SURFACE);
boundary_0.getConditions().get(GuideSurfaceSettings).getSurfaceOption().
setSelected(GuideSurfaceOption.Type.StayPlanar);
|
boundary_0.getConditions().get(MorpherSpecification.class).
setSelected(MorpherSpecification.Type.CONSTRAINT);
boundary_0.getConditions().get(MovingMeshOption.class).
setSelected(MovingMeshOption.Type.IN_PLANE;
boundary_0.getConditions().get(PlaneConstraintSpecification.class).
setTriangulatedPlane(true);
|