0% found this document useful (0 votes)
92 views

A Two-Dimensional Model of Convection For Laminar Flow Over A Cylinder Me 448/548: Starccm+ Tutorial Gerald Recktenwald 4 March 2020

This document provides instructions for setting up a 2D simulation of laminar flow over a cylinder in StarCCM+. It describes creating a parameterized CAD model of the geometry, including a cylinder in cross-flow within a duct. It also outlines setting up the physics continuum as 2D, steady, laminar gas flow with convective heat transfer. Boundary conditions like inlet velocity and cylinder heat input are defined. The tutorial is intended to demonstrate basic convective heat transfer capabilities in StarCCM+ for this simplified problem.

Uploaded by

Thapelo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
92 views

A Two-Dimensional Model of Convection For Laminar Flow Over A Cylinder Me 448/548: Starccm+ Tutorial Gerald Recktenwald 4 March 2020

This document provides instructions for setting up a 2D simulation of laminar flow over a cylinder in StarCCM+. It describes creating a parameterized CAD model of the geometry, including a cylinder in cross-flow within a duct. It also outlines setting up the physics continuum as 2D, steady, laminar gas flow with convective heat transfer. Boundary conditions like inlet velocity and cylinder heat input are defined. The tutorial is intended to demonstrate basic convective heat transfer capabilities in StarCCM+ for this simplified problem.

Uploaded by

Thapelo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

A Two-Dimensional Model of

Convection for Laminar Flow Over a Cylinder


ME 448/548: StarCCM+ Tutorial
Gerald Recktenwald
4 March 2020
Introduction
This tutorial demonstrates the following concepts in StarCCM+ simulation
• Creation of a parameterized model in the StarCCM+ CAD tool
• Creation of 2D mesh
• Use of symmetry boundary conditions
• Convective heat transfer with different boundary conditions
The tutorial demonstrates how to set up and solve a 2D model of a cylinder in cross flow. The
results are only presented on a coarse mesh. No attempt at mesh refinement or obtaining a
verified solution is attempted. However, we do note that the heat transfer computed for laminar
flow is in excellent agreement with the standard correlation from a heat transfer textbook.
Figure 1 is a schematic of a cylinder suspended in a vertical flow. The problem is symmetric
about a vertical line through the center of the cylinder. However, we will neglect this symmetry
and build a model that may be applied to flows that are geometrically symmetric but that do not
yield symmetric flow, e.g. vortex shedding. Table 1 gives the values of physical dimensions used
in the model. The inlet velocity is chosen so that the flow is laminar, with ReD = 200. The
sidewalls are chosen to be symmetry boundaries, though no-slip duct walls could also be used.
Outlet

Inlet: V, T
Figure 1 Two-dimensional geometry of heated cylinder in a duct.
StarCCM+ Tutorial: Laminar convection from a cylinder in 2D 2

Table 1 Dimensions of features in the model of the heated cylinder. Design


parameters are defined and used in the 3D-CAD tool.
Symbol Value Description Design parameter
D 4 cm Outer diameter of the cylinder cylinder_diameter
b 12 cm Distance from inlet to center of cylinder cylinder_position_from_inlet
W 30 cm Width of the domain domain_width
L 60 cm Length of the domain domain_length
V 0.075 m/s Uniform inlet velocity
T 20 °C Inlet temperature
Q 15 W Heat input from the cylinder

Build the Model in the StarCCM+ CAD Tool


Review the documentation under Tutorials " Foundation Tutorials " 3D-CAD.

Create design parameters


Open the CAD Tool by expanding the geometry node in the simulation tree. Right-click 3D-CAD
Models and select New.
• Right-click on the Design Parameters node and select New " Length
» Rename the length as cylinder_diameter
» In the Properties Pane, set the Value to 4 cm
• Repeat the preceding steps to create three additional Design Parameters as lengths, with
the following dimensions. The four Design Parameters are also listed in Table 1.
» cylinder_position_from_inlet: 12 cm
» domain_length: 60 cm
» domain_width: 30 cm

