Macro API Changes 3.02

In Simcenter STAR-CCM+ 3.02, the macro API changed for transmissivity.

The two-sided interface transmissivity may require two changes to macros:

  • If you have set the thermal or solar transmissivity on an interface in a macro, you need to change the macro to set the transmissivity on the two associated interface boundaries. An example of the change for thermal transmissivity is:

    // old - set transmissivity on the interface DirectBoundaryInterface 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);

  • If you have set the thermal transmissivity on any external (non-interface) boundaries for the S2S model, then you need to change the name of the profile from BoundaryTransmissivityProfile to TransmissivityProfile. This does not affect solar S2S or discrete ordinates (DOM does not have transmissivity on external boundaries). An example of the change is:

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

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