Вы находитесь на странице: 1из 16

# Temperature Development In Tubes: Uniform Surface Heat Flux

## ME433 COMSOL INSTRUCTIONS

TEMPERATURE DEVELOPMENT IN TUBES Uniform Surface Heat Flux Problem Statement Room temperature air enters a circular tube with diameter D and length L at a uniform inlet velocity Vi and temperature Ti. The surface wall of the tube is heated by a uniform . Formation of viscous boundary layers establishes a hydrodynamic entrance heat flux qs region of the tube. Air velocity in this region is developing. At and after a certain hydrodynamic length Lh, the velocity distribution is developed and resembles a parabolic profile. This portion of the tube is referred to as fully developed velocity region (FDVR). Temperature profile is changing at the surface and throughout the tube. Of general interest is to learn how to use COMSOL in obtaining temperature field in a tube. It is desired to obtain qualitative, as well as quantitative perspectives about thermal development from COMSOL solution. Known quantities: Fluid: Air L = 100 cm Vi = 0.04 m/s D = 6 cm Ti = 20 C 2 = 1000 W/m qs Observations This is a forced convection, internal channel flow problem. The channel considered is a circular tube. Both hydrodynamic and thermal considerations are of interest. Hydrodynamic considerations were examined in a previous module. Assuming that radial temperature distribution is symmetric at each radial cross section, the problem can be modeled in 2 dimensions. Rectangular geometry is a suitable model for lateral cross section of the tube. We will model this problem with constant air properties determined at incoming air temperature Tair. Later, we may also want to model the problem by varying air properties with respect to temperature. This will enable us to see if there are any differences in solutions when material property variation is introduced. (This is assigned as an extra credit exercise). COMSOL can introduce marginal errors near the exit of the tube. To avoid these small errors, we should always make the tube larger in length by 10 cm. Thus, the modeling length of the tube will be 110 cm. Temperature Development in an Isothermal Tube

-1-

## ME433 COMSOL INSTRUCTIONS

Assignment 1. Use COMSOL to determine the temperature distribution in given tube. Show a 2D colormap of temperature distribution in the tube. 2. Use COMSOL to plot axial temperature T(r, xo) at xo = 5, 10, 25, 75, and 100 cm. 3. Use COMSOL to plot centerline temperature Tc as a function of x on 0 x L . Does temperature profile become invariant with distance? What observations do you make regarding Tc? 4. Use COMSOL to plot and extract surface temperature Ts as a function of x on 0 x L . Use Newtons law of cooling and extracted surface temperature Ts to determine COMSOL h(x) for x0 x L . Plot COMSOL h(x). [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] 5. [Extra Credit]: Modify COMSOL model to include air property variations and resolve the problem. Produce plots of centerline velocity uc and temperature Tc. Determine hydrodynamic and thermal entrance lengths. Comment on any changes you see in these values when compared to the entrance lengths computed with constant air properties assumption.

-2-

## ME433 COMSOL INSTRUCTIONS

Modeling with COMSOL Multiphysics Recall that we already solved for the velocity profile in the previous module. This problem asks us to find temperature distribution of air when the walls of the tube are kept . We will proceed by extending our previous module to a at uniform surface flux qs Multiphysics model. Prepare the COMSOL file you saved for Laminar Flow in a Tube by copying it to your desktop. (Note: The computers in room ST 213 do not allow you to simply copy and paste a file from one location to Desktop. You can still save your COMSOL file by opening it in COMSOL and choosing the option Save as from file menu)
OPENING PREVIOUS MODULE

1. Open COMSOL model file (.mph) for Laminar Flow in a Tube. The model will load at the point where you last saved it.

## MODEL NAVIGATOR: CONVECTION & CONDUCTION HEAT TRANSFER MODE

We are now ready to start applying heat transfer module to create a Multiphysics model. This is done as follows. 1. Select Model Navigator under the Multiphysics menu. 2. Click on Multiphysics button on the bottom right corner of the window. 3. From the list of application modes select COMSOL Multiphysics Heat Transfer Convection and Conduction Steady state analysis. 4. Click the Add button. 5. Click OK.

