• CFD, Fluid Flow, FEA, Heat/Mass Transfer

Cross-learning: FLUENT / CFX / STAR / COMSOL - Last updated on 24-Feb-2024

Same concept - different approaches!

This page is intended to enhance the learning one CFD software to another by providing similarities and difference in approach. The purpose it to help user's learn new software when he/she is familiar with one, the purpose is not to rate any particular software.

Terms and definitions specific to STAR-CCM+

  • Root ObjectThe root object within each simulation object tree is known as the simulation node. This node has its own properties and pop-up menu.
  • Parts: There are three different types of part that can be used in a STAR-CCM+ simulation. In 3D case, a part should represent either a solid or fluid volume and not surfaces.
    • Geometry parts (model geometry)
    • Model parts (including regions, boundaries, and interfaces contained within the Regions, Boundaries, and Interfaces manager nodes - representing the discretized portions of the geometry to be analyzed, on which physics models are applied.
    • Derived parts (parts used in the definition of analysis reports and for visualizing solution data in scalar and vector scenes.
  • Continuum: Continuum is used to contain selections of physics or meshing models that are subsequently applied to one or more regions. Continuum have no geometric definition associated with it.
  • Mesh Continuum: A mesh continuum contains a selection of meshing models, such as the surface remesher, the prism layer mesher and the polyhedral mesher. When a mesh continuum is applied to a region, the region is discretized according to the meshing models selected for the mesh continuum. While using "Automated Mesh operation" to generate volume mesh, 'parts' must be assigned to 'regions'.
  • Physics Continuum: A physics continuum contains a selection of physics models, such as a chosen flow solver, material models, steady or transient time model, a turbulence model and so on. Each physics continuum represents a single substance that is present in all regions to which the physics continuum applies. Fluid Continuum and Solid Continuum are used to designate Fluid and Solid materials respectively.

    Fluids: the colour of fluid nodes change from gray to blue to indicate that fuid models have been activated and continuum is valid.

    Solids: the colour of node changes from gray to shaded gray to indicate that models have been activated for this continuum.
  • Model: Model nodes in the simulation object tree represent simulation features that are active in the current case. Model nodes are contained within the meshing and physics continua to control the construction of surface and volume meshes and physics models to define the behavior of the specified material.
  • Regions: Regions are volume domains (or areas in a two-dimensional case) in space that are completely surrounded by boundaries. They are not necessarily contiguous and can be linked to each other through interface type boundaries. Regions are created either when a volume mesh is imported or when a surface is imported without using geometry parts. Each region is given a unique name during the import process which can be renamed as per user's convenience.
  • Boundaries: Boundaries are surfaces (or lines in a two-dimensional case) that completely surround and define a region. Boundaries are never shared between regions - a boundary can belong to only one region.
  • Scene: A scene facilitate visual representation of the model. Under a scene, Displayers handle the actual visible objects. Default setups are: Geometry, Mesh, Scalar, Vector and Empty though any scene can use any type of displayer or any mix of displayers. The default scenes just automatically load useful displayers in upon creation. Parts can be added in the properties window after selecting it under the displayer.
Regions in STAR-CM+Parts in STAR-CCM+
Computational domains in STAR-CCM+ are called Region where each region is completely surrounded by boundaries. Boundaries common between two regions can be joined with an interface allowing mass, momentum and energy to pass between the regions.Parts in STAR-CCM+ are geometrical representation of Objects. Parts can be modified in different ways and used as input for meshing operation and the result of this meshing process gets placed in a region specified in advance. One or several parts can be used as input to one region. Contacts can be created for surfaces common between two parts which are transformed into interfaces when the parts are meshed into regions.

Following table is an attempt to draw some similarities and analogies between various names and concepts used in CFD programs. However, there is no distinct boundaries and there are overlaps the way these designations refer to underlying objects and collectors.

SolversPhysics Continua Viscous Model - Application
PartsMesh Continua Zones Boundary
RegionsContinuaCell Zones, Face ZonesCell Zones, Face Zones Blocks
DomainsContinua Cell Zones, Face ZonesCell Zones, Face Zones Blocks
Boundaries Cell Zones, Face ZonesFace Zones, Edge Zones Boundary
Zones Regions, boundaries Boundary, Patch
Scenes Separate for Geometry, Mesh, Scalar, Vector Common for Scalar and Vectors, PlanesCommon for Scalar and Vectors, Planes Views and Filters: Render View, Slice View...

The terms used in this table are building blocks of a simulation which consists of physical space (3D volume designated as domain or region), boundaries of a volume (known as surface regions or face zones), solver types (known as viscous model or continua) and so on. A generic term which can be used for all the objects mentioned in above table is 'collector' which is a collection or group of different physical (nodes, faces...) objects and numerical (turbulence model, material properties ...) objects. Few additional terms used to describe the computational volume are walls, interfaces and contacts.

Excerpts from STAR-CCM+ User Manual: Parts-based meshing is a method for generating surface and volume meshes on geometry parts. It is different to region-based meshing in that it uses a series of mesh operations to define the process from the initial geometry to the final volume mesh. Having a series of operations allows you to modify the initial geometry and repeat the entire process with no additional inputs. This makes parts-based meshing particularly suitable for parametric design studies.

Defining the Simulation Topology

Geometry is defined in terms of geometry volume, surfaces, curves and points. The discretized geometry is defined in terms of body points (volumes), faces, edges and nodes / vertices. The collection of these entities are designated as 'parts' in ICEM CFD, zones in "FLUENT", "regions and boundaries" in STAR CCM+ and "Assembly, Primitive 2D, Primitive 3D" in CFX. The computational model to which physics can be applied is defined in terms of regions (domains or zones defined in FLUENT, CFX) and boundaries. Defining the simulation topology is the process of mapping between the geometrical definition of the problem and the computational (or physical) definition.

In STAR CCM+ geometry parts refers to volume which can be assigned to regions, part surfaces can be assigned to boundaries, and part curves can be assigned to objects called feature curves. This mapping is important if all the operations, CAD import till simulation is performed inside STAR CCM+ environment. If mesh is generated out of STAR-CCM+ environment, these operations need to be performed in that application which will also write output file compatible to STAR-CCM+ requirements. For a typical CFD analysis, simple geometries are usually imported in CAD or non-CAD formats (or in more scientific terms, discrete or tessellated formats), while complex geometries usually come in mixed or hybrid formats, containing both CAD and non-CAD parts.

Difference in Descriptions

Tree structure in STAR-CCM+

Note that there is no UNDO option in general. For example, if you delete a part from model tree, you cannot recover by UNDO operation. There are some UNDO and REDO operations though such as surface repair operations. Most of the programs has keyboard short-cuts like famous control-c and control-v in MS-Windows OS. These are sometimes also called hot-keys. A summary of such keyboard features available in STAR-CCM+ are as follows:
  • To align with the X-Y plane, press the 'T' key. Remember 'T' as initial of TOP view
  • To align with the Y-Z plane, press the 'F' key. Remember 'F as initial of FRONT view
  • To align with the Z-X plane, press the 'S' key. Remember 'S' as initial of SIDE view
  • To rotate the model about x-axis, press 'x' key. It will rotate 10° for every press of the 'x' key. Same if true for 'y' and'z' keys
  • To fit the view within the Graphics window, press the 'R' key
  • To rotate about the selected point, hold down the left mouse button and drag
  • To zoom in or out, hold down the middle mouse button and drag
  • To translate or pan, hold down the right mouse button and drag
  • To rotate around an axis perpendicular to the screen, press the 'Ctrl' key and hold down the left mouse button while dragging
  • Double click on an edge and it will attempt to create a closed loop.

STAR-CCM+ Views Options

STAR-CCM+ Toolbars

STAR-CCM+ Toolbar Settings

STAR-CCM+ Tools and Scenes

STAR-CCM+ Tools and Scenes

STAR-CCM+ Geometry Import

STAR-CCM+ Geometry Import Options

You can import a surface or volume mesh from an external file via File > Import > Import surface mesh. During geometry import, a choice of centimeters (cm), feet (ft), inches (in), kilometers (km), meters (m) (default), miles (mi), millimeters (mm), micrometers (um) and yards (yd) is allowed. The selection determines the scale factor that is applied to the import surface to make it conform to SI (meters). For example, selecting millimeters automatically scales the vertices by 0.001. If a unit other than one listed was used for the surface file, select the meters option (equivalent to no scaling). After the import process is complete, you can apply a user-defined scaling factor to scale the mesh.

If a unit other than meters (m) was selected, then the option to Set preferred units for length is available (off by default). This option can be used to set the selected unit as the default for all mesh reference and input values that involve length. Leaving the option off maintains meters as the default unit for length.

Manual Surface Preparation
An imported geometry cab be of poor quality to properly mesh and achieve a useful simulation result. The geometry may be self-intersecting, it may have gaps, there may be free edges or non-manifold vertices. The manual surface preparation tools contained within STAR-CCM+ allow you to:
  • diagnose and locate each surface issue
  • delete faces and edges and create new ones
  • collapse and smooth vertices
  • fill and patch holes
  • split and swap edges
  • locally zip edges
  • locally remesh faces (with or without feature retention)
  • isolate connected surfaces and delete them if necessary
  • inflate thin shell/baffle surfaces so that they have thickness
  • translate a surface
Two defeature modes [accessed by right-clicking the body] are available in STAR.
  1. Automatic mode is applicable to Bodies and automatically defeatures fillets, chamfers and holes based on a user-defined criterion.
  2. Manual defeature mode is applicable on Faces and is used to delete and heal user-selected faces. From V2020.2 onwards, the feature Delete Interior Faces deletes all faces that exist between the two faces selected by the user.

Delete Interior Faces STAR-CCM+

Surface Repair Tool: This is a utility that allows to directly repair the part surface. It is easy to use and will highlight each error. But in case any geometry upstream isbe changed, one need to redo the repair manually, as it is not a pipelined operation. This utility is a good place to start after importing the geometry as it will show how many errors must be fixed and where they are and what type they are.

Surface repair in STAR-CCM+

Find Similar: This features allows user to select a single body or a topology and find similar topologies within the entire assembly. Users can select and define one topology with a single click and then use the find similar feature to select all similar topologies to work with. Prior to adding the search tool, users had to handpick all the entity and right-click select the defeature option to remove the selected entity.

conditions Search Criteria

Fill holes is an operation for preparing a geometry for an internal flow simulation by doing what the name suggests: capping and filling holes in the part. This is possible in 3D-CAD and the surface repair tool, but this operation lets you add it to an automated pipeline. Note there is no Apply button. First select the closed loop (manually or double click on one the edge elements) and then click the fill hole button.

Extract volume pulls an internal volume from a part, typically after Fill Holes or similar operation has been used to cap the openings to prepare the geometry for an internal flow simulation.

One of the most useful operations is that to replace a part. This operation makes swapping out a geometry part repeatable and traceable, unlike manually replacing the part by right clicking it in the tree.

Repairing Features: All feature curves that are required to represent the geometry needs to be correctly identified in the surface mesh. This process identifies feature errors - that is, edges that are features but are not represented as such, and edges that are incorrectly represented as features. Feature curves indicate where sharp edges exist and are listed under the Feature Curves node for each region. If the surface remesher operation is performed to improve the surface mesh quality, then including feature curves is necessary to preserve sharp edges and surface detail (such as imprints). If the feature curves are not included, then edges are rounded off and surface detail is lost.

STAR surface Feature Repair

Closing Gaps: Project vertices onto a set of faces to close a gap using "project selected vertices tool".

Duplicate Faces -- surface repair -- Merge/Imprint: The tool also lets you merge two or more overlapping (co-planar) surfaces or sets of faces. When using Merge/Imprint on a single part, the result is either a common shared surface or no surface at all (that is, the common area is removed). If there are multiple parts, the tool creates part contacts for the shared surface. Similarly, for feature curves belonging to the same parts, the tool can imprint two or more edges onto each other, effectively zipping them together. You can also imprint edges onto faces and imprint faces onto edges, depending on the requirement. No edge options are available when imprinting across multiple parts. In all instances, the faces or edges do not need to belong to a closed surface in order to use the tool.

Automatic repair tool can fix certain global surface problems that relate to bad quality, close proximity and/or intersections (pierced faces) at the push of a button. If you want to fill a large number of holes automatically or zip a large number of edges then you should use the hole filler and edge zipper tools respectively.

To capture the complex and intricate features of the geometry the mesh generation process utilizes contact prevention conditions, volumetric controls and the wrapper scale factor. Wrapped surface is then retriangulated using the surface remesher.

Non-conformal Imprinting
During the process of non-conformal imprinting, pairs of split surfaces are created on contacting parts without altering the individual parts or creating shared faces. To achieve a non-conformal mesh when imprinting these surfaces, before you imprint the parts, activate Show Advanced Parameters and set Resulting Mesh Type to Non-Conformal. After imprinting the parts, the resultant surfaces are non-conformal, which means that the surface discretization on the imprinted surfaces does not match. Each part remains separate and there is no shared surface between each part. However, the original discretized surfaces are cut and a pair of split part surfaces are created which represent an in-place part contact between the surfaces.
Mesh Generation in STAR-CCM+
Excerpts from user manuals and tutorials for STAR-CCM+

STAR-CCM+ offers 7 types of meshing models: [1] Tetrahedral - tetrahedral cell shape based core mesh, [2] Polyhedral* - arbitrary polyhedral cell shape based core mesh, [3] Trimmed - trimmed (Cartesian or cut-and-cell or snappyHexMesh) hexahedral cell shape based core mesh, [4] Thin Mesh - tetrahedral or polyhedral based prismatic thin mesh, [5] Extrduder Mesher, [6] Prism Layer Mesher and [7] Advancing Layer Mesh - polyhedral core mesh, with in-built prismatic layers that advance inward from a polygonal surface mesh.

*In STAR-CCM+, a special dualization scheme is used to create the polyhedral mesh from an underlying tetrahedral mesh, which is automatically created as part of the process. The polyhedral cells that are created typically have an average of 14 cell faces.

Local Refinement

Excerts from User Guide: "Volumetric controls in the shapes of bricks (cuboids), spheres, cylinders, and cones can be used during the volume meshing of the core mesh to increase or decrease the local cell density. Arbitrary shaped volumes that are imported as parts can also be used to define the refinement volume. Feature refinement is automatically included in the case of the trimmer meshing model."

There are two meshing approach in STAR: parts-based meshing and region-based meshing. Parts-based meshing approach is recommended, though one need not always follow this approach to generate a mesh. For simple geometry and assemblies consisting of few sub-assemblies, one can import parts, assign parts to regions, then generate mesh at the regions level. However, if while working with assemblies that contain tens or hundreds of parts, parts-based meshing approach is recommended.

There is an option to use Automatic Surface Repair during Surface Remesher operation. This can help repair small errors in the surface, although it is not recommended for multi-volume models. Automatic Surface Repair cannot repair non-manifold edges or vertices or correct free edges.

Excerpts from User Guide: Parts-based meshing detaches the meshing process from physics modeling and provides a flexible and repeatable sequence of mesh operations. The sequence of mesh operations is called the meshing pipeline.

STAR-CCM+ also includes a comprehensive set of surface-repair tools that allow users to interactively enhance the quality of imported or wrapped surfaces, offering the choice of a completely automatic repair, user control, or a combination of both. One of the most important elements of surface repair tool is its diagnostics tool. It offers functionality to identify error prone parts, surfaces and feature edges and provide real time information via the browse tool as you fix them.

Operations in STAR-CCM+

Operations – utilities that perform actions on 'Parts', Certain operations such as "extract volume", "surface wrapper" ... create new parts.

Surface Repair options in STAR-CCM+

Surface wrapping and partial wrapping: In addition to refining the surfaces of parts in the wrap, partial wrapping can be used to exclude selected parts or part surfaces from the wrap operation. Excluded parts from the wrap, the original tessellation of the those parts is passed through to the final wrap surface. Some geometries only require surface wrapping for a portion of their surface. The surface wrapper allows you to exclude part surfaces that you consider sufficiently well tessellated for subsequent mesh operations. In some cases wrapping the whole geometry is unnecessary and can defeature highly detailed part surfaces unless the surface wrapper is excessively refined using custom controls and contact preventions. Select the Geometry > Operations > Surface Wrapper node and activate the "Perform Partial Wrapping".

Surface Wrapping in STAR-CCM

Per-part meshing feature of "surface wrapping" operation allows multiple disconnected parts to be wrapped separately. The Minimum Size value indicates the triangle size in the space between the two parts, which determines the octree refinement in the area. The value should be set smaller than the gap size (typically one half or one quarter of the distance). It is just a stopping size for the surface wrapper refinement, which results in the two surfaces being separated.

Surface wrapping process steps:

  1. Global surface wrap at part / component level: Right-click the Geometry > Operations node and select New >> Surface Wrapper. In the Create Surface Wrapper Auto Mesh Operation dialog, select appropriate part/assembly. Expand the Surface Wrapper > Default Controls node and set Base Size, Minimum Surface Size and Volume of Interest.
  2. Refining the Mesh on Part Curves: To make sure that you capture the detailed features in the surface mesh, apply mesh refinement to all the part curves. To apply refinement to all part curves: Right-click the Surface Wrapper > Custom Controls node and select Ne>> Curve Control. STAR-CCM+ adds a curve control node within the Custom Controls node.
  3. Preventing Contact between Close Surfaces: To make sure that these two surfaces do not touch each other in the wrapped surface, apply a contact prevention between the nose and main body. To apply contact prevention: Right-click the Operations > Surface Wrapper > Contact Prevention node and select New > One Group Contact Prevention Set. Contact prevention for small clearances -> One Group Contact Prevention Set / Two Group Contact Prevention Set
  4. Local refinements neas gaps using "Surface Control"
  5. Perform "partial wrapping" to capture local features like baffles, channels...[Split surface by patches, Preserved Input Surfaces-> Select "Excluded Surfaces"]
  6. Creating the Fluid Volume: The fluid simulation requires a volume mesh between the walls of the simulation domain. To create the part that defines the outer surface of the volume mesh, subtract the output of the surface wrapper operation from the bounding box. Right-click the Geometry > Operations node and select New > Subtract. In the Create Subtract Operation dialog, select Bounding Box and Surface Wrapper, then click OK. A Subtract node appears beneath the Operations node, and a Subtract part appears beneath the Parts node.

Contact Prevention
When the clearance between two surfaces is less than the target surface size, use a contact prevention to tell the wrapper not to join the two boundaries. The Minimum Size value indicates the triangle size in the space between the two parts, which determines the octree refinement in the area. The value is smaller than the gap size (typically one half or one quarter of the distance). You can still join the surfaces even though a Minimum Size value is set. The Minimum Size value is simply a stopping size for the surface wrapper refinement, which results in the two surfaces being separated. The value also has to be greater than zero.
Mesh Interfaces

There are two categories of interfaces in STAR-CCM+ and any interfaces that are created during the simulation setup process are accessible via the Interfaces manager node. The Interfaces node has properties and a pop-up menu.

  1. between boundary faces: this include contact interfaces between solid and fluid regions, internal interfaces between fluid regions and baffle interfaces representing thin-walled separators. There are two categories for interfaces between boundaries:
    • Direct Interface - boundary faces are intersected or imprinted resulting in conformal mesh: Baffle, Porous-baffle, Contact, Fa, Fluid Film, Fully developed, Internal
    • Indirect Interface - boundary faces are coupled using mapping or mixing: Mapped Contact, Mixing Plane Interface, Blower Interface
  2. between region volumes: Interfaces are created between region volumes to set up an overset mesh or to model heat transfer in a dual stream heat exchanger. To create an interface between regions ➛ Select the two regions that define the interface (press and hold the Ctrl key to select the second node) ➛ Right-click and select the Create Interface pop-up menu item, and make a selection from one of the options in the submenu.

create Interfaces in STAR-CCM+

Interface Types determines the behavior of the interface with respect to the modeling of flow and heat transfer. Interfaces can connect individual boundaries (faces) or entire regions (volumes). Following interface types and connectivity are available in STAR-CCM+

Type Connects toTopologyConnectivity
BaffleBoundariesDirect InterfaceImprinted
Porous BaffleBoundariesDirect InterfaceImprinted
ContactBoundariesDirect InterfaceImprinted
FanBoundariesDirect InterfaceImprinted
Fluid FilmBoundariesDirect InterfaceImprinted
Fully DevelopedBoundariesDirect InterfaceImprinted
InternalBoundariesDirect InterfaceImprinted
Mapped ContactBoundariesIndirect InterfaceMapped
Mixing Plane BoundariesIndirect Interface Connect Average
BlowerBoundaries Indirect Interface Connect Average
Heat ExchangerRegions Heat Exchanger Topology Modeled
Overset MeshRegionsOverset Mesh Topology Modeled

Note that "creating an interface" is not same as "converting boundaries to an interface". While "converting boundaries to an interface" single and usually common boundary belonging to a surface mesh is duplicated and then an interface made between the original and the copy for the primary purpose of defining multiple regions for meshing. To create an interface between boundaries, select the two boundaries that define the interface. The first boundary selected is termed the master boundary and the second is called the slave boundary.

create Boundary Interfaces in STAR-CCM+

Imprint is a process of making a common boundary between two volumes. If two square blocks are touching each other, there are two faces, one each belong to each square. When imprint is performed, the one of the common surface is deleted. The imprint operation will result into entity known as 'contacts' in STAR, and may become interfaces when parts are transferred to regions. Four types of contact definition exists: In-place, Weak in-place (meshed non-conformally), Periodic, Baffle. Part-part contacts may be created (a) automatically during geometry import, (b)by imprinting, (c)by tolerance based searching and (d)manually. STAR-CCM+ allows to imprint parts non-conformally. This process is useful when:

  • a conformal interface is not necessary to achieve solution accuracy
  • there are many contacting parts
  • each part is within many pairs
  • there are gaps between the CAD parts

STAR-CCM+ Mesh Checker
When a mesh created in external application is imported into STAR, by default unit of [m] is assigned to the dimensions of the mesh. Hence, the imported mesh needs to be scaled appropriately. Mesh > Diagnostics... menu option can be used to generate Compact and Full report summarizing the entity count, mesh extents and mesh quality.
Mesh Diagnostics: Compact

The compact report for a volume mesh generates statistics for each mesh region having following sub-sections: Entity count, Mesh extents, Mesh validity check, Face validity statistics and Volume change statistics.

Mesh Diagnostics: Full

The full diagnostics report is structured in a similar way to the compact report and contains all the information the compact report produces with following extra items for each region and the overall summary: Boundary details, Entity count per cell shape, Volume range (the minimum and the maximum volumes of an element in entire domain), Maximum interior skewness angle. The boundary details are split up as Number of faces, Boundary extent, Surface area and Maximum boundary skewness angle. To check if the volume mesh has zero or negative volume cells, either run the mesh diagnostics report or initialize the solution. Cells havin ≥ 0 volumes can be identified and visualized using threshold values.

Mesh Quality Checks in STAR-CCM+

Face quality is a measure of similarity between a face and the ideal face shape which is an equilateral triangle. The surface diagnostics calculate face quality = "in-circle radius / circumcircle radius" x 2. For an equilaterl triangle, in-circle radius * 2 = circum-circle radius. Thus, face quality '0' is degenerate triangle and 1 is the ideal shape. Default value of poor element setting in STAR-CCM+ is 0.01. The other definition in STAR-CCM+ as used in Surface Remesher is that quality of a triangle = the ratio of the triangle face area to the area of an equilateral triangle that would exactly fit inside the circumcircle of the triangle. The default value for surface remesher is 0.05

Dihedral angle of an edge is the angle between its adjacent faces. Edges are considered invalid if they are free or non-manifold as a dihedral angle cannot be calculated for such edges.

  • Polyhedral quality: This value refers to the cell quality of the polyhedral cells.
  • Cell face validity: This value refers to the face validity of the cells.
  • Cell orthogonality: This value refers to the angle between the normals of two faces in a cell that share an edge. The closer the cell edge angles are to 90 degrees, the more orthogonal the cell is.
  • Cell skewness angle: This skewness measure is designed to reflect whether the cells on either side of a face are formed in such a way as to permit diffusion of quantities without these quantities becoming unbounded. The skewness angle the angle between the face area vector (face normal) and the vector connecting the two cell centroids. Skewness angle = 0 indicates a perfectly orthogonal mesh. Variables that are stored at interior faces in STAR-CCM+ cannot be displayed and hence the worst skewness angle for all the faces of a cell are stored in that cell. Thus, two cells often have the same skewness angle corresponding to the face that they share. To reduce the impact on robustness, avoid skewness angles greater than 85° as reported in themesh diagnostics full report.
  • Cell Quality: It describes relative geometric distribution of the cell centroids of the face neighbor cells and of the orientation of the cell faces which is specified as 'Orthogonality' in some programs such as ANSYS FLUENT. Generally, flat cells with highly non-orthogonal faces have a low cell quality. A cell with a quality of 1.0 is considered perfect.
  • Cell volume ratio: This value refers to the volume change between neighboring cells.
  • Boundary Skewness Angle: it is defined as the angle between the area vector and the vector connecting the cell centroid and the boundary face centroid. This angle is important since the dot product of these two vectors appears in a denominator in a component of the equation for diffusive fluxes at a boundary face. In turbulent flows where wall functions are used, the equation for diffusive fluxes at a boundary is not used to compute diffusion fluxes at walls, so boundary face skewness become less important. However, it is important for laminar flows and for heat transfer in solids. To reduce the impact on robustness, avoid boundary skewness angles greater than 85° as reported in the mesh diagnostics full report.
  • Face Validity Cell Metric: It is an area-weighted measure of the correctness of the face normals relative to their attached cell centroid. A face validity of 1.0 means that all face normals are correctly pointing away from the cell centroid. Values < 1.0 mean that some of the cell faces have normals pointing inward towards the cell centroid indicating some form of concavity. Values < 0.5 signify a negative volume cell.
  • Volume change metric: It describes the ratio of the volume of a cell to that of its largest neighbor. A value of 1.0 indicates that the cell has a volume equal to or higher than its neighbors. A large jump in volume from one cell to another can cause potential inaccuracies and instability in the solvers. Consider cells with a volume change value < 10-5 to be suspect and investigate these cells further.

Removing Invalid Cells tool allows to remove mesh cells from the volume mesh region definition based on one or more of the following 4 mesh criteria: Face Validity, Cell Quality, Volume Change and Contiguous Cells. STAR-CCM+ moves all the removed cells into a separate region that is not used in the analysis. Symmetry plane boundaries are automatically added to the neighboring cell faces of cells that have been removed, minimizing the impact of these removed areas on the solution. Cells that do not meet the provided criteria are moved into a new region called Cells deleted from [Region] where [Region] is the name of continuum which these deleted cells belong to.

  • pierced faces: A pierced face is one that has one or more edges of another surface cell piercing it.

    pierced Faces

  • close proximity faces (surface folds and overlaps):
  • free edges (holes and mismatched edges): Free edges refer to cell faces that are not connected to a neighboring face. free edges can be fixed by using the hole filler, the edge zipper, or the manual fixing tools, depending the nature of the problem. To repair click on the number on the Count list and all the problematic part would appear in pink. Then if it is for example problematic faces (that are overcreated) select them one by one or with ctrl or with the Zone selection tool and delete them. Then you will have to fill the holes you created with this action or the ones made by the software when importing the geometry.
  • non-manifold edges: A non-manifold edge refers to a cell face edge that is connected to two (or more) other edges. A non-manifold edge is sometimes valid depending on whether the surface cells causing the problem are supposed to be a part of the geometry or not. For example, consider a geometry that contains a baffle surface that is joined to the exterior surface. This geometry is not a problem as long as the surface is converted to an interface before proceeding with the volume meshing. If the non-manifold edge is not expected, then you can delete the faces that are causing the problem.
  • non-manifold vertices: Typically vertices connected to a surface instead of two or more edges.

    non-Manifold Vertex

  • holes or leaks: Leaks are not desired because they cause an inversion in the wrapping process, which results in the incorrect volumes being wrapped. Run the leak detection tool to identify less obvious gaps and holes. The hole filler can be used to close any closed loop (both single and multiple loops) planar hole within a surface. The edge zipper can be used to join two mismatched surface edges that are within close proximity to one another, so that a closed surface is formed. Two different tools are available to help close off holes, namely the polygonal patch fill and the hole filler.

    The polygonal patch filler is a quick and easy way of closing arbitrary shaped holes which do not have a closed loop definition and/or are not planar. The process literally 'patches' up the surface by creating faces that cover the hole area completely. Having an overlap in the patched surface is perfectly acceptable as the wrapper deals with this overlap automatically.

  • The hole filler is a more exact method of filling well-defined holes by using a closed loop feature edge definition around the hole.
  • missing faces: This refers to open cells where 1 or more faces are missing and elements need to be created to make a valid 3D cell

Six basic repair filter types (or predicates) available to use are listed below. Filter predicates can be used individually to search for parts or pieces of geometry and/or can be compounded within a filter, using logical operators (AND, OR or PIPE) to provide additional control.
  • Part Name: Search for parts based on the presentation name
  • Part Surface Name: Search for part surfaces based on the presentation name
  • Area: Search for faces/surfaces based on the area
  • Volume: Search for closed surfaces based on the volume
  • Area/Volume Ratio: Search for closed surfaces based on the area/volume ratio
  • Face Count: Search for faces/surfaces based on the face count

Continua: Solver Setting

Excerpts from User Guide: Assigning parts to regions creates a relationship between the meshed part and the physics region where part-level objects (parts, part surfaces, and part curves) are associated to their equivalent region-level objects (regions, boundaries, and feature curves). This action allows STAR-CCM+ to convert the volume mesh to a finite volume representation that the solver can use to obtain a solution. These assignments do not need to be one-to-one. That is, you can assign multiple part-level objects to the same region-level objects.

STAR-CCM+ Solution Type and Material

STAR-CCM+ Solution: Coupled vs. Segregated

If Steady State option is selected, Eulerian Multiphase model would not be available. Lagrangian Multiphase gets active only when Liquid or Gas and flow as Coupled or Segregated are selected.

STAR-CCM+ Multiphase Selection

STAR-CCM+ Equation of State and Viscous Regime

Stopping Criteria in STAR-CCM+

Automatically generated stopping criteria cannot be deleted, but the Enabled property can be activated or deactivated.

Stopping Criteria in STAR-CCM+

Options exist to create stopping criteria based on monitors already defined. The node of a monitor-based stopping criterion has properties just like the automatically generated ones.

Monitor-based Stopping Criteria

The monitor-based convergence check and stopping criteria can be used to identify possible divergence or unrealistic results early during the simulation thereby reducing HPC cores and license usage. For example, area-averaged pressure or temperature can be monitored on key planes or walls and if the value exceeds some unreasonably high value say 0.5 [MPa] or 500 [K], the solution should be stopped immediately. This is important when runs are made on a cluster with queueing of large number of tasks. The simulation shall get terminated as soon as divergence conditions emerge and result files shall get saved as well. Note that ANSYS FLUENT does not save any file if divergence occurs.

Field Functions in STAR-CCM+

Field functions are mathematical expressions to define boundary conditions, material properties and booleans. Few basic rules that applies to creating Field Functions in STAR are described below.
  1. The name of field functions can contain few special characters: For example 'Split@X=0.50[m]' is a valid name.
  2. If the name contains any non-alphanumeric characters other than underscore '_', enclose the field function name in curly braces, '{...}' such as ${Split@X=0.50[m]} or ${test-Temperature}.
  3. Creating Field Function Expressions: color code to guide the editing process
    • Green indicates a syntactically correct reference to an existing field function
    • Parentheses appear in yellow to indicate the matching parenthesis
    • Red indicates an incorrect entry
    • If a field function reference has red text (but no black text or red background) the color represents a syntactically correct reference to a field function that does not yet exist
    • Field function definitions are always done in SI units, independent of the units that you use for input or display.
  4. Scalars are defined with single $ such as $Pressure or $Time and vectors with $$ such as $$Position and $$Velocity
  5. Field function names are case-sensitive. Thus, $Time and $time or $Radius and $radius are not same. Since the names are case-sensitive, they must be entered in the field function definition exactly as they are shown in the function name.
  6. Field functions access data on specific parts that are defined in the simulation
  7. Field functions used to define expressions cannot be a function of space that is (x, y, z). They must evaluate to a single number as the expressions are constants in space. Variables such as $Time, $TimeStep, and $Iteration are valid where as variables such as $Temperature or $Pressure are not valid as they have different values at every point in space and hence cannot be used in expressions.
  8. Literal constants can have a unit specification in a different system and are parsed at run time. The syntax for the units is <number units>. For example: <0.001 kg/m/s>, <10 psi>, <0.05 lb/ft^3> The character hyphen "-" binds tighter than "/", so kg/m-s^2 equals (kg)/(m-s^2) not (kg/m)*(s^2).
  9. When defining an expression or a field function that reference other field functions within it, prefixed that Field Function with $, such as $vol_flow_rate.
  10. Components of vectors are retrieved by adding additional $ such $$Velocity[0], $$Velocity[1] and $$Velocity[2] refer to X-, Y- and Z-components of the velocity vector. Subscript operator [] is appended to access components of the vector with indices of [0], [1], or [2].
  11. $$Position(@CoordinateSystem("CylCS"))[0] - The components of a local cylindrical coordinate system is defined by @CoordinateSystem(<Name of Coordinate System>) where <Name of Coordiante System> = "CylCS" in this example. Note that $$Position[0], $$Position[1] and $$Position[2] refer to r, θ and z axes respectively.
  12. When field functions are accessed on boundary parts, following rules by default: 1) If the data is stored on the boundary, the boundary data are accessed. For example "wall velocity" values stored in wall boundaries. 2)If the data is not stored on the boundary, the cell data from the cells in the region adjacent to selecte boundary are accessed. For example, wall-adjacent fluid velocity are stored in the cells.
  13. When Ignore Boundary Values option is switched ON, the field function is evaluated from the data stored for cell next to the boundary.
  14. To define a vector, array or position field function in terms of its components, specify the 3 components inside square brackets separated by commas: [($$Centroid[0] <= 1.0) ? 2.5 : 0.0, 0.0, 5.0]
  15. Initialize a particular volume: $${Position}[0] >= 0.50 && $${Position}[1] <= 1.00 && $${Position}[0] <= 2.50 && $${Position}[1] >= 0.25 ? 300 : 323 - this sets temperature in a cuboid to 323 [K]. To initialize a field variable in spherical volume: $$Position( @CoordinateSystem( "Laboratory.spheric" ) ) <= 0.50 ? 323 : 300. This is equivalent to: if($$Position( @CoordinateSystem( "Laboratory.spheric" ) ) <= 0.50, 323, 300).
  16. Set transient boundary condition where temperature ramps up linearly from 300K to a value of 500 [K] at a time of 5 [s]. ($Time >= 5.0) ? 500 : 300 + (500 - 300)/5.0*$Time. This is short form of conditional IF-ELSE statement. Ternary operator "? :" defines a condition operation similar to the C language.
  17. Divergence of velocity ∇.v = div($$Velocity), Divergence of density, velocity ∇.ρv is specified as: div($Density * $$Velocity), Gradient of pressure ∇p is specified as: grad($Pressure), Curl of velocity ∇×v is specified as: curl($$Velocity).
  18. Pressure ratio to get pressure in atmosphere [atm] unit: ${AbsolutePressure}/101325.0. Note that the default pressure option in Star CCM+ is given as absolute pressure rather than the relative presure.
  19. User field functions can be previewed by without actually running the simulation. The output values for the dependent variable is calculated by substituting the values of each of the independent variables and sweeping through the specified range.
  20. The dot product can be used to find components of a vector where unit($$Area))*unit($$Area) is used to define unit vector for area. For example, normal component of wall shear stress: sN = dot($$WallShearStress, unit($$Area)) * unit($$Area). Since, $WallShearStress is a vector sum of normal and tangential shear stresses, sT = $$WallShearStress - $$sT
  21. Multiple if conditions - Split a region (Split Regions by Function dialog) into 3 parts: ($$)Position[1] <= 2.5) ? 1 : (($$Position[1] >= 0.5) ? 2 : 0). In this case, after the split: The cells where 0.5 < y < 2.5 belong to Region 1, as the field function does not affect them. The cells where y ≤ 0.5 belong to Region 1 2, as it is the created region with the least cells. The cells where y ≥ 2.5 belong to Region 1 3, as it is the created region with the most cells.
  22. stepFun = ($$Centroid[2] <= 50) ? 0 : 1 - this creates a step function at the global z-coordinate of centroids of cell ≤ 50
  23. Field function for temperature dependent thermal conductivity: thCondAir = 1.52e-11 * pow($Temperature,3) - 4.86e-8 * pow($Temperature,2) + 1.02e-4 * $Temperature - 3.93e-4 where T is in [K]. As per the formulat, thCondAir = 0.0262 [W/m-K] at T = 300 [K].

