Professional Documents
Culture Documents
14 Free Convection of Air Over An Isothermal Cylinder
14 Free Convection of Air Over An Isothermal Cylinder
Observations
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-
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 temperature
fields. 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(xo, y) and temperature T(xo, y) on
0.055 y 0.16 at xo = 0 .
5. Use COMSOL to plot and extract numerical data for cylinder surface heat flux
qs ro , on 90 90 . Use Newtons law of cooling and extracted
temperature data to determine COMSOL local surface heat transfer coefficient
h(ro, ). [Note: In this instruction set, part of this assignment question will be
done 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-
This model analyzes free convection process outside a horizontal cylinder. The cylinder
is held at a constant temperature Ts, 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 fy = ( )g. The term is the density far away from hot
cylinder 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-
EXPRESSION
VALUE
DESCRIPTION
Tinf
273.15+20[K]
293.15[K]
dT
10[K]
10[K]
rho0
1.2042[kg/m^3]
1.2042[kg/m ]
mu_air
18.17e-6[kg/(s*m)]
(1.817e-5)[kg/(ms)]
k_air
0.02564[W/(m*degC)]
0.02564[W/(mK)]
Cp_air
1006.1[J/(kg*degC)]
1006.1[J/(kgK)]
9.81[m/s^2]
9.81[m/s ]
Temperature Step
3
3. Click OK.
COMSOL automatically determines correct units under the Value column. If it does
not, 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-
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
-0.055
-5-
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, initial
conditions, 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 the
geometry. 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 model
air 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 rho in the Name field and rho0*(1-(T-Tinf)/Tinf) in the expression
field.
NAME
EXPRESSION
UNIT
rho
rho0*(1-(T-Tinf)/Tinf)
[kg/m ]
1. From the Physics menu select Subdomain Settings (equivalently, press F8).
2. Select subdomain 1 in the Subdomain selection section.
3. Type rho and mu_air in the fields for density and dynamic viscosity .
4. Type g*(rho0-rho) in the Fy field.
5. Click OK.
-6-
Notice that the buoyant force Fy 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
1, 6, 7
Wall
No Slip
2, 4, 5
Open boundary
Normal Stress
Symmetry boundary
COMMENTS
-8-
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
6, 7
Temperature
Convective flux
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 holding
the Control (ctrl) key on your keyboard.
4. Enter 1e-3 in the Maximum element size edit field.
5. Switch to the Point tab.
-9-
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.
- 10 -
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_air in the field for Name of parameter.
4. Enter 1e-4
1.817e-5
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 -
13. In the Initial value section click the Stored solution radio button.
- 12 -
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 according
to 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 100C, 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 velocity
field (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 plot
local heat transfer coefficient h(ro, ) from COMSOL surface heat flux data.
- 13 -
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 qs ro , . We will also use COMSOL
to 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(ro, ).
Displaying T(x, y) and Vector Field V(x, y)
- 14 -
The 2D temperature distribution will be displayed using the hot colormap type with
degrees Celsius as the unit of temperature. Lets 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.
- 15 -
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) Total
heat 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 as
an 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.
- 16 -
1. From the Postprocessing menu, open Plot Parameters dialog box (F12).
2. Under the Arrow tab, disable the Arrow plot checkbox.
3. Switch to Surface tab.
With the Plot Parameters window open, ensure that you are under the Surface tab,
7. Type rho in Expression field (without quotation marks).
- 17 -
- 18 -
These steps produce a plot of T(y) at xo = 0, from y = 0.055 m (ambient air below the
cylinder) to y = 0.16 m (upper edge of modeling space, developing convection current).
Temperature T is plotted on the y axis and y coordinates are plotted on the x axis.
To save this plot,
8. Click the save button in your figure with results. This will bring up an
Export Image window.
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 with
other 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
previous steps.
- 19 -
As a result of these steps, a new plot will be shown that graphs qs ro , for
90 90 . Notice that the x axis plots y coordinates for semicircle (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 flux.txt.
- 20 -
- 21 -
- 22 -
Notice that y coordinate of the modeling space is plotted on abscissa in the above
graphs. The cylinder is centered at y = 0. This is the reason why there is no data in the
region 0.02 y 0.02 (we know the results in this region a priori). Velocity
development graph shows that velocity is zero everywhere below the cylinder. This is the
result of no slip condition we applied for convergence reasons. Do you think that
below the hot cylinder, velocity should be zero everywhere, as shown in the above plot?
The figure below shows the plot of COMSOL local surface heat transfer coefficient
h ro , on 90 90 .
Armed with these results, you are in a position to answer most of the assigned questions.
- 23 -
APPENDIX
MATLAB script
If you could not obtain this script from the Blackboard or the PDF file, you may copy it
here, 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 on
obtaining this script instead of the copying method.
% #########################################################################
% ME 433 - Heat Transfer
% Sample MATLAB Script For:
% (X) Free Convection of Air over an Isothermal Horizontal Cylinder
% IMPORTANT: Save this file in the same directory with
%
"flux.txt" file.
% #########################################################################
%
%% Preliminaries
clear
% Clears variables from memory
clc
% Clears the UI prompt
%% Constant Quantities
r0 = 0.04/2; % Cylinder radius, [m]
Tinf = 20; % Ambient temperature, [degC]
Ts = 100; % Clyinder surface temperature, [degC]
Tf = 0.5*(Ts - Tinf); % Film temperature, [degC]
g = 9.81; % acc. due to gravity, [m/s^2]
Cp = 1008.0; % at Tf
rho = 1.0596; %% at Tf
mu = 20.03e-6; % at Tf
eta = 18.90e-6; % at Tf
k = 0.02852; % at Tf
Pr = 0.708; % at Tf
alpha = eta/Pr; % at Tf
beta = 1/(Tf + 273.15); % in Kelvin^(-1)
%% Heat Flux Data Import from COMSOL Multiphysics:
load flux.txt;
% Loads q"(0,y) as a 2 column vector
y = flux(:,1);
% y - coords vector, [m]
q = (-1)*flux(:,2);
% flux, [W/m^2]
h = q./(Ts - Tinf);
%
theta1 = asin(y./r0)*180/pi; % [y - coords]-->[degrees, theta]
%% Correlation Equation For Average Nusselt Number
RaD = beta*g*(Ts - Tinf)*(2*r0)^3/(eta*alpha);
NuD = (0.6 + 0.387*RaD^(1/6)/(1 + (0.559/Pr)^(9/16))^(8/27))^2;
h_ave = NuD*k/(2*r0);
disp('Average h [W/m2-C] according to eq. 8.35a = '); disp(h_ave)
%% Plotter 1
figure1 = figure('InvertHardcopy','off',...
%\
'Colormap',[1 1 1 ],...
% | -> Setting up the figure
'Color',[1 1 1]);
%/
plot(theta1,h,'MarkerSize',2,'Marker','*','LineStyle','none','Color',[0 0 0]);% Plotting
grid on
box off
%xlim([-90 90]);
title('\fontname{Times New Roman} \fontsize{16} \bf Surface Heat Transfer Coefficient')
xlabel('\fontname{Times New Roman} \fontsize{14} \it \bf \theta, [ \circ ]')
ylabel('\fontname{Times New Roman} \fontsize{14} \it \bf h (r_o ,\theta ) , [W/m^2\circC]')
%% COMSOL u(x,y0) and T(x,y0) Re-plots
% #########################################################################
- 24 -
%
%
%
%
%
%
Unsuppress this portion only if you wich to re-plot COMSOL u(x0,y) and
T(x0,y). Prior to reploting, make sure to extract numerical data for
velocity and temperature to text files. You must name the files as:
"u0.txt" and "t0.txt" for velocity and temperature fields,
respectively and place then in the same directory as this script.
#########################################################################
% load u0.txt;
% Loads u(x0,y) as a 2 column vector
% load t0.txt;
% Loads T(x0,y) as a 2 column vector
% y1 = u0(:,1);
% y - coords, [m]
% u1 = u0(:,2);
% u(y), [m/s]
% t1 = t0(:,2);
% T(y), [degC]
% %
% clear flux u0 t0 % Variable clean up
%
% %% Plotter 2
% figure2 = figure('InvertHardcopy','off',...
%\
%
'Colormap',[1 1 1 ],...
% | -> Setting up the figure
%
'Color',[1 1 1]);
%/
% plot(y1,u1,'k.');
% Plotting
% grid on
% box off
% xlim([-0.055 0.16])
% title('\fontname{Times New Roman} \fontsize{16} \bf Velocity Development')
% xlabel('\fontname{Times New Roman} \fontsize{14} \it \bf y - coordinate, [m]')
% ylabel('\fontname{Times New Roman} \fontsize{14} \it \bf u (x_o, y) at x_o = 0 ,
[m/s]')
%
% figure3 = figure('InvertHardcopy','off',...
%\
%
'Colormap',[1 1 1 ],...
% | -> Setting up the figure
%
'Color',[1 1 1]);
%/
% plot(y1,t1,'k.');
% Plotting
% grid on
% box off
% xlim([-0.055 0.16])
% title('\fontname{Times New Roman} \fontsize{16} \bf Temperature Development')
% xlabel('\fontname{Times New Roman} \fontsize{14} \it \bf y - coordinate, [m]')
% ylabel('\fontname{Times New Roman} \fontsize{14} \it \bf T (x_o, y) at x_o = 0,
[\circC]')
%
- 25 -