-3-

## ME433 COMSOL INSTRUCTIONS

PHYSICS SETTINGS

Physics settings in COMSOL consist of two parts: (1) Subdomain settings and (2) boundary conditions. The subdomain settings let us specify material types, 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. Since weve specified air flow physics settings before, we only need to add and couple heat transfer physics settings. This is done as follows. Convection and Conduction (cc) Subdomain Settings: 1. From Mulptiphysics menu, select 2 Convection and Conduction (cc) mode. 2. From the Physics menu, select Subdomain Settings (F8). 3. Select Subdomain 1 in the subdomain selection field. 4. Enter 0.02564, 1.2042 and 1006 in the k(isotropic), , and Cp fields, respectively. 5. Enter u and v in the u and v fields, respectively. 6. Click OK to close the Subdomain Settings window.

-4-

## ME433 COMSOL INSTRUCTIONS

Convection and Conduction (cc) Boundary Conditions: 1. From the Physics menu open the Boundary Settings (F7) dialog box. 2. Apply the following boundary conditions:
BOUNDARY 1 2, 3 4 BOUNDARY CONDITION Temperature Heat Flux Convective flux COMMENTS Enter 273.15+20 in T0 field Enter 1000 in q0 field

## Click OK to close Boundary Settings window.

MESH GENEARATION

The mesh we created in Laminar Flow in a Tube is not quite suitable to handle heat flux boundary conditions. We shall make changes to the mesh as follows: 1. Go to the Mesh menu and select Free Mesh Parameters option. 2. From Predefined mesh sizes drop down menu, select Extremely fine option. 3. Click Remesh, followed by OK to close Free Mesh Parameters window.

As a result of these steps, you should get the following triangular mesh:

-5-

## COMPUTING AND SAVING THE SOLUTION

In this step we define the type of analysis to be performed. We are interested in steady state analysis here, which we previously selected in the Model Navigator. Therefore, no modifications need to be made. To enable the solver, proceed with the following steps: 1. From the Solve menu select Solve Problem. (Allow few minutes for solution) 2. 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 map:

By default, your immediate result will be given in Kelvin instead of degrees Celsius. (In fact, the first result you will see is the velocity field, not temperature). Furthermore, it will be colored using a jet colormap. We will use distinct colormapping options to represent the air velocity and temperature fields. The next section (Postprocessing and Visualization) will help you in obtaining the above and other diagrams, such as plots of axial temperatures at various xo and a plot of centerline and surface temperatures Tc and Ts, respectively. We will also plot and extract ro , x . Answer the extra credit question numerical data for Ts and use it to find local hx to determine the effects on solution when air property variations are included COMSOL analysis.

-6-

## 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, extraction of Ts, and centerline temperature development plot. Displaying T(r, x) with Velocity Vector Field V(r, x) 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 hsv. 4. Click Apply to refresh main view and keep the Plot Parameters window open.

-7-

## ME433 COMSOL INSTRUCTIONS

The 2D temperature distribution will be displayed using the hsv colormap type with degrees Celsius as the unit of temperature. Lets now add the velocity vector field V(r, x). 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. Black 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 6. 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 30 for the x field and update your view by pressing Apply button. Notice the difference in velocity vector field representation. Try other values.

-8-

## ME433 COMSOL INSTRUCTIONS

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.

-9-

## ME433 COMSOL INSTRUCTIONS

Plotting T(r, xo) (or T(r) at xo) To make axial temperature T(r, xo) plots at specified xo, we simply need to know the end coordinates of axial lines along which T(r, xo) is to be plotted. Vertical axial lines are described by the radius of the tube in y coordinate (or r coordinate). Let us begin by plotting axial temperature T(r, xo) at xo = 100 cm. 1. Under Postprocessing menu, select Cross Section Plot Parameters. 2. Switch to Line/Extrusion tab. 3. Type y in the Expression field under y axis data section of the tab.