From User's Guide: Examples of Field Function Mesh Refinement - The following examples show mesh refinement using the trimmed, polyhedral, and tetrahedral mesher. The field function refines the mesh in an area where the turbulence kinetic energy is greater than 4.0 [J/kg]: Trimmed Cell Mesher:($TurbulentKineticEnergy > 4)? 0.1 : 0, Polyhedral Mesher: ($TurbulentKineticEnergy > 4)? 0.1 : (1.2*pow($Volume, 1/3)), Tetrahedral Mesher: ($TurbulentKineticEnergy > 4)? 0.1 : (2*pow($Volume, 1/3))

Make Multiple Runs in a Sequential Manners

Following macro as available from STAR-CCM+ official user guide document can be customized to make multiple runs by reading different *.sim file for each run. The correct path to the working directory needs to be specified for variable simDir which contains the simulation files to run in sequence.
package macro;
import java.io.*;
import star.base.neo.*;
import star.common.*;
public class runMultiple extends StarMacro {
  public class SimFileFilter implements FilenameFilter {
    public boolean accept(File dir, String name) {
      return name.endsWith(".sim");
  public void execute() {
    File simDir = new File("multipleRuns");
    Simulation sim_0 = getActiveSimulation();
    for (File f : simDir.listFiles(new SimFileFilter())) {
  public void startAndRun(File f) {
    System.out.println("\n Starting "+f);
    String fileName = f.getAbsolutePath();
    Simulation sim = new Simulation(fileName);

    // Uncomment next line to clear simulation before running
    // sim.getSolution().clearSolution();
    String newFileName = fileName.replaceAll("\\.sim", "-new.sim");

Heat Exchangers Models in STAR-CCM+

Heat Exchangers models are used to replicate the transfer of heat between two fluid streams - hot fluid and cold fluid. Applications include air conditioner evaporators, condensers, charge air coolers, radiators, electric heaters, and electronic devices. There are two options available:
  1. Single stream option: in this case only one of the fluid streams (usually the cold stream) is modeled explicitly - by specifying the heat exchanger enthalpy source, while the second stream is assumed to have a uniform temperature that user specifies. This is activated by using option Heat Exchanger for Energy Source Option for the individual Region node.
    • Heat Exchanger Exit Temperature Specification is used to choose between specifying the heat transfer rate and predicting the outlet temperature or vice versa.
    • Here V denotes volume of the cells, u the the velocity and NC refers to total number of cells. Note that there are 3 unknowns: local velocity, local temeperature and local heat transfer rate.

      Single Stream heat transfer rate calculation

    • When this condition is choosen to be 'Inferred', the heat transfer rate can be specified by accessing the Heat Exchanger Energy Transfer physics value node.
    • For a heater, the hot stream [e.g. coolant path in automotive radiator] is assumed to have an infinite thermal capacitance and the specified heat exchanger temperature TH refers to the constant temperature of the hot stream.
    • For specified heat exchanger energy transfer rate Q, the inlet cold stream [e.g. air in automotive radiators] temperature TCI, and the cold stream specific heat CpC, an energy balance could be used to predict the cold stream exit temperature TCO as TCO = TCI + Q / CpC / mC where mC is mass flow rate of the cold fluid.
    • Heat Exchanger First Iteration: This node specifies the iteration from which the heat exchanger enthalpy source is active and begins its contribution to the source term of the energy equation.
    • It is recommended to active the source term when the flow is beginning to conform to its expected pattern, at least in terms of direction. As per user manual, 50 iterations is a good estimate to get a reasonable conformity.
  2. Dual stream option: here both the streams are modeled explicitly by defining two overlapping regions and creating a heat exchanger interface between them. This model supports
    1. fluid-solid interface where the heat exchange occurs between a solid region and a fluid region and
    2. As seen in the expression, the heat transfer rate is calculate after dividing by average volume of the cells - it is recommended to keep the volume of the cells as uniform as possible.

      Dual Stream heat transfer rate calculation

    3. fluid-fluid interface where the heat exchange takes place between two fluid regions. For a fluid-fluid type heat exchanger, following options are available for specifying heat transfer rate in the heat exchanger:
      • UAL Polynomial [UAL is function of cold flow velocity], UAL Table [UAL is a table of the cold flow velocity], UAL Map [map of curves to specify the UAL directly when multiple heat exchanger curves]: UA refers to the product of the Overall heat transfer coefficient (U) and the Area of the heat exchanger (A). UAL refers to the local (or cell value of) heat transfer coefficient (in W/K), with L referring to local.
      • UAG [U.A Global] Table
      • Q Table [table of the cold stream mass flow rate for one value of hot stream mass flow rate], Q Map [series of curves from which it calculates UAL].
    4. Basic option: This option solves for a simpler version of the energy equation using only the convective term and the source term to yield a solution. Heat Exchanger Topology:
      • When using the basic option, ensure that the core mesh is constructed of uniform cells.
      • In other words, all the cells in the heat exchanger region must be of comparable cell volume, as the cell volumes do not enter the calculation of the UAL table in the basic model.
      • The accuracy of results that the actual dual stream heat exchanger predicts does not depend on the uniformity of the mesh.
      • The topology must contain two identical regions with a different continuum associated with each region.
        • Both the regions [hot and cold streams] should be created from the same mesh continuum. To ensure this, copy the [core region of the radiator] region after the volume mesh has been generated.
        • Once the two overlapping regions exist, the heat exchanger interface can then be created by selecting the two regions and choosing Create Interface from the right-click menu. While selecting the two regions, select the region representing the cold stream before the region representing the hot stream.
        • The mesh alignment option should be activated so that a conformal match is obtained across mesh interfaces. STAR-CCM+ does not automatically generate a conformal mesh across interfaces for the trimmed cell mesh type. Operations > Automated Mesh > Meshers > Trimmed Cell Mesher node and activate Perform Mesh Alignment.
        • Create a block shape part around the core which required for the volumetric controls that define mesh refinement. Geometry > Parts node and select New Shape Part > Block.
    5. Actual option: UAL Map method is available with the actual dual stream heat exchanger option only.
  3. In both the options, heat is added or removed from the core cells as a source or sink term in the corresponding fluid energy equation. It is assumed in this section that both the streams exist only in a single phase (liquid or gas) and no phase change occurs inside the heat exchangers.

STAR Heat Exchanger Data

STAR Dual Stream


STAR-CCM+ Lite can be used to post-process the results of a simulation that were solved using STAR-CCM+ (ccmpsuite). STAR-CCM+ Lite can be used to run the simulation for further iterations providing all models are available in STAR-CCM+ Lite including Java macros that were generated by STAR-CCM+ (ccmpsuite). However, if the macro activates any models that are not permitted under the STAR-CCM+ Lite license, the simulation shall fail to run.

The stopping criteria in STAR is not incremental. That means, if stopping criteria is set to 4000 iterations and that many iterations are already completed, this value needs to be increased to 5000 when you modify (such as change inlet velocity) the *.SIM file and want to make additional 1000 iterations. In batch runs, the output of the program can be saved to a file: starccm+ -batch mySim.sim > log.text. For work in the interactive (GUI) client, check the option: Menu bar > Tools > Options > Environment > Log output to File.

As described in the user manual, Design Manager has two possible ways to submit: "General Job Submission" and "Pre-Allocation Job Submission". Single run (No Design Manager) - The single run submission is for cases where only a single simulation without the use of Design Manager is submitted. To submit to the cluster, the sim file and any macros are to be uploaded all in the same directory.

Batch Runs on HPC Clusters

The parallel batch (non-interactive or non-GUI) runs on local machines can be made using command line or from shell/batch files such as: [1]When batch or shell script and *.sim files are in same folder --- starccm+ -np 32 -batch javaFile.java simFile.sim [2]When batch or shell script and *.sim files are in different folders --- starccm+ -np 32 -batch javaFile.java folder1/sub-folder1/simFile.sim. starccm+ -batch geoImport.java, geoClean.java, geoReanme.java, mesh, step, run - multiple commands within the -batch argument can be specified, three macros are run in order before running the mesh pipeline, step and the solver.

If the properties in the simulation file are correctly set, many batch simulations can be run using the default operations with no java file: starccm+ -batch myCase.sim. For example, reports, auto-save, auto-export, and scene hardcopies can all be specified in the simulation properties. Command line to open the STAR-CCM+ workspace, start a new simulation, and play a macro: starccm+ -new -m macro.java Batch mode for macros is run from the command line using the -batch option: starccm+ -batch macro.java myCase.sim. This option runs STAR-CCM+ with a script (macro.java in the above example). The -batch option ensures that no GUI is displayed. If you do not want the server process to exit once the batch file has completed, then add the -noexit option to the command line.

CHECKPOINT and ABORT: STAR-CCM+ runs can be aborted (saved at current iteration and exit the run) by creating a blank 'ABORT' file in home directory. A blank CHECKPOINT file shall save the simulation file at current iteration and let the run continue as per convergence setting.

Multiple Simulations Consecutively

Multiple simulation files can be loaded and run consecutively using a single macro. The following sample macro looks for all the .sim files in a specified directory, then for each simulation file it starts a server, iterates, and saves to a new filename. Use the command line: starccm+ -batch runMultiple.java. Save the macro as runMultiCases.java.

package macro;
import java.io.*;
import star.base.neo.*;
import star.common.*;
public class runMultiCases extends StarMacro {
  public class SimFileFilter implements FilenameFilter {
    public boolean accept(File dir, String name) {
      return name.endsWith(".sim");
  public void execute() {
    File simDir = new File("simFolder");
    Simulation sim_0 = getActiveSimulation();
    for (File f:simFolder.listFiles(new SimFileFilter())) {
  public void startAndRun(File f) {
    System.out.println("\n Starting "+f);
    String fName = f.getAbsolutePath();
    Simulation sim = new Simulation(fName);
    String nuName = fName.replaceAll(".sim","-new.sim");


The plots in STAR is generated using scenes which are collection of 2 objects - Displayers and Outline. (a)Outline can be used to select section plane, boundary faces and edges (b)Scalar or vector - the actual component of contour plot - here again parts need to be selected on which contour plots are to be generated and (c)Attributes - this refers to features available to control the generation and display of the plots. In ANSYS Fluent as on V2021 R2, separate plots for mesh and scalar needs to be generated. Then a scene needs to be manually created where required mesh plot and scalar plot can be combined which makes it close to the concept of Scene used in STAR.

Section Planes and Reports

The post-processing planes can be created under Derived Part tab in the Model Tree. Quantitative values such as area-averaged pressure needs to be defined under Reports tab in the Model Tree. The convergence history charts are available under tab Plots.
Java Macros
Batch mode for macros is run from the command line using the -batch option: % starccm+ -batch sim_1.java sim_1.sim. Playing Macros Within Macros: it is allowed to create a macro that calls other macros. Setting values using a macro follows the same logical sequence as expanding nodes in the object tree. Each of the entities in STAR-CCM+ is an object and to locate an object, the hierarchy of the object tree should be followed. For example, the initial velocity object is contained in a physics continuum object, which is contained in a simulation object.

public class macroX extends StarMacro { ... }: A class called macroX is declared, and is specified as a subclass of the StarMacro class.

public void execute() { executeX(); }: The main method, execute(), is declared. When the macro is run in STAR-CCM+ it uses execute() , which calls executeX().

//Macro to count number of elements in a boundary
PartSurface prtSrf_1 = 
  ((PartSurface) Part_0.getPartSurfaceManager().getPartSurface("Inlet"));

Get reference to active simulation: Simulation sim_1 = getActiveSimulation();

Get a fluid region: Region zn_1 = sim_1.getRegionManager().getRegion("air_domain");

Change the name of a continuum from "Physics 1" to 'air_domain': PhysicsContinuum phyCon_1 = (PhysicsContinuum) sim_1.getContinuumManager().getContinuum("Physics 1"); phyCon_1.setPresentationName("air_domain");

Get name of a zone: Boundary bz_i = zn_1.getBoundaryManager().getBoundary("inlet");

VelocityProfile vp_1 = bz_i.getValues().get( VelocityProfile.class ); vp_1.getMethod( ConstantVectorProfileMethod.class ).getQuantity( ).setComponents( 10, 0, 0 );

Creating a Residuals plot in which the simulation progress shall be displayed: ResidualPlot rp_1 = (ResidualPlot) sim_1 .getPlotManager( ).getObject("Residuals");

Statement to run the simulation: change the number of iterations that the batch job runs: sim_1.getSimulationIterator( ).step(2000);

Find drag coefficient report and store a reference to its location in a variable: ForceCoefficientReport fc_0 = (ForceCoefficientReport) sim_1.getReportManager().getReport("Drag Coefficient");

Create a Geometry Scene: sim_1.getSceneManager().createGeometrySceneAndWait("Geometry Scene", "Outline", "Geometry", 1);

Access a Scalar Scene: Scene scene_sc = sim_1.getSceneManager( ).getScene("Scalar Scene 1");

Create a Part Displayer: PartDisplayer pd_1 = (PartDisplayer) scene_sc.getCreatorDisplayer( );

Retrieve a displayer from scene: ScalarDisplayer scDisp_1 = (ScalarDisplayer) scene_sc.getDisplayerManager( ).getDisplayer( "Scalar 1" );

Defines particular representation to be used in the PartDisplayer: FvRepresentation fv_mesh = ( FvRepresentation ) sim_1.getRepresentationManager( ).getObject( "Vol_Mesh"); pd_1.setRepresentation( fv_mesh);

Define Unit Vector: sim_1.getUnitsManager( ).getPreferredUnits( new IntVecor( new int[] {...} ) ) which is equivalent to following lines of code.

Units uni_y =
  new IntVector(
  new int[] {0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}

Find a scene and assign it to a variable: Scene sc_v = sim_1.getSceneManager().getScene(“Velocity Magnitude”);

Print the image to file: sc_v.printAndWait(resolvePath( "projects/velMag.png" ), 1, 1024, 768); rp_1.encode(resolvePath( "./projects/residuals.png" ), "png", 1024, 768);

Retrieve all Derived Parts: PartManager pm_1 = sim_1.getPartManager(); Collection<Part> allDerivedParts = pm_1.getObjects( ); scDisp_1.getParts( ).setObjects( allDerivedParts );

Save a STAR-View+ scene file of the Streamlines: Scene scene_s = sim_1.getSceneManager().getScene( "Streamlines" ); scene_s.open(true); scene_s.export3DSceneFileAndWait( resolvePath( "./projects/streamlines.sce" ), true);

Save simulation file:sim_1.saveState(resolvePath( "./projects/newFileName.sim")); sim_.saveState(folder + "newFileName_" + i + ".sim");

This code to generate mesh and this Java macro to make runs contains examples to carry out various pre-processing operations in STAR-CCM+ including volume mesh generation.

User Code: User code allows STAR-CCM+ to be customized with functions written in a compiled language such as C, C++ or Fortran, available under the "Tools > User Code" node. User libraries are shared-object libraries (files with the platform-dependent extension .so , .sl or .dll ) containing one or more user functions and a library registration function. A user library that is compiled on one platform (say Windows) is not binary compatible with another platform (say Linux).

User Functions: User functions are functions or subroutines that are written in a compiled language such as C, C++ or Fortran.

License Manager: LMTOOLS

Most of the CFD programs be it ANSYS FLUENT or STAR-CCM+ use LMTools to manage the licenses at their customers. The executable utility is installed in the same folder where main program such as ANSYS FLUENT is installed. The syntax to use LMSTAT is: lmstat [-a] [-c license_file_list] [-f [feature]] [-i [feature]] [-s[server]] [-S [vendor]] [-t timeout_value]. The purpose of each option is:
  • -a: Displays all information
  • -c license_files: Uses the specified license files
  • -f [feature]: Displays 'users' of feature. If feature is not specified, all features are displayed
  • -i [feature]: Displays information from the feature definition line for the specified feature, or all features if feature is not specified
  • -s [server]: Displays status of all license files listed in $VENDOR_LICENSE_FILE or $LM_LICENSE_FILE on server, or on all servers if server is not specified
  • -S [vendor]: Lists all users of vendor’s features
  • -t timeout_value: Sets connection timeout to timeout_value which limits the amount of time 'lmstat' spends attempting to connect to server.
On Windows machines, you can use: "<Installation-Folder>\lmstat.exe" -s licServer -i licFeature > licStatus.txt to print the output to a file. To know what are the name of features available in license file, use -a option, that is: "<Installation-Folder>\lmstat.exe" -s licServers -a > licStatus.txt. Alternatively, you can copy the lmutil.exe file from installation folder to any other local folder and use the command: c:/Users> lmutil.exe lmstat -s licServers -a. lmutil.exe is an independent executable supplied with different commercial tools such as ANSYS, ANSA, STAR-CCM+ and lmutil.exe supplied with STAR can be used to fetch licenses for ANSYS by supplying appropriate server names.

Finding Names of Feature: to use -f option, one need to know the exact names of feasures. This can be found in license.dat file or check the output from -a options. lmutil.exe lmstat -s licServers -f "feature_name"

For scripting and partial automation of pre-processing, solver and post-processing activities, refer to this section of scripting page.

For dealing with file handling in Linux and Windows, refer to short summary of shell scripting.

Sample Java Codes for STAR-CCM+

package macro;
import java.util.*;
import star.common.*;
import star.base.neo.*;
// Import modules related to material, viscous models, energy
import star.material.*;
import star.vis.*;
import star.flow.*;
import star.energy.*;
import star.segregatedenergy.*;
// Import modules related to S2S Radiation modeling
import star.view factors.*;
import star.radiation.s2s.*;
import star.radiation.common.*;

public class star extends StarMacro {
  public void execute( ) {
    execute0 ();
 private void execute0 () {
  Simulation sim_1 = getActiveSimulation();
  // Import Volume Mesh
  ImportManager importManager_0 = sim_1.getImportManager();
  importManager_0.importMeshFiles(new StringVector(new String[]
   {resolve Path("D :\\Projects\\testMacro.msh")}),
   NeoProperty.from String(" {\'FileOptions\': [{\'Sequence\': 43}]}"));
  // Create Scene to show import volume mesh
  FvRepresentation fvRep_2 = (FvRepresentation) sim_1.getRepresentationManager().getObject("Volume Mesh");
  // Retrieve zone named 'meshSolid' created after importing the mesh
  Region domain_1 = sim_1.getRegionManager().getRegion("meshSolid");
  // Create Geometry Scene
  fvRep_2.generateCompactMeshReport(new NeoObjectVector(new Object[] {domain_1}));
  sim_1.getSceneManager().createGeometryScene("Geometry Scene", "Outline", "Surface", 1);
  Scene scene_1 = sim_1.getSceneManager().getScene("Geometry Scene 1");
  SceneUpdate sceneUpdate_1 = scene_1.getSceneUpdate() ;
  HardcopyProperties hardcopyProperties_1 = sceneUpdate_1.getHardcopyProperties();
  // Scale mesh by factors 0.001 to convert [mm] into [m]
  fvRep_2.generateCompactMeshReport(new NeoObjectVector(new Object[] {domain_1}));
  LabCoordinateSystem labCS_1 = sim_1.getCoordinateSystemManager().getLabCoordinateSystem ();
  sim_1.getRepresentationManager().scaleMesh(new NeoObjectVector(new Object[] {domain_1}),
  new DoubleVector(new double[] {0.001, 0.001, 0.001}), labCS_1);
  // Fit screen
  // Select continuum
  PhysicsContinuum phyCon_1 = (PhysicsContinuum) sim_1.getContinuumManager().getContinuum("Physics 1");
  // Select Physics Models: sub-models are context based: order is important
  // Set wall temperatures: zone name 'wall_1'
  Boundary bz_1 = domain_1.getBoundaryManager().getBoundary("wall_1");
  // String newStr = String.format("Old String %s %2d", stringVar, integerVar);
  String bcT = "WallThermalOption.Type.TEMPERATURE";
  String classT = "StaticTemperatureProfile.class";
  String classPr = "ConstantScalarProfileMethod.class";
  StaticTemperatureProfile bcFixedT_1 = bz_1.getValues().get(classT );
  Units units_1 = (Units) sim_1.getUnitsManager().getObject("K");
  // Set wall temperatures: zone name 'wall_2'
  Boundary bz_2 = domain_2.getBoundaryManager().getBoundary("wall_2");
  bz_2.getConditions().get(WallThermalOption.class).setSelected(bcT) ;
  StaticTemperatureProfile bcFixedT_2 = bz_2.getValues().get(classT) ;
Contact us
Disclaimers and Policies

The content on CFDyna.com is being constantly refined and improvised with on-the-job experience, testing, and training. Examples might be simplified to improve insight into the physics and basic understanding. Linked pages, articles, references, and examples are constantly reviewed to reduce errors, but we cannot warrant full correctness of all content.