Create the fluid domain surrounding the cylinder


Note that the 2D model needs to be created on the z = 0 plane.
The following steps create a volume with the plane geometry of
Figure 1 oriented in the z = 0 plane.
• Expand Geometry node
• Right-click 3D CAD Models and select New
• As depicted in the screenshot to the right, right-click on
XY (symbol) and select Create Sketch
• Optional: click on the Grid Spacing icon at the bottom of
the sketch panel.
» Change the Grid Spacing to 0.5 cm
» Change the Number of fine grid divisions to 5
• Click the Create Circle icon
» Click at the origin.
» Click (don’t drag) at another position to create a tentative diameter
StarCCM+ Tutorial: Laminar convection from a cylinder in 2D 3

» Right-click on the circle and choose Apply radius


dimension. Enter $cylinder_diameter/2 in the
length box
» Note that you can drag the annotation of the
dimension to make the model easier to read.
• Click the Create rectangle icon
» Click two points that enclose the cylinder (away
from the origin)
» Right-Click on one of the horizontal edges and
choose Apply dimension
» Enter $domain_width in the box
» Right-Click on one of the vertical edges and choose Apply dimension
» Enter $domain_length in the box
• Locate the cylinder in the center of the domain width
» Click on the point at the origin of the
cylinder
» Hold down the control key, and click on
the vertical line on the right side of the
rectangle.
» With the cylinder center and the right
boundary both selected, right-click on the
right boundary line and select Apply
Distance Dimension.
» Enter $domain_width/2 in the box

• Locate the cylinder relative to the inlet


boundary
» Click on the point at the origin of the cylinder
» Hold down the control key, and click on the horizontal line at the bottom of the
rectangle
» With the cylinder center and the bottom boundary both selected, right-click on the
bottom boundary line and select Apply Distance Dimension.
» Enter $cylinder_position_from_inlet in the box
• Extrude the sketch to create the fluid volume
» Click OK in the sketch panel to close the sketch
» Right-click on Sketch 1 and select Extrude
» Enter 1 cm for the Distance
» Click OK
• Click the Close 3D CAD at the bottom of the panel to return to the simulation tree
• To prepare for future modifications to the model, rename the 3D-CAD model to
fluid_volume.
• Save the model
StarCCM+ Tutorial: Laminar convection from a cylinder in 2D 4

Create a Part
The CAD Tool creates CAD models, but these cannot be used directly in the simulation. The
“parts” created by the CAD Tool must be used to create a new Geometry part.
• Right-click on the newly created 3D-CAD model and select New Geometry Part
• Accept the defaults in the dialog box and click OK.
• Expand the Parts node to see the new part. Change its name from Body 1 to fluid.
Rename surfaces on the Geometric Parts
The geometry part, like parts imported from external CAD tools like Solidworks, needs to have
its enclosing surface expanded to separate surfaces so that boundary conditions can be applied.
• Expand the (newly renamed) fluid node under the Parts node
• Expand the Surfaces node, and right-click on Default.
• If the Split by Patch option is dimmed (not selectable), create a Geometry Scene for the
part. Then select Split by Patch.
» Rotate the model so that the –Z face of the XY plane is in the foreground. Select this
surface and name it z_zero_face.
Note that it is very important to identify the model face that is
coincident with the XY plane passing through z = 0. This (z=0)
plane will be used in the 2D simulation.
» Create the remaining surfaces listed in Table 2. Note that the symmetry_edges surfaces
are created after closing the Split by Patch tool. These two edges are the Default
surface (edge) that is left after all other surfaces were named in the Split by Patch
tool.

Table 2 Named surfaces created with the Split By Patch tool.