4. Under x axis data, use radio button to enable the Expression option.

5. Click on Expression button. 6. In new x axis data window, type T in Expression field. 7. Change the Unit of temperature to degrees Celsius. 8. Click OK to apply and close x axis data window.

9. In Cross Section Plot Parameters window, enter the following coordinates in the Cross section line data: x0 = x1 = 1; y0 = -0.03 and y1 = 0.03. 10. Click Apply.

- 10 -

## ME433 COMSOL INSTRUCTIONS

These steps produce a plot of axial temperature as a function of radius at x = 100 cm. Temperature T is plotted on the x axis in degrees Celsius and y coordinates are plotted on the y axis. To save this plot, 1. Click the save button in your figure with results. This will bring up an Export Image window. 2. Follow steps 2 4 as instructed on page 9 to finish with exporting the image.

To display axial temperature at other x0 values, repeat steps 8 and 9 on page 10. In step 8, change the x0 and x1 coordinates to those given in assignment question 2. You should produce 5 such plots altogether. When you are done with making these plots, click OK to close Cross Section Plot Parameters window. [Note: Alternatively, you can save numerical data for temperature and y coordinates instead of a plot. You can use this data later to recreate the plot in MATLAB (or other software). To save this numerical data, use the Export current data button in the plot window. Give the file a descriptive name (do not forget to add .txt extension at the end of file name), use the Browse button to navigate to your saving folder, and save the file]. Plotting Surface Temperature Ts To plot surface temperature Ts for 0 x L using COMSOL, 1. Select Cross Section Plot Parameters option from Postprocessing menu. 2. Switch to the Line/Extrusion tab. 3. Type T in Expression field and change the Unit of temperature to degrees Celsius. 4. Change the x axis data to x. 5. Enter the following coordinates in the Cross section line data: x0 = 0, x1 = 1; and y0 = y1 = 0.03. 6. Click OK to close Cross Section Plot Parameters window and plot Ts.

- 11 -

## ME433 COMSOL INSTRUCTIONS

As a result of these steps, a new plot will be shown that graphs surface temperature Ts for 0 x L . Do not close this plot just yet. We are going to extract this data to a text file for comparative analysis with MATLAB. Exporting COMSOL Data to a Data File 1. Click on Export Current Plot button in the previous step. in the Temperature time graph created

2. Click Browse and navigate to your saving folder (say Desktop). 3. Name the file Tx_surface.txt. (Note: do not forget to type the .txt extension in the name of the file). 4. Click OK to save the file. The file is saved in the same directory where you first saved COMSOL model file with extension .mph.

- 12 -

## ME433 COMSOL INSTRUCTIONS

Plotting Centerline Temperature Tc(ro, x) as a Function of x Similar to axial temperature plots, we simply need to specify proper coordinates of a line along which we wish to plot temperature. Tube center line begins at x0 = 0 meters and terminates at x1 = 1. The y coordinate (or the r coordinate) at the center of the tube stays at zero level as x varies. 1. Under Postprocessing menu, select Cross Section Plot Parameters. 2. Switch to Line/Extrusion tab. 3. Type T in the Expression field under y axis data section and change the Unit of temperature to degrees Celsius. 4. In x axis data section, switch to upper radio button and select x using the drop down menu. 5. Enter the following coordinates in the Cross section line data section: x0 = 0, x1 = 1; y0 = y1 = 0.

6. Click OK. Centerline temperature Tc will be displayed as a function of x on 0 x L . This graph is shown on the next page. It has been re plotted with MATLAB.

- 13 -

## ME433 COMSOL INSTRUCTIONS

