14 Free Convection of Air Over an Isothermal Cylinder.pdf

25
Free Conv ection of Air Over an Isoth ermal Cylin der ME433 COMSOL INSTRUCTTIONS FREE CONVECTION OF AIR OVER AN ISOTHERMAL CYLINDER Problem Statement A solid horizontal cylinder 4 cm in diameter held at constant temperature T  s is brought to a room – temperature air environment. Surrounding air temperature T is lower than plate surface temperature T  s . Due to temperature difference between air and the cylinder, the density of air near the cylinder starts to decrease. Due to the presence of earth’s gravitational acceleration field, air begins to rise near the surface of the cylinder forming convection currents. Of general interest is to learn how to use COMSOL to generate plots of velocity and temperature in free convection over a horizontal cylinder.  Free Convection over a Horizontal Cylinder Setup Known quantities: Geometry: horizontal cylinder Fluid: Air T  s = 100 ºC T = 20 ºC  D = 4 cm Observations  This is a free convection, external flow problem. Considered geometry is a horizontal cylinder. The cylinder is held at constant temperature T  s .  Velocity and temperature fields are coupled in free convection. Therefore, a multiphysics model involving steady state Navier – Stokes and general heat transfer modes must be setup and coupled in COMSOL. Boussinesq approximation will be used to model air density changes induced by temperature field.  Subject to validation conditions, correlation equations from chapter 8 are applicable. For isothermal horizontal cylinders, local and average Nusselt numbers are the quantities sought.  The problem is symmetric about a vertical line that goes through the center of the cylinder. This fact will be utilized by solving the problem for half of the geometry. - 1 - 

Transcript of 14 Free Convection of Air Over an Isothermal Cylinder.pdf

7/30/2019 14 Free Convection of Air Over an Isothermal Cylinder.pdf

http://slidepdf.com/reader/full/14-free-convection-of-air-over-an-isothermal-cylinderpdf 1/25

Free Convection of Air Over an Isothermal Cylinder ME433 COMSOL INSTRUCTTIONS

FREE CONVECTION OF AIR OVER AN ISOTHERMAL CYLINDER

Problem Statement

A solid horizontal cylinder 4 cm in diameter held at constant temperature T  s is brought to

a room – temperature air environment. Surrounding air temperature T ∞ is lower than platesurface temperature T  s. Due to temperature difference between air and the cylinder, the

density of air near the cylinder starts to decrease. Due to the presence of earth’s

gravitational acceleration field, air begins to rise near the surface of the cylinder formingconvection currents. Of general interest is to learn how to use COMSOL to generate plots

of velocity and temperature in free convection over a horizontal cylinder.

 Free Convection over a Horizontal Cylinder SetupKnown quantities:

Geometry: horizontal cylinder Fluid: Air 

T  s = 100 ºC

T ∞ = 20 ºC D = 4 cm

Observations 

  This is a free convection, external flow problem. Considered geometry is a

horizontal cylinder. The cylinder is held at constant temperature T  s.

  Velocity and temperature fields are coupled in free convection. Therefore, a

multiphysics model involving steady state Navier – Stokes and general heattransfer modes must be setup and coupled in COMSOL. Boussinesq

approximation will be used to model air density changes induced by temperature

field.

  Subject to validation conditions, correlation equations from chapter 8 are

applicable. For isothermal horizontal cylinders, local and average Nusselt

numbers are the quantities sought.

  The problem is symmetric about a vertical line that goes through the center of the

cylinder. This fact will be utilized by solving the problem for half of thegeometry.

- 1 - 

7/30/2019 14 Free Convection of Air Over an Isothermal Cylinder.pdf

http://slidepdf.com/reader/full/14-free-convection-of-air-over-an-isothermal-cylinderpdf 2/25

Free Convection of Air Over an Isothermal Cylinder ME433 COMSOL INSTRUCTTIONS

Assignment

1.  Verify applicability of equation 8.35a for this problem. Calculate average heat

transfer coefficient using this correlation.

2.  Use COMSOL to determine and show 2D colormaps of velocity and temperaturefields. Use arrows to represent velocity vector field.

3.  Use COMSOL to plot 2D colormap of the density field.

4.  Use COMSOL to plot vertical velocity u(x o , y) and temperature T(x o , y) on

at xo = 0 .0.055 0.16  y

 

5.  Use COMSOL to plot and extract numerical data for cylinder surface heat flux

,  s oq r  on  90 90  . Use Newton’s law of cooling and extracted

temperature data to determine COMSOL local surface heat transfer coefficient

h(r o , θ  ). [Note: In this instruction set, part of this assignment question will bedone with MATLAB, but you are free to use any software of your choice]

6.  Use COMSOL to compute average heat transfer coefficient for the cylinder.

Compare this value with analytical results from question 1.

7.  [Extra Credit]: XXYY??

- 2 - 

7/30/2019 14 Free Convection of Air Over an Isothermal Cylinder.pdf

http://slidepdf.com/reader/full/14-free-convection-of-air-over-an-isothermal-cylinderpdf 3/25

Free Convection of Air Over an Isothermal Cylinder ME433 COMSOL INSTRUCTTIONS

Modeling with COMSOL Multiphysics

This model analyzes free convection process outside a horizontal cylinder. The cylinder 

