Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Unsteady CFD Tutorial

Download as pdf or txt
Download as pdf or txt
You are on page 1of 19

Simcenter STAR-CCM+ 2020.

1 | User Guide

Solution Recording and Playback: Vortex Shedding

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

Siemens Digital Industries Software 8918


Simcenter STAR-CCM+ 2020.1 | User Guide

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 STAR-CCM+ workflow Introduction to STAR-CCM+

Using visualization tools, scenes and plots Introduction to STAR-CCM+

Importing the Volume Mesh


To set up the Simcenter STAR-CCM+ simulation, launch a simulation and import the supplied volume mesh.

1. Launch Simcenter STAR-CCM+.


2. Start a simulation.
3. Select File > Import > Import Volume Mesh.
4. In the Open dialog, navigate to the incompressibleFlow folder of the downloaded tutorial files.
5. Select vortexSheddingDomainMesh.ccm then click Open.
Simcenter STAR-CCM+ provides feedback on the import process in the Output window and a mesh region is
created under the Regions node.
6. Create a mesh scene and examine the 2D mesh.

Siemens Digital Industries Software 8919


Simcenter STAR-CCM+ 2020.1 | User Guide

7. Save the simulation as vortexShedding.sim.

Selecting Physics Models


A physics continuum was added to the object tree when the volume mesh was imported. Select the physics
models required to run this case.

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.

To select the physics models:

1. Rename the Continua > Physics 1 continuum to Fluid.


2. For the physics continuum, Continua > Fluid, select the following models in order:

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.

Group Box Model

Time Implicit Unsteady

Material Gas

Flow Coupled Flow

Equation of State Constant Density

Viscous Regime Laminar

Siemens Digital Industries Software 8920


Simcenter STAR-CCM+ 2020.1 | User Guide

3. Click Close.
4. To review the models, open the Fluid > Models node.

Modifying Material Properties and Setting Initial Conditions


Modify the material properties of air, so that the correct Reynolds number is obtained.

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.

Setting Boundary Conditions


Set the required velocity at the inlet boundary.

To set the boundary conditions:


1. Edit the Regions > Fluid_Domain > Boundaries > Inlet node.
2. Set the following properties:

Node Property Setting

Physics Conditions > Velocity Method Components


Specification

Physics Values > Velocity Value [0.15, 0.0] m/s

Siemens Digital Industries Software 8921


Simcenter STAR-CCM+ 2020.1 | User Guide

Creating a Scalar Scene


Create a scalar scene displaying vorticity to visualize the solution while the simulation is running.

1. Create a scalar scene.


2. Click the Scene/Plot button located above the object tree.
3. Select the Scalar 1 > Scalar Field node and set Function to Vorticity > Magnitude.
4. In the same window, set the following properties:

Property Value

Min 0

Max 28

Clip Off

Auto Range 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.

Add an annotation displaying solution time to the scene:

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.

Siemens Digital Industries Software 8922


Simcenter STAR-CCM+ 2020.1 | User Guide

Preparing the Lift Plot


Monitor the lift that the cylinder wall is experiencing to determine the period of oscillation for the vortex
shedding.

First create a report:

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

Reference Velocity 0.15 m/s

Reference Area 0.01 m^2

Force Option Pressure

Direction [0.0, 1.0, 0.0]

4. Set Parts to Regions > Fluid_Domain > Cylinder.

Create a monitor and plot from this report.

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.

Modifying Solver Settings


Modify the solver settings to more appropriate values.

1. Select the Solvers > Implicit Unsteady node and set the following properties:

Property Setting

Time-Step 0.02 s

Siemens Digital Industries Software 8923


Simcenter STAR-CCM+ 2020.1 | User Guide

Property Setting

Temporal Discretization 2nd-order

2. Select the Solvers > Coupled Implicit > Constant CFL node and set Constant CFL number to 100.

Setting Up Stopping Criteria


Adjust the number of inner iterations for each time step and extend the maximum time for the solver to run.

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.

Setting Up the Solution History File


Create a solution history, simh, file and use it to store selected solution data at specified time intervals.

1. Right-click the Solution Histories node and select New....

The Save dialog appears.


2. Enter vortexSheddingData.simh as the name of the solution history file and click Save.