Name Description
z_zero_face Plane on the z = 0 face. This is essential for creating
the 2D mesh
z_max_face Plane opposite the z = 0 face. This surface is named,
but not used in the simulation.
cylinder Surface of the cylinder
inlet Bottom edge of the domain and location of the inlet
outlet Top edge of the domain and location of the outlet
symmetry_edges Two side walls that are combined into a single surface.
Inside the Split by Patch tool these surfaces are left as
undefined. Then after closing the tool these faces
remain in “default” face, which is renamed.
StarCCM+ Tutorial: Laminar convection from a cylinder in 2D 5

Create the Physics Continua


• Two-dimensional
• Steady
• Gas
• Segregated Flow
• Constant density
• Laminar
• Segregated Fluid Enthalpy
The default material for a gas is air. We’ll use air as the fluid, so no additional specifications
need to be made.
Assign Parts to Region
• Under the Parts node, right-click on the fluid
node (was “Body 1”) and select Assign Parts to
Regions
• In the dialog box, make sure each surface is it’s
own boundary by selecting the Create a
Boundary for Each Part Surface.
• Make sure the fluid part is selected
• Change the name of Region to fluid (or air)
• Click Apply
• Click Close
• Rename the Region to fluid (or air) if it wasn’t
assigned when the region was created.
Set Up the Boundary Conditions
• Expand the Boundaries node of the fluid region
• Expand the cylinder surface
» Select Thermal Specification
» In the Properties pane, change Adiabatic to Heat Source
» Expand the Physics Values node. (It just appeared.)
» Select Heat Source and set Value to 15 W in the Properties Pane
• Select the inlet surface, and change Wall to Velocity Inlet in the Properties Pane
» Select Thermal Specification
» Expand the Physics values node and set Static Temperature to 20C
» Set Velocity Magnitude to 0.075 m/s
• Select the outlet surface and change Wall to Outlet
• Select symmetry_edges and change Wall to Symmetry Plane
• Select z_zero_face and change Wall to Symmetry Plane
• Ignore the z_max_face surface. It won’t be part of the solution domain.
StarCCM+ Tutorial: Laminar convection from a cylinder in 2D 6

Set Up the Mesh Pipeline and Create the Mesh


Creation of a 2D mesh requires two separate processes
• Badge for 2D
• Automated 2D mesh
Badging for 2D identifies the planar surfaces while define the 2D domains for the analysis. Once
the 2D planes are badged, the Automatic 2D mesh process is how the type of mesh (polygon,
rectangular) and the size of mesh elements.

Badge for 2D
• Expand the main Geometry node at the top of the simulation tree.
• Right-click on Operations and select New " Mesh " Badge for 2D Meshing
» In the dialog box, select fluid (or whatever name you gave to the part)
» Click OK. Note: you could also check the box labeled Execute Operation Upon
Creation before clicking OK. We’ll do that manually in the next step.
» The preceding steps create a new node under the Operations node.
• To make result of the next step apparent, expand the Surfaces node under the fluid node
under the Parts node. The left side of Figure 2 on the next page shows the appearance of
the simulation tree before the badging operation is executed.
• Right click on the newly created Badge for 2D Meshing node and select Execute. The
right side of Figure 2 shows the appearance of the simulation tree after the badging
operation.
• Select nodes under the Surfaces node of the fluid part and inspect the Properties pane:
» The icon for the cylinder node has changed from filled gray to a red outline. In the
Properties pane, cylinder node has a tag, [Boundary (2D Mesh)]
» The icon for the z_max_face node has not changed
» The icon for the z_zero_face node has changed from filled gray to filled red, with an
additional dot. In the Properties pane, the z_zero_face node has a tag, [Region (2D
Mesh)].
StarCCM+ Tutorial: Laminar convection from a cylinder in 2D 7

Figure 2 Appearance of nodes in the simulation tree before (left) and after (right)
executing the Badge for 2D Meshing operation.

Create the Mesh Pipeline


• Right-click the Operations node and select New " Mesh " Automated Mesh (2D).
• Select the fluid node in the dialog box
• At the bottom of the dialog box make the following selections
» Polygonal Mesher
» Prism Layer Mesher
» Click OK
• A new Automated Mesh (2D) node appears under the Operations node. Expand that node.
» Expand the Default Controls node
» Change the Base Size to 0.5 cm
» Leave other values at their default setting for now