is held at a constant temperature T  s, which is higher than the surrounding temperature T ∞.

As the hot cylinder heats air near its surface, air starts rising due to changes in its density.

This is called a “free convection” or “natural convection” process. When modeling this process, consider a rectangular subdomain that consists of air. The 4 cm diameter 

cylinder is located on the left vertical wall. This wall is a symmetry line. See the diagram

in “Problem Statement” for this modeling geometry.

The lift force responsible for natural convection process can be expressed in terms of 

local density change of air as f  y = (  ρ∞ –   ρ )g. The term  ρ∞ is the density far away from hotcylinder where the cylinder has no influence on the air, g is gravitational acceleration

constant and  ρ represents variable density.

Boussinesq approximation can be used satisfactorily in this model to represent variable

density field. We will compute  ρ according to: ρ = ρ∞[1 – (T –  T∞)/T∞]

With these assumptions and approximations, we are now ready to begin the modeling procedure.

MODEL NAVIGATOR 

To start working on this problem, we first need to enable two application modes in the

model navigator to create a Multiphysics model. The correct application modes are: (1)General Heat Transfer, and (2) Weakly Compressible Navier – Stokes. These modes will

 be responsible for setting up and calculating temperature and velocity distribution fields,

respectively.

For this setup:

1.  Start “COMSOL Multiphysics”.

2.  From the list of application modes, select “Heat Transfer Module General Heat

Transfer  Steady – state analysis”.

3.  Click the “Multiphysics” button.

4.  Click the “Add” button.

5.  From the list of application modes, select “Heat Transfer Module Weakly

Compressible Navier – Stokes Steady – state analysis”.

6.  Click the “Add” button.

7.  Click “OK”.

- 3 - 

7/30/2019 14 Free Convection of Air Over an Isothermal Cylinder.pdf

http://slidepdf.com/reader/full/14-free-convection-of-air-over-an-isothermal-cylinderpdf 4/25

Free Convection of Air Over an Isothermal Cylinder ME433 COMSOL INSTRUCTTIONS

OPTIONS AND SETTINGS: DEFINING CONSTANTS

Continue by creating a small database of constants the model will use.

1.  From the “Options” menu select “Constants”.

2.  Define the following names and expressions:

NAME EXPRESSION VALUE DESCRIPTION

 Tinf 273.15+20[K] 293.15[K] Temperature Far Away

dT 10[K] 10[K] Temperature Step

rho0 1.2042[kg/m 3] 1.2042[kg/m3] Air Density (20ºC)

mu_air 18.17e-6[kg/(s*m)] (1.817e-5)[kg/(m·s)] Air Dynamic Viscosity (20ºC)

k_air 0.02564[W/(m*degC)] 0.02564[W/(m·K)] Air Conductivity (20ºC)

Cp_air 1006.1[J /(kg*degC)] 1006.1[J /(kg·K)] Air Heat Capacity (20ºC)

g 9.81[m/s 2] 9.81[m/s2] Acc. Due to Gravity

3.  Click “OK”.

COMSOL automatically determines correct units under the “Value” column. If it doesnot, you are most likely entering wrong expressions. Carefully check the expression you

typed and make corrections, if necessary. The description column is optional and can be

left blank. It is presented here to give a short description of the constants.

- 4 - 

7/30/2019 14 Free Convection of Air Over an Isothermal Cylinder.pdf

http://slidepdf.com/reader/full/14-free-convection-of-air-over-an-isothermal-cylinderpdf 5/25

Free Convection of Air Over an Isothermal Cylinder ME433 COMSOL INSTRUCTTIONS

GEOMETRY MODELING 

In this step, we will create a 2 – dimensional geometry that will be used as a model in our 

 problem. According to problem statement, we will need to create a rectangle with a semi – circular cut on the left wall. The cut will represent half of the horizontal cylinder. The

entire geometry must be positioned so that the origin coincides with the center of the cut.This composite geometry is made as follows,

1.  In the “Draw” menu, select “Specify Objects Rectangle …”

2.  Enter following rectangle dimensions for “R1”.

R1

WIDTH 0.1

HEIGHT 0.215

BASE Corner

X 0

Y -0.055

3.  Click “OK” to close “Rectangle” definition window.

4.  Click on “Zoom Extents” button in the main toolbar to zoom into thegeometry.

5.  In the “Draw” menu, select “Specify Objects Circle …”

6.  In circle setup window, enter the radius of “0. 02” and click “OK”.

7.  Select “Draw Create Composite Object” option.

8.  In the “Set formula” field, type “R1–C1” (w/o quotation marks) and click “OK”.

You should see your finished modeling geometry now in the

main program window. The left wall should have a semi – circular cut. The composite geometry should also be

 positioned so that the origin coincides with the center of thecut, as shown here.

- 5 - 

7/30/2019 14 Free Convection of Air Over an Isothermal Cylinder.pdf

http://slidepdf.com/reader/full/14-free-convection-of-air-over-an-isothermal-cylinderpdf 6/25

Free Convection of Air Over an Isothermal Cylinder ME433 COMSOL INSTRUCTTIONS

PHYSICS SETTINGS 

