Macro API Changes 6.04
In Simcenter STAR-CCM+ 6.04, the macro API changed for Multiphase Segregated flow, Eulerian Multiphase turbulence, surface tension, cavitation, boiling, VOF, 3D-CAD, Abaqus co-simulation, thermal comfort, and OLGA coupling.
Multiphase Interactions for Multiphase Segregated Flow (Eulerian Multiphase)
The interface for setting up Eulerian phase interactions has changed. In particular the pair of phases represented by a single phase interaction are no longer set on the phase interaction object; they are set on the Eulerian Phase Interaction Model object. This is exemplified below.
Previous Release | Simcenter STAR-CCM+ 6.04.014 |
---|---|
EulerianPhasePair eulerianPhasePair_0 = multiPhaseInteractionModel_0 .createPhasePair(); eulerianPhasePair_0 .setPresentationName( "Liquid Bubble Interactions"); eulerianPhasePair_0 .setContinuousPhase( eulerianPhase_0); eulerianPhasePair_0 .setDispersedPhase( eulerianPhase_1); eulerianPhasePair_0 .setDispersedPhase( eulerianPhase_1); |
PhaseInteraction eulerianPhaseInteraction_0 = multiPhaseInteractionModel_0 .createPhaseInteraction(); eulerianPhaseInteraction_0 .enable( EulerianPhaseInteractionModel.class); EulerianPhaseInteractionModel phaseInteractionModel = eulerianPhaseInteraction_0 .getModelManager() .getModel( EulerianPhaseInteractionModel.class); phaseInteractionModel .setContinuousPhase( eulerianPhase_0); phaseInteractionModel .setDispersedPhase( eulerianPhase_1); |
Change to Turbulence Model Selection for Eulerian Multiphase
Previous Release | Simcenter STAR-CCM+ 6.04.014 |
---|---|
physicsContinuum_0 .enable(TurbulentModel.class); |
physicsContinuum_0 .enable( MultiPhaseTurbulentModel.class); |
Activating the Surface Tension Model
The surface tension model is no longer set on a physics continuum, but on a phase interaction.
Previous Release | Simcenter STAR-CCM+ 6.04.014 |
---|---|
continuum 0 .enable( SurfaceTensionModel.class); |
MultiPhaseInteractionModel multiPhaseInteractionModel_0 = continuum 0 .getModelManager() .getModel( MultiPhaseInteractionModel .class); PhaseInteraction phaseInteraction_0 = multiPhaseInteractionModel_0 .createPhaseInteraction(); phaseInteraction_0 .enable( VofPhaseInteractionModel.class); phaseInteraction_0 .enable( SurfaceTensionModel.class); phaseInteraction_0 .enable( PhaseInteractionMaterialModel .class); |
Set Surface Tension Coefficient
Previous Release | Simcenter STAR-CCM+ 6.04.014 |
---|---|
ConstantMaterialPropertyMethod constantMethod_0 = ((ConstantMaterialPropertyMethod) ((SurfaceTensionProperty) singlePhaseLiquid_0 .getMaterialProperties() .getMaterialProperty( SurfaceTensionProperty.class)) .getMethod()); constantMethod 0 .getQuantity() .setValue(0.0010); |
PhaseInteractionMaterial phaseIntMaterial_0 = ((PhaseInteractionMaterial) phaseIntMaterialModel_0 .getMaterial()); ConstantMaterialPropertyMethod constantMethod_0 = ((ConstantMaterialPropertyMethod) phaseIntMaterial_0 .getMaterialProperties() .getMaterialProperty( SurfaceTensionProperty.class) .getMethod()); constantMethod_0 .getQuantity() .setValue(0.082); |
Set Contact Angle
The contact angle is set on boundaries when the surface tension model is active. Boundaries have a manager object, PhaseConditions, on which such phase specific quantities are set.
Previous Release | Simcenter STAR-CCM+ 6.04.014 |
---|---|
ContactAngleProfile contactAngleProfile_0 = ~ boundary_0 .getValues() .get(ContactAngleProfile.class); contactAngleProfile_0 .getMethod( ConstantScalarProfileMethod.class) .getQuantity() .setValue(3.2); |
PhaseConditions phaseConditions_0 = ((PhaseConditions) boundary_0 .get(PhaseConditionsManager.class) .getPhaseConditions("Phase Interaction 1")); ContactAngleProfile contactAngleProfile_0 = phaseConditions_0 .getPhaseValueManager() .get(ContactAngleProfile.class); contactAngleProfile_0 .getMethod(ConstantScalarProfileMethod.class) .getQuantity() .setValue(0.33); |
Activating the Cavitation Model
This is now set on a phase interaction, rather than on the physics continuum as previously.
Previous Release | Simcenter STAR-CCM+ 6.04.014 |
---|---|
physicsContinuum_0 .enable(CavitationModel.class); |
PhaseInteraction phaseInteraction_0 = ((PhaseInteraction) multiPhaseInteractionModel_0 .getPhaseInteractionManager() .getPhaseInteraction( "Phase Interaction 1")); phaseInteraction_0 .enable(CavitationModel.class); |
Activating the Boiling Model
This is now set on a phase interaction, rather than on the physics continuum as previously.
Previous Release | Simcenter STAR-CCM+ 6.04.014 |
---|---|
physicsContinuum_0 .enable(BoilingTopModel.class); physicsContinuum_0 .enable(VofBoilingModel.class); |
phaseInteraction_0 .enable(BoilingTopModel.class); phaseInteraction_0 .enable(VofBoilingModel.class); |
Specify the Phase Pair (VOF Phase Interaction)
The pair of interacting phases is set on the VofPhaseInteractionModel.
Previous Release | Simcenter STAR-CCM+ 6.04.014 |
---|---|
Not applicable, as only one phase pair could be treated in the previous release. |
VofPhaseInteractionModel vofPhaseInteractionModel_0 = phaseInteraction_0 .getModelManager() .getModel(VofPhaseInteractionModel.class); vofPhaseInteractionModel_0 .setPrimaryPhase( eulerianPhase_1); vofPhaseInteractionModel_0 .setSecondaryPhase( eulerianPhase_0); |
3D-CAD Rotate and Mirror Body Actions
Axes and positions are now set using CadModelCoordinate objects. Some examples of code fragments are given below.
Previous Release | Simcenter STAR-CCM+ 6.04.014 |
---|---|
Setting the feature axis is now done through a CadModelCoordinate. |
|
rotateBodyFeature_1 .getAxis() .setComponents(0.0, 0.0, 1.0); rotateBodyFeature_1 .getAxis() .setUnits(units_0); |
CadModelCoordinate cadModelCoordinate_0 = rotateBodyFeature_1 .getAxis(); cadModelCoordinate_0 .setCoordinateSystem( cartesianCoordinateSystem_0); cadModelCoordinate_0 .setCoordinate( units_0, units_0, units_0, new DoubleVector( new double[] { 0.0, 0.0, 1.0})); |
The position is also set using a CadModelCoordinate object. |
|
Coordinate coordinate_1 = mirrorBodyFeature_0 .getPosition(); coordinate_1 .setCoordinateSystem( cartesianCoordinateSystem_0); coordinate_1 .setCoordinate( units_0, units_0, units_0, new DoubleVector( new double[] {0.4, 0.4, 0.0})); |
CadModelCoordinate cadModelCoordinate_2 = mirrorBodyFeature_0 .getPosition(); cadModelCoordinate_2 .setCoordinateSystem( cartesianCoordinateSystem_0); cadModelCoordinate_2 .setCoordinate( units_0, units_0, units_0, new DoubleVector( new double[] {0.4, 0.4, 0.0})); |
3D-CAD Circular and Linear Patterns
Changes have been made to the way that the number of copies, the direction vector, and the position coordinates are set. Examples are given below for a circular pattern.
Previous Release | Simcenter STAR-CCM+ 6.04.014 |
---|---|
bodyCircularPattern_1 .setNumberCopy(5); |
bodyCircularPattern_1 .getNumberCopy() .setValue(5.0); |
bodyCircularPattern_1 .setDirection( new DoubleVector( new double[] {1.0, 0.0, 0.0})); |
CadModelCoordinate cadModelCoordinate_3 = bodyCircularPattern_1 .getDirection(); cadModelCoordinate_3 .setCoordinateSystem( cartesianCoordinateSystem_0); cadModelCoordinate_3 .setCoordinate( units_0, units_0, units_0, new DoubleVector( new double[] {1.0, 0.0, 0.0})); |
Coordinate coordinate_2 = bodyCircularPattern_1 .getPosition(); coordinate_2 .setCoordinateSystem( cartesianCoordinateSystem_0); coordinate_2 .setCoordinate( units_0, units_0, units_0, new DoubleVector( new double[] {1.0, 0.0, 0.0})); |
CadModelCoordinate cadModelCoordinate_4 = bodyCircularPattern_1 .getPosition(); cadModelCoordinate_4 .setCoordinateSystem( cartesianCoordinateSystem_0); cadModelCoordinate_4 .setCoordinate( units_0, units_0, units_0, new DoubleVector( new double[] {1.0, 0.0, 0.0})); |
3D-CAD Extrusion
Should you choose to set a specified direction, the direction vector is now set as a CadModelCoordinate.
Previous Release | Simcenter STAR-CCM+ 6.04.014 |
---|---|
extrusionMerge_1 .setDirection( new DoubleVector( new double[] {0.0, 1.0, 0.5})); |
CadModelCoordinate cadModelCoordinate_0 = extrusionMerge_1 .getDirectionAxis(); cadModelCoordinate_0 .setCoordinateSystem( cartesianCoordinateSystem_0); cadModelCoordinate_0 .setCoordinate( units_0, units_0, units_0, new DoubleVector( new double[] {0.0, 1.0, 0.0})); |
3D-CAD Move Body
The translation vector of a Move Body feature is now set using a CadModelCoordinate.
Previous Release | Simcenter STAR-CCM+ 6.04.014 |
---|---|
Coordinate coordinate_2 = moveBodyFeature_0 .getTranslationVector(); coordinate_2 .setCoordinateSystem( cartesianCoordinateSystem_0); coordinate_2 .setCoordinate( units_0, units_0, units_0, new DoubleVector( new double[] {0.0, 1.0, 0.0})); |
CadModelCoordinate cadModelCoordinate_2 = moveBodyFeature_0 .getTranslationVector(); cadModelCoordinate_2 .setCoordinateSystem( cartesianCoordinateSystem_0); cadModelCoordinate_2 .setCoordinate( units_0, units_0, units_0, new DoubleVector( new double[] {0.0, 1.0, 0.0})); |
3D-CAD Transform Sketch Plane
The angle properties of the Transform Sketch Plane are set using a simplified function.
Previous Release | Simcenter STAR-CCM+ 6.04.014 |
---|---|
transformSketchPlane_0 .getAngleYZ() .setValue(30.0); transformSketchPlane_0 .getAngleZX() .setValue(-10.0); |
transformSketchPlane_0 .getAngle() .setComponents(30.0, -10.0, 0.0); |
Abaqus Co-simulation
Include paths for ABAQUS co-simulation modules have changed.
Previous Release | Simcenter STAR-CCM+ 6.04.014 |
---|---|
In general, common or abaqus have been added to the paths. The particular form required will depend on the classes you want to use. |
|
import star.cosimulation.*; |
import star.cosimulation.common.*; import star.cosimulation.abaqus.*; |
When referencing individual classes: |
|
import star.cosimulation.CoSimulationManager; |
import star.cosimulation.common.CoSimulationManager; |
import star.cosimulation.CoSimulationModel; |
import star.cosimulation.common.CoSimulationModel; |
In a similar way the Abaqus related classes are prefixed by abaqus: |
|
import star.cosimulation.AbaqusCoSimulation; |
import star.cosimulation.abaqus.AbaqusCoSimulation; |
Thermal Comfort Wizard
Previous Release | Simcenter STAR-CCM+ 6.04.014 |
---|---|
For the ThermalComfortSolver class: |
|
solver .getMaximumTemperatureChange() .setValues(); |
solver .setMaximumTemperatureChange(); |
For the TcmBoundary class: |
|
tcmboundary.setPresentationName(); // has to be set after tcmboundary.setTcmBoundaryName(); |
OLGA Coupling
OlgaZone used to be a ClientServerObject carrying a field called OlgaZoneName. Now OlgaZone is a named object, and no longer has a OlgaZoneName field. The name is changed by calling setPresentationName() on the zone object. The default name for the newly created OlgaZone is also changed.
Previous Release | Simcenter STAR-CCM+ 6.04.014 |
---|---|
OlgaZone olgaZone_0 = ((OlgaZone) olgaNode_0 .getOlgaZoneManager() .getObject( "OLGA Zone:NewOlgaZone")); olgaZone_0 .setOlgaPosName("POS-OUTLET"); olgaZone_0 .setOlgaZoneName("OUTLET"); OlgaZone olgaZone_1 = ((OlgaZone) olgaNode_0 .getOlgaZoneManager() .getObject( "OLGA Zone:OUTLET")); olgaZone_1 .setOlgaZoneName("OUTLET"); OlgaZone olgaZone_2 = ((OlgaZone) olgaNode_0 .getOlgaZoneManager() .getObject( "OLGA Zone:OUTLET")); olgaZone_2 .setCcmBoundary(boundary_2); OlgaZone olgaZone_3 = ((OlgaZone) olgaNode_0 .getOlgaZoneManager() .getObject( "OLGA Zone:NewOlgaZone")); |
olgaNode_0 .getOlgaZoneManager() .addOlgaZone(); OlgaZone olgaZone_0 = ((OlgaZone) olgaNode_0 .getOlgaZoneManager() .getObject("NewOlgaZone")); olgaZone_0 .setOlgaPosName("POS-OUTLET"); olgaZone_0 .setPresentationName("OUTLET"); OlgaZone olgaZone_1 = ((OlgaZone) olgaNode_0 .getOlgaZoneManager() .getObject("OUTLET")); olgaZone_1 .setPresentationName("OUTLET"); OlgaZone olgaZone_2 = ((OlgaZone) olgaNode_0 .getOlgaZoneManager() .getObject("OUTLET")); olgaZone_2 .setCcmBoundary(boundary_2); olgaNode_0 .getOlgaZoneManager() .addOlgaZone(); OlgaZone olgaZone_3 = ((OlgaZone) olgaNode_0 .getOlgaZoneManager() .getObject("NewOlgaZone")); |