Generate the Mesh and Visualize It


• Right-click on the Automated Mesh (2D) node and select Execute.
• Open a new Mesh Scene
• In the Parts node, select all of the fluid Region
Figure 3 shows two views of the 2D mesh. Note that there are no prism cells on the left and right
boundaries because a symmetry boundary does not need to resolve a boundary layer.
StarCCM+ Tutorial: Laminar convection from a cylinder in 2D 8

Figure 3 Full domain 2D mesh (left) with base size of 0.5. cm. Close-up of mesh
near the cylinder (right) showing the two prism layers adjacent to the solid
surface.

Run the model

Set up solution controls


• Expand the Stopping Criteria node and set the Maximum Steps to 200 (as a precaution).
You can always manually stop the simulation by clicking on the red square in the menu
bar at the top of the main window.
• Right-click on Stopping Criteria and select New Monitor Criteria …
» Select Continuity and click OK
» Click on the Minimum Limit sub-node and verify that the Minimum Value is 1.0E-4.
Keep that value.

Run the model


Figure 4 shows the residual history. The model converges quickly.
StarCCM+ Tutorial: Laminar convection from a cylinder in 2D 9

Figure 4 Residual history for mesh with base size of 0.5 cm.

Visualize the solution


• Open a new Scalar scene to display the temperature
» Set the scalar field function to Temperature
» Set the Units of the scalar field to C
» Click on the color bar node and set the Orientation to Vertical and move the color bar
to a convenient location beside the surface display.
» Set the Label Format for the color bar to %0#6.0f
» Click on the Scalar 1 node and notice the “Automatic” Contour Style in the
Properties pane, which creates the image on the left side of Figure 5.
» Changing the Contour Style to “Smooth Filled” produces the image on the right side
of Figure 6.
• Open a new Vector Scene
» Set the Display Mode to Line Integral Convolution
» Click on the color bar node and set the Orientation to Vertical and move the color bar
to a convenient location beside the surface display.
» Set the Label Format for the color bar to %0#6.3g
» Zoom in to create the image in Figure 7.
StarCCM+ Tutorial: Laminar convection from a cylinder in 2D 10

Figure 5 Two representations of the temperature field for the coarse mesh (0.5 cm
base size) and 15W heat input at the cylinder with inlet velocity of 0.075
m/s. The left image shows the “Automatic” contour style. The right image
shows the “Smooth Filled” contour style.

Figure 6 Velocity field near the cylinder for coarse mesh (0.5 cm base size) and
15W heat input with inlet velocity of 0.075 m/s. The lack of symmetry
suggests that further grid refinement is necessary.
StarCCM+ Tutorial: Laminar convection from a cylinder in 2D 11

Create Reports to Extract Quantitative Data


The Reports feature is used to extract quantitative data from the simulation. The data can be
displayed in the Output pane, and it can also be used to create additional computed results. We
will create a series of reports to summarize the total heat transfer, compute the average cylinder
temperature and (with additional intermediate reports) compute the heat transfer coefficient from
the cylinder.

Heat Transfer Report


A heat transfer report for all surfaces in the domain shows where the energy enters and leaves the
domain, and how well the overall energy balance is obtained.
• Right-click on the Reports node of the simulation tree and select New Report " [Element
Count … Volume Standard Deviation] " Heat Transfer
• Select the newly created Heat Transfer 1 node and in the Properties pane select the fluid
region as the list of Parts for the report.
• Right-click on the (newly created) Heat Transfer 1 node and select Run Report to print the
following in the Output pane. Note: you may need to scroll to the bottom of the Output
pane to see this information.
Heat Transfer of Boundary Heat Transfer on Volume Mesh

Part Value (W) Errors