Physics settings in COMSOL consist of two parts: (1) Subdomain settings and (2)

 boundary conditions. The subdomain settings let us specify material properties, initialconditions, modes of heat transfer (i.e. conduction and/or convection). The boundary

conditions settings are used to specify what is happening at the boundaries of thegeometry. In this model, we will have to specify and couple physics settings for the flow

of air and heat transfer. Let us begin by specifying Boussinesq approximation to modelair density – temperature dependence.

We use Boussinesq approximation to achieve this as follows:

1.  In “Options” menu, select “Expressions Subdomain Expressions”.

2.  Select subdomain 1 in the “Subdomain selection” section.

3. 

Type “r ho” in the “Name” field and “rho0*(1- ( T- Ti nf ) / Ti nf ) ” in the expressionfield.

NAME EXPRESSION UNIT

rho rho0*(1-(T-Tinf)/Tinf) [kg/m3]

4.  Click “OK” to close “Subdomain Expressions” setup window.

COMSOL automatically determines correct units under the “Unit” column. If it does not,

you are most likely entering wrong expression. Carefully check the expression you typed

and make corrections, if necessary.

Let us now proceed with setup of subdomain and boundary settings for flow field andheat transfer.

Weakly Compressible Navier – Stokes Subdomain Settings

1.  From the “Physics” menu select “Subdomain Settings” (equivalently, press F8).

2.  Select subdomain 1 in the “Subdomain selection” section.

3.  Type “r ho” and “mu_ai r ” in the fields for density  ρ and dynamic viscosity η.

4.  Type “g*( r ho0- r ho)” in the “F  y” field.

5.  Click “OK”.

- 6 - 

7/30/2019 14 Free Convection of Air Over an Isothermal Cylinder.pdf

http://slidepdf.com/reader/full/14-free-convection-of-air-over-an-isothermal-cylinderpdf 7/25

Free Convection of Air Over an Isothermal Cylinder ME433 COMSOL INSTRUCTTIONS

 Notice that the buoyant force F  y is set up in accordance with the condition described

on page 3. This force setup (and density field variation) is responsible for driving the

warm air up and making free convection possible. If the plate was in an environment

where g  ≈ 0, (such as inside the International Space Station), the air would not rise.Incidentally, this might be part of the reason why astronauts and cosmonauts do not

have conventional cookware in space.

Weakly Compressible Navier – Stokes Boundary Settings

1.  From the “Physics” menu open the “Boundary Settings” (F7) dialog box.

2.  Apply the following boundary conditions:

BOUNDARIES BOUNDARY TYPE BOUNDARY CONDITION COMMENTS

1, 6, 7 Wall No Slip

2, 4, 5 Open boundary Normal Stress Verify that field “f 0” is set to “0”

3 Symmetry boundary

3.  Click “OK” to close the boundary settings window.

The “no – slip” condition applied to boundaries 1, 6, and 7 assumes that velocity is zero

at the wall of the cylinder. The short vertical boundary below the cylinder is set to “no – 

slip” condition for the reasons of successful convergence. Symmetry boundary signifiesthat an identical process takes place to the left outside the model space. The remaining

 boundaries have the “open” boundary condition, meaning that no forces act on the fluid.

The “open” boundary condition defines the assumption that computational domain

extends to infinity.

- 7 - 

7/30/2019 14 Free Convection of Air Over an Isothermal Cylinder.pdf

http://slidepdf.com/reader/full/14-free-convection-of-air-over-an-isothermal-cylinderpdf 8/25

Free Convection of Air Over an Isothermal Cylinder ME433 COMSOL INSTRUCTTIONS

General Heat Transfer Subdomain Settings 

1.  From “Mulptiphysics” menu, select “1 General Heat Transfer (htgh)” mode.

2.  From the “Physics” menu, select “Subdomain Settings” (F8).

3.  Select “Subdomain 1” in the subdomain selection section.

4.  Enter “k_ai r ”, “r ho” and “Cp_air” in the k ,  ρ, and C  p fields, respectively.

5.  Switch to “Convection” tab and check “Enable convective heat transfer” option.

6.  Type “u” and “v” in the u and v fields, respectively.

7.  Click “OK” to close the Subdomain Settings window.

- 8 - 

7/30/2019 14 Free Convection of Air Over an Isothermal Cylinder.pdf

http://slidepdf.com/reader/full/14-free-convection-of-air-over-an-isothermal-cylinderpdf 9/25

Free Convection of Air Over an Isothermal Cylinder ME433 COMSOL INSTRUCTTIONS

General Heat Transfer Boundary Conditions: 

1.  From the “Physics” menu open the “Boundary Settings” (F7) dialog box.

2.  Apply the following boundary conditions:

BOUNDARY BOUNDARY CONDITION COMMENTS

1, 3 Insulation/Symmetry

2, 5 Temperature Enter “ Ti nf ” in T0 field

6, 7 Temperature Enter “ Ti nf +dT” in T0 field

4 Convective flux

3.  Click “OK” to close Boundary Settings window.

The model keeps hot cylinder (boundaries 6, 7) at a constant temperature T  s (we will

slowly raise temperature step dT with parametric solver to 80ºC so that solver is able toconverge system of nonlinear equations. Note that when dT = 80ºC, temperature at the

cylinder is 100ºC, as given in the problem statement). The short boundaries below and