A new node containing the name of the solution history file is added to the object tree below the Solution
Histories node.

Siemens Digital Industries Software 8924


Simcenter STAR-CCM+ 2020.1 | User Guide

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.

Siemens Digital Industries Software 8925


Simcenter STAR-CCM+ 2020.1 | User Guide

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.

Running the Simulation


The simulation is ready to run.

To start the analysis:

Siemens Digital Industries Software 8926


Simcenter STAR-CCM+ 2020.1 | User Guide

1. In the Solution toolbar, click (Run).


While the simulation is running you can click the tabs at the top of the Graphics window to switch between
the plot and the scene. Also, the Solution Views > Current Solution node displays the current Iteration,
Time Step, and Solution Time. The selected data is saved to the solution history file at every time step.

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.

While the simulation is running,

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.

Visualizing the Results


Examine the Vorticity scene and the Coefficient of Lift plot.

The scalar scene after 8 s is shown below.

The Coefficient of Lift monitor plot is shown below.

Siemens Digital Industries Software 8927


Simcenter STAR-CCM+ 2020.1 | User Guide

Validating the Results


From the scalar scene and the monitor plot, it is clear that vortex shedding is occurring. The Strouhal number
(St) is commonly used when describing oscillating flows and is defined as:

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.

1. Click (Zoom Selected Plot) in the Plot toolbar.


2. Drag a box around the last two troughs on the plot, as shown below.

Siemens Digital Industries Software 8928


Simcenter STAR-CCM+ 2020.1 | User Guide

The resulting plot is shown below.

3. Click the Scene/Plot button.

Siemens Digital Industries Software 8929


Simcenter STAR-CCM+ 2020.1 | User Guide

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.

The predicted period is shown to be approximately 0.44 seconds.

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.

Creating a Recorded Solution View


Solution views are used to interrogate this data and make it available for post-processing.

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.

1. Select the Solution Histories > vortexSheddingData node.

The number of states stored in the solution history file is displayed next to the States property.

Siemens Digital Industries Software 8930


Simcenter STAR-CCM+ 2020.1 | User Guide

There are 400 states stored in the solution history file.


2. Create a solution view to access the states.
3. Right-click the Solution Histories > vortexSheddingData node and select Create Recorded Solution
View.
4. Click Yes in the confirmation dialog.

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.

Siemens Digital Industries Software 8931


Simcenter STAR-CCM+ 2020.1 | User Guide

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.

The scene is shown below.

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.

The scene updates as shown below.

Siemens Digital Industries Software 8932


Simcenter STAR-CCM+ 2020.1 | User Guide

8. Set Solution Time to 3 s.


The updated scene is shown below.

Siemens Digital Industries Software 8933


Simcenter STAR-CCM+ 2020.1 | User Guide

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.

Creating an Animation from the Solution View


Create an animation that shows the development of vortex shedding from the start to a regular periodic state.

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.

Siemens Digital Industries Software 8934


Simcenter STAR-CCM+ 2020.1 | User Guide

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.

3. Click the scene/plot button.


4. Select the Scalar Scene 1 > Attributes > Scene animation node and set the Target frame rate (fps) to 50.

Record the animation.

5. Click (Write Movie) in the Animation toolbar.


The Write animation dialog appears.
6. Set the following properties:

Property Value

Animation Length 8

Resolution A resolution of your choice

File Name vorticityAnimation.avi

7. Click Save to write the animation to disk.


8. Play back the animation using a player of your choice.

Summary
This tutorial demonstrated how to use the solution recording and playback module for capturing the results of
transient phenomena.

The tutorial covered the following:

• Creating a Solution History file.


• Selecting appropriate scalars to save to the Solution History file at suitable intervals.
• Plotting the lift coefficient and validating the period of shedding against reference data.

Siemens Digital Industries Software 8935


Simcenter STAR-CCM+ 2020.1 | User Guide

• Creating a Recorded Solution View.


• Viewing recorded solution data in a scene.
• Recording an animation from the Solution History file.

Bibliography
[838] Daily, J.W., and Harleman, D.R.F. Fluid Dynamics, Addison-Wesley, MA, 1966

Siemens Digital Industries Software 8936

You might also like