--------------------------- ------------- -------
fluid: fluid.cylinder -1.500000e+01
fluid: fluid.inlet -7.838780e+03
fluid: fluid.outlet 7.853773e+03
fluid: fluid.symmetry_edges 0.000000e+00
fluid: fluid.z_max_face 0.000000e+00 no data
fluid: fluid.z_zero_face 0.000000e+00 no data
--------------------------- ------------- -------
Total: -6.768833e-03

The heat transfer report shows that 15 W has entered the fluid domain – heat flow is positive
when out of the domain. The energy flows through the inlet and outlet boundary are the enthalpy
flows. Since the enthalpy is defined from an arbitrary reference temperature, only the difference
in enthalpy flows mater. The Total at the bottom of the report shows that the difference in the
inflow/outflow energy flows is nearly balanced (to within 0.007 W) with the energy input at the
cylinder.

Average Cylinder Temperature


The average cylinder temperature will be used to compute the heat transfer coefficient on the
cylinder. It is also an interesting piece of data in its own right.
• Right-click on the Reports node of the simulation tree and select New Report " [Element
Count … Volume Standard Deviation] " Surface Average
• Rename the newly created Surface Average 1 node as Cylinder temperature
• In the Properties Pane select the Temperature as the Field Function.
• In the Properties pane, change the Units to C.
StarCCM+ Tutorial: Laminar convection from a cylinder in 2D 12

• In the list of Parts, expand the Regions node and select fluid.cylinder (only).
• Right click on the Cylinder temperature node and select Run Report to print the following
in the Output pane
Surface Average of Temperature on Volume Mesh

Part Value (C)


--------------------- ------------
fluid: fluid.cylinder 4.579834e+01
--------------------- ------------
Total: 4.579834e+01

Inlet Temperature
The inlet temperature is known from the boundary condition. By creating a report that calculates
the inlet temperature, we have a value that can be used in the expression for computing the heat
transfer coefficient. Perhaps there is a better way to obtain this value.
• Right-click on the Reports node of the simulation tree and select New Report " [Element
Count … Volume Standard Deviation] " Mass Flow Averaged
• Rename the newly created Mass Flow Averaged 1 node as Inlet temperature
• In the Properties Pane select the Temperature as the Field Function.
• In the Properties pane, change the Units to C.
• In the list of Parts, expand the Regions node and select fluid.inlet (only).
• Right click on the Inlet temperature node and select Run Report to print the following in
the Output pane
Mass Flow Average of Temperature on Volume Mesh

Part Value (C)


------------------ ------------
fluid: fluid.inlet 2.000000e+01
------------------ ------------
Total: 2.000000e+01

Cylinder Heat Transfer


• Right-click on the Reports node of the simulation tree and select New Report " [Element
Count … Volume Standard Deviation] " Surface Integral
• Rename the newly created Surface Integral 1 node as Cylinder Heat Transfer
• In the Properties Pane select the Boundary Heat Flux as the Field Function.
• In the list of Parts, expand the Regions node and select fluid.cylinder (only).
• Right click on the Cylinder Heat Transfer node and select Run Report to print the
following in the Output pane (see next page)
StarCCM+ Tutorial: Laminar convection from a cylinder in 2D 13

Surface Integral of Boundary Heat Flux on Volume Mesh

Part Value (W)


--------------------- -------------
fluid: fluid.cylinder -1.500000e+01
--------------------- -------------
Total: -1.500000e+01

This is what we expect. An integral of the heat flux on the cylinder surface equals the total heat
transfer rate of 15 W prescribed as the boundary condition on the cylinder.

Cylinder Area
The cylinder will be used to compute the heat transfer coefficient on the cylinder.
• Right-click on the Reports node of the simulation
tree and select New Report " [Element Count …
Volume Standard Deviation] " Sum
• Rename the newly created Sum 1 node as
Cylinder Area
• In the Properties Pane select the Area Magnitude
as the Field Function. (expand the Area node)
• In the list of Parts, expand the Regions node and
select fluid.cylinder (only).
• Right click on the Cylinder Area node and select
Run Report to print the following in the Output
pane
Sum of Area: Magnitude on Volume Mesh

Part Value (m^2)