above the vertical plate (1 and 3) are thermally insulated so that no conduction or convection occurs normal to the boundaries. On the bottom and the right boundaries (2

and 5), the model sets temperature equal to room temperature T ∞. Air rises upwards

through the upper horizontal boundary (5). Application of “Convective Flux” boundarycondition assumes that convection dominates the transport of heat at this boundary.

MESH GENERATION

The following steps describe how to generate a mesh that properly resolves the velocity

field near the cylinder and symmetry boundaries without using an overly dense mesh in

the far field.

1.  In the “Mesh” menu, select “Free Mesh Parameters” (F9).

2.  Switch to “Boundary” tab

3.  Select boundaries 1, 3, 6, and 7 in the boundary selection section while holdingthe “Control (ctrl)” key on your keyboard.

4.  Enter “1e- 3” in the “Maximum element size” edit field.

5.  Switch to the “Point” tab.

- 9 - 

7/30/2019 14 Free Convection of Air Over an Isothermal Cylinder.pdf

http://slidepdf.com/reader/full/14-free-convection-of-air-over-an-isothermal-cylinderpdf 10/25

Free Convection of Air Over an Isothermal Cylinder ME433 COMSOL INSTRUCTTIONS

6.  Select point 2.

7.  Enter “2e- 5” in the “Maximum element size” edit field.

8.  Click “Remesh”.

9.  Click “OK” to close “Free Mesh Parameters” window.

You should get the following triangular mesh:

We are now ready to compute our solution.

- 10 - 

7/30/2019 14 Free Convection of Air Over an Isothermal Cylinder.pdf

http://slidepdf.com/reader/full/14-free-convection-of-air-over-an-isothermal-cylinderpdf 11/25

Free Convection of Air Over an Isothermal Cylinder ME433 COMSOL INSTRUCTTIONS

COMPUTING AND SAVING THE SOLUTION

In this step we define the type of analysis to be performed. We are interested in stationary

analysis here, which we previously selected in the Model Navigator. However, the problem is highly non – linear. Several solver settings must be changed for successful

convergence.

To easily find an initial guess for the solution, start by solving the problem for a higher viscosity than the true value for air. Then decrease the viscosity until you reach the true

value for air. Make the transition from the start value to the true value using the

 parametric solver in the following way:

1.  In “Solve” menu, select “Solver Parameters” (F11).

2.  Switch to “Parametric” solver.

3. 

Enter “mu_ai r ” in the field for “Name of parameter”.

4.  Enter “1e- 4 1. 817e- 5” in the “List of parameter values” edit field.

5.  Switch to “Stationary” tab and enable “Highly nonlinear problem” check box.

6.  Switch to “Advanced” tab and select “None” from the “Type of scaling” list.

- 11 - 

7/30/2019 14 Free Convection of Air Over an Isothermal Cylinder.pdf

http://slidepdf.com/reader/full/14-free-convection-of-air-over-an-isothermal-cylinderpdf 12/25

Free Convection of Air Over an Isothermal Cylinder ME433 COMSOL INSTRUCTTIONS

7.  Click “OK” to close Solver Parameters window.

8.  From the “Solve” menu select “Solve Problem”. (Allow few minutes for solution)

This solution serves as the initial value for solving the model with higher plate

temperatures, which you perform with these steps:

9.  From the “Solve” menu select the “Solver Manager”.

10. Click “Store Solution” button on the bottom of the window.

11. Select “1. 817e- 5” as the “Parameter value” for solution to store.

12. Click “OK”.

13. In the “Initial value” section click the “Stored solution” radio button.

14. Click “OK” to close the Solver Manager.

15. From the “Solve” menu choose “Solver Parameters” (F11).

16. Enter “dT” in the field for “Name of parameter”.

17. Enter “10: 10: 80” in the “List of parameter values” edit field.

18. Switch to “Stationary” tab.

19.  Disable “Highly nonlinear problem” check box.

20. Click “OK” to close Solver parameters window.

- 12 - 

7/30/2019 14 Free Convection of Air Over an Isothermal Cylinder.pdf

http://slidepdf.com/reader/full/14-free-convection-of-air-over-an-isothermal-cylinderpdf 13/25

Free Convection of Air Over an Isothermal Cylinder ME433 COMSOL INSTRUCTTIONS

 Now we can use the initial value solution to find solutions to higher surface temperatures.

21. From the “Solve” menu select the “Solver Manager”. (Allow few minutes for 

solution)

22. Save your work on desktop by choosing “File

Save”. Name the file accordingto the naming convention given in the “Introduction to COMSOL Multiphysics”

document.

The result that you obtain should resemble the following surface color maps. By default,

temperature field is shown for the case when cylinder surface temperature is 100ºC, as

asked in problem statement.

By default, your immediate result will be given in Kelvin instead of degrees Celsius for temperature field. Furthermore, it will be colored using a “jet” colormap and the velocityfield (represented by arrows in the above) will not be shown. We will use distinct

colormap options to represent air velocity and temperature fields. The next section

(Postprocessing and Visualization) will help you in determining and plotting quantities

asked for in the assignment questions. We will then use MATALB to compute and plotlocal heat transfer coefficient h(r o , θ  ) from COMSOL surface heat flux data.

