Macro API Changes 2.10

In Simcenter STAR-CCM+ 2.10, the macro API changed for stopping criteria and VOF.

Units added to stopping criteria:

  • monitorIterationStoppingCriterionMinLimitType_0.setLimit(1.0E-6);

    becomes

    monitorIterationStoppingCriterionMinLimitType_0.getLimit().setValue(1.0E-6);

  • monitorIterationStoppingCriterionAsymptoticType_0.setMaxWidth(0.02);

    becomes

    monitorIterationStoppingCriterionAsymptoticType_0.getMaxWidth().setValue(0.02);

Due to changes in VOF:

  • MultiPhaseMixtureModel has been removed. It is replaced by EulerianMultiPhaseModel and MultiPhaseMaterialModel, so where you used to enable MultiPhaseMixtureModel.class , now you must enable EulerianMultiPhaseModel.class and MultiPhaseMaterialModel.class, for example:
    
    physicsContinuum_0.enable(MultiPhaseMixtureModel.class);

    becomes

    
    physicsContinuum_0.enable(EulerianMultiPhaseModel.class); physicsContinuum_0.enable( MultiPhaseMaterialModel.class);
  • VofEquationOfStateModel has been removed. It is replaced by MultiPhaseEquationOfStateModel, so where you used to enable VofEquationOfStateModel.class, now you must enable MultiPhaseEquationOfStateModel.class, for example:
    
    physicsContinuum_0.enable(VofEquationOfStateModel.class);

    becomes

    
    physicsContinuum_0.enable(MultiPhaseEquationOfStateModel.class);
  • MultiPhaseMixture has been removed. Where you used to access the MultiPhaseMixture from the MultiPhaseMixtureModel and use MultiPhaseMixture.addComponent() to add Gas/LiquidComponent objects to the mixture, now you use EulerianMultiPhaseModel.createPhase() to create new EulerianPhase objects.
    
    // access EulerianMultiPhaseModel from PhysicsContinuum 
    EulerianMultiPhaseModel eulerianMultiPhaseModel_0 = physicsContinuum_0.getModelManager().getModel(EulerianMultiPhaseModel.class);
    
    // create phase-0 -- gas Oil Vapor 
    EulerianPhase eulerianPhase_0 =  eulerianMultiPhaseModel_0.createPhase();
    
    // create phase-1 -- liquid Oil 
    EulerianPhase eulerianPhase_1 =  eulerianMultiPhaseModel_0.createPhase();
  • New SinglePhaseLiquidModel and SinglePhaseGasModel material models have been created. In each EulerianPhase enable either a SinglePhaseLiquidModel or a SinglePhaseGasModel along with an equation of state model as appropriate for the phase, for example:
    
    // phase-0 -- gas Oil Vapor 
    eulerianPhase_0.enable(SinglePhaseGasModel.class); eulerianPhase_0.enable(ConstantDensityModel.class);
    
    // phase-1 -- liquid Oil 
    eulerianPhase_1.enable( SinglePhaseLiquidModel.class); eulerianPhase_1.enable(ConstantDensityModel.class);
  • New SinglePhaseGas and SinglePhaseLiquid material classes have been created. Where you used to set material properties in each Gas/LiquidComponent material of the (now defunct) MultiPhaseMixture, now you set material properties in the SinglePhaseGas/Liquid material of each phase. The material in each phase is accessed via the material model in that phase, for example:
    
    // phase-0 -- gas Oil Vapor 
    // get SinglePhaseGasModel from ModelManager in phase-0 
    SinglePhaseGasModel singlePhaseGasModel_0 = eulerianPhase_0.getModelManager().getModel(SinglePhaseGasModel.class );
    
    // get SinglePhaseGas material from SinglePhaseGasModel in phase-0 
    SinglePhaseGas singlePhaseGas_0 =  ((SinglePhaseGas) singlePhaseGasModel_0.getMaterial()); singlePhaseGas_0.setPresentationName("Oil vapor");
    
    // set value for constant density in phase-0 
    ConstantMaterialPropertyMethod constantMaterialPropertyMethod_0 = ((ConstantMaterialPropertyMethod) ((ConstantDensityProperty) singlePhaseGas_0.getMaterialProperties().getMaterialProperty( ConstantDensityProperty.class)).getMethod()); constantMaterialPropertyMethod_0.getQuantity().setValue(0.2);