Modeling with MATLAB This part of modeling procedures describes how to create graphs of surface heat transfer coefficient h(x) and temperature Ts using MATLAB. Obtain MATLAB script file named flux_tube.m from Blackboard prior to following these procedures. Save this file in the same directory as the data file(s) (Tx_surface.txt) from COMSOL. (Note: flux_tube.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 flux_tube.m in a proper directory) MATLAB script (flux_tube.m) is programmed to use exported COMSOL data for surface temperature T x, 0 and Newtons Law of cooling to determine the local heat transfer coefficient h(x) along the surface of the tube. Follow the steps below to complete this problem: 1. Open MATLAB by double clicking its icon on the Desktop. 2. Load flux_tube.m file by selecting File Open Desktop flux_tube.m. The script responsible for COMSOL data import and data comparison 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 solutions for h(x) and Ts x will be plotted in Figures 1 and 2. Results plotted with MATLAB

Does the temperature profile become invariant with distance x ? What observations do you make regarding Tc ?

- 14 -

## ME433 COMSOL INSTRUCTIONS

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) Temperature Development in Tubes - Unifor Surface Heat Flux % IMPORTANT: Save this file in the same directory with % "Tx_surface.txt" file. % ######################################################################### %% Preliminaries clear % Clears variables from memory clc % Clears the UI prompt % %% Constant Quantities Tinf = 20; % Ambient temperature, [degC] qx = 1000; % Applied heat flux, [W/m^2] %% COMSOL Data Import & hx_comsol Computation load Tx_surface.txt; % Imports a 2-column data vector from COMSOL x = Tx_surface(:,1)*100 ; % Tube coordinate vector, [cm] Ts = Tx_surface(:,2); % COMSOL Ts vector, [degC] hx_comsol = qx./(Ts-Tinf); % Heat transf. coeff. from COMSOL %% Plotter and Plot Cosmetics figure1 = figure('InvertHardcopy','off',... %\ 'Colormap',[1 1 1 ],... % | -> Setting up the figure 'Color',[1 1 1]); %/ plot(x,hx_comsol) % Plots COMSOL h box off grid on title('\fontname{Times New Roman} \fontsize{16} \bf Surface Heat Transfer Coefficient') xlabel('x, [cm]') ylabel('h, [W/m^2-\circC]') set(get(gca,'YLabel'),... 'fontsize', 14,... 'FontName','Times New Roman',... 'FontAngle','italic') set(get(gca,'XLabel'),... 'fontsize', 14,... 'FontName','Times New Roman',... 'FontAngle','italic') figure2 = figure('InvertHardcopy','off',... %\ 'Colormap',[1 1 1 ],... % | -> Setting up the figure 'Color',[1 1 1]); %/ plot(x,Ts) % Plots COMSOL Ts box off grid on title('\fontname{Times New Roman} \fontsize{16} \bf Surface Temperature T_s') xlabel('x, [cm]') ylabel('T_s , [\circC]') set(get(gca,'YLabel'),... 'fontsize', 14,... 'FontName','Times New Roman',... 'FontAngle','italic') set(get(gca,'XLabel'),... 'fontsize', 14,... 'FontName','Times New Roman',... 'FontAngle','italic')

- 15 -

## ME433 COMSOL INSTRUCTIONS

COMSOL Results and Hints for Extra Credit Question The goal of this question is to determine how varying properties of air affect the solution. The following results for centerline velocity uc and temperature Tc were repotted with MATLAB. The length of the tube was increased to 5 meters.

Notice how varying air properties manifest a dramatic difference in centerline velocity. To use varying air properties in COMSOL, follow the steps below, 1. From the Options menu select Expressions Scalar Expressions 2. Define the following names and expressions:
NAME k_air rho_air mu_air EXPRESSION 10^(-3.723+0.865*log10(abs(T[1/K])))[W/(m*K)] 1.013e5[Pa]*28.8[g/mol]/(8.314[J/(mol*K)]*T) 6e-6[Pa*s]+4e-8[Pa*s/K]*T UNIT W/(mK) kg/m
3

## DESCRIPTION Air Conductivity Air Density Air Viscosity

Kg/(ms)

3. Click OK. 4. Use the same names of quantities defined above in Subdomain Physics Settings to replace the previously defined constant numerical properties. 5. Resolve the problem. COMSOL automatically determines correct property unit under the Unit 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. This completes COMSOL modeling procedures for this problem.

- 16 -