- 13 - 

7/30/2019 14 Free Convection of Air Over an Isothermal Cylinder.pdf

http://slidepdf.com/reader/full/14-free-convection-of-air-over-an-isothermal-cylinderpdf 14/25

Free Convection of Air Over an Isothermal Cylinder ME433 COMSOL INSTRUCTTIONS

POSTPROCESSING AND VISUALIZATION

After solving the problem, we would like to be able to look at the solution. COMSOL

offers us a number of different ways to look at our temperature (and other) fields. In this problem we will deal with 2D color maps, velocity (and other) vector fields, and plotting

and extracting numerical data for surface heat flux , 

 s oq r  . We will also use COMSOLto compute the average heat transfer coefficient for the cylinder. You will then use

MATLAB and COMSOL data to determine and plot local surface heat transfer 

coefficient h(r o , θ  ). 

 Displaying T(x, y) and Vector Field V(x, y)

Let us first change the unit of temperature to degrees Celsius:

1.  From the “Postprocessing” menu, open “Plot Parameters” dialog box (F12).

2.  Under the “Surface” tab, change the unit of temperature to degrees Celsius from

the drop – down menu in the “Unit” field.

3.  Change the “Colormap” type from “jet” to “hot”.

4.  Click “Apply” to refresh main view and keep the “Plot Parameters” window open.

- 14 - 

7/30/2019 14 Free Convection of Air Over an Isothermal Cylinder.pdf

http://slidepdf.com/reader/full/14-free-convection-of-air-over-an-isothermal-cylinderpdf 15/25

Free Convection of Air Over an Isothermal Cylinder ME433 COMSOL INSTRUCTTIONS

- 15 - 

The 2D temperature distribution will be displayed using the “hot” colormap type with

degrees Celsius as the unit of temperature. Let’s now add the velocity vector field V(x,y).

5.  Switch to the “Arrow” tab and enable the “Arrow plot” check box.

6.  Choose “Velocity field” from “Predefined quantities”.

7.  Enter “20” in the “Number of points” for both “x” and “y” fields.

8.  Press the “Color” button and select a color you want the arrows to be displayed in.

(Note: choose a color that produces good contrast. Green is a good choice here.)

9.  Click “Apply” to refresh main view and keep the “Plot Parameters” window open.

At this point, you will see a similar plot as shown on page 13. It is a good idea to save

this colormap for future use. Before you do save it, however, experiment with the“Number of points” field in “Plot Parameters” window and adjust the velocity vector 

field to what seems the best view to you. Put “40” for the “x” field and update your view by pressing “Apply” button. Notice the difference in velocity vector field representation.

Try other values.

7/30/2019 14 Free Convection of Air Over an Isothermal Cylinder.pdf

http://slidepdf.com/reader/full/14-free-convection-of-air-over-an-isothermal-cylinderpdf 16/25

Free Convection of Air Over an Isothermal Cylinder ME433 COMSOL INSTRUCTTIONS

- 16 - 

You may also want to see other quantities as vector fields. Available quantities are: (1)

Temperature gradient, (2) Conductive heat flux, (3) Convective heat flux, and (4) Totalheat flux. To see these quantities represented by a vector field:

10. Choose the quantity you wish to plot from “Predefined quantities”.

11. Click “Apply”.

12. Click “OK” when you are done displaying these quantities to close the “Plot

Parameters” window.

 Saving Color Maps 

After you have selected a view that shows the results clearly, you may want to save it asan image for future discussion. This may be done as follows:

1.  Go to the “File” menu and select “Export Image”. This will bring up an“Export Image” window.

For a 4” by 6” image, acceptable image quality settings are given in the figure below. If 

you need higher image quality, increase the DPI value.

2.  Change your “Export Image” value settings to the ones in the above figure.

3.  Click the “Export” button.

4.   Name and save the image.

7/30/2019 14 Free Convection of Air Over an Isothermal Cylinder.pdf

http://slidepdf.com/reader/full/14-free-convection-of-air-over-an-isothermal-cylinderpdf 17/25

Free Convection of Air Over an Isothermal Cylinder ME433 COMSOL INSTRUCTTIONS

- 17 - 

 Displaying Velocity as a Colormap

1.  From the “Postprocessing” menu, open “Plot Parameters” dialog box (F12).

ce” tab.

2.  Under the “Arrow” tab, disable the “Arrow plot” checkbox.

3.  Switch to “Surfa

 

4.  From “Predefined quantities”, select “Velocity field”.

5.  Change the “Colormap” type from “hot” to “jet”.

ain view and keep the “Plot Parameters” window open.

“jet” colormap.

 Displaying Air Density Field Colormap

With the “Plot Parameters” window open, ensure that you are under the “Surface” tab,

7.  Type “r ho” in “Expression” field (without quotation marks).

6.  Click “Apply” to refresh m

 

The 2D Velocity distribution will be displayed using the 

nit will change automatically)

t displays variations in air’s density  ρ. Note the values

with Appendix C of your textbook.