--------------------- ------------
fluid: fluid.cylinder 1.250267e-01
--------------------- ------------
Total: 1.250267e-01

The value of area is per unit length into the page. The value returned by the report is
approximately equal to the perimeter of the cylinder times one meter into the page.
𝑃 = 𝜋𝑑 = π(0.04𝑚) = 0.12566𝑚
The discrepancy between 0.1250267 and 0.12566 is an error of 0.5% and is due to approximating
the shape of the cylinder surface with flat-side polygon cells.

Heat Transfer Coefficient


We now have enough report results to compute the heat transfer coefficient, which is achieved
with an Expression report.
• Right-click on the Reports node of the simulation tree and select New Report " [Element
Count … Volume Standard Deviation] " Expression
• Rename the newly created Expression 1 node as Heat transfer coefficient
StarCCM+ Tutorial: Laminar convection from a cylinder in 2D 14

• In the Properties Pane select the […] for the Definition parameter, which opens up the
window shown Figure 7. The top panel in Figure 7 is used to create the expression.
• Scroll vertically to find a variables and double-click on the variable name to enter it into
the expression. Use that procedure to create the following expression (which is wrapped
over multiple lines because of the length of the variable names).
${CylinderheattransferReport}/${CylinderareaReport}/(${CylindertemperatureR
eport}-${InlettemperatureReport})

• Click OK to close the Expression editor


• Right click on the Heat transfer coefficient node and select Run Report to print the
following in the Output pane
${Cylinder heat transfer}/${Cylinder area}/(${Cylinder temperature}-${Inlet
temperature}) = -4.650469e+00

The result is a negative number because the heat flow is a negative 15 W (into the domain).
According to this computation, the heat transfer coefficient on the cylinder is 4.65 W/(m2 C).
The correlation of Churchill and Bernstein1
(#/%)
".$%&e! (r (#/') &e (4/2) (./4)
!
Nu! = 0.3 + (%/') (#/()
41 + 5%2%,""" 6 7
*+,("../(r) 1

gives Nud = 7.72 and h = 4.49 W/(m2 C), which is in excellent agreement with the computed
results from StarCCM+ on the coarse mesh.

Figure 7 Tool for editing an Expression report

1
Principles of Heat and Mass Transfer, 7th ed., Frank P. Incropera, David P. Dewitt, Theodore L. Bergman and
Adrienne S. Lavine, 2003, Wiley and Sons. Equation 7.54, p. 458.
StarCCM+ Tutorial: Laminar convection from a cylinder in 2D 15

Comparison of Thermal Boundary Conditions


The thermal boundary conditions of the model can be changed from uniform Q on the cylinder to
uniform T on the cylinder. Table 2 shows the comparison of results for the coarse mesh solution.
Although both the nominal heat transfer rate and nominal cylinder temperature are almost equal,
the heat transfer coefficient with the uniform T boundary condition is 8.6% higher. The
difference in heat transfer coefficient is due to the variation in temperature around the cylinder.
The uniform T case will have higher gradients in the fluid adjacent to the cylinder around the
circumference. Extracting the data for an XY plot is on GWR’s to-do list.

Table 2 Comparison of heat transfer coefficients for uniform Q and


uniform T boundary conditions.
Uniform Q = 15 W Uniform T = 45 °C
Total heat transfer (W) 15 15.78
Wall temperature (°C) 45.80 45
Error in energy balance (W) 0.0068 0.0071
h (W/(m2 °C) ) 4.65 5.05

Further Exploration
You can continue to investigate this model with the following refinements.
• Create a volume mesh refinement around the cylinder surface and wake.
• With the preceding step and additional mesh refinement (e.g. prism layers), determine the
asymptotic mesh-independent solution for heat transfer coefficient.
• Vary the inlet velocity within the range of laminar flows
• Extent the computation to turbulent flow. You may need to extend the outflow boundary if
wake effects cause significant reverse flow at the outlet.
• Extend the model to buoyancy-driven flow.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy