Macro API Changes 6.06

In Simcenter STAR-CCM+ 6.06, the macro API changed for DFBI, VOF, melting and solidification, the Solid Stress solver, battery modeling, and OLGA coupling.

Changes for External and Propulsion Forces in DFBI

Propulsion Force and External Force have been extended so that the position of the force can be specified in a coordinate system other than the body coordinate system. The following macro changes result from this:

Previous Release Simcenter STAR-CCM+ 6.06.011

Propulsion Force: the type of property Position was changed from VectorPhysicalQuantity to Coordinate

propulsionForce_0

.getPosition()

.setComponents(1.0, 0.0, 0.0);

Units units_0 =

((Units) simulation_0

.getUnitsManager()

.getObject("m"));

propulsionForce_0

.getPositionAsCoordinate()

.setCoordinate( units_0, units_0, units_0, new DoubleVector( new double[] {1.0, 0.0, 0.0} ));

propulsionForce_0

.getPosition()

.setVector( new DoubleVector( new double[] {1.0, 0.0, 0.0} ));

Units units_0 = ((Units) simulation_0

.getUnitsManager()

.getObject("m"));

propulsionForce_0

.getPositionAsCoordinate()

.setCoordinate( units_0, units_0, units_0, new DoubleVector( new double[] {1.0, 0.0, 0.0} ));

External Force: the type of property Position was changed from VectorPhysicalQuantity to Coordinate

externalForce_0

.getPosition()

.setComponents(1.0, 0.0, 0.0);

Units units_0 = ((Units) simulation_0

.getUnitsManager()

.getObject("m"));

externalForce_0

.getPositionAsCoordinate()

.setCoordinate( units_0, units_0, units_0, new DoubleVector( new double[] {1.0, 0.0, 0.0} ));

externalForce_0

.getPosition()

.setVector( new DoubleVector( new double[] {1.0, 0.0, 0.0} ));

Units units_0 = ((Units) simulation_0

.getUnitsManager()

.getObject("m"));

externalForce_0

.getPositionAsCoordinate()

.setCoordinate( units_0, units_0, units_0, new DoubleVector( new double[] {1.0, 0.0, 0.0} ));

For safety reasons, the method getPosition() has been declared as private in both classes PropulsionForce and ExternalForce. A compile error will be issued if this method is still used. The method getPositionAsCoordinate().setCoordinate(...) should be used instead.

Change to Class Name for VOF Multiphase Model

If you activate the VOF Multiphase model from a macro, you will need to activate the SegregatedVofFlowModel instead of the SegregatedFlowModel.

Previous Release Simcenter STAR-CCM+ 6.06.011

physicsContinuum_0 .enable( SegregatedVofModel.class);

physicsContinuum_0 .enable( SegregatedFlowModel.class);

physicsContinuum_0 .enable( SegregatedVofModel.class);

physicsContinuum_0 .enable( SegregatedVofFlowModel.class);

Activating Solidification-Melting

The Solidification-Melting model is no longer activated on a physics continuum, but on a phase interaction.

Previous Release Simcenter STAR-CCM+ 6.06.011

physicsContinuum_0 .enable(VofEnthalpyMeltingModel.class);

phaseInteraction_1 .enable(VofEnthalpyMeltingModel.class);

Activating Carman-Kozeny Mushy Permeability

The Carman-Kozeny Mushy Permeability model is no longer activated on a physics continuum, but on a phase interaction.

Previous Release Simcenter STAR-CCM+ 6.06.011

physicsContinuum_0 .enable(MushyZoneCarmanKozenyPermeabilityModel.class);

phaseInteraction_1 .enable(MushyZoneCarmanKozenyPermeabilityModel.class);

Setting Latent Heat, Liquidus and Solidus Temperatures

The Latent Heat, Liquidus Temperature and Solidus Temperature are no longer set for a material within the Eulerian Phase manager, but for the multiphase mixture within the Phase Interaction manager.

Previous Release Simcenter STAR-CCM+ 6.06.011

SinglePhaseLiquidModel singlePhaseLiquidModel_0 = eulerianPhase_1 .getModelManager() .getModel(SinglePhaseLiquidModel.class);

SinglePhaseLiquid singlePhaseLiquid_0 = ((SinglePhaseLiquid) singlePhaseLiquidModel_0 .getMaterial());

ConstantMaterialPropertyMethod constantMaterialPropertyMethod_0 = ((ConstantMaterialPropertyMethod) singlePhaseLiquid_0

.getMaterialProperties()

.getMaterialProperty(LatentHeatProperty.class)

.getMethod());

constantMaterialPropertyMethod_0

.getQuantity() .setValue(4800000.0);

PhaseInteractionMaterialModel phaseInteractionMaterialModel_0 = phaseInteraction_1 .getModelManager() .getModel(PhaseInteractionMaterialModel.class);

PhaseInteractionMaterial phaseInteractionMaterial_0 = ((PhaseInteractionMaterial) phaseInteractionMaterialModel_0 .getMaterial());

ConstantMaterialPropertyMethod constantMaterialPropertyMethod_0 = ((ConstantMaterialPropertyMethod) phaseInteractionMaterial_0

.getMaterialProperties()

.getMaterialProperty(LatentHeatProperty.class)

.getMethod());

constantMaterialPropertyMethod_0

.getQuantity() .setValue(4800000.0);

ConstantMaterialPropertyMethod constantMaterialPropertyMethod_1 = ((ConstantMaterialPropertyMethod) singlePhaseLiquid_0 .getMaterialProperties() .getMaterialProperty(LiquidusTemperatureProperty.class) .getMethod());

constantMaterialPropertyMethod_1.getQuantity().setValue(300.0);

ConstantMaterialPropertyMethod constantMaterialPropertyMethod_1 = ((ConstantMaterialPropertyMethod) phaseInteractionMaterial_0

.getMaterialProperties()

.getMaterialProperty(LiquidusTemperatureProperty.class)

.getMethod());

constantMaterialPropertyMethod_1 .getQuantity().setValue(300.0);

ConstantMaterialPropertyMethod constantMaterialPropertyMethod_2 = ((ConstantMaterialPropertyMethod) singlePhaseLiquid_0 .getMaterialProperties() .getMaterialProperty(SolidusTemperatureProperty.class) .getMethod());

constantMaterialPropertyMethod_2 .getQuantity().setValue(400.0);

ConstantMaterialPropertyMethod constantMaterialPropertyMethod_2 = ((ConstantMaterialPropertyMethod) phaseInteractionMaterial_0

.getMaterialProperties()

.getMaterialProperty(SolidusTemperatureProperty.class)

.getMethod());

constantMaterialPropertyMethod_2 .getQuantity().setValue(400.0);

Change of Class Name for Solid Stress Solver

The class name for the solid stress solver is now SolidStressIterativeSolver.

Previous Release Simcenter STAR-CCM+ 6.06.011

SolidStressSolver solidStressSolver_0 = ((SolidStressSolver) simulation_0

.getSolverManager()

.getSolver(

SolidStressSolver.class));

SolidStressIterativeSolver solidStressIterativeSolver_0 = ((SolidStressIterativeSolver) simulation_0

.getSolverManager()

.getSolver( SolidStressIterativeSolver.class));

Changes to the Battery Module

The process of generating battery module objects has changed since the previous release. The previous single action has been broken into three individual actions.

Previous Release Simcenter STAR-CCM+ 6.06.011

batteryModule_0.generate();

batteryModule_0 .generateParts();

batteryModule_0 .generateConnectorParts();

batteryModule_0 .generateRegions( new NeoObjectVector( new Object[] {}), true);

Changes to OLGA Coupling

For OLGA coupled simulations the dynamic viscosity of an Eulerian phase is set to use the OLGA Dynamic Viscosity method by default. If you wish to set a constant dynamic viscosity, you will need to choose this material property method before setting the constant value.

Previous Release Simcenter STAR-CCM+ 6.06.011

ConstantMaterialPropertyMethod constantMaterialPropertyMethod_0 = ((ConstantMaterialPropertyMethod) singlePhaseGas_1 .getMaterialProperties() .getMaterialProperty(DynamicViscosityProperty.class) .getMethod()); constantMaterialPropertyMethod_0 .getQuantity() .setValue(1.704E-5);

SinglePhaseLiquid singlePhaseLiquid_0 = ((SinglePhaseLiquid) singlePhaseLiquidModel_0 .getMaterial()); singlePhaseLiquid_0 .getMaterialProperties() .getMaterialProperty(DynamicViscosityProperty.class) .setMethod(ConstantMaterialPropertyMethod.class); ConstantMaterialPropertyMethod constantMaterialPropertyMethod_0 = ((ConstantMaterialPropertyMethod) singlePhaseLiquid_0 .getMaterialProperties() .getMaterialProperty(DynamicViscosityProperty.class) .getMethod()); constantMaterialPropertyMethod_0 .getQuantity() .setValue(1.704E-5);