8.  Click “Apply”. (Note: The u 

These steps produce a colormap than the color scale and compare themo

7/30/2019 14 Free Convection of Air Over an Isothermal Cylinder.pdf

http://slidepdf.com/reader/full/14-free-convection-of-air-over-an-isothermal-cylinderpdf 18/25

Free Convection of Air Over an Isothermal Cylinder ME433 COMSOL INSTRUCTTIONS

- 18 - 

 Plotting u(x o , y) and T(x o , y) on 0.055 0.16 y at x o = 0 

rameters” option. 

ct “80” as the only “Solution to use” option. 

Let us plot vertical temperature T(x o , y) development first,

1.  From “Postprocessing” menu select “Cross – Section Plot Pa

 2.  Under “General” tab, sele

 

3.  Switch to the “Line/Extrusion” tab. 

4.  Change the “Unit” of temperature to degrees Celsius. 

rc – length” to “ y”. 

7.  Click “Apply”. 

5.  Change the “x – axis data” from “A

 

6.  Enter the following coordinates in the “Cross – section line data”: x0 = x1 =0; y

= –0.055, and y1 = 0.16. 

7/30/2019 14 Free Convection of Air Over an Isothermal Cylinder.pdf

http://slidepdf.com/reader/full/14-free-convection-of-air-over-an-isothermal-cylinderpdf 19/25

Free Convection of Air Over an Isothermal Cylinder ME433 COMSOL INSTRUCTTIONS

- 19 - 

These steps produce a plot of T(y) = –0.055 mat xo = 0, from y (ambient air below the

ylinder) to y = 0.16 m (upper edge of modeling space, developing convection current).are plotted on the x – axis.

o save this plot,

8.  Click the save “

cTemperature T is plotted on the y – axis and y – coordinates

T

 

” button in your figure with results. This will bring up an

9.  Follow steps 2 – 4 as instructed on page 16 to finish with exporting the image. 

Alternatively, you may save this data to a text file if you wish to re – plot this figure withother software (such as MATLAB). Data from this plot can be saved as follows.

 Exporting COMSOL Data to a Data File

1.  Click on “Export Current Plot” button

“Export Image” window. 

in the Temperature plot created in the previous steps.

2.  Click “Browse” and navigate to your saving folder (say “Desktop”).

3.   Name the file “t0. tx t”. (Note: do not forget to type the “.txt” extension in the

ent,

n the “Expression” field.

6.  Click “OK” to plot velocity and close the “Cross – Section Plot Parameters”

window.

These steps produce a plot of u(y) at xo = 0, from y = –0.055 m to y = 0.16 m. Velocity is plotted on the y – axis and y – coordinates are plotted on the x – axis. Save the plot as an

image and/or export the velocity data to a text file for MATLAB re – plot. If you choose

to save the data, name the file “u0. t xt ”. 

name of the file).

4.  Click “OK” to save the file.

To plot vertical velocity u(x o , y) developm 

5.  Type “U_chns” i

7/30/2019 14 Free Convection of Air Over an Isothermal Cylinder.pdf

http://slidepdf.com/reader/full/14-free-convection-of-air-over-an-isothermal-cylinderpdf 20/25

Free Convection of Air Over an Isothermal Cylinder ME433 COMSOL INSTRUCTTIONS

- 20 - 

 Plotting  Local Surface Heat Flux  ,s o

q r  On 90 90  

To plot ,  s oq r  for 90 90  using COMSOL,

1.  Select “Domain Plot Parameters …” option from “Postprocessing” menu. 

2.  Under “General” tab, select “80” as the only “Solution to use” option. 

5.  Change the “x – axis data” from “ Arc – length” to “ y”. 

selection section while holding the

3.  Switch to the “Line/Extrusion” tab. 

4.  From “Predefined quantities”, select “Normal total heat flux”. 

6.  Select boundaries 6 and 7 in the boundary“Control (ctrl)” key on your keyboard. 

7.  Click “OK”. 

As a result of these steps, a new plot will be shown that graphs ,  s oq r  for 

90 90  . Notice that the x – axis plots y – coordinates for sem circle (not the

values of θ , as desired). We will use MATBAL to convert from y – coordinates to

degrees. Do not close this plot just yet. Export the data to a text file as instructed on page

19. Be sure to name this file “f l ux. tx t”. 

i

7/30/2019 14 Free Convection of Air Over an Isothermal Cylinder.pdf

http://slidepdf.com/reader/full/14-free-convection-of-air-over-an-isothermal-cylinderpdf 21/25

Free Convection of Air Over an Isothermal Cylinder ME433 COMSOL INSTRUCTTIONS

- 21 - 

Computing Average Surface Heat CoeTransfer fficient   

o compute the average heat transfer coefficient with COMSOL,

1.  From the “Postprocessing” menu, open “Boundary Integration” option.

.  Select boundaries 6 and 7 in the boundary selection section while holding the

. 02[ m] ) ”, in the “Expression” field.

 program’s prompt

on the bottom. Average surface heat transfer coefficient determined in this way

T

 

2

“Control (ctrl)” key on your keyboard.

3.  Type “-nt f l ux_ht gh/ ( (T-T i nf ) *pi *0

 

4.  Click “OK”. The value of the integral (solution) is displayed at

should be about 7.1 W/m2 –ºC.

This completes COMSOL modeling procedures for this problem.

7/30/2019 14 Free Convection of Air Over an Isothermal Cylinder.pdf

http://slidepdf.com/reader/full/14-free-convection-of-air-over-an-isothermal-cylinderpdf 22/25

Free Convection of Air Over an Isothermal Cylinder ME433 COMSOL INSTRUCTTIONS

- 22 - 

Modeling with MATLAB 

This part of modeling procedures describes how to create graphs of local surface heattransfer coefficient h(r o , θ  ) using MATLAB. Obtain MATLAB script file named

“i sot her mal _hcyl . m” from Blackboard prior to following these procedures. Save this file

in the same directory as the data file(s) ("t0. tx t", "u0. t xt", and "f l ux. txt ") from

COMSOL. ( Note: “i sot her mal _hcyl . m” file is attached to the electronic version of this

document as well. To access the file directly from this document, select “View  

 Navigation Panels Attachements” and then save “i sot her mal _hcyl . m” in a proper 

directory)

Computing and Plotting COMSOL Local Surface Heat Transfer Coefficient  

MATLAB script (i sot her mal _hcyl . m) is programmed to use exported COMSOL data for 

heat flux ,  s oq r 

,

and Newton’s Law of cooling to determine the local heat transfer 

coefficient  oh r 

 perime

along the surface of the cylinder. The script is also programmed to

calculate ex ntal average heat transfer coefficient h according to correlation 8.35a.Follow the steps below to complete this problem:

1.  Open MATLAB by double clicking its icon on the Desktop.

2.  Load “i sot her mal _hcyl . m” file by selecting “File Open Desktop  

isothermal_hcyl.m”. The script responsible for COMSOL data import and data

computation will appear in a new window.

3.  Press F5 key to run the script. MATLAB editor will display a warning message.

Click “Change Directory” to run the script.

COMSOL , oh r  will be plotted in Figure 1. Average h will be displayed in

MATLAB’s main window. If you chose to unsuppress the bottom portion of the script,

you will get 2 additional figures plotting vertical velocity and temperature development.

These results are shown below.

 Results plotted with MATLAB: 

7/30/2019 14 Free Convection of Air Over an Isothermal Cylinder.pdf

http://slidepdf.com/reader/full/14-free-convection-of-air-over-an-isothermal-cylinderpdf 23/25

Free Convection of Air Over an Isothermal Cylinder ME433 COMSOL INSTRUCTTIONS

- 23 - 

 Notice that y – coordinate of the modeling space is plotted on abscissa in the above

raphs. The cylinder is centered at y = 0. This is the reason why there is no data in the

i). Velocity

evelopment graph shows that velocity is zero everywhere below the cylinder. This is thethat

 below the hot cylinder, velocity should be zero everywhere, as shown in the above plot?

ocal surface heat transfer coefficient

g

region 0.02 0.02 y (we know the results in this region a prior 

dresult of “no – slip” condition we applied for convergence reasons. Do you think 

 

The figure below shows the plot of COMSOL l

, or h on  90 90  .

rmed with these results, you are in a position to answer most of the assigned questions. A 

7/30/2019 14 Free Convection of Air Over an Isothermal Cylinder.pdf

http://slidepdf.com/reader/full/14-free-convection-of-air-over-an-isothermal-cylinderpdf 24/25

Free Convection of Air Over an Isothermal Cylinder ME433 COMSOL INSTRUCTTIONS

- 24 - 

APPENDIX 

n

% ######################################################################### 

r i es % Cl ear

 Tg = 9. 81; % acc. due t o gr avi t y, [ m/ s 2]  

= 0. 708; % at Tf   

Heat Fl ux Data I mpor t f r om COMSOL Mul t i physi cs:  ad f l ux. t x t; % Loads q"( 0, y) as a 2 col umn vector  

ge Nussel t Number  D = beta*g*( Ts - Ti nf ) *( 2*r 0) 3/ ( et a*al pha);

( 0. 559/ Pr) ( 9/ 16) ) ( 8/ 27) ) 2;

di sp( ' Aver age h [ W/ m2- C] accor di ng t o eq. 8. 35a = ' ) ; di sp( h_ave)

%% Pl ot t er 1 f i gure1 = f i gure( ' I nver t Hardcopy' , ' of f ' , . . . %\  

' Col ormap' , [ 1 1 1 ] , . . . % | - > Set t i ng up the f i gure 

' Col or ' , [ 1 1 1] ) ; %/  pl ot ( t het a1, h, ' MarkerSi ze' , 2, ' Marker' , ' * ' , ' L i neStyl e' , ' none' , ' Col or ' , [0 0 0]) ; % Pl ot t i ng gr i d on box of f  %xl i m( [ - 90 90] ) ;  t i t l e( ' \ f ont name{Ti mes New Roman} \ f ont si ze{16} \ bf Sur f ace Heat Transf er Coef f i ci ent ' )xl abel ( ' \ f ont name{Ti mes New Roman} \ f ont si ze{14} \ i t \ bf \ t heta, [ \ ci r c ] ' )yl abel ( ' \ f ont name{Ti mes New Roman} \ f ont si ze{14} \ i t \ bf h ( r _o , \ t het a ) , [ W/ m 2-\ c i rcC] ' )

%% COMSOL u( x, y0) and T(x, y0) Re- pl ot s % ######################################################################### 

 MATLAB script  

