宏 API 更改 3.02

Simcenter STAR-CCM+ 3.02 中,针对透射率进行了宏 API 的更改。

双侧交界面透射率可能需要更改两个宏:

  • 如果在宏中的交界面上设置了热或太阳能透射率,则需要更改宏以在两个相关交界面边界上设置透射率。 热透射率更改的示例为:

    // old - set transmissivity on the interfaceDirectBoundaryInterface directBoundaryInterface_0 =((DirectBoundaryInterface) simulation_0.getInterfaceManager().getInterface("RegionInterface_1"));TransmissivityProfile transmissivityProfile_0 =((TransmissivityProfile) directBoundaryInterface_0.getValues().get(TransmissivityProfile.class));transmissivityProfile_0.setTransmissivity(1.0);

    // new - set transmissivity on the interface boundaries (using a copy for the second boundary)InterfaceBoundary interfaceBoundary_0 =((InterfaceBoundary) region_0.getBoundaryManager().getBoundary("interface-14 [RegionInterface_1]"));InterfaceBoundary interfaceBoundary_1 =((InterfaceBoundary) region_1.getBoundaryManager().getBoundary("interface-11 [RegionInterface_1]"));TransmissivityProfile transmissivityProfile_0 =((TransmissivityProfile) interfaceBoundary_0.getValues().get(TransmissivityProfile.class));((ConstantScalarProfileMethod) transmissivityProfile_0.getMethod()).getQuantity().setValue(1.0);interfaceBoundary_1.copyProperties(interfaceBoundary_0);

  • 如果在 S2S 模型的任何外部(非交界面)边界上设置了热透射率,则需要将配置文件的名称从 BoundaryTransmissivityProfile 更改为 TransmissivityProfile。 这不会影响太阳能 S2S 或离散坐标(DOM 在外部边界上没有透射率)。 更改的示例为:

    // oldBoundaryTransmissivityProfile boundaryTransmissivityProfile_1 =((BoundaryTransmissivityProfile) boundary_1.getValues().get(BoundaryTransmissivityProfile.class));

    // newTransmissivityProfile transmissivityProfile_1 =((TransmissivityProfile) boundary_1.getValues().get(TransmissivityProfile.class));