StarCCM Tutorial
StarCCM Tutorial
StarCCM Tutorial
6922
Introduction
Welcome to the STAR-CCM+ introductory tutorial. In this tutorial, you explore the important concepts and workflow. Complete this tutorial before attempting any others. Throughout this tutorial, links to other sections of the online documentation explore important concepts. For example, for a clearer understanding of the changes to typeface in the tutorials, refer to the typographic conventions. This tutorial is useful in addition to STAR-CCM+ training. For more help, contact your local CD-adapco office. A list of contacts is found at: http://www.cd-adapco.com/about/locations.html. The case is a transonic flow over an idealized symmetrical blunt body in a wind tunnel.
The tutorial workflow includes: Importing the geometry files. Generating a polyhedral mesh. Setting boundary names and types.
Version 7.06
Defining the models in the continua and applying them to the regions. Defining the region conditions, values, and boundary conditions. Running the simulation. Post-processing the results. These steps follow the general workflow for STAR-CCM+.
Version 7.06
The menu bar provides access to application-wide actions, with some of the more important actions being duplicated in the toolbar. Let the mouse hover over any of the buttons in the toolbar. A short description of what that button does appears in a tooltip.
Creating a Simulation
Start a simulation by selecting File > New Simulation from the menu bar.
Version 7.06
STAR-CCM+ is a client-server application with the client (user interface or batch interpreter) running in one process, and the server (the solver) running in another process. Start a server process on the same machine as the client using the settings from the above dialog. Ticking the Remote Server checkbox allows you to start the server process on another machine. The client and server can run on machines of different architectures. The server can also run in parallel mode.
Version 7.06
In the Create a New Simulation dialog, click OK. A new window containing a simulation object tree is created in the Explorer pane, with the name Star 1. The initial folder nodes for this simulation are shown in the following screenshot. Other nodes are added to the object tree as you progress further.
As the new simulation is created, a window that is named Output appears in the lower-right portion of the STAR-CCM+ workspace. The Output window describes the progress of actions in the simulation.
Version 7.06
The tree represents all the objects in the simulation. Nodes are added in later sections when a geometry is imported and models are defined in the continuum. Most of your interaction with the simulation is by selecting nodes in the tree and: Right-clicking to expose an action menu. Using keys to, for example, copy and delete objects. Dragging objects to other tree nodes or onto visualization displays. The handle next to a node indicates that subnodes exist below that one. To open a node and show the subnodes, click the handle. To close it, do the same for an open node.
Version 7.06
Most objects in the tree have one or more properties that define the object. Access to the properties is through the table.
To modify the properties of an object, click its node once to select it. Edit most types of properties in the value cell. Otherwise, when setting values of complex properties, click the property customizer button to the right of the value. A property-specific dialog opens.
Version 7.06
In the Save dialog, type bluntBody.sim into the File Name text box and click Save. The title of the simulation window in the Explorer pane updates to reflect the new name. It is useful to save work in progress periodically. This tutorial includes reminders to save the simulation at the end of each section. If you would like to return to a stage of the tutorial at a later stage, save it with a unique name.
Version 7.06
To start the import, click Open. The Import Surface Options dialog appears.
Version 7.06
Click OK to import the geometry. STAR-CCM+ provides feedback on the import process in the Output window. A new geometry scene is created in the Graphics window and shows the imported geometry. In the simulation tree, expand the Geometry > Parts node to see the new
Version 7.06
bluntBody part.
The imported geometry represents the fluid volume around the body in the wind tunnel. Save the simulation by clicking the (Save) button.
Version 7.06
A new geometry scene contains: A part displayer, Geometry 1, which contains all faces in the geometry part and is preset to display a shaded surface. A second part displayer, Outline, which also contains all faces in the geometry part and is preset to display the mesh outline.
Version 7.06
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. There are also several hot keys that rotate the view: To align with the X-Y plane, press the <T> key. To align with the Y-Z plane, press the <F> key. To align with the Z-X plane, press the <S> key. To fit the view within the Graphics window, press the <R> key. Adjust the view as shown in the following screenshot.
Version 7.06
Index
Description
1 2 3 4 5
To facilitate boundary creation, identify the surfaces to become boundaries: Open the Geometry > Parts > bluntBody > Surfaces > Faces node. Right-click the Faces node and from the pop-up menu, select Split by
Version 7.06
Patch.
The Split Part Surface by Patch dialog appears. In Geometry Scene 1, select the face in the low X direction, rotating the
Version 7.06
geometry as necessary.
Click the Create button. The face is removed from the scene and the new surface appears within the surfaces manager node belonging to the parent part.
Version 7.06
Repeat the previous steps for the following surfaces. Location High X face Low Z face Low Y face Corresponding part surface patch number 3 4 6 Name
Pressure Symmetry_plane1 Symmetry_plane2
The outside walls of the region can be defined as a single boundary by combining two faces into one part surface using the multi-select functionality. Hold down the <Ctrl> key and click both the High Y and High Z faces. Type Slip_wall in the Part Surface Name. Click Create. The remaining patches remain as part of the default surface.
Click Close.
Version 7.06
Press <Enter> or click another node to accept. To rename the Faces part surface, the previous method can be used. Use the alternative right-click menu option: Right-click the Geometry > Parts > subdomain-1 > Surfaces > Faces node
Version 7.06
The parts are ready to be converted to a region and boundaries. Save the simulation .
Version 7.06
Regions...
The Assign Parts to Regions dialog appears. To make sure that subdomain-1 has been selected successfully, expand the Parts node. In the Region Mode menu, select One Region per Part.
Version 7.06
Click the Create Regions button. Close the dialog. The portion of the object tree below the Regions node appears as shown in the following screenshot. All of the surfaces appear as individual boundaries within the region.
Version 7.06
The boundary node icon changes to reflect the new type. Using the same technique, change Symmetry_plane2 to Symmetry Plane. For compressible flows, the most appropriate inflow and outflow types are stagnation inlet and pressure outlet. Change the type of the Inlet boundary to Stagnation Inlet and the type of the Pressure boundary to Pressure Outlet. The Slip_wall and Inner_wall boundaries retain the default Wall type. Slip walls are boundary conditions and are set up later. Save the simulation .
Selecting Parts
Click a part in the Geometry Scene 1 display, for example the High X face.
Version 7.06
The object becomes highlighted and a label appears with the name of the object selected.
In the bluntBody object tree, the node that corresponds to this object is also highlighted.
Conversely, if a boundary node is selected in the bluntBody tree, the surface corresponding to that boundary is highlighted in the Graphics window.
Version 7.06
Open the Scenes > Geometry Scene 1 > Displayers > Geometry 1 > Parts node and click the ellipsis (Custom Editor) for the Parts value.
Click OK.
Version 7.06
This selection removes the solid-colored boundaries representing the wind tunnel from the scene, leaving the outlines and the blunt body.
Add those parts back to the scene using a drag-and-drop method: Open the Regions > subdomain-1 > Boundaries node. To extend your selection, hold down the <Ctrl> key and select all the boundary nodes except Inner_wall. Release the <Ctrl> key but continue to keep the left mouse button pressed. Drag the nodes onto the display and release the left mouse button.
A pop-up menu appears. Use this menu to choose which of the part displayers in the scene receive the parts that you have dragged across.
Version 7.06
The parts are restored to the scene. To clear all the parts, click the white background of the display.
Version 7.06
Version 7.06
In the Mesh 1 Model Selection dialog: Select Surface Remesher from the Surface Mesh group box. Select Polyhedral Mesher and Prism Layer Mesher from the Volume Mesh group box. The enabled models section appears as shown in the following screenshot.
Version 7.06
Select Continua > Mesh 1 > Reference Values > Number of Prism Layers and
Version 7.06
The run and progress of the meshers are displayed in the Output window.
Version 7.06
Version 7.06
Version 7.06
To provide better definition of the blunt body, modify the surface mesh at the inner wall: Select the Regions > subdomain-1 > Boundaries > Inner_wall > Mesh Conditions > Custom Surface Size node and activate Custom Surface Size.
A new Mesh Values manager appears. Select the Surface Size node and set Relative/Absolute to Absolute.
Select the Surface Size > Absolute Minimum Size node and make sure that Value is 0.0010 m
To regenerate the mesh: Click the (Generate Volume Mesh) button. Zoom in to the area around the slip walls and inner walls to see the
Version 7.06
improved mesh.
Selecting Models
To access the physics continuum: Right-click Continua and select New > Physics Continuum.
Version 7.06
Open the Continua node, which contains the default Physics 1 node.
Version 7.06
screenshot.
Select the Gas radio button from the Material group box, since this exercise involves an idealized gas (air). Since the Auto-select recommended models checkbox is activated, the Physics Model Selection dialog guides you through the model selection process by selecting certain default models automatically as you make some choices. Certain models, when activated in a continuum, require other models also to be activated in that continuum. For instance, once a continuum contains a liquid or a gas, it also needs a flow model. Once it has a flow model, it needs a viscous model (inviscid, laminar, or turbulent). Once turbulence is activated within a fluid continuum, select a turbulence model. The prompt
Version 7.06
Additional model selections are required alerts you to the fact that
The following selections are required for this simulation: Select Coupled Flow from the Flow group box. Select Ideal Gas from the Equation of State group box. The Coupled Energy model is selected automatically. Select Steady from the Time group box. Select Turbulent from the Viscous Regime group box. Select K-Epsilon Turbulence from the Reynolds-Averaged Turbulence group box. The Realizable K-Epsilon Two-Layer and the Two-Layer All y+ Wall Treatment models are selected automatically. To reverse part or all of the model selection process, simply clear the checkboxes of the models you wish to deactivate. Other active models require the selections that are grayed out. Therefore, deactivate the models that are not grayed out to begin with.
Version 7.06
When complete, the Physics Model Selection dialog appears as shown in the following screenshot:
No optional models are required for this simulation. Click Close. To see the selected models in the simulation tree, open the Continua node in the bluntBody window of the Explorer pane. The color of the Physics 1 node has turned from gray to blue to indicate that models have been selected. To display the selected models, open the Physics 1 node and then the
Version 7.06
Models node.
Version 7.06
When you select the Gas model, the properties of air such as dynamic viscosity are used by default. Since this problem uses air, the properties are acceptable. Save the simulation .
Version 7.06
STAR-CCM+ adds the decimal point and units automatically, so by simply typing 300,0,0 you get an entry of [300.0, 0.0, 0.0] m/s. In the same Initial Conditions node, open the Turbulent Viscosity Ratio node and select the Constant node. Set Value to 50, which is the same as the turbulent viscosity ratio that is set on the stagnation boundary condition.
Set the Physics Continuum property to Physics 1, the name of the continuum where you defined all the models earlier.
During this tutorial, there is one continuum in the above drop-down list, but as you add more (to the Continua node in the simulation tree), they are
Version 7.06
added to the drop-down list. This process determines which continua is used in the analysis, though continua can be defined and left unused.
Version 7.06
Constant node.
The total pressure setting is relative to the operating pressure value of 101,325 Pa. A supersonic static pressure is also required as part of a stagnation inlet condition but is only used if the inlet velocity becomes supersonic at some instance during solution iteration. The default value of 0.0 Pa relative pressure is sufficient as long as supersonic flow does not occur. The next value to set is the total temperature. In the same Physics Values node, open the Total Temperature node and select the Constant node.
Version 7.06
Select the Physics Values > Turbulent Viscosity Ratio> Constant node.
Set Value to 50. This value has been determined to give a reasonable decay of turbulence in the channel core (for the default turbulence intensity).
Version 7.06
Select the Slip_wall > Physics Conditions > Shear Stress Specification node.
Version 7.06
The solution does not converge in this number of iterations. The solution does not run for more than 300 iterations, unless this stopping criterion is changed or deactivated. Save the simulation .
Hide all parts except the blunt body itself and the vertical symmetry plane. Select the new Scenes > Scalar Scene 1 > Displayers > Scalar 1 > Parts
Version 7.06
node.
Click the
In the Parts dialog, expand Regions > subdomain-1, select Inner_wall and Symmetry_plane1, and click OK.
Define Mach number as the scalar to display: Right-click the scalar bar (near the bottom of the Graphics window).
Version 7.06
Select Mach Number > Lab Reference Frame from the pop-up menu.
Since the geometry of this example is symmetric, the mesh was cut into quarters with two symmetry planes to reduce computing costs. However, the symmetric repeat transform lets you create the visual effect of the complete geometry by setting up the mirror image of the model in the Graphics window. In this case, you only do one repeat so that half the model is shown. Select the Scalar 1 node.
Version 7.06
To remove the outline: Select the Displayers > Outline 1 node. Clear the checkbox of the Outline property.
Version 7.06
Version 7.06
Setting Up a Report
Right-click the Reports node and select New Report > Force Coefficient.
This action creates a Force Coefficient 1 node under the Reports node.
Select the Force Coefficient 1 node and enter the settings for the report in the Properties window.
Enter 1.277 for Reference Density, the density of the freestream air. Enter 264.6 for Reference Velocity, the velocity at the inlet. Enter a value of 0.0161269 for Reference Area, the projected area of the quarter of the blunt body that is used in the simulation. Make sure that Direction is [1.0,0.0,0.0] (for drag).
Version 7.06
Use the drag-and-drop method to select the monitored part, namely the Inner_wall boundary: Open the Regions > subdomain-1 > Boundaries node and then drag the Inner_wall node onto the Force Coefficient 1 node.
The Inner_wall entry is now listed in the Parts property of the Force Coefficient 1 node. The setup for the report is now complete, and a monitor and a plot can be made from that report.
Version 7.06
from Report.
This action creates a Force Coefficient 1 Monitor node under the Monitors node.
The existing monitors in this branch of the simulation tree are the residual monitors from the solvers that the models use. With the new monitor node selected, the default settings for the Force Coefficient 1 monitor are seen.
These settings update the plot every iteration while the solution is running.
Version 7.06
In addition to the new monitor node, a Force Coefficient 1 Monitor Plot node is created in the Plots node.
Select the new Force Coefficient 1 Monitor Plot node. The property settings for the plot appear.
Additional properties of the plot can be adjusted using the subnodes of the
Force Coefficient 1 Plot node.
To view the plot display, either Double-click the Force Coefficient 1 Monitor Plot node. Or Right-click the Force Coefficient 1 Monitor Plot node and select Open from the pop-up menu.
Version 7.06
This plot display is automatically updated with the drag force coefficient when the solver starts to run. The pre-processing setup is completed. The simulation can now be run to convergence. Save the simulation .
Version 7.06
The tabs at the top of the Graphics window allow you to select any one of the active displays for viewing. To see the results, click the tab of the Scalar Scene 1 display. Rotate and zoom if desired for a better view.
During the run, it is possible to stop the process by clicking the (Stop) button in the toolbar. If you do halt the simulation, you can resume it by clicking the (Run) button. If left alone, the simulation continues until the stopping criterion of 300 iterations is satisfied. After the run is finished, save the simulation.
Version 7.06
Select the Stopping Criteria > Maximum Steps node and set the Maximum Steps to 1500 This setting instructs STAR-CCM+ to iterate 1200 steps in addition to the 300 already done.
The maximum number of 1500 steps is a reasonable setting, in this case, to get to convergence. Normally, you do not know ahead of time what a suitable iteration count is. You can either set a large iteration and watch the residuals or a monitor plot, or add a stopping criterion from a monitor. To continue running the simulation, click the (Run) button.
Version 7.06
check on results. You can also reconnect from a different machine, even a machine of another architecture. To disconnect the client from the server: Open the Servers window (if it is not already open) by selecting Window > Servers. To see your simulation, look in the Servers window of the Explorer pane. Reselect the simulation window in the Explorer pane, and select the File > Disconnect menu item.
Version 7.06
The client disconnects from the server, but both are still running, although the simulation window no longer appears in the client. If desired, the client can be shut down using File > Exit. The Servers window of the Explorer pane lists all server processes (simulations) that are running locally. Selecting the node in the tree displays the server process properties.
If the Clients property is empty (as shown above), then that server process does not have a client that is connected to it and it is possible to connect. Connect by right-clicking the server process node in the Servers tree and selecting Connect from the pop-up menu.
When you reconnect, none of the previously created scenes and plots are displayed in the Graphics window. To display a scene of interest: Double-click its node in the simulation object tree, Or Right-click the node and select Open.
Version 7.06
Visualizing Results
Once the solution is finished, you can examine the results in scalar and vector scenes.
Examining Scalars
Make the Scalar Scene 1 display active to see the Mach number results
Version 7.06
By default, Filled cell values are shown. To display smooth contours: Select the Scalar 1 node and set the Contour Style to (Smooth Filled).
Version 7.06
Display two scalar values at the same time: one on the symmetry plane, the other on the inner wall: Add another scalar displayer by right-clicking the Displayers node and selecting New Displayer > Scalar.
The creation of the second displayer has added a second scalar bar in the display. To view both scalar bars easily: Point the mouse in the interior of a scalar bar to drag either one of them
Version 7.06
to a different location.
In the display, right-click the scalar bar (blue) of the new displayer and select Pressure.
Right-click the inner wall in the display, select Displayers, and open its submenu. Among the checkboxes to the right of in, clear the checkbox under Scalar 1 and tick the one under Scalar 2.
Version 7.06
This single step transfers the part from one displayer to another. Select the Scenes > Scalar Scene 1 > Displayers > Scalar 2 node.
(Smooth Filled).
Set the Transform expert property to Symmetry_plane2 1. The blunt body shows pressure values while the symmetry plane shows Mach number.
Version 7.06
Examining Vectors
This section demonstrates how to examine velocity vectors in the model. In this example, you set up vectors in a reflected symmetry plane around a solid-colored blunt body. First, create a scene by right-clicking the Scenes node. Select New Scene > Vector.
You do not need the outlines that the Outline part displayer provides by default, so reuse that displayer to show the blunt body as a solid object. Select the Vector Scene 1 > Displayers > Outline 1 > Parts node and click the (Custom Editor) button. In the Parts dialog, expand the Regions and subdomain-1 nodes. Click Clear Selection. Select the Inner_wall node.
Version 7.06
Click OK.
Make the following changes to the Outline displayer properties: Deactivate the Outline property. Activate the Surface property.
Version 7.06
Select the Vector 1 > Parts node and click the ellipsis for the Parts value.
(Custom Editor)
In the Parts dialog, expand the Regions and subdomain-1 nodes. Select
Version 7.06
Version 7.06
These settings show a solid blunt body with velocity vectors surrounding it.
It is possible to make the arrows shorter to see the vectors more clearly. Select the Vector 1 > Glyph > Relative Length node and change Glyph Length (%) to 2.0.
Version 7.06
Version 7.06
Right-click the Scenes node and select New Scene > Geometry.
Right-click the Derived Parts node and select New Part > Section > Plane...
A new interactive in-place dialog is activated to allow definition of the derived part. To define the source part for this derived part: In the Input Parts group box, click the [subdomain-1] button. In the dialog that appears, expand the Regions and subdomain-1 nodes. Click Clear selection.
Version 7.06
The plane tool in the scene display allows interactive definition of the plane that cuts the blunt body. Rotate and pan the image as needed so that the inner wall is in front of the plane tool rectangle as shown.
In the dialog, leave the Display box at its default setting. The barbell represents the normal of the cutting plane, which can be changed by dragging one of the balls to another location. The plane can also be dragged to change the origin of the cutting plane. A bounding box slightly larger than the regions in the scene is displayed to limit the movement of the plane.
Version 7.06
Move the mouse over the plane tool, then click-and-drag the rectangle so that it cuts the blunt body close to the symmetry plane.
Version 7.06
Click Create and then Close. In the bluntBody window, a node, plane section, has been added within the
Derived Parts.
It is now possible to plot data on the new surface. Save the simulation .
An empty plot node is added to the tree and opens in the Graphics window. To select the part on which to plot: Select the Plots > XY Plot 1 node and click the for the Parts property. (Custom Editor) button
In the XY Plot 1 dialog, make sure that Derived parts > plane section is ticked. Click OK. To set the variable to plot on the y-axis: Select the XY Plot 1 > Y Types > Y Type 1 node and make sure that the Type property is set to Scalar.
Version 7.06
Select the Y Type 1 > Scalar node and set Scalar to Pressure Coefficient.
Match the reference density, reference pressure, and reference velocity of the Pressure Coefficient field function in the Force Coefficient 1 report. Copy and paste these properties from the report to the field function: Select the Reports > Force Coefficient 1 node. In the Properties window, select the value of the Reference Density property, and press Ctrl+C. Select the Tools > Field Functions > Pressure Coefficient node.
In the Properties window, select the value of the Reference Density property, press Ctrl+V, and then Enter. Repeat the above steps for the Reference Velocity. Leave the Reference Pressure property at 0.0 Pa.
Version 7.06
Adding Streamlines
To visualize streamlines in STAR-CCM+: Create a scene Create a streamline derived part Add a streamline displayer, with suitable properties, to the new scene based on the streamline derived part. In this example, the streamline derived part is set up so that it shows the recirculating flow behind the blunt body. The part is then modified to show streamlines over the blunt body. To create the scene: Right-click the Scenes node.
Version 7.06
To create the streamline derived part: Right-click the Derived Parts node. Select New Part > Streamline in the bluntBody window.
Version 7.06
The entire fluid region is used as the input part for the streamline part. Click the Input Parts button. In the Select Objects dialog, make sure that subdomain-1 is the only part in the Selected list. Click Close in the Select Objects dialog. In the Vector Field box, make sure that Velocity is selected in the drop-down list.
Version 7.06
To position the seed point just after the back of the blunt body (in the direction of flow): Enter the following coordinates under Seed Position: 0.05 for X, 0.01 for Y and 0.01 for Z. Enter 0.002 for Seed Radius and 10 for Number of Points.
Leave other settings at their defaults. To generate the streamlines, click Create.
Version 7.06
In the bluntBody window, a streamline node appears in the Derived Parts node.
Click Close in the interactive in-place dialog. A new streamline displayer has been added to the scene. Select the Displayers > Streamline Stream 1 node to modify the displayer to customize how the streamlines appear: Set the Mode to Tubes so that the streamlines are displayed as tubes instead of lines. Make sure that Orientation is set to Normals.
Version 7.06
In the display, right-click the color bar and select Velocity: Magnitude.
Improve the contrast between boundaries and streamlines: Select the Geometry 1 node and set the Color Mode to Constant.
You now fine-tune the streamline derived part. Select the Derived Parts > streamline node and make sure that the Rotation Scale expert property is 1.0 Select the streamline > 2nd Order Integrator node and set the Integration Direction to Both so that the streamlines are generated both upstream and downstream.
Version 7.06
In the Expert properties: Set Initial Integration Step to 0.1 to provide more resolution to the streamlines. Set Maximum Propagation to 5.0 Set Max Steps to 1000 This option, together with the maximum propagation, provide a stopping criterion to make sure that the streamlines are not calculated endlessly. The modified streamlines appear as below.
The next step involves moving the seed point of the streamline derived part to the front of the blunt body. Select the 2nd Order Integrator node and change Integration Direction to Forward. Select the streamline > Point Seed node and set the x-value of the Center to -0.05, so that the value of the property is -0.05, 0.01, 0.01
Version 7.06
Click Disconnect. It is easy to reopen the file and restore the displays.
Version 7.06
Summary 7005
Summary
This tutorial of STAR-CCM+ introduced the following steps: Starting the code and creating a simulation. Saving and naming the simulation. Importing a geometry file. Visualizing the imported geometry. Splitting and naming the geometry surfaces. Renaming techniques. Changing types of boundaries. Designing a three-dimensional mesh Visualizing the mesh. Selecting the physics models. Defining the initial conditions. Defining the boundary conditions and values. Setting the solver parameters and stopping criteria. Setting up a monitoring report and plot. Running the solver until the residuals are satisfactory. Disconnecting from a server and reconnecting during a run. Analyzing results using the visualization, monitor-plot, and XY-plot features. Creating streamlines. Reopening a simulation.
Version 7.06