Unsteady CFD Tutorial
Unsteady CFD Tutorial
Unsteady CFD Tutorial
1 | User Guide
This tutorial demonstrates how to use the solution recording and playback module for capturing the results of
transient phenomena.
The particular scenario being modeled is that of incompressible air flowing over a cylinder with diameter D =
0.01 m. Under the correct conditions, vortices are formed and shed from the cylinder in a regular pattern. The
free-stream velocity is 0.15 m/s and the flow is laminar with a Reynolds number (Re) of 75. The predicted
Strouhal number and shedding frequency can be determined from a graph of measured lift forces and
compared to results obtained by Daily et al.[413].
A 2D volume mesh of a simple cylinder in a fluid domain is provided for this tutorial, the dimensions of which
are shown below.
Contents:
Prerequisites
Importing the Volume Mesh
Selecting Physics Models
Modifying Material Properties and Setting Initial Conditions
Setting Boundary Conditions
Creating a Scalar Scene
Preparing the Lift Plot
Modifying Solver Settings
Setting Up Stopping Criteria
Setting Up the Solution History File
Running the Simulation
Visualizing the Results
Validating the Results
Creating a Recorded Solution View
Creating an Animation from the Solution View
Summary
Bibliography
Prerequisites
The instructions in the Solution Recording and Playback: Vortex Shedding tutorial assume that you are already
familiar with certain techniques in Simcenter STAR-CCM+.
Before attempting this tutorial, make sure that you are familiar with the following techniques:
Technique Tutorial
The fluid used in this tutorial is air, and the flow is incompressible and laminar. Vortex shedding is a periodic
phenomenon and requires the use of a transient solver.
Note: If you deactivated the default option Run Mesh Diagnostics After Importing Mesh (see
Simcenter STAR-CCM+ Default Options in the User Guide), you must first activate the Two
Dimensional model in the Space group box.
Material Gas
3. Click Close.
4. To review the models, open the Fluid > Models node.
1. Within the Fluid continuum, select the Models > Gas > Air > Material Properties > Density > Constant
node and set Value to 1 kg/m^3.
2. Select the Dynamic Viscosity > Constant node and set Value to 2.0E-5 Pa-s.
Set the initial conditions so that the simulation begins with the fluid in a state of motion.
3. Select the Fluid > Initial Conditions > Velocity node and set Value to [0.15, 0.0] m/s.
Property Value
Min 0
Max 28
Clip Off
5. Select the Scalar 1 node and set Contour Style to Smooth Filled.
6. Click the Simulation button to return to the Simcenter STAR-CCM+ simulation object tree.
7. Expand the Tools > Annotations node and drag the Solution Time node into the scene.
The Solution Time annotation is added to the bottom left of the scene.
1. Right-click the Reports node and select New Report > Force Coefficient.
2. Rename the new report to Coefficient of Lift.
3. Select the Coefficient of Lift node and set the following:
Property Setting
5. Right-click the Coefficient of Lift node and select Create Monitor and Plot from Report.
A new monitor and plot is added to the Monitors and Plots nodes respectively.
1. Select the Solvers > Implicit Unsteady node and set the following properties:
Property Setting
Time-Step 0.02 s
Property Setting
2. Select the Solvers > Coupled Implicit > Constant CFL node and set Constant CFL number to 100.
1. Select the Stopping Criteria > Maximum Inner Iterations node and set Maximum Inner Iterations to 15.
2. Select the Stopping Criteria > Maximum Physical Time node and set Maximum Physical Time to 8 s.
3. Save the simulation.
A new node containing the name of the solution history file is added to the object tree below the Solution
Histories node.
The red asterisk next to this node means that data is actively written to the file when the simulation runs.
Choose what data to save to the solution history file. As this is a vortex shedding case it is appropriate to store
results for pressure, velocity and vorticity.
3. Select the Solution Histories > vortexSheddingData node and set the following properties:
Property Setting
Functions Pressure
Velocity
Vorticity
Set the frequency with which the selected data is written to the solution history file:
4. Select the Solution Histories > vortexSheddingData > Update node and set Trigger to Time Step.
5. Select the Update > Time-Step Frequency node and make sure that Frequency is set to 1.
6. Select the Solution Histories > vortexSheddingData node.
A summary of the properties for the solution history file is shown.
The Auto-record property records the data to the solution history file at the required intervals. If you do not
want to record the data when the solver is running, deactivate this setting. The Regions property is
automatically populated with all regions in the simulation. In cases with multiple regions, you may remove
regions by clicking to the right of the Regions property and clearing the checkbox next to the region you
want to remove. The Path property displays the relative path to the simulation history file. The States
property displays the number of saved states stored in the selected solution history file; currently this is
displaying 0 as the solver has not yet run.
7. Save the simulation.
The Residuals display is created automatically and shows the progress of the solvers. The simulation
continues until the physical time of the simulation reaches 8 seconds.
2. While the simulation is running, select the Scalar Scene 1 tab at the top of the Graphics window to
visualize the solution.
3. When the simulation has finished, save the simulation.
fD
St = (4376)
U
Where f is the frequency of vortex shedding, D is the cylinder diameter, and U is the free-stream velocity. In
this case, the Strouhal number is given as 0.15 by Daily et al. [413]. The theoretical frequency of vortex
shedding is therefore calculated as 2.25 Hz, which gives a period of 0.444 seconds.
The predicted period of shedding can be obtained by zooming into the last two troughs of the monitor plot.
4. Select the Coefficient of Lift Monitor Plot > Axes > Bottom Axis > Major Labels node, deactivate Auto
Spacing and Auto Precision, and set Spacing to 0.1.
5. Select Minor Ticks and set Count to 4.
6. Click the simulation button.
The enlarged scale on the X-axis makes it possible to measure the period.
Note: A relatively large time step was used for this tutorial resulting in a limited number of data points in
the plot. If you want more accurate results and a smoother plot, reduce the time step.
There is a difference of less than 1% between the predicted period and the reference period, which is good
agreement. The corresponding predicted frequency of 2.27 Hz is also in good agreement with the theoretical
frequency of vortex shedding of 2.25 Hz.
Properties of the solution view set the point in the solution history at which data is read. Data is read into a
separate representation linked to the solution view. The solution history file contains all the data that was
specified in the previous part of the tutorial.
The number of states stored in the solution history file is displayed next to the States property.
A new node, vortexSheddingData, is added to the Solution Views node. The properties of the solution
view node control the data shown by the representation associated with it.
An additional representation linked to this view was added to the object tree under the Representations
node. This representation stores solution data from the solution history file.
5. Click the Scalar Scene 1 tab in the Graphics window.
6. Drag and drop the Solution Views > vortexSheddingData node onto a blank area in the scene window.
This action sets the Representation property for all displayers (Outline 1 and Scalar 1) and solution history
annotations (Solution Time) in the scene to vortexSheddingData.
This scene corresponds to the data stored in the solution history file for the first time-step. Adjust the
solution time to display the solution data at 1.3 seconds.
7. Select the Solution Views > vortexSheddingData node and set Solution Time to 1.3 s.
Restore the scene to use the most recent solution from the simulation file (stored on the volume mesh
representation).
9. Drag the Solution Views > Current Solution node into the scene as previously described.
10.Save the simulation.
1. Drag the recorded solution view, Solution Views > vortexSheddingData, back into the scene.
2. Select the Solution Views > vortexSheddingData > Animation node and set the Animation Mode to
Solution Time.
A new node, Solution Time Animation, appears below the Animation node.
When creating an animation, it is important to set the correct framerate. If the framerate is set too high, the
video may reuse identical frames. If the framerate is set too low, the video may appear to play too quickly.
One way to determine the correct framerate is to divide the total number of states (frames) by the total
physical time of the simulation. In this case you have 400 states and a physical time of 8 seconds. Knowing
this, you can calculate that 50 frames make up one second of simulation time.
Adjust the framerate for the animation.
Property Value
Animation Length 8
Summary
This tutorial demonstrated how to use the solution recording and playback module for capturing the results of
transient phenomena.
Bibliography
[838] Daily, J.W., and Harleman, D.R.F. Fluid Dynamics, Addison-Wesley, MA, 1966