宏 API 更改 7.04

Simcenter STAR-CCM+ 7.04 中,针对融化-凝固模型、空化、DFBI 和欧拉多相建模进行了宏 API 的更改。

融化-凝固:凝固路径

融化-凝固模型所需的凝固路径不再属于模型节点本身。 可以转而使用分数固相曲线材料属性节点来设置路径。

以前发行版本 Simcenter STAR-CCM+ 7.04.006

VofEnthalpyMeltingModel

vofEnthalpyMeltingModel_0 = eulerianPhase_0

.getModelManager() .getModel( VofEnthalpyMeltingModel.class); vofEnthalpyMeltingModel_0 .getSolidificationPathOption()

.setSelected( SolidificationPathOption.TABULAR);

SinglePhaseLiquidModel singlePhaseLiquidModel_0 =

eulerianPhase_0 .getModelManager() .getModel(

SinglePhaseLiquidModel.class);

SinglePhaseLiquid singlePhaseLiquid_0 =

((SinglePhaseLiquid) singlePhaseLiquidModel_0.getMaterial());singlePhaseLiquid_0.getMaterialProperties().getMaterialProperty(FractionSolidCurveProperty.class)

.setMethod(FractionSolidCurveTemperatureTableMethod.class);singlePhaseLiquid_0.getMaterialProperties().getMaterialProperty(FractionSolidCurveProperty.class)

.setMethod(FractionSolidCurveLinearMethod.class);

空化:种子密度和种子直径

现在,空化相间相互作用模型可用于使用场函数或常数分布来定义种子密度和种子直径属性。 因此,恒定种子密度或种子直径的定义已改为包括全部两个选项。

以前发行版本 Simcenter STAR-CCM+ 7.04.006

cavitationModel_0

.getSeedDensity()

.setValue(1.0E12);

cavitationModel_0

.getCavitationSeedDensity()

.setMethod(ConstantInteractionCoefficientMethod.class);

ConstantInteractionCoefficientMethod constantInteractionCoefficientMethod_0 =

cavitationModel_

.getCavitationSeedDensity()

.getMethod(ConstantInteractionCoefficientMethod.class);

constantInteractionCoefficientMethod_0

.getQuantity()

.setValue(1.0E12);

cavitationModel_0

.getSeedDiameter()

.setValue(1.0E-6);

cavitationModel_0

.getCavitationSeedDiameter()

.setMethod(ConstantInteractionCoefficientMethod.class);

ConstantInteractionCoefficientMethod constantInteractionCoefficientMethod_1 =

cavitationModel_0

.getCavitationSeedDiameter()

.getMethod(ConstantInteractionCoefficientMethod.class);

constantInteractionCoefficientMethod_1

.getQuantity()

.setValue(1.0E-6);

动态流体相互作用:外力矩

对于动态流体相互作用物理模型,已扩展外力矩以使其相对于体位置,而非相对于质心。根据选定体运动类型,体位置可以不同于质心。因此,外力矩已重命名。

以前发行版本 Simcenter STAR-CCM+ 7.04.006

ExternalMomentCM

externalMomentCM_0 = body_0

.getExternalForceAndMomentManager()

.createExternalForceAndMoment(ExternalMomentCM.class);

ExternalMoment

externalMoment_0 = body_0

.getExternalForceAndMomentManager()

.createExternalForceAndMoment(ExternalMoment.class);

欧拉多相:相湍流模型

欧拉多相模型现在对每个欧拉相使用单个 K-Epsilon 湍流模型。 此更改影响以下属性:

  • 欧拉相的初始和边界条件属性
    • 湍流强度
    • 湍流粘度比
    • 湍流耗散率
    • 湍动能
  • K-Epsilon 湍流求解器
    • 已重命名类
    • 包括具有 V 循环选项的 AMG 线性求解器
  • 启用 K-Epsilon 湍流模型
    • 从物理连续体中移除多余的湍流模型
    • 将新的湍流模型添加到每个欧拉相
    • 设置模型选项
以前发行版本 Simcenter STAR-CCM+ 7.04.006

初始条件

MultiPhaseTurbulenceIntensityProfile multiPhaseTurbulenceIntensityProfile_0 =

physicsContinuum_0

.getInitialConditions()

.get(MultiPhaseTurbulenceIntensityProfile.class);

multiPhaseTurbulenceIntensityProfile_0

.getMethod(ConstantArrayProfileMethod.class)

.getQuantity().setArray(new DoubleVector(new double[] {0.06}));

MultiPhaseTurbulentViscosityRatioProfile multiPhaseTurbulentViscosityRatioProfile_0 =

physicsContinuum_0

.getInitialConditions(

.get(MultiPhaseTurbulentViscosityRatioProfile.class);

multiPhaseTurbulentViscosityRatioProfile_0

.getMethod(ConstantArrayProfileMethod.class)

.getQuantity()

.setArray(

new DoubleVector(

new double[] {255.0}));

EulerianMultiPhaseModel eulerianMultiPhaseModel_0 =

physicsContinuum_0

.getModelManager()

.getModel(EulerianMultiPhaseModel.class);

EulerianPhase eulerianPhase_0 =

((EulerianPhase)

eulerianMultiPhaseModel_0

.getPhaseManager()

.getPhase("Water"));

TurbulenceIntensityProfile turbulenceIntensityProfile_0 =

eulerianPhase_0

.get(ContinuumInitialConditionManager.class)

.get(TurbulenceIntensityProfile.class);

turbulenceIntensityProfile_0

.getMethod(ConstantScalarProfileMethod.class)

.getQuantity()

.setValue(0.06);

TurbulentViscosityRatioProfile turbulentViscosityRatioProfile_0 =

eulerianPhase_0

.get(ContinuumInitialConditionManager.class)

.get(TurbulentViscosityRatioProfile.class);

turbulentViscosityRatioProfile_0

.getMethod(ConstantScalarProfileMethod.class)

.getQuantity()

.setValue(255.0);

边界条件

MultiPhaseTurbulenceIntensityProfile

multiPhaseTurbulenceIntensityProfile_0 =

boundary_0

.getValues()

.get(

MultiPhaseTurbulenceIntensityProfile.class);

multiPhaseTurbulenceIntensityProfile_0

.getMethod(ConstantArrayProfileMethod.class)

.setArray(

new DoubleVector(

new double[] {0.05}));

Boundary boundary_0 =

region_0

.getBoundaryManager()

.getBoundary("Inlet");

PhaseConditions phaseConditions_0 =

((PhaseConditions) boundary_0

.get(PhaseConditionsManager.class) .getPhaseConditions("Water"));

TurbulenceIntensityProfile turbulenceIntensityProfile_0 =

phaseConditions_0

.getPhaseValueManager()

.get(

TurbulenceIntensityProfile

.class);

turbulenceIntensityProfile_0

.getMethod(

ConstantScalarProfileMethod.class)

.getQuantity()

.setValue(0.05);

K-Epsilon 湍流求解器

MultiPhaseKeTurbSolver multiPhaseKeTurbSolver_0 =

((MultiPhaseKeTurbSolver) simulation_0

.getSolverManager()

.getSolver(

MultiPhaseKeTurbSolver.class));

multiPhaseKeTurbSolver_0

.setUrf(0.5);

KeTurbSolver

keTurbSolver_0 =

((KeTurbSolver) simulation_0

.getSolverManager()

.getSolver(

KeTurbSolver.class));

keTurbSolver_0

.setUrf(0.5);

AMGLinearSolver aMGLinearSolver_0 =

keTurbSolver_0

.getAMGLinearSolver();

aMGLinearSolver_0

.getCycleOption()

.setSelected(

AMGCycleOption.V_CYCLE);

启用 K-Epsilon 湍流模型

PhysicsContinuum

physicsContinuum_0 =

simulation_0

.getContinuumManager()

.createContinuum(

PhysicsContinuum.class);

physicsContinuum_0

.enable(

RansTurbulenceModel.class);

physicsContinuum_0

.enable(

KEpsilonTurbulence.class);

physicsContinuum_0

.enable(

MultiPhaseSkeTurbModel.class);

physicsContinuum_0

.enable(

MultiPhaseKeHighYplusWallTreatment

.class);

EulerianMultiPhaseModel eulerianMultiPhaseModel_0 =

physicsContinuum_0

.getModuleManager()

.getModel(

EulerianMultiPhaseModel.class);

EulerianPhase eulerianPhase_0 =

eulerianMultiPhaseModel_0

.createPhase();

eulerianPhase_0

.enable(

RansTurbulenceModel.class);

eulerianPhase_0

.enable(

KEpsilonTurbulence.class);

eulerianPhase_0

.enable(

SkeTurbModel.class);

eulerianPhase_0

.enable(

KeHighYplusWallTreatment.class)

设置 K-Epsilon 湍流模型选项

MultiPhaseSkeTurbModel multiPhaseSkeTurbModel_0 =

physicsContinuum_0

.getModelManager()

.getModel(

MultiPhaseSkeTurbModel.class);

multiPhaseSkeTurbModel_0

.getSecondaryGradientOption()

.setSelected(

SecondaryGradientOption.OFF);

EulerianMultiPhaseModel eulerianMultiPhaseModel_0 =

physicsContinuum_0

.getModelManager()

.getModel(

EulerianMultiPhaseModel.class);

EulerianPhase eulerianPhase_0 =

((EulerianPhase) eulerianMultiPhaseModel_0

.getPhaseManager()

.getPhase("Water"));

SkeTurbModel SkeTurbModel_0 =

eulerianPhase_0

.getModelManager()

.getModel(SkeTurbModel.class);

SkeTurbModel_0

.getSecondaryGradientOption()

.setSelected(

SecondaryGradientOption.OFF);