If you could not obtain this script from the Blackboard or the PDF file, you may copy ithere, then paste it into notepad and save it in the same directory where you saved

COMSOL data file(s). You will most likely get hard – to – spot syntax errors if you copy

the script this way. It is therefore highly advised that you use the other 2 methods o

obtaining this script instead of the copying method.

% ME 433 - Heat Transf er  % Sampl e MATLAB Scr i pt For :  % ( X) Free Convect i on of Ai r over an I sother mal Hori zont al Cyl i nder  % I MPORTANT: Save t hi s f i l e i n the same di r ector y wi t h % " f l ux. t xt " f i l e.  % ######################################################################### %%% Prel i mi nacl ear s var i abl es f r om memory cl c % Cl ear s t he UI prompt  

%% Const ant Quanti t i es = 0. 04/ 2; % Cyl i nder r adi us, [ m]  r 0

 Ti nf = 20; % Ambi ent t emper ature, [ degC]   Ts = 100; % Cl yi nder s ur f ace t emper ature, [ degC]  

f = 0. 5*( Ts - Ti nf ) ; % Fi l m t emper at ur e, [ degC]  

Cp = 1008. 0; % at Tf   r ho = 1. 0596; %% at Tf  mu = 20. 03e- 6; % at Tf   eta = 18. 90e-6; % at Tf   

= 0. 02852; % at Tf   kPral pha = et a/ Pr ; % at Tf   bet a = 1/ ( Tf + 273. 15) ; % i n Kel vi n ( - 1)  

%%l oy = f l ux( : , 1) ; % y - coor ds vect or, [ m]  q = ( - 1) * f l ux( : , 2) ; % f l ux, [ W/ m 2] h = q. / ( Ts - Ti nf ) ;%t het a1 = asi n( y. / r0)*180/ pi ; % [ y - coor ds] - - >[ degr ees, t het a]  

% Corr el ati on Equati on For Avera%RaNuD = ( 0. 6 + 0. 387*RaD ( 1/ 6) / ( 1 +h_ave = NuD*k/ ( 2*r 0);

7/30/2019 14 Free Convection of Air Over an Isothermal Cylinder.pdf

http://slidepdf.com/reader/full/14-free-convection-of-air-over-an-isothermal-cylinderpdf 25/25

Free Convection of Air Over an Isothermal Cylinder ME433 COMSOL INSTRUCTTIONS

% Unsuppress t hi s por t i on onl y i f you wi ch to r e- pl ot COMSOL u(x0, y) and % T(x0, y). Pr i or t o repl ot i ng, make sur e to extr act numer i cal dat a f or  % vel oci t y and t emper atur e to t ext f i l es. You must name t he fi l es as:  % "u0. t xt" and "t0. t xt " f or vel oci t y and temperature f i el ds,  % r espect i vel y and pl ace then i n the same di r ect ory as t hi s scr i pt .  % ######################################################################### 

% l oad u0. t xt; % Loads u(x0, y) as a 2 col umn vect or 

% l oad t 0. t xt; % Loads T(x0, y) as a 2 col umn vect or y1 = u0( : , 1) ; % y - coords, [ m]  %% u1 = u0(: , 2) ; % u( y) , [ m/ s]  % t1 = t0( : , 2) ; % T(y) , [degC]  % %% cl ear f l ux u0 t 0 % Var i abl e cl ean up 

%% Pl ott er 2 

% ' Col ormap' , [1 1 1 ] , . . . % | - > Sett i ng up t he f i gure % ' Col or ' , [1 1 1]) ; %/  %p lo t (y1, u1, ' k. ' ) ; % Pl ot t i ng % gri d on % box of f  % xl i m( [ - 0. 055 0. 16] )  % t i t l e( ' \ f ont name{Ti mes New Roman} \ f ont si ze{16} \ bf Vel oci t y Devel opment ' )  % xl abel ( ' \ f ont name{Ti mes New Roman} \ f ont si ze{14} \ i t \ bf y - coor di nate, [ m] ' )  

% yl abel ( ' \ f ont name{Ti mes New Roman} \ f ont si ze{14} \ i t \ bf u (x_o, y) at x_o = 0 ,[m/ s] ' )  %  % f i gure3 = f i gure( ' I nvert Hardcopy' , ' of f ' , . . . %\  % ' Col ormap' , [1 1 1 ] , . . . % | - > Sett i ng up t he f i gure % ' Col or ' , [1 1 1]) ; %/  % pl ot ( y 1, t 1, ' k. ' ) ; % Pl ot t i ng % gri d on % box of f  % xl i m( [ - 0. 055 0. 16] )  % t i t l e( ' \ f ont name{Ti mes New Roman} \ f ont si ze{16} \ bf Temper ature Devel opment ' )  % xl abel ( ' \ f ont name{Ti mes New Roman} \ f ont si ze{14} \ i t \ bf y - coor di nate, [ m] ' )  % yl abel ( ' \ f ont name{Ti mes New Roman} \ f ont si ze{14} \ i t \ bf T (x_o, y) at x_o = 0,[ \ ci r c C] ' )  %  

his completes MATLAB modeling procedures for this problem.

%%% f i gure2 = f i gure( ' I nvert Hardcopy' , ' of f ' , . . . %\

 

T