Table of Contents i. Introduction to COMSOL Multiphysics iii. File Naming and Saving Conventions vii

Size: px
Start display at page:

Download "Table of Contents i. Introduction to COMSOL Multiphysics iii. File Naming and Saving Conventions vii"

Transcription

1 COMSOL Multiphysics Instruction Manual THE CITY COLLEGE OF NEW YORK MECHANICAL ENGINEERING DEPARTMENT ME 433: HEAT TRANSFER PROFESSOR LATIF M. JIJI

2

3 TABLE OF CONTENTS I. INTRODUCTION Table of Contents i A Message to the Student ii TABLE OF CONTENTS Introduction to COMSOL Multiphysics iii File Naming and Saving Conventions vii II. CONDUCTION MODELING WITH CONSTANT HEAT TRANSFER COEFFICIENT Fin tip insulation: effect on Q f 1 Heat loss from a rod 19 Limits of the fin approximation 35 Test chamber insulation (rectangular) 55 Test chamber insulation (circular) 69 Transient cooling of a rod 85 III. CONDUCTION AND CONVECTION MODELING Laminar forced convection over an isothermal flat plate 101 Laminar forced convection over a heated flat plate 127 Laminar flow in a tube 155 Temperature development in tubes (Uniform Surface Temperature) 169 Temperature development in tubes (Uniform Surface Heat Flux) 185 Free convection of air over a vertical plate (Isothermal) 201 Free convection of air over a vertical plate (Heated) 225 Free convection of air over a horizontal cylinder (Isothermal) 249 Cross flow heat exchanger -- IV. RADIATION MODELING Radiation in a triangular cavity i -

4 INTRODUCTION TO COMSOL MULTIPHYSICS A MESSAGE TO THE STUDENT Dear student, Half a century ago, a great American scientist said: The next great era of awakening of human intellect may well produce a method of understanding the qualitative content of [physical] equations. Today, we are privileged to live in time to see this prediction begin to come true. Today s expanding research and developing industry, scientists and engineers, experimentalists and theoreticians, and many other professional analysts who deal with complex mathematical analysis rely more and more on finite element method as a tool to solve insuperably difficult problems. With the ever increasing number crunching power of modern computing machines, it is possible today to solve and visualize complicated physical phenomena, such as wet water flow and temperature field in steam turbines, body fluid redistribution in human organs subject to unfamiliar gravitational environments, or investigate aerodynamic performance of an entire aircraft without having to setup up an overly expensive experimental lab. Some fifty years ago, an undertaking of the above examples was simply not possible. A theoretician of those days had to have boundless imagination in order to extract information such as vortex shedding in a fluid flow past an object from the well known Navier Stokes equations. That is what was meant by the qualitative content of the equations. Today, an undergraduate student with enough ingenuity can accurately simulate the complex vortices produced by the fluid flow on his or her notebook computer. Universities around the world have much advanced the development of different finite element techniques to attack a wide variety of technical issues. In recent times, many universities, technical institutes, and colleges have adopted programs that introduce students to this relatively new and powerful tool. Most of the institutions are doing so on the graduate level only. At City College, we would like to offer our modest attempts to introduce mechanical engineering students taking undergraduate level heat transfer course to have a first glimpse of how the finite element method may be useful. Pavel Danilochkin COMSOL module developer and technical writer. Latif M. Jiji Project manager. - ii -

5 INTRODUCTION TO COMSOL MULTIPHYSICS INTRODUCTION TO COMSOL MULTIPHYSICS 1. Manual Objective and Organization The major objective of this undertaking is not to simply show you and explain how to use COMSOL Multiphysics to solve certain heat transfer problems, but that in doing so you may improve your physical intuition regarding the phenomena under study. Our textbook (with its discussions and numerous diagrams) already does a great job in meeting this objective, however, with COMSOL Multiphysics we take it a step higher. With this manual and COMSOL Multiphysics, you will compute heat transfer rates in multilayered walls, analyze solutions of transient cooling in rods and fins, see the external flow of fluids over plates and internal flows inside pipes, calculate temperature distributions and property variations of fluids under various circumstances, solve free/forced convection and radiation problems. And that is not the end of the list! It is our hope that by analyzing these problems with a rather intuitive program, you will gain a better physical insight, which in turn should make you a better scientist and/or engineer! INTRODUCTION The written manual is organized by problems. There are 15 problems in total. Your Professor will decide which and how many problems you will do during the course. Previously, the number of problems that students solved in the course ranged from 2 to 4. Each problem has a separate written instruction manual and a corresponding video tutorial. Some problems include additional files, such as MATLAB scripts, that may be needed to complete the problem. These files can either be obtained from instruction manual itself or from the Blackboard. The rest of the files (including written manuals and video tutorials) are available from Blackboard or from victordanilochkin.org/comsol. By far, the simplest way to solve the problem is by watching the video tutorial. You should, however, read the manual at least once prior or during the time when you are solving the problem. Written instructions are far more specific and often include discussions that can be beneficial to you. You should also consult your textbook prior to doing these problems to make sure that your understanding of basic concepts is cold. Written instruction manual structure adapts your textbook s problem solving methodology. However, the form of the structure has several modifications. Written manuals for COMSOL Multiphysics are organized as follows: 1. Problem Statement in this section, a problem that involves certain physical phenomenon (or phenomena) is described. A general learning objective is often stated in this section. Material properties, geometric dimensions, temperature conditions and other relevant specifics are given here. 2. Observations typically, this section lists certain noticeable facts or assumptions about the problem statement from a physical standpoint. COMSOL modeling geometry is often determined and justified here. 3. Assignment this section raises questions to be answered throughout the study of the problem. The number of mandatory questions to be answered is usually 5. - iii -

6 INTRODUCTION TO COMSOL MULTIPHYSICS INTRODUCTION Most problems also include extra credit questions, which are usually more difficult than the 5 mandatory questions and require more effort from the student. For your own educational good, we encourage you to attempt answering these questions. 4. Modeling with COMSOL Multiphysics this section gives all the instructions on how to solve and post process the problem with COMSOL Multiphysics. This section constitutes the main bulk of the manual. 5. Modeling with MATLAB certain problems that need to be analyzed with MATLAB will include this section. No prior knowledge of MATLAB is assumed nor is it necessary! MATLAB is primarily used to compute theoretical solutions and make comparative plots of the solutions. Note that you are free to use other software to achieve similar results. We do encourage you to get to know MATLAB, nevertheless, as it is another invaluable computational tool in hands of a knowledgeable engineer. 6. Verification of Results certain problems will include a separate section for verifying COMSOL results against theoretical solutions. All problems, however, require such verification. Most of the manuals list instructions for verifications wherever sought most convenient. 7. MATLAB Script problems that include MATLAB analysis will also fully reprint MATLAB script at the end of the manual. This is done in case MATLAB scripts cannot be obtained by other means. When you are done solving a problem you are asked to prepare a small report of your findings. The report should include the answers to the questions assigned and supporting data that you obtained from COMSOL Multiphysics and other software. Based on the assignment questions, please use your own judgment to decide which data to include in your report. Be aware of this idea as you solve the problems with COMSOL Multiphysics, as this will be the only time when you can save the data you want to use for the report. These reports will have a due date and must be turned in in a hardcopy format. 2. What is COMSOL Multiphysics? Simply put, it is a computer program that allows us to model and simulate a wide variety of physical phenomena. The word Multiphysics is not in the name for the kicks! The program can tackle technical problems in many fields of science and engineering. Here are some of them: acoustics, electromagnetism, fluid dynamics and heat transfer, structural mechanics, chemical engineering, earth science, and MEMs. For a complete list of application modes (or the type of phenomena COMSOL is capable of solving), visit Naturally, in the interest of our course, we are only going to use the heat transfer and fluid dynamics modes of COMSOL Multiphysics. - iv -

7 INTRODUCTION TO COMSOL MULTIPHYSICS 3. Why COMSOL Multiphysics? Traditional finite element method software comes as a bound package of separate computer programs, each of which is responsible for only a part of the modeling procedure. Thus, traditionally, one program is used to create model geometry, another program is used to mesh the geometry, apply material properties and specify boundary conditions. A solver is another program that is responsible for the actual number crunching and saving of the solution. At the end, the results must be plotted in yet another program that deals with post processing. For our purposes, such disconnected way of analyzing a problem is rather inconvenient. COMSOL Multiphysics solves this issue by being an all in one geometry creator and mesher, solver and post processor. In the course of solving these problems, you will see how easy it is to switch from one traditionally separate step to another. In addition, COMSOL Multiphysics is much simpler to use than traditional finite element method software packages. (Although its geometry creating features still suffer from an underdeveloped environment) Moreover, it was designed to be a user intuitive software. The fact that COMSOL Multiphysics is capable of analyzing our problems and that it is relatively user friendly made it our choice. INTRODUCTION 4. Where in ME Department Can I find and use COMSOL Multiphysics? The software is installed in rooms ST 226 and ST 213. We advise you to use computers in room ST 213 when you solve the problems with COMSOL Multiphysics. Computers in this room are more powerful than computers in room ST 226. Some problems require MATLAB, which is installed in room ST 226. MATLAB is also installed on most of the computers throughout Steinman Hall. 5. Can I install and use COMSOL Multiphysics at home? Possibly. You must first obtain a copy of the software of the same version or higher used to create these instructions. The version of the software we used to create instruction manuals is 3.5. Earlier versions of the software will have differences in their appearance and certain menu options, and may thus be somewhat incompatible with these instructions. In the mechanical engineering department, Professor P. Ganatos has a copy of COMSOL Multiphysics. If you are the first one to ask him for the software, announce it to your fellow classmates and organize a way in which you will share the software with the students after you are done installing it on your personal computer. Do not return it to Professor Ganatos before making sure that there are no other students who are willing to install it on their computers. - v -

8 INTRODUCTION TO COMSOL MULTIPHYSICS INTRODUCTION When you install the software on your personal computer, setup will ask you for a license. It is possible (although we have not tested it) to request the license from the server in mechanical engineering department. You need to have an internet connection to do this from your home. Consult Professor Ganatos on how to do this step properly. He will most likely direct you to our IT specialist for further assistance. Again, try to organize yourself and your classmates so that only one or two people ask the same question to Professor Ganatos. Put yourself in his position! If 30 or so students ask the same question every semester! 6. There is Always Room for Improvement! In the course of solving the assigned problems, you may come up with certain suggestions to improve things a bit. These can be issues with the program, mistakes in the instructions of the manuals or even general remarks. If you find your cause beneficial to others, let your voice be heard so that proper improvements can be made. Remember that the next generation of students after you will use the same instructions and that you may be the one to have corrected certain errors. We have opened a Google based forum to handle this aspect of the course. Each semester, one of your fellow classmates must become a moderator of forum to keep things organized. All the details about the forum, its rules of use, and how to join it are located on the following website: - vi -

9 INTRODUCTION TO COMSOL MULTIPHYSICS FILE NAMING AND SAVING CONVENTIONS In an effort to keep things organized when it comes to trouble shooting, we have created the following file naming conventions. Please follow these conventions when you save and/or backup your COMSOL Multiphysics (.mph) files and use them to share with other students or your Professor. This way, it is easy for us and your fellow classmates to identify your work performed on COMSOL Multiphysics. In this section, we also explain how to obtain and/or create MATLAB (.m) files from a variety of sources. 1. How to properly name and save COMSOL Multiphysics (.mph) files. INTRODUCTION Please use the following file naming convention when you save COMSOL Multiphysics (.mph) files: Where, MN_FirstNameL_ZZZZ.mph MN stands for Module Number. Replace MN by the actual module number. FirstNameL is to be replaced by your first name, followed by the last name initial (ex. John Smith = JohnS). ZZZZ is to be replaced by the last 4 digits of your social security number (ex = 6789). For instance, if John Smith is working on module #3 and the last 4 digits of his social security number are 6789, he would save the file as: 3_JohnS_6789.mph. 2. Obtaining MATLAB (.m) files. As you may already know, MATLAB (.m) files are usually text based scripts that contain certain commands, or code to be executed by MATLAB. Most of the problems in this manual use MATLAB as an auxiliary tool to re plot and check results from COMSOL Multiphysics. For this reasons, we have created sample scripts for you to use after solving a problem with COMSOL Multiphysics. These scripts are available from multiple sources: outpost 1. The Blackboard 2. The PDF version of this manual 3. The Google based group ( - vii -

10 INTRODUCTION TO COMSOL MULTIPHYSICS 4. COMSOL video tutorial website ( INTRODUCTION In case you still cannot obtain MATLAB scripts for some reason, there is a fifth (a most cumbersome, but also most reliable) source. Problems which use MATLAB include the sample script with them, fully reprinted in the appendix section. You will find this section at the end of each problem. At this point, we have covered most of the essential introductory remarks. We wish you good luck in simulating heat transfer problems that follow! - viii -

11 Fin Tip Insulation Effect On Q f FIN TIP INSULATION: EFFECT ON Q f Problem Statement In this module, we will examine the extent to which insulating the tip of a fin plays a role on total heat transfer Q f. As shown in diagram 1, one end of a cylindrical fin is maintained at T 0. Two cases are considered at the tip: (A) insulated tip and (B) heat transfer by convection at the tip. Heat is removed from the surface of the fin to the surroundings by convection. Assuming constant h, k, and T, we will compute total heat transfer, Q f, for both of the cases. We will then compare the results of the two cases with each other to make a judgment and comment on what the effect of insulating a fin tip on heat transfer rate is. Thermal and geometric parameters for the model are listed below. Known quantities: Diagram 1 Insulated Rod T 0 = 100 ºC T = 20 ºC k = 160 W/m ºC h = 10 W/m 2 ºC L = 30 cm r 0 = 0.5 cm Observations Since Bi << 1, we should expect negligible radial temperature variation. This means that at any point x, temperature at the center of the fin is the same (or very nearly the same) as temperature at the surface. Both equations (3.68) and (3.69) are applicable for determination of Q f. Since r 0 /L << 1, the tip surface area is small when compared to cylindrical surface area of the fin. In addition, the temperature at the tip is lowest and therefore, convection at the tip is expected to be small. We should therefore expect a small difference in the total heat transfer Q f for both of the cases. Assignment 1. Using COMSOL, show the radial temperature distribution for both cases. 2. Using COMSOL, compute the heat transfer rate Q f for both cases. 3. Compute theoretical Q f for both cases. Compare the results with those in the above question. Are COMSOL results valid? 4. Compute theoretical Q f using the corrected length parameter L c and compare the result to Q f (theoretical) calculated for the case of convection at the tip. Do these results agree better than those in question 3? Why or why not? - 1 -

12 Fin Tip Insulation Effect On Q f 5. Using COMSOL and an additional software of your choice (i.e. MATLAB, Excel, ), compare temperature distribution T(x) obtained by COMSOL with the predicted theoretical distributions derived in chapter 3 of your textbook for both of the cases. Do COMSOL results agree well with the theory? A sample answer for this question using MATLAB is provided. Modeling with COMSOL Multiphysics MODEL NAVIGATOR This is our starting point in the model where you define the very basics of the problem, such as the number of dimensions, type of coordinate system, and most importantly the application mode which agrees with the physical phenomena of the problem. We will model this problem with a 3 dimensional cylindrical fin. Since we are not intending to look at the field flow outside the fin, we will only need to work with the Heat Transfer Module. We are also modeling the process as steady state. For this setup: 1. Start COMSOL Multiphysics. 2. In the Space dimension list select 3D (under the New Tab). 3. From the list of application modes select Heat Transfer Module General Heat Transfer Steady State Analysis 4. Click OK

13 Fin Tip Insulation Effect On Q f GEOMETRY MODELING In this step, we will create a 3 dimensional cylindrical geometry that will be used as a model for our problem. To do this: 1. Select Draw Cylinder option from menus at the top. 2. In the newly appearing Cylinder window, specify the cylinder Radius and Height (length) as 0.5e-2 and 30e-2, respectively. 3. Enter -0.5e-2 for the y and z axis base point fields. This will place the fin centered at the origin. 4. Enter 1 and 0 in the x and z axis direction vector fields, respectively. This will align the fin in the x direction and place the base of the fin in the y z plane. 5. Click OK. 6. Click on Zoom Extents button in the main toolbar to zoom into the geometry. You should see your 3D fin now selected in light red color in the main program window. You can try to orbit, pan, and zoom to investigate the geometry you just made. In particular, try to explore what the following buttons do:,,,,,,,

14 Fin Tip Insulation Effect On Q f Note: If you made errors in this step, you can still correct them. Make sure the geometry you created is shown in a light red color in the main window, then select Draw Object Properties from the menus at the top. This will bring the Cylinder definition window back up. PHYSICS SETTINGS CASE A: INSULATED TIP Physics settings in COMSOL consist of two parts: (1) Subdomain settings and (2) boundary conditions. The subdomain settings let us specify fin s material, initial conditions and 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. Subdomain Settings: 1. From the Physics menu select Subdomain Settings (equivalently, press F8). 2. Select Subdomain 1 in the Subdomain selection field. 3. Enter 160 in the field for thermal conductivity k. 4. Click OK Observe that COMSOL provides the governing equation for conduction on the top left corner of the Subdomain Settings window. Also, the fields for the density and heat capacity do not play a role in steady state analysis

15 Fin Tip Insulation Effect On Q f 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 Temperature Enter in the T 0 field 2, 3, 4, 5 Heat Flux Enter 10 in the h field Enter in the T inf field 6 Thermal Insulation 3. Click OK to apply and close the Boundary Settings dialogue. Observe that: (1) by selecting the boundary numbers in the Boundary selection field, the selected boundaries are highlighted in red on the actual geometry of the fin; alternatively, you could have selected a boundary by clicking on the geometry itself, and (2) the types of boundaries for convection/conduction, such as heat fluxes, temperatures, or thermal insulations and more are all described mathematically in the upper part of the window. The condition for boundary 1 is the base temperature T 0, as described in the problem definition. The heat flux boundary condition for boundaries 2 5 allows us to model conductive convective interface at these boundaries. With q 0 equal to zero we obtain a condition that implies that conductive heat transfer is equal to convective heat transfer at those boundaries with constant h. The thermal insulation condition applied to boundary 4 (the tip) implies that there is no convective heat transfer taking place

16 Fin Tip Insulation Effect On Q f MESH GENERATION To minimize the computational time without compromising much accuracy of the solution, we must change the default meshing parameters. To do this, 1. Select Mesh Free Mesh Parameters (F9) from the menus at the top. 2. Switch to the Edge tab in the new Free Mesh Parameters window. 3. Select edges 1, 2, 4, and 6, at the same time in the Edge selection field. 4. Switch to the Distribution tab. 5. Enable the Constrained edge element distribution checkbox. 6. Enter 4 as the number of edge elements. 7. Click the Mesh Selected button. 8. Select edge 7 in the Edge selection field. 9. Enable the Constrained edge element distribution checkbox. 10. Enter 10 as the number of edge elements. 11. Enable the Distribution checkbox. 12. Enter 5 as the element ratio. 13. Change the distribution method to Exponential

17 Fin Tip Insulation Effect On Q f 14. Click the Mesh Selected button. 15. Click the OK button. 16. Switch to the boundary mode by selecting the following button:. 17. In the main window (with the fin geometry), select the base boundary of the fin. 18. Apply the mapped boundary meshing by pressing the following button:. 19. Switch to the subdomain mode by selecting the following button:. 20. Apply the mapped subdomain meshing by pressing the following button:. Your mesh is now complete. If you did not encounter any errors in the meshing steps, it should resemble the one shown below. We are now ready to compute and obtain the solution

18 Fin Tip Insulation Effect On Q f 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. 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 seconds 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 boundary color map: By default, your immediate result may be given as a slice distribution diagram instead of the boundary one shown above. The next section (Postprocessing and Visualization) will help you in obtaining the above and other diagrams, extracting temperature distribution data from the solution, and computing the heat transfer rate Q f through COMSOL)

19 Fin Tip Insulation Effect On Q f 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 field. In this problem we will deal with 3D color maps, heat transfer rate computation, 1D temperature distribution plots, and data extraction. We will then address the questions of COMSOL solution validity and compare the results to theoretical predictions. To do this effectively, we will need a more flexible data plotting utility. We will use MATLAB as a choice of post computational and plotting program to address these questions. However, if you do not feel comfortable using MATLAB, you may use the software of your choice. Obtaining the 3D Boundary Temperature Color Map: 1. From the Postprocessing menu open Plot Parameters dialog box (F12). 2. Under the General tab, enable the Boundary plot type. 3. Deselect any other plot types, except Geometry edges as shown below (left): 4. Change the Plot in option to New Figure using the drop down menu. 5. Switch to Boundary tab. 6. Change the unit of temperature to degrees Celsius. 7. Click the Apply button

20 Fin Tip Insulation Effect On Q f Clicking the Apply button will keep the Plot Parameters window open. If you have time, experiment with other plot types for a few minutes. As you look through results, notice which quantities are being plotted. After you click the Apply button, a separate window will pop up with the 3D temperature color map. You can still interactively orbit, zoom, and pan around the geometry. Clicking the Default 3D View button will show the default trimetric view of the results. Clicking the,, buttons will position the geometry of the fin with the z, x, and y axis pointing normal to the computer monitor, with the axis vector direction pointing towards the user. Clicking twice consecutively on either of these buttons will negate the axis vector direction (pointing normal to the computer monitor in a direction away from the user) 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. Click the save button in your figure with results. 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

21 Fin Tip Insulation Effect On Q f As an example, the image shown below was processed with the same settings as above. It shows temperature distribution of the fin slice in x y plane. The triangles represent the heat flux. The size of the triangles represents the amount of heat flux at a point. Computing Total Heat Transfer Q f : 1. From the Postprocessing menu select Boundary Integration option. 2. Select boundaries 2 to 6 in the boundary selection field. 3. In the Subdomain Integration dialog window, change Predefined Quantities setting to Normal total heat flux. 4. Click the OK button. The value of the integral (solution) is displayed at program s prompt on the bottom. In this case, Q f = 4.48 W. 1D Plots and Data Extraction: Data, such as T(x,0,0) can be best represented on a 1D plot. While the color maps showing temperature distribution do present numerical data, they are better suited for an overall qualitative representation. When specific quantitative data is needed, such as T(x,0,0), 1D plots should be the choice of representation. In addition, such quantitative

22 Fin Tip Insulation Effect On Q f data representation makes it easier to compare and verify. Here, we will first plot T(x,0,0). Secondly, we will extract T(x,0,0) to a text file. To do this, 1. Select Postprocessing Cross Section Plot Parameters option. 2. Switch to the Line/Extrusion tab. 3. Change the unit of temperature to degrees Celsius. 4. Enter 0 and 0.3 for the x0 and x1 coordinates in cross section line data field. Enter -0.5e-2 for y0, y1, z0, and z1 coordinate fields. 5. Click the OK button. You should now get an exponentially decaying graph showing T(x,0,0). This is the temperature variation along the length of the fin at the center line. To export this data to a text file, 6. Click the export current data plot button. 7. Click Browse and navigate to your saving folder (say Desktop ). 8. Name the file Tx_comsol_insulated.txt. (Note: do not forget to type the.txt extension in the name of the file). Make sure you remember where you save this data file. You will need it later for analysis with MATLAB

23 Fin Tip Insulation Effect On Q f CASE B: NON INSULATED TIP Prior to moving on to this case, make sure you have saved all the color maps you need and extracted the data T(x,0,0) to a text file. If you did not, finish those tasks first before you continue with case B. LOADING PREVIOUS FILE Since this is the same problem with simple modification on one boundary, first load the model you saved earlier by double clicking on it. If you already have it open, continue by modifying its physics settings. PHYSICS SETTINGS Boundary Conditions: Simple boundary modification is needed for enabling convection at the tip of the fin. To do this, 1. Press F7 to load the Boundary Settings window. 2. Select boundary 6 in the Boundary selection field. 3. Change the Boundary condition to Heat flux. 4. Enter these quantities in their appropriate fields: h = 10, Tinf = Click the OK button

24 Fin Tip Insulation Effect On Q f RECOMPUTING 1. From the Solve menu select Solve Problem. Allow a few seconds for the computation. POSTPROCESSING As you probably can see from the 3D color map for this case, there is hardly any difference when compared to case A. It is hard to note quantitative differences from these color maps. We will therefore use COMSOL to just compute the total heat transfer q f and extract the COMSOL T(x,0,0) data to a text file. The procedures for doing this are the same as in case A. 1. Follow the same procedure as in case A to find the total heat transfer Q f. Start from page 11, section on Computing the total heat transfer Q f. The COMSOL value of Q f for case B (non insulated tip) is about q = W. 2. Extract the COMSOL T(x,0,0) data to a text file for this case. Name the file Tx_comsol_non_insulated.txt and save it in the same location that where you saved your data for case A. Make sure you have and know where you save these files as you will need them for further analysis. With the amount of data gathered by this time, you are in a position to answer the questions posed in the Assignment section on page 1. A sample for question 5 using MATLAB script is provided in the Appendix. You are advised to use this sample to answer question 5. This completes COMSOL modeling procedures for this problem

25 Fin Tip Insulation Effect On Q f Modeling with MATLAB This part of modeling procedures describes how to create comparative T(x) using MATLAB. Obtain the file named effect_of_insulating_fin_tip.m from Blackboard prior to following these procedures. Important: save this file in the same directory where you saved your 2 COMSOL data files. (Note: effect_of_insulating_fin_tip.m file is attached to the PDF version of this document as well. To access the file directly from this document, select View Navigation Panels Attachements and then save effect_of_insulating_fin_tip.m in the same directory where you saved your 2 COMSOL data files). In case you cannot obtain effect_of_insulating_fin_tip.m file from the above sources, it is also fully reprinted in this appendix. Comparing COMSOL Solution with the Fin Heat Equation Solution Now we are ready to load and graph our COMSOL data in MATLAB and compare it with the fin heat equation solution. Follow the steps below to complete this problem: 1. Open MATLAB by double clicking its icon on the Desktop. 2. Load effect_of_insulating_fin_tip.m file by selecting File Open [%Your Selected Saving Directory%] effect_of_insulating_fin_tip.m. The script program responsible for COMSOL data import and data comparison will appear in a new window. 3. Press F5 to run the script. MATLAB editor will display a warning message. Click Change Directory to run the script. If there are no errors in the process, you will be presented with 3 plots showing temperature distribution comparisons. Theoretical heat transfer rates for both of the cases will be displayed in the main Command Window in MATLAB. Save these results for your module report. Results Plotted with MATLAB

26 Fin Tip Insulation Effect On Q f

27 Fin Tip Insulation Effect On Q f APPENDIX MATLAB script If you could not obtain this script from the Blackboard or the PDF file, you may copy it from here into notepad and save it in the same directory where you saved your 2 COMSOL data files. 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 Heat Transfer % Sample MATLAB Script For COMSOL Module: % (X) INSULATING FIN TIP: EFFECT ON qf % IMPORTANT: Save this file in the same folder with your % "Tx_comsol_insulated.txt" and % "Tx_comsol_non_insulated.txt" files. % ###################################################### % clc; % Clears the UI prompt clear; % Clears variables from memory % %% Constant Quantities k = 160; % Fin's Conductivity, [W/m-K] h = 10; % Heat Tranf. Coeff. at fin's surface, [W/m^2-K] r = 0.005; % Fin's radius, [m] L = 0.3; % Fin's length, [m] C = 2*pi*r; % Fin's circumference, [m] Ac = pi*r^2; % Fin's conduction area, [m^2] m = (h*c/(k*ac))^(1/2); % Fin parameter, [1/m] To = 100; % Base temperature, [degc] Tinf = 20; % Ambient temperature, [degc] %% Case A: Insulated Tip % Computing Theoretical qf and T(x): qf_a = (k*ac*c*h)^(1/2)*(to - Tinf)*tanh(m*L); % Fin's Heat Transfer Rate, [W] disp('theoretical qf (case A), [in Watts] = '); disp(qf_a); % Displaying Theor. qf, [W] x = 0:.01:L; % x - coordinate discritization, [m] Tx_a = cosh(m*(l - x))./(cosh(m*l))*(to - Tinf) + Tinf; % T(x) for the above Fin, [degc] % Loading and extracting COMSOL results for T(x,0,0) load Tx_comsol_insulated.txt; % loads COMSOL text data file into memory comsol_coords_a = Tx_comsol_insulated(:,1); % extracts COMSOL x - axis coordinates, [m] comsol_coords_a = comsol_coords_a(1:200,1); % deletes extraneous data Tx_comsol_a = Tx_comsol_insulated(:,2); % extracts COMSOL T(x,0,0), [degc] Tx_comsol_a = Tx_comsol_a(1:200,1); % deletes extraneous data % Plotting Theoretical T(x) and COMSOL T(x,0,0) figure1 = figure('inverthardcopy','off',... %\ 'Colormap',[1 1 1 ],... % -> Setting up the figure 'Color',[1 1 1]); %/ plot(x,tx_a,'r+'); % Plotting theor. T(x) hold on % Freezing the figure plot(comsol_coords_a,tx_comsol_a,'k') % Plotting COMSOL T(x,0,0) legend('equation [3.82]','COMSOL Solution') %\ box off % xlabel('x, (m)') % ylabel('temperature, (deg C)') % set(get(gca,'ylabel'),... % 'fontsize', 20,... % 'FontName','Times New Roman',... % -> Cosmetics 'FontAngle','italic') % set(get(gca,'xlabel'),... % 'fontsize', 20,... % 'FontName','Times New Roman',... % 'FontAngle','italic') %/ %% CASE B: Convection at the Tip of the Fin

28 Fin Tip Insulation Effect On Q f % Computing Theoretical qf and T(x): term1 = (sinh(m*l) + (h/(m*k))*cosh(m*l))/(cosh(m*l) + (h/(m*k))*sinh(m*l)); qf_b = (k*ac*c*h)^(1/2)*(to - Tinf)*term1; % Fin's Heat Transfer Rate, [W] disp('theoretical qf (case B), [in Watts] = '); disp(qf_b); % Displaying Theor. qf, [W] term2 = (cosh(m*(l - x)) + (h/(m*k))*sinh(m*(l - x)))./(cosh(m*l) + (h/(m*k))*sinh(m*l)); Tx_b = term2*(to - Tinf) + Tinf; % T(x) for the above Fin, [degc] % Loading and extracting COMSOL results for T(x,0,0) load Tx_comsol_non_insulated.txt; % loads COMSOL text data file into memory comsol_coords_b = Tx_comsol_non_insulated(:,1); % extracts COMSOL x - axis coordinates, [m] comsol_coords_b = comsol_coords_b(1:200,1); % deletes extraneous data Tx_comsol_b = Tx_comsol_non_insulated(:,2); % extracts COMSOL T(x,0,0), [degc] Tx_comsol_b = Tx_comsol_b(1:200,1); % deletes extraneous data % Plotting Theoretical T(x) and COMSOL T(x,0,0) figure2 = figure('inverthardcopy','off',... %\ 'Colormap',[1 1 1 ],... % -> Setting up the figure 'Color',[1 1 1]); %/ plot(x,tx_b,'r+'); % Plotting theor. T(x) hold on % Freezing the figure plot(comsol_coords_b,tx_comsol_b,'k') % Plotting COMSOL T(x,0,0) legend('equation [3.80]','COMSOL Solution') %\ box off % xlabel('x, (m)') % ylabel('temperature, (deg C)') % set(get(gca,'ylabel'),... % 'fontsize', 20,... % 'FontName','Times New Roman',... % -> Cosmetics 'FontAngle','italic') % set(get(gca,'xlabel'),... % 'fontsize', 20,... % 'FontName','Times New Roman',... % 'FontAngle','italic') %/ %% Comprehensive Plot figure3 = figure('inverthardcopy','off',... %\ 'Colormap',[1 1 1 ],... % -> Setting up the figure 'Color',[1 1 1]); %/ plot(comsol_coords_a,tx_comsol_a,comsol_coords_b,tx_comsol_b) hold on plot(x,tx_a,'+',x,tx_b,'+') legend('comsol Solution (case A)','COMSOL Solution (case B)',... 'Equation [3.82]','Equation [3.80]') %\ box off % xlabel('x, (m)') % ylabel('temperature, (deg C)') % set(get(gca,'ylabel'),... % 'fontsize', 20,... % -> Cosmetics 'FontName','Times New Roman',... % 'FontAngle','italic') % set(get(gca,'xlabel'),... % 'fontsize', 20,... % 'FontName','Times New Roman',... % 'FontAngle','italic') %/ This completes MATLAB modeling procedures for this problem

29 Heat Loss From A Rod HEAT LOSS FROM A ROD Problem Statement In this module, we will examine the situation in which the heat loss from a steel rod is insufficient. The rod is attached to a steam pipe at one end and is insulated on the other end. The cylindrical surface loses heat to the surroundings by convection. The length of the rod is L. To increase the heat loss, one engineer recommended increasing the length of the rod. We will carry out a COMSOL study to evaluate the effect of increasing the length of the rod on the rate of heat transfer q f. Ultimately, we wish to construct a plot of heat loss rate q f vs. rod length L as the length is increased from L to 2L. Known quantities: Diagram 1 Cylindrical Rod T 0 = 80 ºC T = 24 ºC h = 8 W/m 2 ºC k = steel L = 25 cm L 50 cm d = 0.2 cm T o h L T d Use the appendices in your textbook for the properties of materials considered. Observations Since Bi << 1, we should expect negligible axial temperature variation. This means that at any point x, temperature at the center of the fin is the same (or very nearly the same) as temperature at the surface. Both equations (3.68) and (3.69) are applicable for determination of q f. Intuitively speaking, increasing the length L of the rod will also increase its surface area in proportion, which should, presumably, increase the rate of heat loss. Nevertheless, the temperature difference T 0 T is also a factor in determination of q f. Given that h and k are fixed, if T 0 T is small enough, increasing the length of the rod may not contribute to the increase of q f. However, we do not have knowledge of just how small T 0 T should be to cause no significant change in the value of q f as L is increased

30 Heat Loss From A Rod Assignment 1. Using COMSOL, show the axial temperature distribution color map. 2. Using COMSOL, compute the heat transfer rate q f for at least 5 lengths of the rod. 3. Compute theoretical q f for at least 5 cases (using the same L s for the cases in question 2). Compare the results with those in the above question. Are COMSOL results valid? 4. Using an additional software of your choice (i.e. MATLAB, Excel, ), construct a plot showing theoretical q f and q f obtained from COMSOL vs. L. Comment on the effect of increasing the length of the rod on the rate of heat transfer q f. A sample answer for this question using MATLAB is provided. 5. Compute fin efficiency, η f, for L = 25 cm and L = 50 cm. Validate your comment in question 4 in light of this computation. Based on heat transfer considerations, would it be wise to follow the engineer s suggestion? Besides heat transfer, what other considerations might pose issues? 6. [Extra Credit]: Optimize η f with respect to L. What L would you recommend for the same values of h, k and d used in this problem? Use practical judgment

31 Heat Loss From A Rod Modeling with COMSOL Multiphysics MODEL NAVIGATOR This is our starting point in the model where you define the very basics of the problem, such as the number of dimensions, type of coordinate system, and most importantly the application mode which agrees with the physical phenomena of the problem. We will model this problem with a 3 dimensional cylindrical fin. Since we are not intending to look at the field flow outside the fin, we will only need to work with the Heat Transfer Module. We are also assuming the process to be in steady state. For this setup: 1. Start COMSOL Multiphysics. 2. In the Space dimension list select 3D (under the New Tab). 3. From the list of application modes select Heat Transfer Module General Heat Transfer Steady State Analysis. 4. Click OK

32 Heat Loss From A Rod GEOMETRY MODELING In this step, we will create a 3 dimensional cylindrical geometry that will be used as a model for our problem. To do this: 1. Select Draw Cylinder option from menus at the top. 2. In the newly appearing Cylinder window, specify cylinder s Radius and Height (length) as 0.1e-2 and 25e-2, respectively. 3. Enter 1 and 0 in the x and z axis direction vector fields, respectively. This will align the fin in the x direction and place the base of the fin in the y z plane. 4. Click OK. 5. Click on Zoom Extents button in the main toolbar to zoom into the geometry. You should see your 3D fin now selected in light red color in the main program window. You can try to orbit, pan, and zoom to investigate the geometry you just made. In particular, try to explore what the following buttons do:,,,,,,,

33 Heat Loss From A Rod Note: If you made errors in this section, you can still correct them. Make sure the geometry you created is shown in a light red color in the main window, then select Draw Object Properties from the menus at the top. This will bring the Cylinder definition window back up. PHYSICS SETTINGS Physics settings in COMSOL consist of two parts: (1) Subdomain settings and (2) boundary conditions. The subdomain settings let us specify fin s material, initial conditions and 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. Subdomain Settings: 1. From the Physics menu select Subdomain Settings (equivalently, press F8). 2. Select Subdomain 1 in the Subdomain selection field. 3. Enter 43 in the field for thermal conductivity k. 4. Click OK Observe that COMSOL provides the governing equation for conduction on the top left corner of the Subdomain Settings window. Also, the fields for the density and heat capacity do not play a role in steady state analysis

34 Heat Loss From A Rod 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 Temperature Enter in the T 0 field 2, 3, 4, 5 Heat Flux Enter 8 in the h field Enter in the T inf field 6 Thermal Insulation 3. Click OK to apply and close the Boundary Settings dialogue. Observe that: (1) by selecting the boundary numbers in the Boundary selection field, the selected boundaries are highlighted in red on the actual geometry of the fin; alternatively, you could have selected a boundary by clicking on the geometry itself, and (2) the types of boundaries for convection/conduction, such as heat fluxes, temperatures, or thermal insulations and more are all described mathematically in the upper part of the window. The condition for boundary 1 is the base temperature T 0, as described in the problem statement. The heat flux boundary condition for boundaries 2 5 allows us to model conductive convective interface at these boundaries. With q 0 equal to zero we obtain a condition that implies that conductive heat transfer is equal to convective heat transfer at those boundaries with constant h. The thermal insulation condition applied to boundary 4 (the tip) implies that there is no convective heat transfer taking place

35 Heat Loss From A Rod MESH GENERATION To minimize the computational time without compromising much accuracy of the solution, we must change the default meshing parameters. To do this, 1. Select Mesh Free Mesh Parameters (F9) from the menus at the top. 2. Switch to the Edge tab in the newly appearing Free Mesh Parameters window. 3. Select edges 1, 2, 4, and 6, at the same time in the Edge selection field. 4. Switch to the Distribution tab. 5. Enable the Constrained edge element distribution checkbox. 6. Enter 4 as the number of edge elements. 7. Click the Mesh Selected button. 8. Select edge 7 in the Edge selection field. 9. Enable the Constrained edge element distribution checkbox. 10. Enter 30 as the number of edge elements. 11. Enable the Distribution checkbox. 12. Enter 5 as the element ratio. 13. Change the distribution method to Exponential

36 Heat Loss From A Rod 14. Click the Mesh Selected button. 15. Click the OK button. 16. Switch to the boundary mode by selecting the following button:. 17. In the main window (with the fin geometry), select the base boundary of the fin. 18. Apply the mapped boundary meshing by pressing the following button:. 19. Switch to the subdomain mode by selecting the following button:. 20. Apply the mapped subdomain meshing by pressing the following button:. Your mesh is now complete. If you did not encounter any errors in the meshing steps, it should resemble the one shown below. We are now ready to compute and obtain the solution

37 Heat Loss From A Rod 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. 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 seconds 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 boundary color map: By default, your immediate result may be given as a slice distribution diagram instead of the boundary one shown above. The next section (Postprocessing and Visualization) will help you in obtaining the above diagram and computing the heat transfer rate q f through COMSOL)

38 Heat Loss From A Rod 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 3D color maps and heat transfer rate computation. We will then address the questions of COMSOL solution validity and compare the results to theoretical predictions. To do this effectively, we will need a more flexible data plotting utility. We will use MATLAB as a choice of post computational and plotting program to address these questions. However, if you do not feel comfortable using MATLAB, you may use the software of your choice. Obtaining the 3D Boundary Temperature Color Map: 1. From the Postprocessing menu open Plot Parameters dialog box (F12). 2. Under the General tab, enable the Boundary plot type. 3. Deselect any other plot types, except Geometry edges as shown below (left): 4. Change the Plot in option to New Figure using the drop down menu. 5. Switch to Boundary tab. 6. Change the unit of temperature to degrees Celsius. 7. Click the Apply button

39 Heat Loss From A Rod Clicking the Apply button will keep the Plot Parameters window open. If you have time, experiment with other plot types for a few minutes. As you look through results, notice which quantities are being plotted. After you click the Apply button, a separate window will pop up with the 3D temperature color map. You can still interactively orbit, zoom, and pan around the geometry. Clicking the Default 3D View button will show the default trimetric view of the results. Clicking,, buttons will position the geometry of the fin with the z, x, and y axis pointing normal to the computer monitor, respectively, with the axis vector direction pointing towards the user. Clicking twice consecutively on either of these buttons will negate the axis vector direction (pointing normal to the computer monitor in a direction away from the user) 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. Click the save button in your figure with results. 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

40 Heat Loss From A Rod As an example, the image shown below was processed with the same settings as above. It shows temperature distribution of the fin slice in x y plane. Computing Total Heat Transfer q f : 1. From the Postprocessing menu select Boundary Integration option. 2. Select boundaries 2 6 in the boundary selection field. 3. In the Subdomain Integration dialog window, change Predefined Quantities setting to Normal total heat flux. 4. Click the OK button. The value of the integral (solution) is displayed at program s prompt on the bottom. In this case, q f = W. Note the value of the total heat flux q f. This is the value when the length of the rod is L = 25 cm. We will now gradually increase the length of the rod to 2L. To do this, let s select 5 cm increments. In other words, we will resolve the problem for the following lengths of the rod: 25, 30, 35, 40, 45, and 50 cm. Recall that our goal is to obtain the total heat transfer rate (the procedure is shown above in steps 1 4) for each of these cases. Therefore, it is a good idea for you to start tabulating these values along the way. We will

41 Heat Loss From A Rod then construct a graph of q f versus the length L of the rod to see if there is a significant effect on enhancing q f. Since the procedure for this recalculation is the same for each of the cases, we will only do one case here for demonstrative purposes. Use this procedure to complete the other cases on your own. GEOMETRY REARRANGEMENTS To change L from 25 cm to 30 cm, we need to go back to geometry settings. Note that this change will not affect boundary conditions. Thus, no changes will need to be made for the boundary settings. Nevertheless, the current mesh settings will be affected. Thus, we will need to apply custom meshing for each of the cases as was done on pages We start by rearranging the geometry as follows: 1. Go back to the geometry modeling by clicking the Draw mode button located in the upper toolbar. 2. Select the CYL1 geometry by clicking on it in the main drawing area. The geometry should now be highlighted in light red color. 3. Select Draw Object Properties from the menus at the top. This will bring the Cylinder definition window up. 4. Change the Height value to Click the OK button. 6. Click on Zoom Extents button in the main toolbar to re center the geometry

42 Heat Loss From A Rod Unfortunately, the custom mesh settings have been altered by the above steps. To obtain the mesh used previously, follow the steps on pages Once you have created the mesh, 7. Resolve the problem by selecting the Solve Problem from Solve menu. Repeat the Computing Total Heat Transfer q f section on page 30. Note the value you compute of total heat transfer rate q f for this configuration. Then, repeat the steps for geometry rearrangements for all the other increments. Make a table listing the total heat transfer rate q f versus the length of the rod L. With the amount of data gathered by this time, you are in a position to answer the questions posed in the Assignment section on page 20. A sample for question 4 using MATLAB script is provided in the Appendix. You are advised to use this sample to answer question 5. This completes COMSOL modeling procedures for this problem

43 Heat Loss From A Rod Modeling with MATLAB This part of modeling procedures describes how to create comparative T(x) using MATLAB. Obtain the file named heat_loss_from_rod.m from Blackboard prior to following these procedures. (Note: heat_loss_from_rod.m file is attached to the PDF version of this document as well. To access the file directly from this document, select View Navigation Panels Attachements and then save heat_loss_from_rod.m on your desktop). In case you cannot obtain heat_loss_from_rod.m file from the above sources, it is also fully reprinted in this appendix. Comparing COMSOL Solution with the Fin Heat Equation Solution Now we are ready to load and graph our COMSOL data in MATLAB and compare it with the fin heat equation solution. Follow the steps below to complete this problem: 1. Open MATLAB by double clicking its icon on the Desktop. 2. Load heat_loss_from_rod.m file by selecting File Open [%Your Selected Saving Directory%] heat_loss_from_rod.m. The script program responsible for manual COMSOL data entry and comparison will appear in a new window. 3. Press F5 to run the script. MATLAB editor will display a warning message. Click Change Directory to run the script. 4. Enter the values of q f, separated by comas and in square brackets, from the table you recorded earlier in MATLAB prompt. 5. Hit the enter key on your keyboard. If there are no errors in the process, you will be presented with 1 plot showing q f vs. L as L varies from 25 cm 50 cm. Theoretical and COMSOL heat transfer rates are both displayed in this plot. Save these results for your module report

44 Heat Loss From A Rod APPENDIX MATLAB script If you could not obtain this script from the Blackboard or the PDF file, you may copy it here, paste into notepad and save it in the same directory where you saved your 2 COMSOL data files. 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 Heat Transfer % Sample MATLAB Script For COMSOL Module: % (X) HEAT LOSS FROM A ROD % ###################################################### % clc; % Clears the UI prompt clear; % Clears variables from memory % %% Constant Quantities k = 43; % Fin's Conductivity, [W/m-K] h = 8; % Heat Tranf. Coeff. at fin's surface, [W/m^2-K] r = 0.001; % Fin's radius, [m] L = 0.25:.01:0.5; % Fin's length vector, [m] C = 2*pi*r; % Fin's circumference, [m] Ac = pi*r^2; % Fin's conduction area, [m^2] m = (h*c/(k*ac))^(1/2); % Fin parameter, [1/m] To = 80; % Base temperature, [degc] Tinf = 24; % Ambient temperature, [degc] %% Insulated Tip % Computing Theoretical qf and T(x): qf_t = (k*ac*c*h)^(1/2)*(to - Tinf)*tanh(m.*L); % Fin's Heat Transfer Rate, [W] % User prompt entry code for the COMSOL values of qf: qf_c = input('enter COMSOL qf values (Separated by comas) = '); L_c = [.25,.3,.35,.4,.45,.5]; % Evaluated COMSOL length entries, [m] % Plotting Theoretical Qf and COMSOL Qf vs. L: figure1 = figure('inverthardcopy','off',... %\ 'Colormap',[1 1 1 ],... % -> Setting up the figure 'Color',[1 1 1]); %/ plot(l,qf_t); % Plotting theor. qf hold on % Freezing the figure plot(l_c,qf_c,'r+') % Plotting COMSOL qf legend('equation [3.83]','COMSOL Solution') %\ box off % xlabel('x, (m)') % ylabel('q_f, (W)') % set(get(gca,'ylabel'),... % 'fontsize', 20,... % 'FontName','Times New Roman',... % -> Cosmetics 'FontAngle','italic') % set(get(gca,'xlabel'),... % 'fontsize', 20,... % 'FontName','Times New Roman',... % 'FontAngle','italic') %/ This completes MATLAB modeling procedures for this problem

45 Limits of the Fin Approximation LIMITS OF THE FIN APPROXIMATION Problem Statement In this module, our main goal is to demonstrate the validity of the fin approximation and its limitations. In particular, we wish to verify that simplifications in analysis leading to the fin approximation become not valid when Bi > 0.1. The setup, shown in diagram 1, is as follows: one end (the base) of a uniform cylindrical rod is maintained at T 0 and the other is insulated (the tip). The cylindrical surface exchanges heat with the surrounding fluid by convection. We will carry out a COMSOL study to visualize the 2D steady state temperature distribution in this fin for 5 distinct cases of h (given below). Using the obtained visual cues and the knowledge of Biot number, we will conclude in which of the 5 cases the fin approximation would fail. Known quantities: T 0 T = 200 ºC = 20 ºC L = 25 cm r 0 = 2.5 cm k = pyroceramic glass h = 0.08, 0.8 8, 80, 800 W/m 2 ºC Diagram 1 Insulated Rod Use the appendices in your textbook for the properties of material considered. Observations Since Biot number depends on the heat transfer coefficient h, the 5 fin cases considered above have different Biot numbers associated with them. Therefore, we should expect the fin approximation deviate from the exact analysis in the cases when Bi > 0.1. For the cases where Bi << 0.1, the fin approximation should be accurate. Since we are only interested in cross sectional temperature distribution along the fin, building a 2D COMSOL model is sufficient for this case. One of the model parameters (the heat transfer coefficient h) changes. We will use this observation as an advantage in our model and build a simple parametric study model

46 Limits of the Fin Approximation Assignment 1. What three parameters play a role in the assumption of the fin approximation that temperature variation in the lateral direction is negligible? 2. Calculate the Biot number for each h. 3. Using COMSOL, show the temperature distribution color maps for 5 different heat transfer coefficients specified above. 4. Use COMSOL solution to compare surface to center temperature of the 5 cases for all x along the fin. Produce a single graph that plots COMSOL T(x, 0) and T(x, r 0 ) for all of the cases considered. [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. Produce graphs which plot COMSOL center to surface temperature difference ΔT for all of the cases considered. For which Biot numbers is ΔT within 5 degrees of difference? For which Biot numbers is ΔT beyond 5 degrees of difference? [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. Compare COMSOL center temperature solution T(x, 0) with analytical solution for fin temperature given by equation Produce a single graph that plots COMSOL T(x, 0) and analytic T(x) for all of the cases considered. [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] 7. Perform simple error analysis between COMSOL center temperature data T(x, 0) and analytic temperature T(x) for all of the cases considered. Assume that analytic temperature T(x) given by equation 3.82 is correct. Make plots showing the error. [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] 8. Based on your answers to questions 4 5, which of the 3 cases should not be analyzed using the fin approximation approach and why not? Which if the cases could be analyzed using the fin approximation approach? 9. Based on your answers to questions 6 7, which of the 3 cases should not be analyzed using the fin approximation approach and why not? Which if the cases could be analyzed using the fin approximation approach?

47 Limits of the Fin Approximation Modeling with COMSOL Multiphysics MODEL NAVIGATOR This is our starting point in the model where you define the very basics of the problem, such as the number of dimensions, type of coordinate system, and most importantly the application mode which agrees with the physical phenomena of the problem. We will model this problem with a 2D rectangular geometry. Since we are not intending to look at the field flow outside the fin, we will only need to work with the Heat Transfer Module. We are also assuming the process to be in steady state. For this setup: 1. Start COMSOL Multiphysics. 2. In the Space dimension list select 2D (under the New Tab). 3. From the list of application modes select Heat Transfer Module General Heat Transfer Steady State Analysis 4. Click OK

48 Limits of the Fin Approximation OPTIONS AND SETTINGS: DEFINING CONSTANTS In this part, we will define certain constants that we will use in the steps to follow. In general, this step is optional. However, COMSOL gives us a neat way of tracking all of our constants in one window. In a complex model with many constants and parameters, it is a good idea to keep things as much organized as possible. 1. From the Options menu select Constants, and in the resulting dialog box define the following names and expressions; when done, click OK : NAME EXPRESSION VALUE DESCRIPTION d 2*2.5e-2[m] 0.05[m] Fin diameter L 25e-2[m] 0.25[m] Fin length T_ [K] [K] Base Temperature T_inf [K] [K] Ambient Temperature k_0 4[W/(m*K)] 4[W/(m K)] Glass conductivity h_0 8[W/(m^2*K)] 8[W/(m 2 K)] Heat Transf. Coeff. 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. GEOMETRY MODELING In this step, we will create a 2D rectangle that we will use as a model for our problem. We will use the dimensions ( d and L ) of the fin which we defined previously in Constants. To do this, 1. Select Draw Specify Objects Rectangle from the menus at the top. 2. Enter dimensions L and d for the width and height, respectively. 3. Enter -d/2 for the y base coordinate. 4. Click OK. 5. Use the Zoom Extents button in the main toolbar to zoom into the geometry

49 Limits of the Fin Approximation PHYSICS SETTINGS Physics settings in COMSOL consist of two parts: (1) Subdomain settings and (2) boundary conditions. The subdomain settings let us specify fin s material, initial conditions and 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. Subdomain Settings: 1. From the Physics menu select Subdomain Settings (equivalently, press F8). 2. Select Subdomain 1 in the Subdomain selection field. 3. Enter k_0 in the field for thermal conductivity k. 4. Click OK. Observe that COMSOL provides the governing equation for conduction on the top left corner of the Subdomain Settings window. Also, the fields for the density and heat capacity do not play a role in steady state analysis. Boundary Conditions: 1. From the Physics menu open the Boundary Settings (F7) dialog box

50 Limits of the Fin Approximation 2. Apply the following boundary conditions: BOUNDARY BOUNDARY CONDITION COMMENTS 1 Temperature Enter T_0 in the T 0 field 2, 3 Heat Flux 4 Thermal Insulation Enter h_0 in the h field Enter T_inf in the T inf field 3. Click OK to apply and close the Boundary Settings dialogue. Observe that: (1) by selecting the boundary numbers in the Boundary selection field, the selected boundaries are highlighted in red on the actual geometry of the fin; alternatively, you could have selected a boundary by clicking on the geometry itself, and (2) the types of boundaries for convection/conduction, such as heat fluxes, temperatures, or thermal insulations and more are all described mathematically in the upper part of the window. The condition for boundary 1 is the base temperature T 0, as described in the problem statement. The heat flux boundary condition for boundaries 2 and 3 allows us to model conductive convective interface at these boundaries. With q 0 equal to zero we obtain a condition that implies that conductive heat transfer is equal to convective heat transfer at those boundaries with constant h. The thermal insulation condition applied to boundary 4 (the tip) implies that there is no convective heat transfer taking place

51 Limits of the Fin Approximation MESH GENERATION To minimize the computational time without compromising much accuracy of the solution, we must change the default meshing parameters. To do this, 1. Select Mesh Free Mesh Parameters (F9) from the menus at the top. 2. Switch to the Boundary tab in the newly appearing Free Mesh Parameters window. 3. Select Boundary 1 from the Boundary Selection field. 4. Switch to the Distribution tab. 5. Enable the Constrained edge element distribution checkbox. 6. Enter 8 for the Number of edge elements. 7. Click the Remesh button. 8. Click OK to close Free Mesh Parameters window. You should get a mesh that looks like the one below: We are now ready to compute our solution

52 Limits of the Fin Approximation COMPUTING AND SAVING THE SOLUTION A parametric analysis is specified as follows for this problem: 1. From the Solve menu select Solver Parameters (F11). 2. Switch to Parametric analysis in Solver field. 3. Enter h_0 in the Name of Parameter field. 4. Enter in the List of parameter values 5. Click OK to close the Solver Parameters dialog. 6. From the Solve menu select Solve Problem. 7. Save your work on desktop by choosing File Save. Name the file according to the naming convention given in Introduction to COMSOL Multiphysics. One of the results that you obtain should resemble the following surface color map:

53 Limits of the Fin Approximation POSTPROCESSING AND VISUALIZATION After solving the problem, we would like 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 and temperature data extraction. Assignment questions 6 through 7 (see page 36) address COMSOL solution validity and compare results to analytic solution. Obtaining the 2D Fin Cross Section Temperature Color Map: 1. From the Postprocessing menu open Plot Parameters dialog box (F12). 2. Under the General tab, enable the Surface plot type (if it is not on by default). 3. Deselect any other plot types, except Geometry edges as shown below (left): 4. Select 800 as the solution to display using the drop down menu. (Note: This menu gives you the option to select the solution for a particular h ) 5. Switch to Surface tab. 6. Change the unit of temperature to degrees Celsius from the drop down menu in the Unit field. 7. Click the OK button

54 Limits of the Fin Approximation At this point, save the resulting color map for the purpose of writing your report. (Note: Saving instructions are given below). This color map displays solution for the case h = 800 W/m 2 ºC. For the other cases, repeat steps 1 7 on page 43, changing the value of h in step 4. Don t forget to save the color maps you obtain for these cases. Saving Color Maps: To save the results as an image for future discussion: 1. Select File 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. Plotting and Extracting COMSOL T(x, 0) and T(x, r 0 ) for h = 0.08 W/m 2 ºC To first plot COMSOL temperature at the center of the fin on 0 x L, 1. Select Cross Section Plot Parameters option from Postprocessing menu. 2. Under General tab, select 0.08 as the only Solution to use option

55 Limits of the Fin Approximation 3. Switch to the Line/Extrusion tab. 4. Change the Unit of temperature to degrees Celsius. 5. Enter the following coordinates in the Cross section line data : x0 = 0, x1 = 0.25; y0 = y1 = Click Apply. As a result of these steps, a new plot will be shown that graphs T(x, 0) on 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

56 Limits of the Fin Approximation Exporting COMSOL Data to a Data File 1. Click on Export Current Plot button in the Temperature graph. 2. Click Browse and navigate to your saving folder (say Desktop ). 3. Name and save the file as Tx_comsol_h008.txt. (Note: do not forget to type the.txt extension in the name of the file). 4. Click OK to save the file. To plot COMSOL temperature T(x, r 0 ) (surface of the fin) on 0 x L, repeat the steps for the above section with following modification: 5. In step 5 (page 45), change the y coordinates to y0 = y1 = When the graph is displayed, export the data to a text file using steps 1 4 above. Name and save the file as Ts_comsol_h008.txt in the same directory as the first data file. Important: You have to export temperature data for all other values of h. In total, you should have 10 text based data files: two data files per each value of h (one for central temperature distribution, one for surface temperature distribution). Simply repeat the steps for the above section with following modifications: 6. In step 2 (page 44), select the next value for h (0.8 in this case) Do not forget to export the data! Use the following table to name the 8 remaining temperature data files for each of the corresponding h. h CENTRAL T(x) FILE NAME SURFACE T(x) FILE NAME 0.08 Tx_comsol_h008.txt Ts_comsol_h008.txt 0.8 Tx_comsol_h08.txt Ts_comsol_h08.txt 8 Tx_comsol_h8.txt Ts_comsol_h8.txt 80 Tx_comsol_h80.txt Ts_comsol_h80.txt 800 Tx_comsol_h800.txt Ts_comsol_h800.txt It is important that you name the data files exactly as instructed above, as our sample MATLAB script is coded to use these names to import the data. If you make a mistake in naming a data file, MATLAB will produce an error and leave you without the plots! Therefore, it is advised that you pay extra attention to name these files correctly. This completes COMSOL modeling procedures for this problem

57 Limits of the Fin Approximation Modeling with MATLAB This part of modeling procedures describes how to create comparative graphs of COMSOL and analytical temperature distributions at the center and the surface of the fin for all x using MATLAB. Obtain MATLAB script file named lim_finapprox.m from Blackboard prior to following these procedures. Save this file in the same directory as the data file(s) (qy.txt) from COMSOL. (Note: lim_finapprox.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 lim_finapprox.m in a proper directory) Comparing COMSOL Solution to Correlation Solution MATLAB script (lim_finapprox.m) is programmed to use exported COMSOL data for fin center and surface temperature to compare it with analytical temperature distribution given by equation The script is also programmed to calculate COMSOL center to surface temperature differences and perform a simple error analysis to verify COMSOL solution. The script will ultimately produce 6 comparative graphs that will plot both solutions. Follow the steps below to complete this problem: 1. Open MATLAB by double clicking its icon on the Desktop. 2. Load lim_finapprox.m file by selecting File Open Desktop lim_finapprox.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 center to surface temperature comparison for all 5 h cases will be plotted in figure 1. Figures 2 and 3 plot COMSOL center to surface temperature differences for all 5 h cases. Figure 6 plots COMSOL center temperature T(x, 0) and analytically determined fin temperature T(x) using equation From this plot notice that agreement is poor, even for small Biot numbers. Figures 4 and 5 take the results of figure 6 further and perform a simple error analysis. The equation for computation of error is printed on these plots. These results are shown on the next page

58 Limits of the Fin Approximation Results Plotted with MATLAB Figures 1 and 6 Figures 2 and 3 Figures 4 and 5 Armed with these results, you are in a position to answer most of the assigned questions

59 Limits of the Fin Approximation 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 Heat Transfer % Sample MATLAB Script For COMSOL Module: % (X) Limits of the Fin Approximation % IMPORTANT: Save this file in the same folder with the following files: % % "Ts_comsol_h008.txt", "Tx_comsol_h008.txt", % "Ts_comsol_h08.txt", "Tx_comsol_h08.txt", % "Ts_comsol_h8.txt", "Tx_comsol_h8.txt", % "Ts_comsol_h80.txt", "Tx_comsol_h80.txt", % "Ts_comsol_h800.txt", "Tx_comsol_h800.txt". % % ######################################################################### % clc; % Clears the UI prompt clear; % Clears variables from memory % %% Constant Quantities k = 4; % Fin's Conductivity, [W/m-K] h = [ ]; % Heat Tranf. Coeffs., [W/m^2-K] r = 0.025; % Fin's radius, [m] L = 0.25; % Fin's length, [m] C = 2*pi*r; % Fin's circumference, [m] Ac = pi*r^2; % Fin's conduction area, [m^2] m = (h.*c./(k*ac)).^(1/2); % Fin parameter, [1/m] To = 200; % Base temperature, [degc] Tinf = 20; % Ambient temperature, [degc] %% COMSOL Multiphysics Data Import % Fin Surface data: load Ts_comsol_h008.txt; load Ts_comsol_h08.txt; load Ts_comsol_h8.txt; load Ts_comsol_h80.txt; load Ts_comsol_h800.txt; % Fin Center data: load Tx_comsol_h008.txt; load Tx_comsol_h08.txt; load Tx_comsol_h8.txt; load Tx_comsol_h80.txt; load Tx_comsol_h800.txt; x = Ts_comsol_h008(:,1); % tsc008 = Ts_comsol_h008(:,2); tsc08 = Ts_comsol_h08(:,2); tsc8 = Ts_comsol_h8(:,2); tsc80 = Ts_comsol_h80(:,2); tsc800 = Ts_comsol_h800(:,2); % txc008 = Tx_comsol_h008(:,2); txc08 = Tx_comsol_h08(:,2); txc8 = Tx_comsol_h8(:,2); txc80 = Tx_comsol_h80(:,2); txc800 = Tx_comsol_h800(:,2);

60 Limits of the Fin Approximation clear Ts_comsol_h008 Ts_comsol_h08 Ts_comsol_h8... Ts_comsol_h80 Ts_comsol_h800 Tx_comsol_h008 Tx_comsol_h08... Tx_comsol_h8 Tx_comsol_h80 Tx_comsol_h800 % %% Analytic Temp. Distribution according to Eq.: 3.82 % Computing Theoretical T(x): ta008 = Tinf + (To - Tinf)*cosh(m(1)*(L - x))./cosh(m(1)*l); ta08 = Tinf + (To - Tinf)*cosh(m(2)*(L - x))./cosh(m(2)*l); ta8 = Tinf + (To - Tinf)*cosh(m(3)*(L - x))./cosh(m(3)*l); ta80 = Tinf + (To - Tinf)*cosh(m(4)*(L - x))./cosh(m(4)*l); ta800 = Tinf + (To - Tinf)*cosh(m(5)*(L - x))./cosh(m(5)*l); %% COMSOL Center to Surface Temperature Difference diff008 = (txc008 - tsc008); diff08 = (txc08 - tsc08); diff8 = (txc8 - tsc8); diff80 = (txc80 - tsc80); diff800 = (txc800 - tsc800); %% Error Analysis: COMSOL Tc(x) to Analytic T(x) Comparison err008 = abs(txc008 - ta008)./ta008*100; err08 = abs(txc08 - ta08)./ta08*100; err8 = abs(txc8 - ta8)./ta8*100; err80 = abs(txc80 - ta80)./ta80*100; err800 = abs(txc800 - ta800)./ta800*100; %% Plotter 1 figure1 = figure('inverthardcopy','off',... %\ 'Colormap',[1 1 1 ],... % -> Setting up the figure 'Color',[1 1 1]); %/ plot(x,tsc008,'k--',x,txc008,'k', x,tsc08,'k--',x,txc08,'k',... x,tsc8,'k--',x,txc8,'k', x,tsc80,'k--',x,txc80,'k',... x,tsc800,'k--',x,txc800,'k'); xlim([0 0.25]); grid on box off title(['\fontname{times New Roman} \fontsize{12} \bf COMSOL Muliphysics Solution: Center to Surface',... sprintf('\n'),' Temperature Comparison at various Biot numbers']); xlabel('\fontname{times New Roman} \fontsize{14} \it \bf x, [m]') ylabel('\fontname{times New Roman} \fontsize{14} \it \bf T_c(x) _(_s_o_l_i_d_), T_s(x) _(_d_a_s_h_e_d_), [\circc]') % Create textbox annotation(figure1,'textbox',[ ],... 'String',{'10'},... 'HorizontalAlignment','center',... 'FontWeight','bold',... 'FontSize',14,... 'FontName','Times New Roman',... 'FontAngle','italic',... 'FitBoxToText','off',... 'LineStyle','none'); % Create textbox annotation(figure1,'textbox',[ ],... 'String',{'1'},... 'HorizontalAlignment','center',... 'FontWeight','bold',... 'FontSize',14,... 'FontName','Times New Roman',... 'FontAngle','italic',... 'FitBoxToText','off',... 'LineStyle','none'); % Create textbox annotation(figure1,'textbox',[ ],... 'String',{'0.1'},... 'HorizontalAlignment','center',... 'FontWeight','bold',... 'FontSize',14,

61 Limits of the Fin Approximation 'FontName','Times New Roman',... 'FontAngle','italic',... 'FitBoxToText','off',... 'LineStyle','none'); % Create textbox annotation(figure1,'textbox',[ ],... 'String',{'0.01'},... 'HorizontalAlignment','center',... 'FontWeight','bold',... 'FontSize',14,... 'FontName','Times New Roman',... 'FontAngle','italic',... 'FitBoxToText','off',... 'LineStyle','none'); % Create textbox annotation(figure1,'textbox',[ ],... 'String',{'0.001'},... 'HorizontalAlignment','center',... 'FontWeight','bold',... 'FontSize',14,... 'FontName','Times New Roman',... 'FontAngle','italic',... 'FitBoxToText','off',... 'LineStyle','none'); %% Plotter 2 figure2 = figure('inverthardcopy','off',... %\ 'Colormap',[1 1 1 ],... % -> Setting up the figure 'Color',[1 1 1]); %/ plot(x,diff008,'k', x,diff08,'k-.', x,diff8,'k--'); xlim([0 0.25]); grid on box off title(['\fontname{times New Roman} \fontsize{12} \bf COMSOL Muliphysics Solution: Center to Surcace',... sprintf('\n'),' Temperature Difference \DeltaT Comparison at various Biot numbers']); xlabel('\fontname{times New Roman} \fontsize{14} \it \bf x, [m]') ylabel('\fontname{times New Roman} \fontsize{14} \it \bf \Delta T = T_c(x) - T_s(x), [\circc]') legend('bi = 0.001','Bi = 0.01','Bi = 0.1') %% Plotter 3 figure3 = figure('inverthardcopy','off',... %\ 'Colormap',[1 1 1 ],... % -> Setting up the figure 'Color',[1 1 1]); %/ plot(x,diff80,'k', x,diff800,'k--'); xlim([0 0.25]); grid on box off title(['\fontname{times New Roman} \fontsize{12} \bf COMSOL Muliphysics Solution: Center to Surcace',... sprintf('\n'),' Temperature Difference \DeltaT Comparison at various Biot numbers']); xlabel('\fontname{times New Roman} \fontsize{14} \it \bf x, [m]') ylabel('\fontname{times New Roman} \fontsize{14} \it \bf \Delta T = T_c(x) - T_s(x), [\circc]') legend('bi = 1','Bi = 10') %% Plotter 4 figure4 = figure('inverthardcopy','off',... %\ 'Colormap',[1 1 1 ],... % -> Setting up the figure 'Color',[1 1 1]); %/ plot(x,err008,'k', x,err08,'k-.', x,err8,'k--'); xlim([0 0.25]); grid on box off title(['\fontname{times New Roman} \fontsize{12} \bf Error Analysis:',... sprintf('\n'),'comsol Solution vs. Analytic Eq.: 3.82']); xlabel('\fontname{times New Roman} \fontsize{14} \it \bf x, [m]') ylabel('\fontname{times New Roman} \fontsize{14} \it \bf Error, [%]')

62 Limits of the Fin Approximation legend('bi = 0.001','Bi = 0.01','Bi = 0.1','location','south') str1(1) = {'$${\%err={t_{x_{comsol}}-t_{x_{eq.3.82}}\over T_{x_{eq.3.82}}}\times 100} $$'}; text('units','normalized', 'position',[.05.9],... 'fontsize',12,... 'FontName', 'Times New Roman',... 'FontAngle', 'italic',... 'BackgroundColor',[1 1 1],... 'interpreter','latex',... 'string', str1); %% Plotter 5 figure4 = figure('inverthardcopy','off',... %\ 'Colormap',[1 1 1 ],... % -> Setting up the figure 'Color',[1 1 1]); %/ plot(x,err80,'k', x,err800,'k--'); xlim([0 0.25]); grid on box off title(['\fontname{times New Roman} \fontsize{12} \bf Error Analysis:',... sprintf('\n'),'comsol Solution vs. Analytic Eq.: 3.82']); xlabel('\fontname{times New Roman} \fontsize{14} \it \bf x, [m]') ylabel('\fontname{times New Roman} \fontsize{14} \it \bf Error, [%]') legend('bi = 1','Bi = 10','location','northeast') str1(1) = {'$${\%err={t_{x_{comsol}}-t_{x_{eq.3.82}}\over T_{x_{eq.3.82}}}\times 100} $$'}; text('units','normalized', 'position',[.2.9],... 'fontsize',12,... 'FontName', 'Times New Roman',... 'FontAngle', 'italic',... 'BackgroundColor',[1 1 1],... 'interpreter','latex',... 'string', str1); %% Plotter 6 figure1 = figure('inverthardcopy','off',... %\ 'Colormap',[1 1 1 ],... % -> Setting up the figure 'Color',[1 1 1]); %/ plot(x,txc008,'k--',x,ta008,'k', x,txc08,'k--',x,ta08,'k',... x,txc8,'k--',x,ta8,'k', x,txc80,'k--',x,ta80,'k',... x,txc800,'k--',x,ta800,'k'); xlim([0 0.25]); grid on box off title(['\fontname{times New Roman} \fontsize{12} \bf COMSOL vs. Theory: Center to Center',... sprintf('\n'),'temperature Comparison at various Biot numbers']); xlabel('\fontname{times New Roman} \fontsize{14} \it \bf x, [m]') ylabel('\fontname{times New Roman} \fontsize{14} \it \bf T_e_q_._:_3_._8_2 (x) _(_s_o_l_i_d_), T_c_o_m_s_o_l (x) _(_d_a_s_h_e_d_), [\circc]') % Create textbox annotation(figure1,'textbox',[ ],... 'String',{'10'},... 'HorizontalAlignment','center',... 'FontWeight','bold',... 'FontSize',14,... 'FontName','Times New Roman',... 'FontAngle','italic',... 'FitBoxToText','off',... 'LineStyle','none'); % Create textbox annotation(figure1,'textbox',[ ],... 'String',{'1'},... 'HorizontalAlignment','center',... 'FontWeight','bold',... 'FontSize',14,... 'FontName','Times New Roman',... 'FontAngle','italic',... 'FitBoxToText','off',... 'LineStyle','none');

63 Limits of the Fin Approximation % Create textbox annotation(figure1,'textbox',[ ],... 'String',{'0.1'},... 'HorizontalAlignment','center',... 'FontWeight','bold',... 'FontSize',14,... 'FontName','Times New Roman',... 'FontAngle','italic',... 'FitBoxToText','off',... 'LineStyle','none'); % Create textbox annotation(figure1,'textbox',[ ],... 'String',{'0.01'},... 'HorizontalAlignment','center',... 'FontWeight','bold',... 'FontSize',14,... 'FontName','Times New Roman',... 'FontAngle','italic',... 'FitBoxToText','off',... 'LineStyle','none'); % Create textbox annotation(figure1,'textbox',[ ],... 'String',{'0.001'},... 'HorizontalAlignment','center',... 'FontWeight','bold',... 'FontSize',14,... 'FontName','Times New Roman',... 'FontAngle','italic',... 'FitBoxToText','off',... 'LineStyle','none'); This completes MATLAB modeling procedures for this problem

64

65 Test Chamber Insulation (Rectangular) TEST CHAMBER INSULATION (Rectangular) Problem Statement As shown in diagram 1, the wall of a rectangular test chamber consists of a stainless steel layer and a brick layer. It is desired to reduce the heat loss from a chamber by adding an insulation layer of 85% magnesia. Of interest is determining where to insert the insulation layer so that the rate of heat loss is lowest. One student recommended adding the 85% magnesia layer on the cold side (brick) while a second student suggested the hot side (steel). A third student recommended inserting the insulation layer between the steel and brick. A fourth student who did not seem to pay much attention to the discussion claimed that it does not matter where to add the insulation. You are asked to carry out a study to determine the option that will result in the lowest rate of heat loss from the chamber. Known quantities: Stainless steel thickness, L cm Brick thickness, L 2 5 cm 85% magnesia thickness, L 3 2 cm T, steel = 90 ºC h steel = 6.5 W/m 2 ºC T, brick = 10 ºC h brick = 15.8 W/m 2 ºC Diagram 1 Chamber Wall 1 steel 2 brick L 1 L 2 Use COMSOL Material Library and/or appendices in your textbook for the properties of materials considered. Observations According to the data above, we are only given the thicknesses of the chamber wall. Thus, the vertical height is assumed to be arbitrary. While this is not an issue in analytic study (such as the 1D steady state conduction in chapter 3), COMSOL, like all other computer programs, requires definite object dimensions. We will thus assume a height of 5 cm, without compromising any results. Although the problem can be solved in 1D, we will purposefully solve it in 2D. The objective of doing so is to notice the uniformity of temperature field in vertical direction. Upon a close inspection of the thermal circuit equation 3.28, it is clear that by changing the position of the insulation layer in the wall, the denominator remains unchanged as long as the same heat transfer coefficients remain at the internal and external surfaces. This being the case here, we expect the total q to remain the same as we place the insulation layer at different locations

66 Test Chamber Insulation (Rectangular) Assignment 1. Using COMSOL, show the temperature distribution for the 3 cases. 2. Using COMSOL, compute the heat transfer rate q f for the 3 cases. 3. Compute theoretical q f. Compare the results with those in the above question. Are COMSOL results valid? [Hint: You will need to compute the total area of the chamber wall to do this] 4. Using COMSOL, plot graphs for each of the cases showing T(x) for the three layers. Each graph should show clearly the boundaries of the layers and the corresponding temperature distribution. 5. Pick one of the 3 cases and compute the temperatures of the inner and outer boundaries of the chamber analytically. Compare these results with COMSOL solution and claim whether or not they are valid. 6. [Extra Credit]: Would the rate of heat transfer vary in an analogous multi layer cylindrical wall as one of the insulation layers is moved to a different position? Explain

67 Test Chamber Insulation (Rectangular) Modeling with COMSOL Multiphysics MODEL NAVIGATOR We will model this problem with 2 dimensional rectangles. Since we are not intending to look at the field flow outside the chamber walls, we will only need to work with the Heat Transfer Module. We are also assuming the process to be in steady state. For this setup: 1. Start COMSOL Multiphysics. 2. In the Space dimension list select 2D (under the New Tab). 3. From the list of application modes select Heat Transfer Module General Heat Transfer Steady State Analysis 4. Click OK

68 Test Chamber Insulation (Rectangular) 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 3 adjacent rectangles. 1. Create a rectangle by going to the Draw menu, selecting Specify Objects Rectangle. 2. Start by entering information for RECTANGLE 1 from the following table. RECTANGLE 1 RECTANGLE 2 RECTANGLE 3 WIDTH HEIGHT BASE CORNER CORNER CORNER X Y NAME STEEL BRICK MAGNESIA 3. When done with step 2, click OK and repeat steps 1 to 3 for the other 2 rectangles. 4. Click on Zoom Extents button in the main toolbar to zoom into the geometry. You should see your 2D chamber wall now selected in light red color in the main program window. Try to investigate the geometry you just made. In particular, try to explore what the Geometric Properties button does: as you select the parts of the geometry. See how the function of this button changes as you switch the program mode with these buttons:. Notice that this places the 85% magnesia layer on the cold side (brick). Let this position be our first configuration. We will later move the insulation layer to the middle (configuration 2), and on the hot side (steel, configuration 3)

69 Test Chamber Insulation (Rectangular) 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 and 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. Subdomain Settings: 1. From the Physics menu select Subdomain Settings (equivalently, press F8). 2. Select Subdomain 1 in the Subdomain selection window. (For this configuration, this subdomain corresponds to the steel layer) 3. Enter 44.5 in the field for thermal conductivity k. 4. Select Subdomain 2 in the Subdomain selection window. (For this configuration, this subdomain corresponds to the brick layer) 5. Enter 2.2 in the field for thermal conductivity k. 6. Select Subdomain 3 in the Subdomain selection window. (For this configuration, this subdomain corresponds to the 85% magnesia layer) 7. Enter in the field for thermal conductivity k. 8. Click OK to apply these properties and close the Subdomain Settings window

70 Test Chamber Insulation (Rectangular) 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 Heat Flux Enter h = 6.5 W/m 2 ºC; T INF = K 2, 3, 5, 6, 8, 9 Thermal Insulation 10 Heat Flux Enter h = 15.8 W/m 2 ºC; T INF = K Boundaries 4 and 7 are internal boundaries. COMSOL automatically applies the continuity boundary condition by default. Internal boundaries appear grayed out in the selection window and are inaccessible to the user. Leave them as they are! 3. Click OK to close the Boundary Settings window. MESH GENERATION 1. From the Mesh menu select Initialize Mesh. You should get a mesh that looks like the one below: We are now ready to compute our solution

71 Test Chamber Insulation (Rectangular) 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. 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 seconds 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 may be given in Kelvin instead of degrees Celsius as shown above. The next section (Postprocessing and Visualization) will help you in obtaining the above and other diagrams, extracting temperature distribution data from the solution, and computing the heat transfer rate q f through COMSOL)

72 Test Chamber Insulation (Rectangular) 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, heat transfer rate computation, and 1D temperature distribution plots. We will then address the questions of COMSOL solution validity and compare the results to theoretical predictions. All of these steps can be done effectively in COMSOL alone. Changing Temperature Units: 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. Click OK. The 2D temperature distribution will be displayed with degrees Celsius as the units of temperature

73 Test Chamber Insulation (Rectangular) 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. Click the save button in your figure with results. 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. Generating a 1D Plot of T(x): 1. From Postprocessing menu select Cross Section Plot Parameters option. 2. Switch to the Line/Extrusion tab. 3. Change the Unit of temperature to degrees Celsius. 4. Change the x axis data from arc length to x

74 Test Chamber Insulation (Rectangular) 5. Enter the following coordinates into Cross section line data section: x0 = 0.02 and x1 = 0.054; y0 = 0.03 and y1 = Click OK. These steps produce a plot of T(x) at y = 3 cm. You can experiment with the value of y and see that it does not matter which y you select (as long as it is in the geometry range). This shows the uniformity of temperature field in vertical direction. Computing Total Heat Transfer q: 1. From the Postprocessing menu select Subdomain Integration option. 2. Select all 3 subdomains by first clicking on the 1 in the Subdomain selection field on the left followed by 3 while holding the shift key on your keyboard. 3. In the Subdomain Integration dialog window, change Predefined Quantities setting to Total heat flux. 4. Click the OK button. The value of the integral (solution) is displayed at program s prompt on the bottom. In this case, q = 0.54 W. Note the value of the total heat flux. This is the value for configuration 1, where 85% magnesia is located on the cold side (brick). We now will rearrange the geometry for configurations 2 and 3, where the insulation layer is in the middle and on the hot side (steel), respectively

75 Test Chamber Insulation (Rectangular) GEOMETRY REARRANGEMENTS To place the 85% magnesia layer in the middle of the wall, we need to go back to geometry settings. Note that this will affect the rightmost boundary condition as well. Thus we will also need to fix the rightmost boundary condition in accordance with the problem statement. We start by rearranging the geometry as follows. 1. Go back to the geometry modeling by clicking the Draw mode button located in the upper toolbar. 2. Double click on the MAGNESIA layer in the main drawing area. This will bring up the geometry definition of this layer. 3. Change the x value of the base position from to and click Apply. This will move the magnesia layer to left, placing it adjacent to the steel layer. 4. Click OK to close geometry definition of the magnesia layer. 5. Double click on the BRICK layer in the main drawing area. 6. Change the x value of the base position from to and click OK. This will move the brick layer to right, placing it adjacent to the magnesia layer. Having changed the geometry according to configuration 2, we now wish to fix the boundary conditions and solve the problem again. Boundary Conditions: 7. From the Physics menu open the Boundary Settings (F7) dialog box. 8. Change boundary 10 from Thermal Insulation to Heat Flux. 9. Enter h = 15.8 W/m 2 ºC and T INF = K in their appropriate fields. 10. Click OK to close the Boundary Settings window. 11. Resolve the problem by selecting the Solve Problem from Solve menu. Repeat the Postprocessing and Visualization section on pages 62 to 64. Pay special attention to the section on how to compute the total heat transfer rate. Note the value you compute of total heat transfer rate for this configuration. Is there a difference in q for this configuration?

76 Test Chamber Insulation (Rectangular) Lastly, we need to redo the geometry rearrangements for configuration 3, where the magnesia insulation is on the hot side (steel). Note that the boundary conditions are going to be affected by this change as well. Since the procedures are similar as in the previous configuration, redo steps 1 to 6 on page 65 with the following changes: 1. In step 3, change the x value of the base position from to In step 6, change the x value of the base position from to After step 6, click on Zoom Extents button in the main toolbar to re center the geometry. Redo steps 7 to 11 on page 65 with the following changes: 4. In step 8, change boundary 1 from Thermal Insulation to Heat Flux. 5. In step 9, enter h = 6.5 W/m 2 ºC and T INF = K in their appropriate fields. Again, repeat the Postprocessing and Visualization section on pages 62 through 64. Do you see any differences in q this time?

77 Test Chamber Insulation (Rectangular) ANALYTIC VALIDATION In this section, we will discuss the validation of COMSOL solution. This includes comparing both COMSOL heat transfer rate and COMSOL temperature distribution. The analytic solution for q to this problem is given by equation 3.28: q x T 1 T 4 1 L1 L2 L3 1 Ah Ak Ak Ak Ah Note that this equation contains terms involving the area of the geometry. To compare COMSOL q to the q according to equation 3.28, this fact must be taken into account. Since we had to define the height of the chamber wall, and the length was given in the problem statement, the total area A of the wall is readily computable. If you wish to use COMSOL to find the total area of the wall, you may do so as follows: 1. With the COMSOL model file open, click on the Geometry mode button 2. Select all of the layers (Magnesia, Brick, Steel) by clicking on each while holding the Shift key down on your keyboard. All 3 layers should be highlighted now in a light red color. 3. Click on the Geometric Properties button. The area of the wall will be computed and shown at the program s prompt. With the area found, you are in a position to compute the analytic heat transfer rate q. Does it agree with COMSOL s heat transfer rate that you found earlier? If you were to specify different height of the wall in the beginning, would the total q change? Would COMSOL solution be still valid? Would the heat flux q change? With the knowledge of q, use equations 3.29 and 3.27 to find the wall temperatures (both inner and outer) of the chamber for any of the configurations. Compare these results with the 1D graph of T(x) you made earlier. Do both results agree well? Is COMSOL solution valid? This completes COMSOL modeling procedures for this problem

78

79 Test Chamber Insulation (Cylindrical) TEST CHAMBER INSULATION (Cylindrical) Problem Statement The wall of a small cylindrical test chamber is made of stainless steel and glass, as shown in the diagram below. It is desired to reduce the heat loss from a chamber by adding an insulation layer of 85% magnesia. Of interest is determining where to insert the insulation layer so that the rate of heat loss is lowest. One student recommended adding the 85% magnesia layer on the cold side (glass) while a second student suggested the hot side (steel). A third student recommended inserting the insulation layer between the steel and glass. A fourth student who did not seem to pay much attention to the discussion claimed that it does not matter where to add the insulation. You are asked to carry out a study to determine the option that will result in the lowest rate of heat loss from the chamber. Known quantities: Chamber Wall Steel inside, glass outside Chamber s inside radius, r1 8.5 cm Stainless steel thickness, Ls 1.5 cm Glass thickness, Lg 1 cm 85% magnesia thickness, L 4 cm T, steel = 100 ºC h steel = 8 W/m 2 ºC T, glass = 10 ºC h glass = 16 W/m 2 ºC Use appendices in your textbook for the properties of materials considered. Observations m Three principal cases will be considered to determine where the rate of heat loss is lowest (a) 85% magnesia layer on the outside of the chamber, (b) 85% magnesia layer between steel and glass layers, and (c) 85% magnesia layer on the inside of the chamber. The amount of material in a layer depends on where it is placed. An inner layer of thickness L will have less material than an outer layer of the same thickness. Upon a close inspection of the thermal circuit equation 3.57, it is clear that by changing the position of the insulation layer in the wall, the denominator value changes [Hint: Examine the arguments of logarithmic terms and other terms involving radii]. We therefore expect the total q to change as we place the insulation layer at different locations

80 Test Chamber Insulation (Cylindrical) Assignment 1. Using COMSOL, show the temperature distribution for the 3 cases. 2. Using COMSOL, compute the heat per unit length, q ', for the 3 cases. 3. Compute theoretical q '. Compare the results with those in the above question. Are COMSOL results valid? [Hint: COMSOL results for heat per unit length q were computed for half the geometry] 4. Using COMSOL, plot graphs for each of the cases showing T(x) for the three layers. Each graph should show clearly the boundaries of the layers and the corresponding temperature distribution. 5. Pick one of the 3 cases and compute the temperatures of the inner and outer boundaries of the chamber analytically. Compare these results with COMSOL solution and claim whether or not they are valid. 6. [Extra Credit]: Would the rate of heat transfer vary in an analogous multi layer rectangular wall as one of the insulation layers is moved to a different position? Explain. 7. [Extra Credit]: If the design requirement is not to exceed 20 ºC at the outer surface, which of the three cases would you recommend? Can you use less than 3 layers? Take financial considerations into account. 8. [Extra Credit]: Verify the results of example 3.2 using COMSOL. Include COMSOL solution in your report for this module

81 Test Chamber Insulation (Cylindrical) Modeling with COMSOL Multiphysics MODEL NAVIGATOR We will model this problem with 2 dimensional semicircular disks. Since we are not intending to look at the field flow outside the chamber walls, we will only need to work with the Heat Transfer Module. We are also assuming the process to be in steady state. For this setup: 1. Start COMSOL Multiphysics. 2. In the Space dimension list select 2D (under the New Tab). 3. From the list of application modes select Heat Transfer Module General Heat Transfer Steady State Analysis 4. Click OK

82 Test Chamber Insulation (Cylindrical) DEFINING CONSTANTS Continue by creating a database for constants the model uses: 1. From the Options menu select Constants, and in the resulting dialog box define the following names and expressions. 2. Click OK. GEOMETRY MODELING NAME EXPRESSION VALUE DESCRIPTION k_s 43[W/(m*degC)] 43[W/(m K)] 1% Carbon 20C k_g 0.7[W/(m*degC)] 0.7[W/(m K)] Window 20C k_m 0.065[W/(m*degC)] 0.065[W/(m K)] 85% 20C T_inf1 100[degC] [K] T Inside Chamber T_inf4 10[degC] [K] T Outside Chamber h_1 8[W/(m^2*degC)] 8[W/(m 2 K)] h Inside Chamber h_4 16[W/(m^2*degC)] 16[W/(m 2 K)] h Outside Chamber In this section, 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 3 multi layered circular disks (1 multi layered disk per case considered in problem statement). To reduce computational time, we will make 3 semicircular disks instead of full disks. 1. Create a circular disk by going to the Draw menu, selecting Specify Objects Circle. 2. Start by entering information for first circle, or C1, from the following table. C1 C2 C3 C4 C5 C6 RADIUS BASE CENTER CENTER CENTER CENTER CENTER CENTER X C7 C8 C9 C10 C11 C12 RADIUS BASE CENTER CENTER CENTER CENTER CENTER CENTER X When done with step 2, click OK and repeat steps 1 to 3 for the other 11 circles. 4. Click on Zoom Extents button in the main toolbar to zoom into the geometry. You should now have created 12 circular disks for the 3 cases considered. The geometry at this point should look like the one shown below

83 Test Chamber Insulation (Cylindrical) Proceed by creating the following (temporary) rectangles: 5. Go to the Draw menu and select Specify Objects Rectangle. 6. Enter information for RECTANGLE 1 from the following table. RECTANGLE 1 (R1) WIDTH 0.15 HEIGHT 0.3 BASE CORNER X Y With rectangle R1 selected (light red color), select Edit Copy. 8. Select Edit Paste. 9. Enter 0.4 as the displacement value in the x direction in the Paste displacement window. 10. Click OK. 11. Select Edit Paste for the second time. 12. Enter 0.8 as the displacement value in the x direction in the Paste displacement window. 13. Click OK. You should now have created 3 temporary rectangles for the 3 cases considered. They will be used to construct semicircular disks. The geometry at this point should look like the one shown below

84 Test Chamber Insulation (Cylindrical) To construct multilayered semicircular disks, 14. Select Draw Create Composite Object option. 15. In the Set formula field, type (C1+C2+C3+C4) R1 (without quotation marks). 16. Click Apply. 17. In the Set formula field, type (C5+C6+C7+C8) R2 and click Apply. 18. In the Set formula field, type (C9+C10+C11+C12) R3 and click OK. 19. Choose Select All from the Edit menu. 20. Select objects CO2 and CO4 by left clicking them in the model space while holding the Shift key on your keyboard. 21. Select Draw Modify Move. 22. Enter -0.2 as the displacement value in the x direction in the Move displacement window. 23. Click OK. 24. Left click anywhere in the white model space in COMSOL to deselect the geometry objects CO2 and CO Select object CO4 by left clicking it in the model space. 26. Select Draw Modify Move

85 Test Chamber Insulation (Cylindrical) 27. Enter -0.2 as the displacement value in the x direction in the Move displacement window. 28. Click OK. 29. Choose Select All from the Edit menu. 30. Choose Split Object from the Draw menu. 31. Left click anywhere in the white model space in COMSOL to deselect the entire geometry. 32. Select objects C7, C11, and C15 by left clicking them in the model space while holding the Shift key on your keyboard. 33. Press the Delete key on your keyboard to delete objects C7, C11, and C Click on Zoom Extents button in the main toolbar to zoom into the geometry. You should now see your completed 2D chamber wall. The leftmost semicircular disk represents case A (as described in observations), the middle semicircular disk represents case B, and the rightmost semicircular disk represents case C. Let us further visually distinguish these cases in COMSOL by naming each layer by its material name (as opposed to generic names, such as CO6). To do so, 35. Double click object CO6 and rename it as steela. 36. Click OK 37. Use the table given below to rename the rest of the objects in the same way as instructed in steps 35 and 36. OBJECT CO5 CO3 CO10 CO9 CO8 CO14 CO13 CO12 NAME glassa magnesiaa steelb magnesiab glassb steelc magnesiac glassc

86 Test Chamber Insulation (Cylindrical) When completed, your final geometry should look like the one shown below: Try to investigate the geometry you just made. In particular, try to explore what the Geometric Properties button does: as you select the parts of the geometry. S ee how th e function of this button changes as you switch the program mode with. 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 and 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. Subdomain Settings: 1. From the Physics menu select Subdomain Settings (equivalently, press F8). 2. Select subdomains 1, 5, and 9 in the Subdomain selection window while holding the Control (ctrl) key on your keyboard. (These subdomains correspond to the magnesia layer). 3. Enter k_m in the field for thermal conductivity k

87 Test Chamber Insulation (Cylindrical) 4. Select subdomain 2 (do not hold the ctrl key in this step) 5. Select subdomains 4 and 7 in the Subdomain selection window while holding the Control (ctrl) key on your keyboard. (These subdomains correspond to the glass layer). 6. Enter k_g in the field for thermal conductivity k. 7. Select subdomain 3 (do not hold the ctrl key in this step) 8. Select subdomains 6 and 8 in the Subdomain selection window while holding the Control (ctrl) key on your keyboard. (These subdomains correspond to the steel layer). 9. Enter k_s in the field for thermal conductivity k. 10. Click OK to apply these properties and close the Subdomain Settings window. 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 through 18 Insulation/Symmetry Not physical boundaries 22,23,30,31,38,39 Heat Flux Enter h = h_1; T INF = T_inf1 19,26,27,34,35,42 Heat Flux Enter h = h_4; T INF = T_inf4 Boundaries 20,21,24,25,28,29,32,33,36,37,40,41 are internal boundaries. COMSOL automatically applies the continuity boundary condition by default. Internal boundaries appear grayed out in the selection window and are inaccessible to the user. Leave them as they are! Boundaries 1 18 are not real boundaries in the sense that we use a semicircular model. The correct boundary condition of insulation/symmetry is applied by default to these boundaries. 3. Click OK to close the Boundary Settings window

88 Test Chamber Insulation (Cylindrical) MESH GENERATION To minimize the computational time without compromising much accuracy of the solution, we must change the default meshing parameters. To do this, 1. Go to the Physics menu and select Selection Mode Subdomain Mode. 2. From the Edit menu, choose Select All. 3. Left click the Mesh Selected (Mapped) button on the left hand side toolbar. As a result of these steps, you should get the following radial mesh: We are now ready to compute our solution

89 Test Chamber Insulation (Cylindrical) 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. 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 seconds 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 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 as shown above. The next section (Postprocessing and Visualization) will help you in obtaining the above and other diagrams, plotting graphs for each of the cases showing radial T(x) for the three layers, and computing heat per unit length, q ' through COMSOL)

90 Test Chamber Insulation (Cylindrical) 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, heat per unit length, q ' computation, and 1D temperature distribution plots. You will then address the questions of COMSOL solution validity and compare the results to theoretical predictions. All of these steps can be done efficiently in COMSOL alone. Changing Temperature Units: 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. Click OK. The 2D temperature distribution will be displayed with degrees Celsius as the units of temperature

91 Test Chamber Insulation (Cylindrical) 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. Generating 1D Plot of Radial T(x): In this section, we will make 3 separate plots of radial temperature distribution for each of the 3 cases. Let s choose the most convenient line along which to plot the temperature distribution the central line running at y = 0 with the slope of From Postprocessing menu select Cross Section Plot Parameters option. 2. Switch to the Line/Extrusion tab. 3. Change the Unit of temperature to degrees Celsius

92 Test Chamber Insulation (Cylindrical) 4. Change the x axis data from arc length to x. 5. Enter the following coordinates in the Cross section line data : x0 = and x1 = 0.15; y0 = 0 and y1 = Click Apply. These steps produce a plot of T(x) at y = 0, from x = 8.5 cm (inside surface of the chamber wall) to x = 15 cm (outside surface of the chamber wall) for case (a). To save this plot, 7. Click the save button in your figure with results. This will bring up an Export Image window. 8. Follow steps 2 4 as instructed on page 81 to finish with exporting the image. Repeat steps 5 8 on this page using the table of coordinates for Cross section line data field for cases (b) and (c) given below: COORDINATE CASE B CASE C X X Y0, Y1 0 0 Computing Heat per Unit Length q : To compute the heat per unit length, q ' for case (a), 1. From the Postprocessing menu select Boundary Integration option. 2. In the Subdomain selection field, select boundaries 19 and 26 while holding the Control key on your keyboard. 3. In the Subdomain Integration dialog window, change Predefined Quantities setting to Normal total heat flux

93 Test Chamber Insulation (Cylindrical) 4. Click the OK button. The value of the integral (solution) is displayed at program s prompt on the bottom. For case (a), q ' = W/m. Note the value of the heat per unit length, q '. This is the value for case (a). Repeat steps 1 4 for cases (b) and (c). For step 2, the corresponding boundaries for cases (b) and (c) are tabulated below, BC SELECTION CASE B 27 and 34 CASE C 35 and 42 Note the values of the heat per unit length, q ' for these cases as well. You will use these values to answer assignment question 3. Keep in mind that these values (and the one for case (a) are only valid for half the chamber wall

94 Test Chamber Insulation (Cylindrical) ANALYTIC VALIDATION In this section, we will discuss the validation of COMSOL solution. This includes comparing both COMSOL heat per unit length, q 'and COMSOL temperature distribution. The analytic solution for q ' to this problem is given by equation 3.57: q r T 1 T 4 1 ln r2 r1 ln r3 r2 ln r4 r3 1 2 rhl 2 k L 2 k L 2 k L 2 rh L Note that this equation contains terms involving length L. The value of L is not given in this problem (L corresponds to the depth of the object in 3 rd dimension). To compare COMSOL q ' to the qr according to equation 3.57, this fact must be taken into account. qr Simply rearrange equation 3.57 to get q r. In this form, q r has the same dimensions L as COMSOL s q '. Thus q ' and q r are readily comparable. Compute analytic q r and compare with COMSOL s q '. Do both results agree well? Is COMSOL solution valid? With the knowledge of q, apply equation 3.27 to find the wall temperatures (both inner and outer) of the chamber for any of the configurations. Compare these results with the 1D radial graphs of T(x) you made earlier. Do both results agree well? This completes COMSOL modeling procedures for this problem

95 Cooling of a Rod (Transient Study) TRANSIENT COOLING OF A ROD Problem Statement A horizontal rod is maintained at a uniform temperature of 150 ºC. It is then brought into an environment where temperature is 20 ºC and set to cool off by free convection. The rod is insulated on both ends and exchanges heat only along its cylindrical surface. The length of the rod, L, is 30 cm. Of interest is to learn how to use COMSOL to determine transient temperature T(t) at the center and the surface of the fin. Known quantities: Horizontal Rod at t = 0 sec. Material: 1% Carbon Steel T i = T(0) = 150 ºC T = T(t steady state ) = 20 ºC h = 10 W/m 2 ºC L = 30 cm r 0 = 1.5 cm Use appendices in your textbook for the properties of materials considered. Observations The use of lumped capacity idealization may be justified if Biot number is less than 0.1, as is the case for this problem. Thus, radial temperature drop is expected to be less than 5 percent. The time t at which temperature of the rod reaches the ambient temperature T, is called t steady state, or t s.s. for short. The value of t s.s. is unknown, but can be estimated to any practical accuracy desirable with the use of equation 5.7. For this problem, it can be shown that tss sec. estimated at 0.5 % of difference between rod s temperature T and ambient temperature T. Notice that the true theoretical value of t s.s. is infinite, as implied by equation 5.7. Although equation 5.7 implies infinite conductivity k, we will use the real k in COMSOL analysis so that the spatial temperature variation is not neglected. The results from COMSOL may thus be used to justify the conclusion of the 1 st observation. The best geometry to be used as a model for this problem is a circle, which will represent radial cross section of the rod. This is justified by the fact that the rod is insulated at both tips and that heat is transferred uniformly and equally at the surface. Therefore, temperature distribution at any cross section of the rod (except the tips) is identical

96 Cooling of a Rod (Transient Study) Assignment 1. Use COMSOL to solve the transient temperature distribution that includes spatial temperature variation (2D) in the time range of 0 t seconds. Use an increment of 100 seconds as a solution time stepping in COMSOL. 2. Use COMSOL to plot 1D transient temperature T(t) at the center of the rod, or T(0,t), and the surface of the rod, or T(r 0,t) in the time range of 0 t seconds. 3. Validate COMSOL results by plotting both T(0,t) and T(r 0,t) against the lumped capacity solution given by equation 5.7. Are COMSOL results valid? [Note: In this instruction set, this assignment question will be done with MATLAB, but you are free to use any software of your choice] 4. Calculate the Biot number. Compute and plot temperature difference T T r, t T 0, t 0 for all t. Based on the results of this plot, can you conclude that spatial temperature variation is negligible? Based on the results of this plot, can you justify the implication of infinite k suggested by equation 5.7? [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. Using equation 5.7, material properties of 1% Carbon steel, and the other known quantities given in the problem statement, show that tss.. 5.5hours. Use an estimation of 0.5 % difference between rod s temperature T and ambient temperature T. 6. [Extra Credit]: Use COMSOL to resolve the problem for various values of k that approach infinity. (Leave the rest of the setup unchanged). Make similar plots as in questions 3 and 4 and document any departures you notice in T(0,t) and T(r 0,t) from those obtained for the true k. Explain the results you obtained from a physical point of view. You may base you explanation on analogous conclusions drawn from equation 5.7. Is it safe to assume that k does not play any role on the temperature distribution? [Note: Be very observant and consider all cases before you make a statement]. Which material properties have a strong influence on the solution of transient problems that are justified by the lumped capacity idealization?

97 Cooling of a Rod (Transient Study) Modeling with COMSOL Multiphysics MODEL NAVIGATOR We will model this problem with a circular geometry, which, as stated earlier, will represent radial cross section of the rod. Since we are not intending to look at the flow field outside the rod, we will only need to work with the Heat Transfer Module. We will use a transient analysis to set up the model. For this setup: 1. Start COMSOL Multiphysics. 2. In the Space dimension list select 2D (under the New Tab). 3. From the list of application modes select Heat Transfer Module General Heat Transfer Transient analysis 4. Click OK

98 Cooling of a Rod (Transient Study) GEOMETRY MODELING 1. Go to the Draw menu and select Specify Objects Circle. 2. Enter 1.5e-2 as the radius of the circle. 3. Click OK. 4. Click on Zoom Extents button in the main toolbar to zoom into the geometry. You should now have a highlighted circle in your main window. This geometry is all we need to solve this problem and answer the assignment questions. PHYSICS SETTINGS Physics settings in COMSOL consist of two parts: (1) Subdomain settings and (2) boundary settings. The subdomain settings let us specify material properties, initial conditions and 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. Subdomain Settings: 1. From the Physics menu, select Subdomain Settings (equivalently, press F8). 2. Select subdomain 1 in the Subdomain selection window. 3. Enter 43 in the field for thermal conductivity k. Enter 7801 in the field for the density ρ. Enter 473 in the field for the heat capacity C p. 4. Switch to Init tab. We will specify initial temperature condition here

99 Cooling of a Rod (Transient Study) 5. Enter in the Initial value field 6. Close the Subdomain Settings dialog by clicking OK. Boundary Conditions: 1. From the Physics menu open the Boundary Settings (F7) dialog box. 2. Select boundaries 1 4 while holding down the shift key on your keyboard. 3. Apply the following boundary conditions: BOUNDARY BOUNDARY CONDITION COMMENTS 1,2,3,4 Heat Flux Enter h = 10; T INF = Click OK

100 Cooling of a Rod (Transient Study) MESH GENERATION To minimize the computational time without compromising much accuracy of the solution, we must change the default meshing parameters. To do this, 1. Go to the Physics menu and select Selection Mode Subdomain Mode. 2. From the Edit menu, choose Select All. 3. Click the Mesh Selected (Mapped) button on the left hand side toolbar. As a result of these steps, you should get the following mesh:

101 Cooling of a Rod (Transient Study) COMPUTING AND SAVING THE SOLUTION To program the solver with proper time stepping and the final time t s.s., 1. Choose Solver Parameters from the Solve menu. 2. In the Time Stepping section, enter 0:100:20000 in the Times: field. 3. Click OK. 4. From the Solve menu select Solve Problem. (Allow few minutes for solution) 5. 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 document

102 Cooling of a Rod (Transient Study) The result that you obtain should resemble the following color map: The defaults show us spatial temperature distribution at t = seconds. Notice that although this distribution is clearly mapped with a range of colors, the scale temperature values appear to be the same. In fact, they are not the same, but are very close to each other numerically. You can examine this by clicking random parts of the solution geometry and checking the temperature at those parts. As you click on solution geometry, the temperature is displayed at the program prompt. Notice how close the values are to each other! By default, your immediate result may be given in Kelvin instead of degrees Celsius as shown above. The next section (Postprocessing and Visualization) will help you in obtaining the above plot, displaying the solution at times other than seconds, and plotting and extracting T(0,t) and T(r 0,t) for further analysis

103 Cooling of a Rod (Transient Study) POSTPROCESSING AND VISUALIZATION This section will show you how to get results that will enable you to answer questions 1 and 2 and prepare the data needed for analysis in MATLAB (or other software of your choice). Changing Temperature Units: 1. From the Postprocessing menu, open Plot Parameters dialog box (F12). 2. Under the Surface tab, change the unit of temperature to degrees Celsius using the drop down menu in the Unit field. 3. Click OK. The 2D temperature distribution will be displayed with degrees Celsius as the units of temperature

104 Cooling of a Rod (Transient Study) 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

105 Cooling of a Rod (Transient Study) Displaying Spatial Temperature Distribution at Times Other Than t = Seconds: Since we chose a stepping time increment of 100 seconds, we can only see solutions at some multiples of 100 in the range of 0 t seconds. Thus, solution exists for times such as 0, 100, 200, 300,, and seconds, but not for times such as 3, 26, or 78.1 seconds. Let s display spatial temperature distribution at t = 100 s. To do this, 1. Go to the Postprocessing menu and select Cross Section Plot Parameters. 2. Use the drop down menu to select t = 100 s as the solution time to display in the Solution to use field. 3. Click Apply. Choose other values of time and display the spatial temperature distribution at those values. When you are done, click OK to close the Postprocessing window

106 Cooling of a Rod (Transient Study) Displaying Temperature as a Function of Time at the Center of the Rod, T(0,t): The steps in this section may depend on the particular version of COMSOL you use. In this instruction set, COMSOL version 3.5 was used. If you are using an earlier version of the program, the steps may somewhat differ. 1. Select Postprocessing menu and choose Cross Section Plot Parameters. 2. Switch to Point tab and change the units of temperature to ºC. 3. Ensure the x: and y: coordinates are both 0. These coordinates represent the center point of the rod. 4. Change radio button from Auto to Expression and click Expression button. 5. Type t in Expression field. Here, non capitalized t stands for time. [Note: Notice that the field Unit of integral lists time unit as m 2 s. Do not worry! We ve simply discovered a minor bug in the program. The output will still be in the unit of seconds, even though the program is trying to confuse us.]

107 Cooling of a Rod (Transient Study) 6. Click OK to close the x axis data window. 7. Click Apply in the Cross Section Plot Parameters window to plot the Temperature versus time graph at the center of the rod. Do not close the graph yet! Exporting COMSOL Data to a Data File: 8. Click on Export Current Plot button in the Temperature time graph created in the previous step. 9. Click Browse and navigate to your saving folder (say Desktop ). 10. Name the file center_data.txt and save it. (Note: do not forget to type the.txt extension in the name of the file). 11. Click OK to save the file. Displaying Temperature as a Function of Time at a Surface Point of the Rod, T(r 0,t): 1. Back in COMSOL s Cross Section Plot Parameters dialog box, change the y: coordinate to 1.5e Click OK to plot the Temperature versus time graph at a surface point of the rod. Do not close the newly created graph window yet! Exporting COMSOL Data to a Data File: 3. Click on Export Current Plot button in the Temperature time graph created in the previous step. 4. Click Browse and navigate to your saving folder (say Desktop ). 5. Name the file surface_data.txt and save it. (Note: do not forget to type the.txt extension in the name of the file). 6. Click OK to save the file. This completes COMSOL modeling procedures for this problem

108 Cooling of a Rod (Transient Study) Modeling with MATLAB This part of modeling procedures describes how to create comparative temperature vs. time graphs using MATLAB. Obtain MATLAB script file named transient_cooling.m from Blackboard prior to following these procedures. Save this file in the same directory as the data files ( center_data.txt and surface_data.txt ) from COMSOL. (Note: transient_cooling.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 transient_cooling.m in a proper directory) Comparing COMSOL solution with Lumped Capacity solution: Now we are ready to load and graph our COMSOL T(0,t) and T(r 0,t) data in MATLAB and compare it with Lumped Capacity solution given by equation 5.7. IMPORTANT: If you have not done so already, download transient_cooling.m MATLAB file from the Blackboard and save it in the same directory as the data files from COMSOL. Follow the steps below to complete this problem: 1. Open MATLAB by double clicking its icon on the Desktop. 2. Load transient_cooling.m file by selecting File Open Desktop transient_cooling.m. The script program 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. Lumped Capacity method and COMSOL solutions will be plotted on the top graph. The bottom graph shows the difference in center and surface temperatures as a function of time. These results are shown on the next page

109 Cooling of a Rod (Transient Study) Results Plotted with MATLAB: While in MATLAB, you may zoom into the top plot to notice small departures in results based on the solution methods. Armed with these results, you are in a position to answer questions 3 and

110 Cooling of a Rod (Transient Study) 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 Heat Transfer % Supplementary MATLAB Script For: % (X) Transient Cooling by Free Convection % IMPORTANT: Save this file in the same directory where % "center_data.txt" and "surface_data.txt" % files are saved. % ######################################################################### clear % Clears the UI prompt clc % Clears variables from memory %% Constant Quantities Ti = 150; % Rod initial temperature at t = 0 sec, [degrees C] Tinf = 20; % Ambient temperature, [degrees C] rho = 7850; % 1% Carbon Steel [kg/m^3] Cp = 475; % 1% Carbon Steel heat [J/kg-C] h = 10; % Heat transfer coeff., [W/m^2-C] r0 = 1.5e-2; % Rod radius, [m] %% Time Vector: t_dummy = 20000; t = 0:100:t_dummy; % Final time, [seconds] % [seconds] %% Temperature Distribution by Lumped Capacity Method: T = Tinf + (Ti - Tinf)*exp(-(2*h*t)/(rho*Cp*r0)); % Eq. 5.7, [degrees C] %% Temperature Distribution from COMSOL Multiphysics: load center_data.txt; % Loads T(0,t) as a 2 column vector load surface_data.txt; % Loads T(r0,t) as a 2 column vector tcent_comsol = center_data(:,1)'; %\ Tcent_comsol = center_data(:,2)'; % --> COMSOL data splitting tsurf_comsol = surface_data(:,1)'; % --> into single row vectors Tsurf_comsol = surface_data(:,2)'; %/ %% Temperature Distribution Plot: figure1 = figure('inverthardcopy','off',... %\ 'Colormap',[1 1 1 ],... % -> Setting up the figure 'Color',[1 1 1]); %/ subplot(2,1,1) plot(t,t,'r',tcent_comsol,tcent_comsol,'b',tsurf_comsol,tsurf_comsol,'k') grid on title('\fontname{times New Roman} \fontsize{16} \bf Lumped Capacity vs. COMSOL Temp. Distributions') xlabel('\fontname{times New Roman} \fontsize{14} \it \bf Time t, [s]') ylabel('\fontname{times New Roman} \fontsize{14} \it \bf T, [\circc]') legend('eq. 5.7','COMSOL Solution (center)','comsol Solution (surface)') %% Temperature Difference Plot from COMSOL Multiphysics: T_diff = Tcent_comsol - Tsurf_comsol; subplot(2,1,2) plot(t,t_diff); grid on title('\fontname{times New Roman} \fontsize{16} \bf COMSOL Center - to - Surface \DeltaT') xlabel('\fontname{times New Roman} \fontsize{14} \it \bf Time t, [s]') ylabel('\fontname{times New Roman} \fontsize{14} \it \bf \DeltaT = T(0,t) - T(r_0,t), [\circc]') This completes MATLAB modeling procedures for this problem

111 Laminar Forced Convection Over an Isothermal Flat Plate LAMINAR FORCED CONVECTION OVER AN ISOTHERMAL FLAT PLATE Problem Statement Ambient room temperature air at standard atmospheric pressure flows over an isothermal semi infinite flat plate. Air starts to flow at x = 0 with a uniformly distributed velocity profile V. The plate has an insulated section extending from x = 0 to x = x 0 and is maintained at a constant temperature T s from x = x 0 to x = L (the considered plate length L is not shown). Of general interest is to learn how to use COMSOL in obtaining the flow and temperature distribution fields and compare them with the Blasius and Pohlhausen solutions (or more general curve fits of them). It is desired to obtain qualitative, as well as quantitative perspectives about boundary layer flow concept from COMSOL solutions. Known quantities: Fluid: Air Flow over an Isothermal Flat Plate with an Insulated Leading Section V = 0.1 m/s T = 20 ºC T s = 200 ºC L = 10 cm x 0 = 2 cm Observations This is an external flow, forced convection problem. Both fluid and temperature fields are essential parts of the problem. COMSOL model must include steady state analyses for both heat transfer and Navier Stokes application modes. To solve this problem, a coupled Multiphysics model must be created. Subject to all 16 assumptions given in section 7.2.1, Blasius solution applies. Subject to all 16 assumptions given in section 7.2.1, an approximation of Pohlhausen s solution given by equation 7.30 applies. Although one of the assumptions for analytic solution is that of constant properties, COMSOL can easily handle material property variations. Some of the key properties of air strongly depend on temperature variations. We will discuss which properties of air should be varied in Options and Settings, along with equations that achieve this. Property variation will be included in our COMSOL model. Neglecting the thickness of the plate, the flow and heat transfer processes can be modeled with a simple rectangular geometry. However, plate boundary must then be split into two separate but connected boundaries in order to allow the correct boundary condition setup

112 Laminar Forced Convection Over an Isothermal Flat Plate Assignment 1. State and calculate the conditions under which the flow field in this problem can be considered laminar and that the concept of boundary layer flow can be applied. 2. Use COMSOL to solve for and save 2D color distributions of velocity and temperature fields. 3. Use COMSOL to solve for and save 2D color distributions of key air properties. Use your textbook s Appendix C to examine whether or not these properties were accurately determined by COMSOL. 4. Use COMSOL to plot and save T(0.08,y). 5. Use COMSOL to compute the heat transfer rate per unit length, q T along the plate s surface. Use equations 7.25 and 7.28 to compute theoretical q T. Assume a plate of 1 meter in width. Compare the q T values. Are COMSOL results valid? for 6. Use COMSOL to plot and extract numerical data for local q x,0 x0 x L. Use Newton s law of cooling to determine COMSOL h(x) from q x x,0 for x0 x L. Compute and plot analytically determined local h(x) given by equation 7.30 and COMSOL h(x) on the same graph. [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] 7. Calculate and plot the percent error between COMSOL h(x) and theoretical h(x). Base your error analysis on assumption that COMSOL h(x) is the correct solution. Can you conclude that COMSOL results are valid? [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] 8. [Extra Credit]: Use COMSOL and MATLAB to graph on the same plot theoretical and COMSOL determined boundary layers and T. Comment on differences in the solutions you notice. Which results would you trust? The instructions for COMSOL boundary layer data extraction and sample MATLAB scripts that will plot and T are given separately in the appendix. x

113 Laminar Forced Convection Over an Isothermal Flat Plate Modeling with COMSOL Multiphysics 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

114 Laminar Forced Convection Over an Isothermal Flat Plate OPTIONS AND SETTINGS: DEFINING CONSTANTS In this section, we will define material properties of air (Applying them to geometry is done in Subdomain Settings section). Some of the properties strongly depend on temperature while others do not. Since we are working with a rather large temperature range (20ºC 200ºC) and would like to include property variation in the model, we first need to determine which of the properties exhibit strong temperature dependence. This is done by examining Appendix C Properties of dry air at atmospheric pressure. Notice that with increasing temperature, properties of air either increase or decrease in the given temperature range. Notice further that no property reaches a maximum or a minimum in the given temperature range. This enables us to concentrate our attention on the extremes of the given temperature range in evaluating temperature dependence of the properties. The following table lists numerical values for properties of air at the given temperature extremes and shows the percent difference in those properties based on these extremes. C p k Pr EVALUATED AT T x EVALUATED AT T s x % DIFFERENCE (based on 20ºC) Based on these calculations, it is now clear that for air in the given temperature range,,, and k strongly depend on temperature while and Pr are weakly dependent properties with respect to temperature. Therefore, C and C p p Pr will be set as constants while,, and k will be modeled as varying properties. The following equations will be used to calculate air properties that vary strongly with temperature: PM 0 w 3, [kg/m ] RT k log 10, [W/m K] 10 T T , [Pa s] [Ref.: J.M. Coulson and J.F. Richardson, Chemical Engineering, Vol. 1, Pergamon Press, 1990, appendix] Where, P0 (atmospheric pressure) kpa, M (molecular weight of air) kg mol, w R (universal gas constant) J/mol K

115 Laminar Forced Convection Over an Isothermal Flat Plate Armed with these equations, let us now define temperature dependent air properties in COMSOL. 1. From the Options menu select Expressions Scalar Expressions 2. Define the following names and expressions: NAME EXPRESSION UNIT DESCRIPTION k_air 10^( *log10(abs(T[1/K])))[W/(m*K)] W/(m K) Air Conductivity rho_air 1.013e5[Pa]*28.8[g/mol]/(8.314[J/(mol*K)]*T) kg/m 3 Air Density mu_air 6e-6[Pa*s]+4e-8[Pa*s/K]*T Kg/(m s) Air Viscosity 3. Click OK. 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. Although Prandtl s number is essential, it is a composite property that is defined by C p,, and k, most of which have now been defined. The only constant property that needs to be defined as well is C p. We will define and apply it to geometry in Subdomain Settings section. GEOMETRY MODELING In this model we will create a 2D rectangular geometry by drawing it. This is particularly useful since we need to create a boundary for the insulated part as a separate entity. 1. Start by clicking on the Line button located on the draw toolbar. 2. Position your cursor at the origin (0,0) in the main drawing area and start making a line by pressing on the left mouse button (LMB) once and moving the mouse to the right. You should be getting a line that looks like this one. 3. Move your cursor to the (0.2,0) coordinate and press the left mouse button (LMB) once to create the first line. As you do this, the line segment from (0,0) to (0.2,0) should turn red, as shown here. 4. Continue to make the line segments outlined in the previous step for the following coordinates; from: (a) (0.2,0) to (1,0); (b) (1,0) to (1,0.4); (c) (1,0.4) to (0,0.4); and (d) (0,0.4) to (0,0). The geometry you are creating should look rectangular. 5. Once back at the origin (0,0), press on the right mouse button (RMB) to finish the rectangle

116 Laminar Forced Convection Over an Isothermal Flat Plate We now must scale the geometry down to centimeters. (Recall that COMSOL s default system of units is the MKS. Therefore, we just made a 1 meter long rectangle). 6. To scale the geometry, go under Draw Modify Scale menu and type 0.1 as a scale factor for both x and y fields as shown below: 7. Click OK. 8. Click on Zoom Extents button in the main toolbar to zoom into the geometry. Your geometry should now be complete and highlighted in red, as shown below. 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. Let us begin with the air flow physics settings

117 Laminar Forced Convection Over an Isothermal Flat Plate Non Isothermal Flow Subdomain Settings: 1. From the Physics menu select Subdomain Settings (equivalently, press F8). 2. Select subdomain 1 in the Subdomain selection window. 3. Enter rho_air and mu_air in the fields for density ρ and dynamic viscosity η. 4. Click OK. Non Isothermal Flow Boundary Conditions: 1. From the Physics menu open the Boundary Settings (F7) dialog box. 2. Apply the following boundary conditions: BOUNDARY BOUNDARY TYPE BOUNDARY CONDITION 1 Inlet Velocity 2, 4 Wall No Slip COMMENTS Enter 0.1 in U 0 field (Normal Inflow velocity) 3, 5 Open boundary Normal stress Verify that field f 0 is set to 0 3. Click OK to close the boundary settings window

118 Laminar Forced Convection Over an Isothermal Flat Plate 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 field. 4. Enter k_air, rho_air and 1006 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

119 Laminar Forced Convection Over an Isothermal Flat Plate 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 Temperature Enter in T 0 field 2, 3 Insulation/Symmetry 4 Temperature Enter in T 0 field 5 Convective flux 3. Click OK to close Boundary Settings window. MESH GENERATION To minimize the computational time without compromising much accuracy of the solution, we must change the default meshing parameters. To do this, 1. Go to the Mesh menu and select Free Mesh Parameters option. 2. Change Predefined mesh sizes from Normal to Finer. 3. Switch to Boundary tab. 4. Select boundaries 1 and 5 in the Boundary selection field while holding the Control (ctrl) key on your keyboard. 5. Switch to Distribution tab. 6. Enable Constrained edge element distribution option. 7. Enter 20 in the Number of edge elements field. 8. Select boundary 2. (Do not hold the Control (ctrl) key on your keyboard)

120 Laminar Forced Convection Over an Isothermal Flat Plate 9. Switch to Distribution tab and enable Constrained edge element distribution. 10. Enter 30 in the Number of edge elements field. 11. Select boundary 4. (Do not hold the Control (ctrl) key on your keyboard) 12. Switch to Distribution tab and enable Constrained edge element distribution. 13. Enter 80 in the Number of edge elements field. 14. Switch to Point tab. 15. Select points 1 and 3 in the Point selection field while holding the Control (ctrl) key on your keyboard. 16. Enter in the Maximum element size field. 17. Click the Remesh button. 18. Click OK to close the Free Mesh Parameters window. As a result of these steps, you should get the following triangular mesh: We are now ready to compute our solution

121 Laminar Forced Convection Over an Isothermal Flat Plate 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 seconds 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 boundary 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 and the velocity field (represented by arrows in the above) will not be shown. We will use distinct colormap 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 2D color distributions of key air properties, a plot of T(y) at x = 8 cm, a plot of local q x x,0 for x0 x L. We will also show how to use COMSOL to compute the total heat transfer rate per unit length, q T q x,0 data and analytically. and use MATLAB to determine h(x) from COMSOL x

122 Laminar Forced Convection Over an Isothermal Flat Plate 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, computation of local q x x,0 as well as the heat transfer rate per unit length, q T along the plate s surface, and 1D temperature distribution plot. You will then address the questions of COMSOL solution validity and compare the results to theoretical predictions mainly by using MATLAB. 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

123 Laminar Forced Convection Over an Isothermal Flat Plate 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 and white are good choices 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 111. 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 y field and update your view by pressing Apply button. Notice the difference in velocity vector field representation. Try other values

124 Laminar Forced Convection Over an Isothermal Flat Plate 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. Change the color of the arrow (see step 8). 11. Choose the quantity you wish to plot from Predefined quantities. 12. Click Apply. 13. 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

125 Laminar Forced Convection Over an Isothermal Flat Plate Displaying V(x, y) as a Colormap: 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. 4. From Predefined quantities, select Velocity field. 5. Change the Colormap type from hot to jet. 6. Click Apply to refresh main view and keep the Plot Parameters window open. The 2D Velocity distribution will be displayed using the jet colormap. Displaying Variations of Key Air Properties as Colormaps: With the Plot Parameters window open, ensure that you are under the Surface tab, 7. Type k_air in Expression field (without quotation marks). 8. Click Apply. (Note: The unit will change automatically) These steps produce a colormap that displays variations in air s thermal conductivity k. Note the values on the color scale and compare them with Appendix C of your textbook

126 Laminar Forced Convection Over an Isothermal Flat Plate To produce colormaps for density and viscosity variations, repeat steps 6 and 7 while typing rho_air and mu_air, respectively in the Expression field in step 6. When done, click OK to close the Plot Parameters window. Note: You may also view composite properties, such as kinematic viscosity and Prandtl s number simply by entering their definitions in the Expression field. Thus, to view kinematic viscosity variation, enter mu_air/rho_air. For Prandtl number, enter 1006*mu_air/k_air. It is even possible to enter expressions for other desired quantities, such as local Reynold s number. For Reynold s number evaluated at every x and y using x as the computational value in its definition, enter 0.1[m/s]*rho_air*x/mu_air. For Reynold s number evaluated at every x and y using y as the computational value in its definition, enter 0.1[m/s]*rho_air*y/mu_air. Plotting T(0.08, y) (or T(y) at x = 8 cm): 1. From Postprocessing menu select Cross Section Plot Parameters option. 2. Switch to the Line/Extrusion tab. 3. Change the Unit of temperature to degrees Celsius. 4. Change the x axis data from arc length to y. 5. Enter the following coordinates in the Cross section line data : x0 = x1 = 0.08; y0 = 0 and y1 = Click OK

127 Laminar Forced Convection Over an Isothermal Flat Plate These steps produce a plot of T(y) at x = 8 cm, from y = 0 cm (plate surface) to y = 4 cm (ambient environment conditions). Temperature T is plotted on the y axis and y coordinates are plotted on the x axis. To save this plot, 7. Click the save button in your figure with results. This will bring up an Export Image window. 8. Follow steps 2 4 as instructed on page 114 to finish with exporting the image. Computing Heat Transfer Rate per Unit Length, q T along the Plate Surface To compute heat transfer rate per unit length using COMSOL, 1. Select Boundary Integration option from Postprocessing menu. 2. Select boundary 4 in the Subdomain selection field. 3. Change Predefined Quantities setting to Normal total heat flux. 4. Click the OK button. The value of the integral (solution) is displayed at program s prompt on the bottom. For this model, q ' = W/m

128 Laminar Forced Convection Over an Isothermal Flat Plate Plotting Local q x, 0 for x x L 0 x To plot q x x,0 for x0 x L using COMSOL, 1. Select Cross Section Plot Parameters option from Postprocessing menu. 2. Switch to the Line/Extrusion tab. 3. From Predefined quantities, select Total heat flux. 4. Change the x axis data from y to x. 5. Enter the following coordinates in the Cross section line data : x0 = 0.02, x1 = 0.1; y0 = y1 = Click OK to close Cross Section Plot Parameters window. As a result of these steps, a new plot will be shown that graphs q x,0 x for x0 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

129 Laminar Forced Convection Over an Isothermal Flat Plate Exporting COMSOL Data to a Data File: 1. Click on Export Current Plot button in the graph created in the previous step. 2. Click Browse and navigate to your saving folder (say Desktop ). 3. Name the file qx.txt. (Note: do not forget to type the.txt extension in the name of the file). 4. Click OK to save the file. This completes COMSOL modeling procedures for this problem

130 Laminar Forced Convection Over an Isothermal Flat Plate Modeling with MATLAB This part of modeling procedures describes how to create comparative graphs of local heat transfer coefficient h(x) (along the heated portion of the plate) using MATLAB. Obtain MATLAB script file named isothermal_plate.m from Blackboard prior to following these procedures. Save this file in the same directory as the data file(s) (qx.txt) from COMSOL. (Note: isothermal_plate.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 isothermal_plate.m in a proper directory) Comparing COMSOL solution with Generalized Pohlhausen Solution: MATLAB script (isothermal_plate.m) is programmed to use exported COMSOL data for heat flux q x x,0 and Newton s Law of cooling to determine the local heat transfer coefficient h(x) along the heated portion of the plate. The script is also programmed to calculate analytical local heat transfer coefficient h(x) according to equation This equation represents is a more general approximation to Pohlhausen solution that is suitable for plates with insulated section. The script will ultimately produce comparative graphs that will plot both solutions. Follow the steps below to complete this problem: 1. Open MATLAB by double clicking its icon on the Desktop. 2. Load isothermal_plate.m file by selecting File Open Desktop isothermal_plate.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. Approximated Pohlhausen s and COMSOL solutions will be plotted in Figure 1. Figure 2 plots the percent error between local heat transfer coefficients according to the equation printed on the figure. These results are shown on the next page

131 Laminar Forced Convection Over an Isothermal Flat Plate Results plotted with MATLAB: While in MATLAB, you may zoom into the top plot to notice departures in results based on the solution methods. Armed with these results, you are in a position to answer most of the assigned questions. (Approaches that show how to answer extra credit questions are given in appendix). This completes MATLAB modeling procedures for this problem

132 Laminar Forced Convection Over an Isothermal Flat Plate 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 Heat Transfer % Sample MATLAB Script For: % (X) Laminar Thermal Boundary Layer [Specified Surface Temperature] % IMPORTANT: Save this file in the same directory with "qx.txt" file. % ######################################################################### % clc; % Clears the UI prompt clear; % Clears variables from memory % %% Constant Quantities Ts = 200; % Plate surface temperature, [degc] Tinf = 20; % Ambient temperature, [degc] Vinf = 0.1; % Velocity at the inlet, [m/s] k_air = ; % Air conductivity at plate surface, [W/m-K] Pr_air = 0.704; % Air Prandtl number evaluated at Tfilm, [1] eta_air = e-05; % Air viscosity at plate surface, [m^2/s] x0 = 0.02; % A speical plate coordinate!, [m] %% COMSOL Data Import & hx_comsol Computation load qx.txt; % Imports a 2-column data vector from COMSOL xcoord = qx(:,1)'; % Plate coordinate vector, [m] qx = qx(:,2)'; % COMSOL q'' vector, [W/m^2] % hx_comsol = qx./(ts-tinf); % Heat transf. coeff. from COMSOL %% Analytical analysis Rex = Vinf.*(xcoord)./eta_air; % Local Reynold's number, [1] num = ( *(Rex).^(1/2).*Pr_air^(1/3))./... % Local Nux numerator (1 + (0.0468/Pr_air)^(2/3))^(1/4); den = (1 - (x0./xcoord).^(3/4)).^(1/3); % Local Nux denominator Nux = num./den; % Local Nux hx_analyt = k_air./xcoord.*nux; % Local hx from theory %% Error analysis in h deltah = abs(hx_comsol - hx_analyt); error = deltah./hx_comsol*100; % -> Simple % Error % -> calculation for h %% Plotter and Plot Cosmetics figure1 = figure('inverthardcopy','off',... %\ 'Colormap',[1 1 1 ],... % -> Setting up the figure 'Color',[1 1 1]); %/ plot(xcoord,hx_comsol,xcoord,hx_analyt) % Plots COMSOL vs. Theory h xlim([ ]) % -> Limits x-axis plot view ylim([0 35]) % -> Limits y-axis plot view % % Plot cosmetics for figure 1 begin here: annotation(figure1,'textbox',... 'String',{'Flow Over an Isothermal Plate','with Insulated Edge'},... 'HorizontalAlignment','center',... 'FontSize',14,... 'FontName','Times New Roman',... 'FitBoxToText','off',... 'LineStyle','none',... 'BackgroundColor',[1 1 1],... 'Position',[ ]);

133 Laminar Forced Convection Over an Isothermal Flat Plate annotation(figure1,'textbox',... 'String',{... 'T_s = 200\circC','T_\infty = 20\circC','V_\infty = 0.1 m/s','l = 10 cm','x_0 = 2 cm'},... 'FontSize',14,... 'FontName','Times New Roman',... 'FontAngle','italic',... 'FitBoxToText','off',... 'EdgeColor',[1 1 1],... 'BackgroundColor',[1 1 1],... 'Position',[ ]); legend('comsol Solution','Equation [7.30]') box off grid on title('\fontname{times New Roman} \fontsize{16} \bf Local Heat Transfer Coefficient') xlabel('x, [m]') 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(xcoord,error) % Plots % Error in h xlim([ ]) % -> Limits x-axis plot view ylim([0 40]) % -> Limits y-axis plot view % % Plot cosmetics for figure 2 begin here: box off grid on title('\fontname{times New Roman} \fontsize{16} \bf Error Analysis') xlabel('x, [m]') ylabel('error in h, [%]') set(get(gca,'ylabel'),... 'fontsize', 14,... 'FontName','Times New Roman',... 'FontAngle','italic') set(get(gca,'xlabel'),... 'fontsize', 14,... 'FontName','Times New Roman',... 'FontAngle','italic') str1(1) = {'$${\%err={h_{x_{eq.7.30}}-h_{x_{comsol}}\over h_{x_{comsol}}}\times 100} $$'}; text('units','normalized', 'position',[.35.9],... 'fontsize',14,... 'FontName', 'Times New Roman',... 'FontAngle', 'italic',... 'BackgroundColor',[1 1 1],... 'interpreter','latex',... 'string', str1);

134 Laminar Forced Convection Over an Isothermal Flat Plate COMSOL Hints and Sample MATLAB Scripts for Extra Credit Question The goal of this question is to obtain boundary layers and T from COMSOL and compare them directly with analytical boundary layer solutions obtained by Blasius and Pohlhausen. This is particularly tricky, since there is no clear definition as to where the viscous boundary layer thickness occurs. Notice that in our textbook, the definition is given based on the condition that u/ V be 0.994, from which, with the use of table 7.1, equation 7.11 is derived. We could have taken u/ V as close to unity as we wish and equation 7.11 would therefore change. Physically, the closer u/ V is to unity, the better the distinction in the viscous boundary layer, since it implies that u V. The number 0.994, however, is special because it corresponds to a Prandtl s number of 1.0 on Pohlhausen s solution given in figure 7.2. From figure 7.2 and equation 7.19, it follows that for air (Pr = 0.7), t / 1, since t 6.5. We therefore need to program MATLAB with the following analytical equations for and T : 5.2x 6.5 and t Re 5.2 To compute Re x, properties at T film must be found. This is easily done since both temperature extremes are given. Variable x ranges between 0 x 0.1 meters. x In COMSOL, we have to use Contour plot type to single out velocity and temperature iso curves that correspond to u/ V and T * 1 conditions, respectively. To extract boundary layer from COMSOL, 1. From the Postprocessing menu, open Plot Parameters dialog box (F12). 2. Under the Arrow tab, disable the Arrow plot checkbox 3. Switch to Contour tab. 4. Enable Contour plot checkbox on the top left portion of the window. 5. Type u in the Expression field. (without quotation marks) 6. Enable Vector with isolevels radio button option. (The entry field right below it enables us to enter the single out the velocity for which we want the iso curve to be mapped out). 7. Enter in the entry field below Vector with isolevels. (This is the x component velocity that satisfies u/ V condition)

135 Laminar Forced Convection Over an Isothermal Flat Plate 8. Switch to General tab. 9. Disable all other plot types except Contour and Geometry edges. 10. Use the Plot in drop down menu (located on the bottom left of the window) to switch from Main axes to New figure. 11. Click OK. Viscous COMSOL boundary layer satisfying u/ V will be shown in a new plot figure. 12. Click on Export Current Plot button. 13. Name the file fluid_blayer.txt. (Note: do not forget to type the.txt extension in the name of the file). 14. Click OK to save the file. The file is saved in the same directory where you first saved COMSOL model file with extension.mph. To extract boundary layer T from COMSOL, simply repeat the above steps with following modifications: In step 5, type T in the Expression field and change the unit to degrees Celsius. * In step 7, enter a temperature in degrees Celsius that satisfies T 1 condition. (Note: do not enter the value for temperature of the ideal condition, namely * T 1, because no clear temperature iso level exists for it in COMSOL solution. * Experiment with the values and enter a temperature for which T 1 condition is nearly satisfied). In step 13, name the file thermal_blayer.txt

136 Laminar Forced Convection Over an Isothermal Flat Plate The following MATLAB script sample shows how the above analytical equations can be programmed. It also imports COMSOL boundary layer data saved in fluid_blayer.txt and thermal_blayer.txt text files and uses it to plot comparative graphs. %% Preliminaries clc; clear; % Clears the UI prompt % Clears variables from memory %% Constant Quantities Vinf = 0.1; % Velocity at the inlet, [m/s] k_air = ; % Conductivity at Tf, [W/m-K] rho_air = ; % Density at Tf, [kg/m^3] Pr_air = 0.704; % Prandtl number at Tfilm, [1] mu_air = 22.2e-6; % Viscosity at Tf, [m^2/s] eta_air = mu_air/rho_air; % Specific viscosity at Tf, [m^2/s] %% COMSOL Data Import load fluid_blayer.txt; xcomsol = fluid_blayer(:,1); ycomsol = fluid_blayer(:,2); % <-- COMSOL Viscous Bound. Layer Thincknes load thermal_blayer.txt; xcomsol2 = thermal_blayer(:,1); ycomsol2 = thermal_blayer(:,2);% <-- COMSOL Thermal Bound. Layer Thincknes %% Analytic Boundary Layer Thincknes Rex = Vinf*xcomsol/eta_air; yblasius = 5.2*xcomsol./sqrt(Rex);% <-- Viscous B.L.T. % xcomsol3 = xcomsol2 - min(xcomsol2); ypohlhausen = 6.3./sqrt(Vinf./(eta_air*xcomsol3));% <-- Thermal B.L.T. %% Percent Difference Analysis erryblasius = abs((ycomsol - yblasius)./yblasius)*100; errypohlhausen = abs((ycomsol2 - ypohlhausen)./ypohlhausen)*100; %% Plotter figure(1) plot(xcomsol,ycomsol,'r.',xcomsol,yblasius,'b.',... xcomsol2,ycomsol2,'r.',xcomsol2,ypohlhausen,'b.') grid on legend('comsol \delta','blasius \delta',... 'COMSOL \delta_t','pohlhausen \delta_t','location','northwest') figure(2) plot(xcomsol,erryblasius,'b.',xcomsol2,errypohlhausen,'r.') This completes MATLAB modeling procedures for this problem

137 Laminar Forced Convection Over a Heated Flat Plate LAMINAR FORCED CONVECTION OVER A HEATED FLAT PLATE Problem Statement Ambient room temperature air at standard atmospheric pressure flows over semi infinite flat plate that is being heated by surface heat flux q s. Air starts to flow at x = 0 with a uniformly distributed velocity profile V. The plate has an insulated section extending from x = 0 to x = x 0 and experiences applied heat flux q s x,0 from x = x 0 to x = L (the considered plate length L is not shown). Of general interest is to learn how to use COMSOL in obtaining the flow and temperature distribution fields and compare them with the Blasius and Pohlhausen solutions (or more general curve fits of them). It is desired to obtain qualitative, as well as quantitative perspectives about boundary layer flow concept from COMSOL solutions. Flow over an Isothermal Flat Plate with an Known quantities: Insulated Leading Section Fluid: Air V = 0.1 m/s T = 20 ºC q = 1000 W/m 2 s L = 10 cm x 0 = 2 cm Observations This is an external flow, forced convection problem. Both fluid and temperature fields are essential parts of the problem. COMSOL model must include steady state analyses for both heat transfer and Navier Stokes application modes. Subject to all 16 assumptions given in section 7.2.1, Blasius solution applies. Although Pohlhausen s solution does not apply directly due to a lack of plate temperature knowledge, it still can be used to develop equations for local Nusselt number and plate surface temperature distribution. Reference equations for these quantities will be presented in Postprocessing and Visualization section. Although one of the assumptions for analytic solution is that of constant properties, COMSOL can easily handle material property variations. Some of the key properties of air strongly depend on temperature variations. We will discuss which properties of air should be varied in Options and Settings, along with equations that achieve this. Property variation will be included in our COMSOL model. Neglecting the thickness of the plate, the flow and heat transfer processes can be modeled with a simple rectangular geometry. However, plate boundary must then be split into two separate but connected boundaries in order to allow the correct boundary condition setup

138 Laminar Forced Convection Over a Heated Flat Plate Assignment 1. State and calculate the conditions under which the flow field in this problem can be considered laminar and that the concept of boundary layer flow can be applied. 2. Use COMSOL to solve for and save 2D color distributions of velocity and temperature fields. 3. Use COMSOL to solve for and save 2D color distributions of key air properties. Use your textbook s Appendix C to examine whether or not these properties were accurately determined by COMSOL. 4. Use COMSOL to plot and save T(0.08,y). 5. Use COMSOL to plot and extract surface temperature datat x,0. Use this data to compare it with surface temperature reference equations given in Postprocessing and Visualization section. Are COMSOL results valid? [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 data for T x,0 on x0 x L and Newton s law of cooling to determine COMSOL h(x) for x0 x L. Compute and plot analytically determined local h(x) given by a reference equation and COMSOL h(x) on the same graph. [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] 7. Calculate and plot the percent error between COMSOL h(x) and theoretical h(x). Base your error analysis on assumption that COMSOL h(x) is the correct solution. Can you conclude that COMSOL results are valid? [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] 8. [Extra Credit]: Use COMSOL and MATLAB to graph on the same plot theoretical and COMSOL determined boundary layer. Comment on differences in the solutions you notice. Which results would you trust? The instructions for COMSOL boundary layer data extraction and sample MATLAB scripts that will plot are given separately in the appendix. 9. [Extra Credit]: Determine wall shear o induced by the flow on the plate and friction coefficient C f

139 Laminar Forced Convection Over a Heated Flat Plate Modeling with COMSOL Multiphysics 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 located under COMSOL Multiphysics Fluid Dynamics and Heat Transfer sections. 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 COMSOL Multyphysics Fluid Dynamics Incompressible Navier Stokes Steady state analysis. 3. Click the Multiphysics button. 4. Click the Add button. 5. From the list of application modes, select COMSOL Multyphysics Heat Transfer Convection and Conduction Steady state analysis. 6. Click the Add button. 7. Click OK

140 Laminar Forced Convection Over a Heated Flat Plate OPTIONS AND SETTINGS: DEFINING CONSTANTS In this section, we will define material properties of air (Applying them to geometry is done in Subdomain Settings section). Some of the properties strongly depend on temperature while others do not. Since we are working with a rather large heat flux and would like to include property variation in the model, we first need to determine which of the properties exhibit strong temperature dependence. This is done by examining Appendix C Properties of dry air at atmospheric pressure. Since we do not know the high temperature extreme in this problem, we will take the largest temperature available in Appendix C. Notice that with increasing temperature, properties of air either increase or decrease in the temperature range of 20ºC to 350ºC. Notice further that no property reaches a maximum or a minimum in this temperature range. This enables us to concentrate our attention on the extremes of the temperature range in evaluating temperature dependence of the properties. The following table lists numerical values for properties of air at these temperature extremes and shows the percent difference in those properties based on these extremes. C p k Pr EVALUATED AT T x EVALUATED AT 350ºC x ~ 0.7 % DIFFERENCE (based on 20ºC) Based on these calculations, it is now clear that for air in this temperature range,,, and k strongly depend on temperature while C and Pr are weakly dependent properties with respect to temperature. Therefore, C p and Pr will be set as constants while,, and k will be modeled as varying properties. The following equations will be used to calculate air properties that vary strongly with temperature: PM 0 w 3, [kg/m ] RT k log 10, [W/m K] p 10 T T , [Pa s] [Ref.: J.M. Coulson and J.F. Richardson, Chemical Engineering, Vol. 1, Pergamon Press, 1990, appendix] Where, P0 (atmospheric pressure) kpa, M (molecular weight of air) kg mol, w R (universal gas constant) J/mol K

141 Laminar Forced Convection Over a Heated Flat Plate Armed with these equations, let us now define temperature dependent air properties in COMSOL. 1. From the Options menu select Expressions Scalar Expressions 2. Define the following names and expressions: NAME EXPRESSION UNIT DESCRIPTION k_air 10^( *log10(abs(T[1/K])))[W/(m*K)] W/(m K) Air Conductivity rho_air 1.013e5[Pa]*28.8[g/mol]/(8.314[J/(mol*K)]*T) kg/m 3 Air Density mu_air 6e-6[Pa*s]+4e-8[Pa*s/K]*T Kg/(m s) Air Viscosity 3. Click OK. 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. Although Prandtl s number is essential, it is a composite property that is defined by C p,, and k, most of which have now been defined. The only constant property that needs to be defined as well is C p. We will define and apply it to geometry in Subdomain Settings section. GEOMETRY MODELING In this model we will create a 2D rectangular geometry by drawing it. This is particularly useful since we need to create a boundary for the insulated part as a separate entity. 1. Start by clicking on the Line button located on the draw toolbar. 2. Position your cursor at the origin (0,0) in the main drawing area and start making a line by pressing on the left mouse button (LMB) once and moving the mouse to the right. You should be getting a line that looks like this one. 3. Move your cursor to the (0.2,0) coordinate and press the left mouse button (LMB) once to create the first line. As you do this, the line segment from (0,0) to (0.2,0) should turn red, as shown here. 4. Continue to make the line segments outlined in the previous step for the following coordinates; from: (a) (0.2,0) to (1,0); (b) (1,0) to (1,0.4); (c) (1,0.4) to (0,0.4); and (d) (0,0.4) to (0,0). The geometry you are creating should look rectangular. 5. Once back at the origin (0,0), press on the right mouse button (RMB) to finish the rectangle

142 Laminar Forced Convection Over a Heated Flat Plate We now must scale the geometry down to centimeters. (Recall that COMSOL s default system of units is the MKS. Therefore, we just made a 1 meter long rectangle). 6. To scale the geometry, go under Draw Modify Scale menu and type 0.1 as a scale factor for both x and y fields as shown below: 7. Click OK. 8. Click on Zoom Extents button in the main toolbar to zoom into the geometry. Your geometry should now be complete and highlighted in red, as shown below. 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. Let us begin with the air flow physics settings

143 Laminar Forced Convection Over a Heated Flat Plate Incompressible Navier Stokes (ns) Subdomain Settings: 1. From Mulptiphysics menu, select 1 Incompressible Navier Stokes (ns). 2. From the Physics menu select Subdomain Settings (equivalently, press F8). 3. Select subdomain 1 in the Subdomain selection window. 4. Enter rho_air and mu_air in the fields for density ρ and dynamic viscosity η. 5. Click OK. Incompressible Navier Stokes (ns) Boundary Conditions: 1. From the Physics menu open the Boundary Settings (F7) dialog box. 2. Apply the following boundary conditions: BOUNDARY BOUNDARY TYPE BOUNDARY CONDITION COMMENTS 1 Inlet Velocity Enter 0.1 in U 0 field (Normal Inflow velocity) 2, 4 Wall No Slip 3, 5 Open boundary Normal stress Verify that field f 0 is set to 0 3. Click OK to close the boundary settings window

144 Laminar Forced Convection Over a Heated Flat Plate 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 k_air, rho_air and 1006 in the k(isotropic), ρ, and C p fields, respectively. 5. Enter u and v in the u and v fields, respectively. 6. Click OK to close the Subdomain Settings window. 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 BOUNDARY CONDITION COMMENTS 1 Temperature Enter in T 0 field 2, 3 Thermal Insulation 4 Heat Flux Enter 1000 in q 0 field 5 Convective flux 3. Click OK to close Boundary Settings window

145 Laminar Forced Convection Over a Heated Flat Plate MESH GENERATION To minimize the computational time without compromising much accuracy of the solution, we must change the default meshing parameters. To do this, 1. Go to the Mesh menu and select Free Mesh Parameters option. 2. Change Predefined mesh sizes from Normal to Finer. 3. Switch to Boundary tab. 4. Select boundaries 1 and 5 in the Boundary selection field while holding the Control (ctrl) key on your keyboard. 5. Switch to Distribution tab. 6. Enable Constrained edge element distribution option. 7. Enter 20 in the Number of edge elements field. 8. Select boundary 2. (Do not hold the Control (ctrl) key on your keyboard) 9. Switch to Distribution tab and enable Constrained edge element distribution. 10. Enter 30 in the Number of edge elements field. 11. Select boundary 4. (Do not hold the Control (ctrl) key on your keyboard) 12. Switch to Distribution tab and enable Constrained edge element distribution. 13. Enter 80 in the Number of edge elements field. 14. Switch to Point tab. 15. Select points 1 and 3 in the Point selection field while holding the Control (ctrl) key on your keyboard. 16. Enter in the Maximum element size field

146 Laminar Forced Convection Over a Heated Flat Plate 17. Click the Remesh button. 18. Click OK to close the Free Mesh Parameters window. As a result of these steps, you should get the following triangular mesh: We are now ready to compute our solution

147 Laminar Forced Convection Over a Heated Flat Plate 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 seconds 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 boundary 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 and the velocity field (represented by arrows in the above) will not be shown. We will use distinct colormap 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 2D color distributions of key air properties, a plot of T(y) at x = 8 cm, a plot of local q x x,0 for x0 x L. We will also show how to use COMSOL to compute the total heat transfer rate per unit length, q T q x,0 data and analytically. and use MATLAB to determine h(x) from COMSOL x

148 Laminar Forced Convection Over a Heated Flat Plate 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 plate surface temperature T x,0, as well as computation of local heat transfer coefficient and 1D temperature distribution plot. You will then address the questions of COMSOL solution validity and compare the results to theoretical predictions mainly by using MATLAB. 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

149 Laminar Forced Convection Over a Heated Flat Plate 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 and white are good choices 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 137. 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 y field and update your view by pressing Apply button. Notice the difference in velocity vector field representation. Try other values

150 Laminar Forced Convection Over a Heated Flat Plate 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. Change the color of the arrow (see step 8). 11. Choose the quantity you wish to plot from Predefined quantities. 12. Click Apply. 13. 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

151 Laminar Forced Convection Over a Heated Flat Plate Displaying V(x, y) as a Colormap: 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. 4. From Predefined quantities, select Velocity field. 5. Change the Colormap type from hot to jet. 6. Click Apply to refresh main view and keep the Plot Parameters window open. The 2D Velocity distribution will be displayed using the jet colormap. Displaying Variations of Key Air Properties as Colormaps: With the Plot Parameters window open, ensure that you are under the Surface tab, 7. Type k_air in Expression field (without quotation marks). 8. Click Apply. (Note: The unit will change automatically) These steps produce a colormap that displays variations in air s thermal conductivity k. Note the values on the color scale and compare them with Appendix C of your textbook

152 Laminar Forced Convection Over a Heated Flat Plate To produce colormaps for density and viscosity variations, repeat steps 6 and 7 while typing rho_air and mu_air, respectively in the Expression field in step 6. When done, click OK to close the Plot Parameters window. Note: You may also view composite properties, such as kinematic viscosity and Prandtl s number simply by entering their definitions in the Expression field. Thus, to view kinematic viscosity variation, enter mu_air/rho_air. For Prandtl number, enter 1006*mu_air/k_air. It is even possible to enter expressions for other desired quantities, such as local Reynold s number. For Reynold s number evaluated at every x and y using x as the computational value in its definition, enter 0.1[m/s]*rho_air*x/mu_air. For Reynold s number evaluated at every x and y using y as the computational value in its definition, enter 0.1[m/s]*rho_air*y/mu_air. Plotting T(0.08, y) (or T(y) at x = 8 cm): 1. From Postprocessing menu select Cross Section Plot Parameters option. 2. Switch to the Line/Extrusion tab. 3. Change the Unit of temperature to degrees Celsius. 4. Change the x axis data from arc length to y. 5. Enter the following coordinates in the Cross section line data : x0 = x1 = 0.08; y0 = 0 and y1 = Click OK

153 Laminar Forced Convection Over a Heated Flat Plate These steps produce a plot of T(y) at x = 8 cm, from y = 0 cm (plate surface) to y = 4 cm (ambient environment conditions). Temperature T is plotted on the y axis and y coordinates are plotted on the x axis. To save this plot, 7. Click the save button in your figure with results. This will bring up an Export Image window. 8. Follow steps 2 4 as instructed on page 140 to finish with exporting the image. Plotting Plate Surface Temperature T x, 0 For x x L 0 To plot T x,0 for x0 x L using COMSOL, 1. Select Cross Section Plot Parameters option from Postprocessing menu. 2. Switch to the Line/Extrusion tab. 3. From Predefined quantities, select Temperature. 4. Change the Unit of temperature to degrees Celsius. 5. Change the x axis data from y to x. 6. Enter the following coordinates in the Cross section line data : x0 = 0.02, x1 = 0.1; y0 = y1 = Click OK to close Cross Section Plot Parameters window. As a result of these steps, a new plot will be shown that graphs T x,0 for x0 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

154 Laminar Forced Convection Over a Heated Flat Plate Exporting COMSOL Data to a Data File: 1. Click on Export Current Plot button in the graph created in the previous step. 2. Click Browse and navigate to your saving folder (say Desktop ). 3. Name the file comsol_temperature.txt. (Note: do not forget to type the.txt extension in the name of the file). 4. Click OK to save the file. This completes COMSOL modeling procedures for this problem

155 Laminar Forced Convection Over a Heated Flat Plate Modeling with MATLAB This part of modeling procedures describes how to create comparative graphs of local heat transfer coefficient h(x) (along the heated portion of the plate) using MATLAB. Obtain MATLAB script file named heated_plate.m from Blackboard prior to following these procedures. Save this file in the same directory as the data file(s) (comsol_temperature.txt) from COMSOL. (Note: heated_plate.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 heated_plate.m in a proper directory) Comparing COMSOL solution with Approximated Pohlhausen Solution: The reference analytic equations for heated plates with an insulation section are: 1 x Pr Re hx x Nux k x 1 q 3 s x0 x Ts x T k x Pr Re MATLAB script (heated_plate.m) is programmed to use exported COMSOL data for surface temperature T x,0 and Newton s Law of cooling to determine the local heat transfer coefficient h(x) along the heated portion of the plate. The script is also programmed to calculate analytical local heat transfer coefficient h(x) and surface temperature according to analytic reference equations given above. These equations represent a more general approximation to Pohlhausen solution that is suitable for plates with insulated section and applied heat flux. The script will ultimately produce comparative graphs that will plot both solutions. Follow the steps below to complete this problem: 1. Open MATLAB by double clicking its icon on the Desktop. 2. Load heated_plate.m file by selecting File Open Desktop heated_plate.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. Approximated Pohlhausen s and COMSOL solutions for h(x) and Ts x will be plotted in Figures 1 and 3. Figures 2 and 4 plot the percent error between quantities considered according to the equations printed on the figures. These results are shown on the next page

156 Laminar Forced Convection Over a Heated Flat Plate Results plotted with MATLAB: The results shown above were based on varying properties of air determined by the equations given in Options and Settings: Defining Constants section. By default, the script is programmed to use constant air properties determined at film temperature. This, however, introduces greater error. If you wish to use varying properties, you must export them to the same folder where the MATLAB script is. You must export varying Prandtl s number, conductivity k, and kinematic viscosity along heated portion of the surface of the plate. Refer to steps 1 7 on page 143 and 1 4 on page 144 to properly extract these quantities. Type the following expressions in the Expressions field of Cross Section Plot Parameters window to extract these properties and give them the following file names: PROPERTY EXPRESSION FILE NAME Pr 1018*mu_air/k_air Pr_comsol.txt k k_air k_comsol.txt mu_air/rho_air eta_comsol.txt

157 Laminar Forced Convection Over a Heated Flat Plate Further, you will need to un suppress a section in MATLAB script. This is explained in the script itself under Varying Quantities Import From COMSOL section. While in MATLAB, you may zoom into plots to notice departures in results based on the solution methods. Armed with these results, you are in a position to answer most of the assigned questions. (Approaches that show how to answer extra credit questions are given in appendix). This completes MATLAB modeling procedures for this problem

158 Laminar Forced Convection Over a Heated Flat Plate 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 Heat Transfer % Sample MATLAB Script For: % (X) Laminar Thermal Boundary Layer [Specified Surface Heat Flux] % IMPORTANT: Save this file in the same directory with % "comsol_temperature.txt" file. % ######################################################################### % clc; % Clears the UI prompt clear; % Clears variables from memory %% Constant Quantities Tinf = 20; % Ambient temperature, [degc] Vinf = 0.1; % Velocity at the inlet, [m/s] k_air = ; % Air conductivity at Tfilm, [W/m-K] Pr_air = 0.701; % Air Prandtl number at Tfilm, [1] eta_air = 29.75e-6; % Air viscosity at Tfilm, [m^2/s] x0 = 0.02; % A speical plate coordinate!, [m] qs = 1000; % Applied Surface Heat Flux, [W/m^2] %% Varying Quantities Import From COMSOL % ######################################################################### % Un-suppress the quantities below to perform verification of results % using varying air properties determined by COMSOL. Make sure to export % the following data files from COMSOL and save them in the same % directory as this script: Pr_comsol.txt, k_comsol.txt, eta_comsol.txt. % Otherwise, leave this section suppressed. When suppressed, the results % you get are determined at T film and introduce larges errors. % ######################################################################### % load Pr_comsol.txt % Pr_air = Pr_comsol(:,2)'; % load k_comsol.txt % k_air = k_comsol(:,2)'; % load eta_comsol.txt % eta_air = eta_comsol(:,2)'; % clear Pr_comsol k_comsol eta_comsol; %% COMSOL Data Import and h(x) Computation load comsol_temperature.txt x = comsol_temperature(:,1)'; Ts_comsol = comsol_temperature(:,2)'; hx_comsol = qs./(ts_comsol - Tinf); clear comsol_temperature; %% Finding Ts(x) and h(x) Analytically (Correlation Equation) Rex = Vinf*x./eta_air; qs = 1000; % Applied Uniform Surface Heat Flux, [W/m^2] Ts_analyt = Tinf *qs./k_air.*(1-x0./x).^(1/3).*x./... (Pr_air.^(1/3).*Rex.^(1/2)); % Correlation Eq. for T(x) Nux = 0.417*(1-x0./x).^(-1/3).*... Pr_air.^(1/3).*Rex.^(1/2); % Local Nusselt number, [1] hx_analyt = Nux.*k_air./x; % Local Heat transfer coefficient, [W/(m^2-C)] %% Error analysis in h(x) and Ts(x) deltah = abs(hx_comsol - hx_analyt); errorh = deltah./hx_comsol*100; % -> Simple % Error % -> calculation for h

159 Laminar Forced Convection Over a Heated Flat Plate deltat = abs(ts_comsol - Ts_analyt); errort = deltat./ts_comsol*100; % -> Simple % Error % -> calculation for T %% h(x) Plot Begins Here: figure1 = figure('inverthardcopy','off',... %\ 'Colormap',[1 1 1 ],... % -> Setting up the figure 'Color',[1 1 1]); %/ plot(x,hx_comsol,'b',x,hx_analyt,'r--') % Plots COMSOL vs. Theory h %% Plot cosmetics for figure 1 begin here: annotation(figure1,'textbox',... 'String',{'Flow Over a Heated Plate','with Insulated Edge'},... 'HorizontalAlignment','center',... 'FontSize',14,... 'FontName','Times New Roman',... 'FitBoxToText','off',... 'LineStyle','none',... 'BackgroundColor',[1 1 1],... 'Position',[ ]); annotation(figure1,'textbox',... 'String',{'q_s" = 1000W/m^2','T_\infty = 20\circC','V_\infty = 0.1 m/s','l = 10 cm','x_0 = 2 cm'},... 'FontSize',14,... 'FontName','Times New Roman',... 'FontAngle','italic',... 'FitBoxToText','off',... 'EdgeColor',[1 1 1],... 'BackgroundColor',[1 1 1],... 'Position',[ ]); legend('comsol Solution','Analytic Equation') box off grid on title('\fontname{times New Roman} \fontsize{16} \bf Local Heat Transfer Coefficient') xlabel('x, [m]') ylabel('h(x), [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') %% Error Plot in h(x) begins here: figure2 = figure('inverthardcopy','off',... %\ 'Colormap',[1 1 1 ],... % -> Setting up the figure 'Color',[1 1 1]); %/ plot(x,errorh) % Plots % Error in h %% Plot cosmetics for figure 2 begin here: box off grid on title('\fontname{times New Roman} \fontsize{16} \bf Error Analysis in h(x)') xlabel('x, [m]') ylabel('error in h(x), [%]') set(get(gca,'ylabel'),... 'fontsize', 14,... 'FontName','Times New Roman',... 'FontAngle','italic') set(get(gca,'xlabel'),... 'fontsize', 14,... 'FontName','Times New Roman',... 'FontAngle','italic') str1(1) = {... '$${\%err={h_{x_{analyt}}-h_{x_{comsol}}\over h_{x_{comsol}}}\times 100} $$'}; text('units','normalized', 'position',[.35.2],... 'fontsize',14,

160 Laminar Forced Convection Over a Heated Flat Plate 'FontName', 'Times New Roman',... 'FontAngle', 'italic',... 'BackgroundColor',[1 1 1],... 'interpreter','latex',... 'string', str1); %% Ts(x) Plot Begins Here: figure3 = figure('inverthardcopy','off',... %\ 'Colormap',[1 1 1 ],... % -> Setting up the figure 'Color',[1 1 1]); %/ plot(x,ts_comsol,'b',x,ts_analyt,'r--') % Plots COMSOL vs. Theory h %% Plot cosmetics for figure 3 begin here: annotation(figure3,'textbox',... 'String',{'Flow Over a Heated Plate with Insulated Edge'},... 'FontSize',14,... 'FontName','Times New Roman',... 'FitBoxToText','off',... 'LineStyle','none',... 'BackgroundColor',[1 1 1],... 'Position',[ ]); annotation(figure3,'textbox',... 'String',{'q_s" = 1000W/m^2','T_\infty = 20\circC','V_\infty = 0.1 m/s','l = 10 cm','x_0 = 2 cm'},... 'FontSize',14,... 'FontName','Times New Roman',... 'FontAngle','italic',... 'FitBoxToText','off',... 'EdgeColor',[1 1 1],... 'BackgroundColor',[1 1 1],... 'Position',[ ]); legend('comsol Solution','Analytic Equation','location', 'southwest') box off grid on title('\fontname{times New Roman} \fontsize{16} \bf Plate Surface Temperature') xlabel('x, [m]') ylabel('t_s(x), [\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') %% Error Plot in Ts(x) begins here: figure4 = figure('inverthardcopy','off',... %\ 'Colormap',[1 1 1 ],... % -> Setting up the figure 'Color',[1 1 1]); %/ plot(x,errort) % Plots % Error in h %% Plot cosmetics for figure 4 begin here: box off grid on title('\fontname{times New Roman} \fontsize{16} \bf Error Analysis in T_s(x)') xlabel('x, [m]') ylabel('error in T_s(x), [%]') set(get(gca,'ylabel'),... 'fontsize', 14,... 'FontName','Times New Roman',... 'FontAngle','italic') set(get(gca,'xlabel'),... 'fontsize', 14,... 'FontName','Times New Roman',... 'FontAngle','italic') str1(1) = {... '$${\%err={t_{s_{analyt}}-t_{s_{comsol}}\over T_{s_{comsol}}}\times 100} $$'};

161 Laminar Forced Convection Over a Heated Flat Plate text('units','normalized', 'position',[.35.2],... 'fontsize',14,... 'FontName', 'Times New Roman',... 'FontAngle', 'italic',... 'BackgroundColor',[1 1 1],... 'interpreter','latex',... 'string', str1); COMSOL Hints and Sample MATLAB Scripts For Extra Credit Question The goal of this question is to obtain boundary layer from COMSOL and compare it directly with analytical boundary layer solution obtained by Blasius. This is particularly tricky, since there is no clear definition as to where the viscous boundary layer thickness occurs. Notice that in our textbook, the definition is given based on the condition that u/ V be 0.994, from which, with the use of table 7.1, equation 7.11 is derived. We could have taken u/ V as close to unity as we wish and equation 7.11 would therefore change. Physically, the closer u/ V is to unity, the better the distinction in the viscous boundary layer, since it implies that u V. The number 0.994, however, is special because it corresponds to a Prandtl s number of 1.0 on Pohlhausen s solution given in figure 7.2. From figure 7.2 and equation 7.19, it follows that for air (Pr = 0.7), / 1, since 6.5. t We therefore need to program MATLAB with the following analytical equation for : t 5.2x Re x To compute Re x, properties at T film must be found. This is easily done since both temperature extremes are now known. Variable x ranges between 0 x 0.1 meters. In COMSOL, we have to use Contour plot type to single out velocity iso curve that correspond to u/ V condition. To extract boundary layer from COMSOL, 1. From the Postprocessing menu, open Plot Parameters dialog box (F12). 2. Under the Arrow tab, disable the Arrow plot checkbox 3. Switch to Contour tab. 4. Enable Contour plot checkbox on the top left portion of the window. 5. Type u in the Expression field. (without quotation marks)

162 Laminar Forced Convection Over a Heated Flat Plate 6. Enable Vector with isolevels radio button option. (The entry field right below it enables us to enter the single out the velocity for which we want the iso curve to be mapped out). 7. Enter in the entry field below Vector with isolevels. (This is the x component velocity that satisfies u/ V condition). 8. Switch to General tab. 9. Disable all other plot types except Contour and Geometry edges. 10. Use the Plot in drop down menu (located on the bottom left of the window) to switch from Main axes to New figure. 11. Click OK. Viscous COMSOL boundary layer satisfying u/ V will be shown in a new plot figure. 12. Click on Export Current Plot button. 13. Name the file fluid_blayer.txt. (Note: do not forget to type the.txt extension in the name of the file). 14. Click OK to save the file. The file is saved in the same directory where you first saved COMSOL model file with extension.mph

163 Laminar Forced Convection Over a Heated Flat Plate The following MATLAB script sample shows how the above analytical equations can be programmed. It also imports COMSOL boundary layer data saved in fluid_blayer.txt text file and uses it to plot comparative graphs. %% Preliminaries clc; % Clears the UI prompt clear; % Clears variables from memory %% Constant Quantities Vinf = 0.1; % Velocity at the inlet, [m/s] k_air = ; % Conductivity at Tf, [W/m-K] rho_air = ; % Density at Tf, [kg/m^3] Pr_air = 0.701; % Prandtl number at Tfilm, [1] mu_air = 24.24e-6; % Viscosity at Tf, [m^2/s] eta_air = mu_air/rho_air; % Specific viscosity at Tf, [m^2/s] %% COMSOL Data Import load fluid_blayer.txt; xcomsol = fluid_blayer(:,1); ycomsol = fluid_blayer(:,2); % <-- COMSOL Viscous Bound. Layer Thincknes %% Analytic Boundary Layer Thincknes Rex = Vinf*xcomsol/eta_air; yblasius = 5.2*xcomsol./sqrt(Rex);%<-- Viscous B.L.T. %% Percent Difference Analysis erryblasius = abs((ycomsol - yblasius))./yblasius*100; %% Plotter figure(1) plot(xcomsol,ycomsol,'r.',xcomsol,yblasius,'b.') grid on legend('comsol \delta','blasius \delta','location','northwest') figure(2) plot(xcomsol,erryblasius,'b.') title('error') This completes MATLAB modeling procedures for this problem

164

165 Laminar Flow in a Tube LAMINAR FLOW IN A TUBE Problem Statement Room temperature air enters a circular tube with diameter D and length L at a uniform inlet velocity V i. Formation of viscous boundary layers establishes a hydrodynamic portion in the inlet region of the tube. Air velocity in this region is developing. At and after a certain hydrodynamic length L h, the velocity distribution is developed and resembles a parabolic profile. This portion of the tube is referred to as fully developed velocity region (FDVR). Of general interest is to learn how to use COMSOL in obtaining the flow field in a tube. It is desired to obtain qualitative, as well as quantitative perspectives about the entrance and fully developed flow field regions from COMSOL solution. Known quantities: Velocity Development in a Tube Fluid: Air V i = 0.04 m/s Tair = 20 ºC L = 100 cm D = 6 cm Observations This is a forced internal channel flow problem. The channel considered is a circular tube. Only hydrodynamic considerations are of interest. Thermal considerations are omitted. Inlet velocity has a uniform distribution. Mean velocity u is not given. Therefore, Reynolds number is not readily calculable. Entrance flow region is expected to form in the tube. If Lh L, fully developed flow region will form in the tube as well. If Lh L, the entire tube is in entrance flow field region. Assuming that radial velocity 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. The problem can be modeled with constant air properties determined at incoming air temperature T air. 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

166 Laminar Flow in a Tube Assignment 1. State the experimental criterion which permits analyzing flow in a tube as laminar. Determine D e for a circular tube of diameter d. Use table 7.2 to find a correct C h for a circular tube. Rearrange equation 7.43a to solve for Re in terms of L h, C h, and hydraulic diameter for a circular tube. 2. Use COMSOL to solve for velocity distribution in the given tube. [Note: Please save this COMSOL model in.mph file for future thermal modeling. Thermal considerations will be done as a separate problem and it will require you to have COMSOL velocity solution]. 3. Use COMSOL to graph a vector field showing the development of velocity profile. Show a 2D colormap of velocity distribution. 4. Use COMSOL to plot axial velocity u(r, x o ) at x o = 5, 10, 25, 75, and Use COMSOL to plot centerline velocity uc as a function of x on 0 x L. Does the velocity profile become invariant with distance? What observations do you make regarding uc? 6. Use the plot of centerline velocity uc to find the hydrodynamic entrance length L h. 7. Use the results of questions 1 and 6 to calculate the Reynold s number based on hydrodynamic entrance length L h. State whether the flow is laminar or turbulent. 8. [Extra Credit]: Compute velocity profile in FDVR according to equation Compare this result with axial velocity u(r, x o ) at x o that is in FDVR from COMSOL solution. Comment on COMSOL solution validity. 9. [Extra Credit]: Compute mean velocity u in FDVR. [Hint: Recall from fluid mechanics that velocity distribution in fully developed velocity region is given by u u 1 2 c r r o. Compare this equation with equation 7.48 and use COMSOL solution to axial velocity u(r, x o ) at x o that is in FDVR to compute u ]. 10. [Extra Credit]: Perform parametric study in COMSOL that solves the problem for multiple input velocities. Solve the problem in the rage of 0.01 m/s to 1.0 m/s. Use an increment of 0.01 m/s

167 Laminar Flow in a Tube Modeling with COMSOL Multiphysics MODEL NAVIGATOR The problem asks us to solve for velocity profile within the tube. Since no other field of interest is asked for (ex. Temperature, Pressure, etc), this is not a multi coupled PDE system, and thus requires only Non Isothermal Flow application mode. For this setup: 1. Start COMSOL Multiphysics. 2. From the list of application modes select Heat Transfer Module Weakly Compressible Navier Stokes Steady state analysis. 3. Click OK

168 Laminar Flow in a Tube GEOMETRY MODELING We will model tube s lateral cross section only, as it saves computation time and is physically symmetric to any other lateral cross section. A rectangular geometry is adequate to model this problem. Let us therefore begin by creating a rectangle. 1. From the Draw menu, select Specify Objects Rectangle. 2. Enter 1.1 and 0.06 as the Width and Height of the rectangle, respectively. (Without quotation marks). 3. Enter as the base position y coordinate. 4. Click OK. 5. Click on Zoom Extents button in the main toolbar to zoom into the geometry. Your geometry should now be complete and highlighted in red, as shown below. 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. Let us begin with the air flow physics settings

169 Laminar Flow in a Tube Subdomain Settings: 1. From the Physics menu select Subdomain Settings (F8). 2. Select Subdomain 1 in the subdomain selection field. 3. Enter and 18.17e-6 in the ρ, and η fields, respectively. 4. Click OK to apply and close the Subdomain Settings window. Boundary Conditions: 1. From the Physics menu open the Boundary Settings (F7) dialog box. 2. Apply the following boundary conditions: BOUNDARY BOUNDARY TYPE BOUNDARY CONDITION COMMENTS 1 Inlet Velocity Enter 0.04 in U 0 field (Normal Inflow velocity) 2, 3 Wall No Slip 4 Open boundary Normal stress Verify that field f 0 is set to 0 3. Click OK to close the Boundary Settings window

170 Laminar Flow in a Tube MESH GENERATION To minimize the computational time without compromising much accuracy of the solution, we must change the default meshing parameters. To do this, 1. Go to the Mesh menu and select Mapped Mesh Parameters option. 2. Switch to Boundary tab. 3. Select boundaries 1 and 4 in the Boundary selection field while holding the Control (ctrl) key on your keyboard. 4. Enable Constrained edge element distribution option. 5. Enter 25 in the Number of edge elements field. 6. Enter 5 in the Element ratio: field and switch the Distribution method from Linear to Exponential. 7. Enable the Symmetric check box option. 8. Select boundaries 2 and 3 in the Boundary selection field while holding the Control (ctrl) key on your keyboard. 9. Enable Constrained edge element distribution option. 10. Enter 150 in the Number of edge elements field. 11. Enter 20 in the Element ratio: field and switch the Distribution method from Linear to Exponential

171 Laminar Flow in a Tube 12. Click Remesh button. 13. Click OK button to close Mapped Mesh Parameters window. As a result of these steps, you should get the following quadrilateral mesh: We are now ready to compute our solution. 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 as shown in velocity colormap above. In addition to this qualitative solution representation, the next section (Postprocessing and Visualization) will help you in obtaining other diagrams, such as 2D velocity vector field, plots of axial velocities at various x o, and a plot of centerline velocity u c. With these results available, you should be able to determine the hydrodynamic entrance length L h and a corresponding Reynolds number. Furthermore, you will be able to determine whether the flow is laminar or turbulent. With hydrodynamic entrance length L h known, you can determine and see whether both entrance and FDV regions or only the entrance region exist in the tube. Answer the extra credit questions to verify COMSOL results

172 Laminar Flow in a Tube POSTPROCESSING AND VISUALIZATION Displaying Velocity Vector Field with an Arrow Plot: One of the simplest ways to show the evolution of velocity profile is with arrow plot. This can be done as follows. 1. From the Postprocessing menu, open Plot Parameters dialog box (F12). 2. Switch to the Arrow tab and enable the Arrow plot check box. 3. Enter 20 in the Number of points for both x and y fields. 4. 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 and white are good choices here) 5. 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 161 with an additional velocity vector field represented by arrows. 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

173 Laminar Flow in a Tube the difference in velocity vector field representation. Try other values. 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

174 Laminar Flow in a Tube Plotting Axial Velocity as a Function of Radius at Specified x o Values To make axial velocity u(r, x o ) plots at specified x o, we simply need to know the end coordinates of axial lines along which u(r, x o ) 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 velocity u(r, x o ) at x o = 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 u in Expression field. 7. Click OK to apply and close x axis data window. 8. In Cross Section Plot Parameters window, enter the following coordinates in the Cross section line data : x0 = x1 = 1; y0 = -3e-2 and y1 = 3e Click Apply. These steps produce a plot of axial velocity as a function of radius at x = 100 cm. Velocity u is plotted on the x axis and y coordinates are plotted on the y axis. To

175 Laminar Flow in a Tube 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 163 to finish with exporting the image. To display axial velocity at other x 0 values, repeat steps 8 and 9 on page 164. In step 8, change the x0 and x1 coordinates to those given in assignment question 4. 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 velocity 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 Centerline Velocity uc as a Function of x Similar to axial velocity plots, we simply need to specify the proper coordinates of a line along which we wish to plot velocity. 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. 1. Under Postprocessing menu, select Cross Section Plot Parameters. 2. Switch to Line/Extrusion tab. 3. Type u in the Expression field under y axis data section. 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 = Click OK

176 Laminar Flow in a Tube Centerline velocity u c will be displayed as a function of x on 0 x L. This graph is shown below. It has been re plotted with MATLAB. MATLAB Re Plot of Centerline Velocity uc This completes COMSOL modeling procedures for this problem

177 Laminar Flow in a Tube APPENDIX MATLAB script The following MATLAB script re produces the centerline velocity plot. Make sure to use COMSOL first to export the centerline velocity data to an external text file. Name the file as uc.txt and place it in the same directory with MATLAB s.m script file. %% Preliminaries clear % Clears the UI prompt clc % Clears variables from memory %% Velocity Data Import from COMSOL Multiphysics: load uc.txt; % Loads u(0,x) as a 2 column vector x = uc(:,1)*100; % x - coordinate, [cm] u = uc(:,2); % velocity, [m/s] %% Plotter figure1 = figure('inverthardcopy','off',... %\ 'Colormap',[1 1 1 ],... % -> Setting up the figure 'Color',[1 1 1]); %/ plot(x,u,'k'); % Plotting grid on box off title(... '\fontname{times New Roman} \fontsize{16} \bf Centerline Velocity u_c') xlabel('\fontname{times New Roman} \fontsize{14} \it \bf x, [cm]') ylabel('\fontname{times New Roman} \fontsize{14} \it \bf u_c, [m/s]') This completes MATLAB modeling procedures for this problem

178

179 Temperature Development In Tubes: Uniform Surface Temperature TEMPERATURE DEVELOPMENT IN TUBES Uniform Surface Temperature Problem Statement Room temperature air enters a circular tube with diameter D and length L at a uniform inlet velocity V i and temperature T i. The surface walls of the tube are maintained at a higher constant temperature T s. Formation of viscous boundary layers establishes a hydrodynamic entrance region of the tube. Air velocity in this region is developing. At and after a certain hydrodynamic length L h, the velocity distribution is developed and resembles a parabolic profile. This portion of the tube is referred to as fully developed velocity region (FDVR). Formation of thermal boundary layers establishes a thermal entrance region of the tube. Air temperature in this region is developing. At and after a certain thermal length L t, temperature develops to a uniform profile. This portion of the tube is referred to as fully developed temperature region (FDTR). 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 the entrance and fully developed thermal regions from COMSOL solution. Temperature Development in an Isothermal Tube Known quantities: Fluid: Air V i = 0.04 m/s T i = 20 ºC T s = 150 ºC L = 100 cm D = 6 cm 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. In Laminar Flow in a Tube, it was established that Lh L for the given geometry and velocity entrance conditions. Thus, velocity becomes fully developed at a certain L h. Of interest here is the determination of L t. If Lt L, the entire tube is in thermal entrance region. If that is the case, we can still find L t by extending the length of the geometry and resolving the problem. 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 T air. Later, we may also want to model the problem by varying air

180 Temperature Development In Tubes: Uniform Surface Temperature properties with respect to temperature. This will enable us to see if there are any differences in entrance lengths 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. 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, x o ) at x o = 5, 10, 25, 75, and 100 cm. 3. Use COMSOL to plot and extract numerical data for local h r x on 0 x L. x o, [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] 4. Use COMSOL to plot centerline temperature T c as a function of x on 0 x L. Does temperature profile become invariant with distance? What observations do you make regarding Tc? 5. Use centerline temperature T c plot to find the thermal entrance length L t. If necessary, increase the length of the tube and resolve the problem until you obtain a graph of centerline temperature T c that enables you to determine L t. 6. [Extra Credit]: Modify COMSOL model to include air property variations and resolve the problem. Produce plots of centerline velocity u c and temperature T c. 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

181 Temperature Development In Tubes: Uniform Surface Temperature 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 at uniform surface temperature T s. We will proceed by extending our previous module to a 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: ADDING GENERAL 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 Heat Transfer Module General Heat Transfer Steady state analysis. 4. Click the Add button. 5. Click OK

182 Temperature Development In Tubes: Uniform Surface Temperature 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 we ve specified air flow physics settings before, we only need to add and couple heat transfer physics settings. This is done as follows. 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 field. 4. Enter , and 1006 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

183 Temperature Development In Tubes: Uniform Surface Temperature 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 Temperature Enter in T 0 field 2, 3 Temperature Enter in T 0 field 4 Convective flux 3. Click OK to close Boundary Settings window. MESH GENEARATION The mesh for this model was optimized before in Laminar Flow in a Tube. No further modification is necessary. To check that mesh is preserved, click on the Mesh Mode button. Your mesh should be made with quadrilateral elements, as shown here. We are now ready to compute our solution

184 Temperature Development In Tubes: Uniform Surface Temperature 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 and the velocity field (represented by arrows in the above) will not be shown. 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 x o and a plot of centerline temperature T c. To determine thermal entrance length L t, you need to determine whether both entrance and FDT regions or only the entrance region exist in the tube. We will also plot and extract numerical data for local h x r, o x. Answer the extra credit question to determine the effects on solution when air property variations are included COMSOL analysis

185 Temperature Development In Tubes: Uniform Surface Temperature 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 local h r x, and centerline temperature development plot. x o, 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

186 Temperature Development In Tubes: Uniform Surface Temperature The 2D temperature distribution will be displayed using the hsv colormap type with degrees Celsius as the unit of temperature. Let s 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 174. 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

187 Temperature Development In Tubes: Uniform Surface Temperature 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

188 Temperature Development In Tubes: Uniform Surface Temperature Plotting T(r,x o ) (or T(r) at x o ) To make axial temperature T(r, x o ) plots at specified x o, we simply need to know the end coordinates of axial lines along which T(r, x o ) 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, x o ) at x o = 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 = and y1 = Click Apply

189 Temperature Development In Tubes: Uniform Surface Temperature 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 177 to finish with exporting the image. To display axial temperature at other x 0 values, repeat steps 8 and 9 on page 178. 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 Local h x r o,x for x x L: 0 To plot h x ro, x for x0 x L using COMSOL, 1. Select Cross Section Plot Parameters option from Postprocessing menu. 2. Switch to the Line/Extrusion tab. 3. Type tflux_htgh/(t ) in Expression field. 4. Change the x axis data to x. 5. Enter the following coordinates in the Cross section line data : x0 = x1 = 0; and y0 = -0.03, y1 = Click OK to close Cross Section Plot Parameters window. Local surface heat transfer coefficient will be plotted in a new figure

190 Temperature Development In Tubes: Uniform Surface Temperature As a result of these steps, a new plot will be shown that graphs h r x, x o for x0 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 graph created in the previous step. 2. Click Browse and navigate to your saving folder (say Desktop ). 3. Name the file hx_surface.txt. (Note: do not forget to type the.txt extension in the name of the file). 4. Click OK to save the file

191 Temperature Development In Tubes: Uniform Surface Temperature Plotting Centerline Temperature T c (r o, x) as a Function of x Similar to axial temperature plots, we simply need to specify the 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 = Click OK. Centerline temperature T c 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

192 Temperature Development In Tubes: Uniform Surface Temperature MATLAB Re Plot of Centerline Temperature T c Does the temperature profile become invariant with distance x? What observations do you make regarding T c? Can you determine thermal entrance length from the above graph?

193 Temperature Development In Tubes: Uniform Surface Temperature 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 u c and temperature T c 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. Can you notice the differences in hydrodynamic and thermal entrance lengths between the solutions? To use varying air properties in COMSOL, follow the steps below, 2. From the Options menu select Expressions Scalar Expressions 3. Define the following names and expressions: NAME EXPRESSION UNIT DESCRIPTION k_air 10^( *log10(abs(T[1/K])))[W/(m*K)] W/(m K) Air Conductivity rho_air 1.013e5[Pa]*28.8[g/mol]/(8.314[J/(mol*K)]*T) kg/m 3 Air Density mu_air 6e-6[Pa*s]+4e-8[Pa*s/K]*T Kg/(m s) Air Viscosity 4. Click OK. 5. Use the same names of quantities defined above in Subdomain Physics Settings to replace the previously defined constant numerical properties. 6. 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

194

195 Temperature Development In Tubes: Uniform Surface Heat Flux 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 V i and temperature T i. The surface wall of the tube is heated by a uniform heat flux q s. Formation of viscous boundary layers establishes a hydrodynamic entrance region of the tube. Air velocity in this region is developing. At and after a certain hydrodynamic length L h, 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: Temperature Development in an Isothermal Tube Fluid: Air V i = 0.04 m/s T i = 20 ºC q = 1000 W/m 2 s L = 100 cm D = 6 cm 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 T air. 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

196 Temperature Development In Tubes: Uniform Surface Heat Flux 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, x o ) at x o = 5, 10, 25, 75, and 100 cm. 3. Use COMSOL to plot centerline temperature T c 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 T s as a function of x on 0 x L. Use Newton s law of cooling and extracted surface temperature T s 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 u c and temperature T c. 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

197 Temperature Development In Tubes: Uniform Surface Heat Flux 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 at uniform surface flux q s. We will proceed by extending our previous module to a 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

198 Temperature Development In Tubes: Uniform Surface Heat Flux 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 we ve 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 , and 1006 in the k(isotropic), ρ, and C p fields, respectively. 5. Enter u and v in the u and v fields, respectively. 6. Click OK to close the Subdomain Settings window

199 Temperature Development In Tubes: Uniform Surface Heat Flux 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 BOUNDARY CONDITION COMMENTS 1 Temperature Enter in T 0 field 2, 3 Heat Flux Enter 1000 in q 0 field 4 Convective flux 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: We are now ready to compute our solution

200 Temperature Development In Tubes: Uniform Surface Heat Flux 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 x o and a plot of centerline and surface temperatures T c and T s, respectively. We will also plot and extract numerical data for T s and use it to find local h x r, o x. Answer the extra credit question to determine the effects on solution when air property variations are included COMSOL analysis

201 Temperature Development In Tubes: Uniform Surface Heat Flux 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 T s, 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

202 Temperature Development In Tubes: Uniform Surface Heat Flux The 2D temperature distribution will be displayed using the hsv colormap type with degrees Celsius as the unit of temperature. Let s 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 190. 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

203 Temperature Development In Tubes: Uniform Surface Heat Flux 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

204 Temperature Development In Tubes: Uniform Surface Heat Flux Plotting T(r, x o ) (or T(r) at x o ) To make axial temperature T(r, x o ) plots at specified x o, we simply need to know the end coordinates of axial lines along which T(r, x o ) 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, x o ) at x o = 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 = and y1 = Click Apply

205 Temperature Development In Tubes: Uniform Surface Heat Flux 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 193 to finish with exporting the image. To display axial temperature at other x 0 values, repeat steps 8 and 9 on page 194. 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 T s To plot surface temperature T s 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 = Click OK to close Cross Section Plot Parameters window and plot T s

206 Temperature Development In Tubes: Uniform Surface Heat Flux As a result of these steps, a new plot will be shown that graphs surface temperature T s 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 Temperature time graph created in the previous step. 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

207 Temperature Development In Tubes: Uniform Surface Heat Flux Plotting Centerline Temperature T c (r o, 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 = Click OK. Centerline temperature T c 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

208 Temperature Development In Tubes: Uniform Surface Heat Flux Modeling with MATLAB This part of modeling procedures describes how to create graphs of surface heat transfer coefficient h(x) and temperature T s 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 Newton s 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 s T 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 T c?

209 Temperature Development In Tubes: Uniform Surface Heat Flux 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 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') This completes MATLAB modeling procedures for this problem

210 Temperature Development In Tubes: Uniform Surface Heat Flux 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 u c and temperature T c 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, 7. From the Options menu select Expressions Scalar Expressions 8. Define the following names and expressions: NAME EXPRESSION UNIT DESCRIPTION k_air 10^( *log10(abs(T[1/K])))[W/(m*K)] W/(m K) Air Conductivity rho_air 1.013e5[Pa]*28.8[g/mol]/(8.314[J/(mol*K)]*T) kg/m 3 Air Density mu_air 6e-6[Pa*s]+4e-8[Pa*s/K]*T Kg/(m s) Air Viscosity 9. Click OK. 10. Use the same names of quantities defined above in Subdomain Physics Settings to replace the previously defined constant numerical properties. 11. 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

211 Free Convection of Air Over an Isothermal Vertical Plate ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE ME433 COMSOL INSTRUCTTIONS FREE CONVECTION OF AIR OVER AN ISOTHERMAL VERTICAL PLATE Problem Statement A plate of 10 cm in height 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 plate, the density of air near the plate starts to decrease. Due to the presence of earth s gravitational acceleration field, air begins to rise along the surface of the plate forming viscous and thermal boundary layers. Of general interest is to learn how to use COMSOL to generate plots of velocity and temperature boundary layers in free convection over a vertical plate. Free Convection Modeling Setup Known quantities: Geometry: vertical plate Fluid: Air T s = 100 ºC T = 20 ºC L = 10 cm Observations This is a free convection, external flow problem. Considered geometry is a vertical plate. The plate 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 vertical plates, local Nusselt number is the quantity sought. COMSOL may introduce errors in solution at the bottom and upper edges of the plate. Although the bottom edge errors are unavoidable, the upper edge error can be eliminated by extending the height of the plate by a few millimeters. Thus, we will extend the height of the plate by 5 mm at the upper edge (making the y coordinates of the plate as y bottom = 0.01m and y up = 0.115m, as shown in the figure above)

212 Free Convection of Air Over an Isothermal Vertical Plate ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE ME433 COMSOL INSTRUCTTIONS Assignment 1. State the criterion for transition from laminar to turbulent flow for free convection in vertical plates. Determine whether the flow in this problem is laminar or turbulent. 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 axial velocity u(x,y o ) and temperature T(x,y o ) at y o = 6 cm. 5. Use COMSOL to plot and extract numerical data local heat flux q y as a function of y on 0 y L. Use Newton s law of cooling and extracted local heat flux q y to determine COMSOL local heat transfer coefficient h(0,y). Compute and plot experimentally determined h(y) given by the correct correlation equation and COMSOL h(y) on the same graph. [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. Calculate and plot the percent error between COMSOL h(y) and h(y) based on correlation equation you chose. Base your error analysis on assumption that correlation based h(y) is the correct solution. Can you conclude that COMSOL results are valid? [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] 7. Compute (analytically) the total heat transfer rate q T for a plate of 50 cm width. 8. [Extra Credit]:

213 Free Convection of Air Over an Isothermal Vertical Plate ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE ME433 COMSOL INSTRUCTTIONS Modeling with COMSOL Multiphysics This model analyzes free convection process outside a vertical plate. The plate is held at a constant temperature T s, which is higher than the surrounding temperature T. As warm plate 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 10 cm plate is located on the left vertical wall. 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 the plate where warm plate 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

214 Free Convection of Air Over an Isothermal Vertical Plate ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE 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 [K] [K] Temperature Far Away dt 10[K] 10[K] Temperature Step rho [kg/m^3] [kg/m 3 ] 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 [W/(m*degC)] [W/(m K)] Air Conductivity (20ºC) Cp_air [J/(kg*degC)] [J/(kg K)] Air Heat Capacity (20ºC) g 9.81[m/s^2] 9.81[m/s 2 ] Acc. Due to Gravity 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

215 Free Convection of Air Over an Isothermal Vertical Plate ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE 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 partitioned left wall. This is done as follows. 1. In the Draw menu, select Specify Objects Rectangle 2. Enter following rectangle dimensions for R1. R1 WIDTH HEIGHT Click OK to close Rectangle definition window. 4. Click on Zoom Extents button in the main toolbar to zoom into the geometry. 5. In the Draw menu, select Specify Objects Point 6. Start by entering following point coordinates for point P1. COORDINATES P1 P2 X 0 0 Y When done with step 6, click OK and repeat step 6 for point P2. 8. Click OK to close Point definition window. You should see your finished modeling geometry now in the main program window. The left wall of the rectangle should be partitioned into 3 parts by 2 points

216 Free Convection of Air Over an Isothermal Vertical Plate ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE 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 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. 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 3 ] 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 and heat 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 rho and mu_air in the fields for density ρ and dynamic viscosity η. 4. Type g*(rho0-rho) in the F y field. 5. Click OK

217 Free Convection of Air Over an Isothermal Vertical Plate ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE ME433 COMSOL INSTRUCTTIONS Notice that the buoyant force F y is set up in accordance with the condition described on page 203. 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, 3, 4 Wall No Slip 2, 5, 6 Open boundary Normal Stress COMMENTS Verify that field f 0 is set to 0 3. Click OK to close the boundary settings window. The no slip condition applied to boundaries 1, 3, and 4 assumes that velocity is zero at the wall. The remaining boundaries all 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

218 Free Convection of Air Over an Isothermal Vertical Plate ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE 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_air, rho 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

219 Free Convection of Air Over an Isothermal Vertical Plate ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE 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, 4 Insulation/Symmetry 2, 6 Temperature Enter Tinf in T 0 field 3 Temperature Enter Tinf+dT in T 0 field 5 Convective flux 3. Click OK to close Boundary Settings window. The model keeps hot plate (boundary 3) at a constant temperature T s (we will slowly raise temperature step dt with parametric solver to 80ºC so that solver is able to converge system of nonlinear equations. Note that when dt = 80ºC, temperature at the plate (boundary 3) is 100ºC, as given in the problem statement). The short boundaries below and above the vertical plate (1 and 4) are thermally insulated so that no conduction or convection occurs normal to the boundaries. Ideally you would not include the insulated parts, but they are needed to smoothen out air flow near the hot plate edges. On the bottom and the right boundaries (2 and 6), the model sets temperature equal to room temperature T. Air rises upwards through the upper horizontal boundary (5). Application of Convective Flux boundary condition 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 wall 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, and 4 in the boundary selection section while holding the Control (ctrl) key on your keyboard. 4. Enter 3e-4 in the Maximum element size edit field. 5. Switch to the Point tab

220 Free Convection of Air Over an Isothermal Vertical Plate ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE ME433 COMSOL INSTRUCTTIONS 6. Select point 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 a mesh that looks like the one below: We are now ready to compute our solution

221 Free Convection of Air Over an Isothermal Vertical Plate ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE 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_air in the field for Name of parameter. 4. Enter 1e e-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

222 Free Convection of Air Over an Isothermal Vertical Plate ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE 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 area 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

223 Free Convection of Air Over an Isothermal Vertical Plate ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE ME433 COMSOL INSTRUCTTIONS 20. Click OK to close Solver parameters window. We will now use the initial value solution to find solutions to higher plate 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 plate 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 velocity field (represented by arrows in the above) will not be shown. We will use distinct colormap 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 2D colormap of air density field, plots of axial velocity u(x, y o ) and temperature T(x, y o ) at y o = 6 cm, and a plot of q y on 0 y L. We will then use MATALB to compute and plot local heat transfer coefficient h(y) from COMSOL q y data and verify this result with an appropriate correlation equation. A sample MATLAB script for COMSOL results verification is given in appendix

224 Free Convection of Air Over an Isothermal Vertical Plate ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE 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, computation of local q y and 1D temperature distribution plot. You will then address the questions of COMSOL solution validity and compare the results to correlation equation mainly by using MATLAB. 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

225 Free Convection of Air Over an Isothermal Vertical Plate ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE ME433 COMSOL INSTRUCTTIONS 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 213. 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

226 Free Convection of Air Over an Isothermal Vertical Plate ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE ME433 COMSOL INSTRUCTTIONS 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. Change the color of the arrow (see step 8). 11. Choose the quantity you wish to plot from Predefined quantities. 12. Click Apply. 13. 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

227 Free Convection of Air Over an Isothermal Vertical Plate ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE ME433 COMSOL INSTRUCTTIONS Displaying V(x, y) as a Colormap: 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. 4. From Predefined quantities, select Velocity field. 5. Change the Colormap type from hot to jet. 6. Click Apply to refresh main view and keep the Plot Parameters window open. The 2D Velocity distribution will be displayed using the jet colormap. Displaying Air Density Field Colormap: With the Plot Parameters window open, ensure that you are under the Surface tab, 7. Type rho in Expression field (without quotation marks). 8. Click Apply. (Note: The unit will change automatically) These steps produce a colormap that displays variations in air s density ρ. Note the values on the color scale and compare them with Appendix C of your textbook

228 Free Convection of Air Over an Isothermal Vertical Plate ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE ME433 COMSOL INSTRUCTTIONS Plotting Axial Temperature T(x, y o ) at y o = 6 cm 1. From Postprocessing menu select Cross Section Plot Parameters option. 2. Under General tab, select 80 as the only Solution to use option. 3. Switch to the Line/Extrusion tab. 4. Change the Unit of temperature to degrees Celsius. 5. Change the x axis data from arc length to x. 6. Enter the following coordinates in the Cross section line data : x0 = 0, x1 = 0.105; y0 = y1 = Click Apply

229 Free Convection of Air Over an Isothermal Vertical Plate ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE ME433 COMSOL INSTRUCTTIONS These steps produce a plot of T(x) at y = 6 cm, from x = 0 cm (plate surface) to x = 10.5 cm (ambient environment conditions). Temperature T is plotted on the y axis and x 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 216 to finish with exporting the image. Plotting Axial Velocity u(x, y o ) at y o = 6 cm With Cross Section Plot Parameters window open, ensure that you are under the Line/Extrusion tab, 10. Type U_chns in Expression field (without quotation marks). 11. Click OK. (Note: The unit will change automatically) These steps produce a plot of u(x) at y = 6 cm, from x = 0 cm (plate surface) to x = 10.5 cm (ambient environment conditions). Axial velocity u is plotted on the y axis and x coordinates are plotted on the x axis. To save this plot, 12. Click the save button in your figure with results. This will bring up an Export Image window. 13. Follow steps 2 4 as instructed on page 216 to finish with exporting the image. Plotting Local q y for 0 y L To plot q for 0 y L using COMSOL, y 1. Select Cross Section Plot Parameters option from Postprocessing menu. 2. Switch to the Line/Extrusion tab. 3. From Predefined quantities, select Total heat flux

230 Free Convection of Air Over an Isothermal Vertical Plate ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE ME433 COMSOL INSTRUCTTIONS 4. Change the x axis data from x to y. 5. Enter the following coordinates in the Cross section line data : x0 = x1 = 0; y0 = 0.01, and y1 = Click OK to close Cross Section Plot Parameters window. As a result of these steps, a new plot will be shown that graphs q y for 0 y 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 Temperature time graph created in the previous step. 2. Click Browse and navigate to your saving folder (say Desktop ). 3. Name the file qy.txt. (Note: do not forget to type the.txt extension in the name of the file). 4. Click OK to save the file. This completes COMSOL modeling procedures for this problem

231 Free Convection of Air Over an Isothermal Vertical Plate ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE ME433 COMSOL INSTRUCTTIONS Modeling with MATLAB This part of modeling procedures describes how to create comparative graphs of local heat transfer coefficient h(y) using MATLAB. Obtain MATLAB script file named isothermal_vplate.m from Blackboard prior to following these procedures. Save this file in the same directory as the data file(s) (qy.txt) from COMSOL. (Note: isothermal_vplate.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 isothermal_vplate.m in a proper directory) Comparing COMSOL Solution to Correlation Solution MATLAB script (isothermal_vplate.m) is programmed to use exported COMSOL data for heat flux q y and Newton s Law of cooling to determine the local heat transfer coefficient h(y) along the plate. The script is also programmed to calculate experimental local heat transfer coefficient h(y) according to a correlation equation. The script will ultimately produce comparative graphs that will plot both solutions. Follow the steps below to complete this problem: 1. Open MATLAB by double clicking its icon on the Desktop. 2. Load isothermal_vplate.m file by selecting File Open Desktop isothermal_vplate.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. Correlation equation and COMSOL solutions will be plotted in Figure 1. Figure 2 plots the percent error between local heat transfer coefficients according to the equation printed on the figure. These results are shown below. Results Plotted with MATLAB:

232 Free Convection of Air Over an Isothermal Vertical Plate ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE ME433 COMSOL INSTRUCTTIONS While in MATLAB, you may zoom into the left plot to notice departures in results based on the solution methods. Error analysis shows that most of the error is concentrated at the bottom edge of the plate. It is therefore reasonable to zoom into this area to better notice departures in results based on the solution methods. This is shown in the figure below. The following 2 graphs show axial velocity and temperature at y o = 6 cm. These graphs were previously obtained in COMSOL. They have been repotted with MATLAB. Armed with these results, you are in a position to answer most of the assigned questions

233 Free Convection of Air Over an Isothermal Vertical Plate ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE ME433 COMSOL INSTRUCTTIONS 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 Heat Transfer % Sample MATLAB Script For: % (X) Free Convection of Air over an Isothermal Vertical Plate % IMPORTANT: Save this file in the same directory with % "qy.txt" file. % ######################################################################### % %% Preliminaries clear % Clears variables from memory clc % Clears the UI prompt %% Constant Quantities Tinf = 20; % Ambient temperature, [degc] Ts = 100; % Plate temperature, [degc] Tf = 0.5*(Tinf + Ts); % Film temperature, [degc] g = 9.81; % acc. due to gravity, [m/s^2] Cp = 1008; % at Tf rho = ; %% at Tf mu = 20.03e-6; % at Tf eta = 18.9e-6; % at Tf k = ; % at Tf Pr = 0.708; % at Tf alpha = eta/pr; % at Tf beta = 1/(Tf ); % in Kelvin^(-1) %% Heat Flux Data Import from COMSOL Multiphysics: load qy.txt; % Loads q"(0,y) as a 2 column vector y = 0: :0.1'; % y - coords vector, [m] yflux = qy(:,2)'; % flux, [W/m^2] hy_comsol = yflux./(ts - Tinf); % COMSOL h(y), [W/(m^2-C)] %% Correlation Equation For Nusselt Number Ray = beta*g*(ts - Tinf)*y.^(3)/(eta*alpha); Nuy = 3/4*(Pr/( *sqrt(Pr) *Pr))^(1/4)*Ray.^(1/4); % Local Nusselt number hy_analyt = (k./y).*nuy; % Correlation Local Heat Transfer Coefficient %% Error Analysis in h(y) errh = (hy_comsol - hy_analyt)./hy_analyt*100; %% Plotter figure1 = figure('inverthardcopy','off',... %\ 'Colormap',[1 1 1 ],... % -> Setting up the figure 'Color',[1 1 1]); %/ plot(y,hy_comsol,'k',y,hy_analyt,'k--'); % Plotting grid on box off title('\fontname{times New Roman} \fontsize{16} \bf Local Heat Transfer Coefficient h_y') xlabel('\fontname{times New Roman} \fontsize{14} \it \bf y, [m]') ylabel('\fontname{times New Roman} \fontsize{14} \it \bf h_y, [W/m^2-\circC]') legend('comsol Solution','Correlation Solution','location','northeast') % % figure2 = figure('inverthardcopy','off',... %\

234 Free Convection of Air Over an Isothermal Vertical Plate ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE ME433 COMSOL INSTRUCTTIONS 'Colormap',[1 1 1 ],... % -> Setting up the figure 'Color',[1 1 1]); %/ plot(y,errh,'k'); % Plotting grid on box off title('\fontname{times New Roman} \fontsize{16} \bf Error Analysis') xlabel('\fontname{times New Roman} \fontsize{14} \it \bf y, [m]') ylabel('\fontname{times New Roman} \fontsize{14} \it \bf Error in h_y, [%]') str1(1) = {'$${\%err={h_{y_{comsol}}-h_{y_{correlation}}\over h_{y_{correlation}}}\times 100} $$'}; text('units','normalized', 'position',[.33.9],... 'fontsize',14,... 'FontName', 'Times New Roman',... 'FontAngle', 'italic',... 'BackgroundColor',[1 1 1],... 'interpreter','latex',... 'string', str1); %% COMSOL u(x,y0) and T(x,y0) Replots % ######################################################################### % Unsuppress this portion only if you wich to replot COMSOL u(x,y0) and % T(x,y0). Prior to reploting, make sure to extract numerical data for % velocity and temperature to text files. You must name the files as: % "velfields.txt" and "tempfield.txt" for velocity and remperature fields, % respectively and place then in the same directory as this script. % ######################################################################### % load velfield.txt; % Loads u(x,y0) as a 2 column vector % load tempfield.txt; % Loads T(x,y0) as a 2 column vector % y1 = velfield(:,1)*100; % y - coords, [cm] % u1 = velfield(:,2); % u(x), [m/s] % t1 = tempfield(:,2); % T(x), [degc] % % figure3 = figure('inverthardcopy','off',... %\ % 'Colormap',[1 1 1 ],... % -> Setting up the figure % 'Color',[1 1 1]); %/ % plot(y1,u1,'k--'); % Plotting % grid on % box off % title('\fontname{times New Roman} \fontsize{16} \bf Axial velocity u at y_o = 6 cm') % xlabel('\fontname{times New Roman} \fontsize{14} \it \bf y, [cm]') % ylabel('\fontname{times New Roman} \fontsize{14} \it \bf u (x, y_o), [m/s]') % % figure4 = figure('inverthardcopy','off',... %\ % 'Colormap',[1 1 1 ],... % -> Setting up the figure % 'Color',[1 1 1]); %/ % plot(y1,t1,'k--'); % Plotting % grid on % box off % title('\fontname{times New Roman} \fontsize{16} \bf Axial temperature T at y_o = 6 cm') % xlabel('\fontname{times New Roman} \fontsize{14} \it \bf y, [cm]') % ylabel('\fontname{times New Roman} \fontsize{14} \it \bf T (x, y_o), [\circc]') % This completes MATLAB modeling procedures for this problem

235 Free Convection of Air Over a Heated Vertical Plate ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE ME433 COMSOL INSTRUCTTIONS FREE CONVECTION OF AIR OVER A HEATED VERTICAL PLATE Problem Statement A plate of 10 cm in height heated with constant heat flux q y is brought to a room temperature air environment. Due to temperature difference between air and the plate, the density of air near the plate starts to decrease. In presence of earth s gravitational acceleration field, air begins to rise near the surface of the plate forming viscous and thermal boundary layers. Of general interest is to learn how to use COMSOL to generate plots of velocity and temperature boundary layers in free convection over a vertical plate. Free Convection Modeling Setup Known quantities: Geometry: vertical plate Fluid: Air q y = 1000 W/m 2 T = 20 ºC L = 10 cm Observations This is a free convection, external flow problem. Considered geometry is a vertical plate. The plate is heated by constant heat flux q y. Velocity and temperature fields are coupled in free convection. Therefore, a multiphysics model involving steady state Navier Stokes and heat transfer modes must be set up 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 may be applicable. For heated vertical plates, plate surface temperature is the quantity sought. COMSOL may introduce errors in solution at the bottom and upper edges of the plate. Although the bottom edge errors are unavoidable, the upper edge error can be eliminated by extending the height of the plate by a few millimeters. Thus, we will extend the height of the plate by 5 mm at the upper edge (making the y coordinates of the plate as y bottom = 0.01m and y up = 0.115m, as shown in the figure above)

236 Free Convection of Air Over a Heated Vertical Plate ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE ME433 COMSOL INSTRUCTTIONS Assignment 1. Use COMSOL to determine and show 2D colormaps of velocity and temperature fields. Use arrows to represent velocity vector field. 2. Use COMSOL to plot 2D colormap of the density field. 3. Use COMSOL to plot axial velocity u(x,y o ) and temperature T(x,y o ) at y o = 6 cm. 4. Use COMSOL to plot and extract numerical data for plate surface temperature T s as a function of y on 0 y L. Compute and plot analytic T s given by correlation 8.29a and COMSOL T s on the same graph. [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. Calculate and plot the percent error between COMSOL T s and T s based on correlation 8.29a. Base your error analysis on assumption that correlation based T s is the correct solution. Can you conclude that COMSOL results are valid? [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. State the criterion for transition from laminar to turbulent flow for free convection in vertical plates. Determine whether the flow in this problem is laminar or turbulent [Hint: use COMSOL solution for temperature field to determine film temperature]. Determine whether of correlation 8.29a is applicable. 7. [Extra Credit]: Compare 2D colormaps of velocity and temperature fields from parametric solver for the following values of surface flux stepping dq : (a) 100 W/m 2, and (b) 1000 W/m 2. [Hint: Use available Parameter value: options under General tab of Plot Parameters window]. Explain why thermal boundary layer is larger for smaller flux (a) than for the larger flux (b). Present sufficient numerical evidence to support your answer. Intuitively speaking, would you expect this to take place prior to comparing COMSOL solutions for velocity and temperature fields?

237 Free Convection of Air Over a Heated Vertical Plate ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE ME433 COMSOL INSTRUCTTIONS Modeling with COMSOL Multiphysics This model analyzes free convection process outside a vertical plate. The plate is heated with constant heat flux q y. As warm plate 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 10 cm plate is located on the left vertical wall. 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 the plate where the hot plate has no influence on 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 located under COMSOL Multiphysics Fluid Dynamics and Heat Transfer sections. 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 COMSOL Multyphysics Fluid Dynamics Incompressible Navier Stokes Steady state analysis. 3. Click the Multiphysics button. 4. Click the Add button. 5. From the list of application modes, select COMSOL Multyphysics Heat Transfer Convection and Conduction Steady state analysis. 6. Click the Add button. 7. Click OK

238 Free Convection of Air Over a Heated Vertical Plate ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE 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 [K] [K] Temperature Far Away dq 100[W/m^2] 100[W/m 2 ] Heat Flux Stepping rho [kg/m^3] [kg/m 3 ] 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 [W/(m*degC)] [W/(m K)] Air Conductivity (20ºC) Cp_air [J/(kg*degC)] [J/(kg K)] Air Heat Capacity (20ºC) g 9.81[m/s^2] 9.81[m/s 2 ] Acc. Due to Gravity 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

239 Free Convection of Air Over a Heated Vertical Plate ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE 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 partitioned left wall. This is done as follows. 1. In the Draw menu, select Specify Objects Rectangle 2. Enter following rectangle dimensions for R1. R1 WIDTH HEIGHT Click OK to close Rectangle definition window. 4. Click on Zoom Extents button in the main toolbar to zoom into the geometry. 5. In the Draw menu, select Specify Objects Point 6. Start by entering following point coordinates for point P1. COORDINATES P1 P2 X 0 0 Y When done with step 6, click OK and repeat step 6 for point P2. 8. Click OK to close Point definition window. You should see your finished modeling geometry now in the main program window. The left wall of the rectangle should be partitioned into 3 parts by 2 points

240 Free Convection of Air Over a Heated Vertical Plate ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE 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 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. 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 3 ] 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 and heat transfer. Incompressible Navier Stokes Subdomain Settings 1. From Mulptiphysics menu, select 1 Incompressible Navier Stokes (ns) mode. 2. From the Physics menu select Subdomain Settings (equivalently, press F8). 3. Select subdomain 1 in the Subdomain selection section. 4. Type rho and mu_air in the fields for density ρ and dynamic viscosity η. 5. Type g*(rho0-rho) in the F y field. 6. Click OK

241 Free Convection of Air Over a Heated Vertical Plate ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE ME433 COMSOL INSTRUCTTIONS Notice that the buoyant force F y is set up in accordance with the condition described on page 227. 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. Incompressible 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, 3, 4 Wall No Slip 2, 5, 6 Open boundary Normal Stress Verify that field f 0 is set to 0 3. Click OK to close the boundary settings window. The no slip condition applied to boundaries 1, 3, and 4 assumes that velocity is zero at the wall. The remaining boundaries all 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

242 Free Convection of Air Over a Heated Vertical Plate ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE ME433 COMSOL INSTRUCTTIONS Convection and Conduction 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 section. 4. Enter k_air, rho and Cp_air in the k, ρ, and C p fields, respectively. 5. Type u and v in the u and v fields, respectively. 6. Switch to Init tab. 7. Type Tinf in T(t 0 ) field. 8. Click OK to close the Subdomain Settings window

243 Free Convection of Air Over a Heated Vertical Plate ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE ME433 COMSOL INSTRUCTTIONS Convection and Conduction 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, 4 Thermal Insulation 2, 6 Temperature Enter Tinf in T 0 field 3 Heat Flux Enter dq in q 0 field 5 Convective flux 3. Click OK to close Boundary Settings window. The model keeps hot plate (boundary 3) at a constant heat flux q y (we will slowly raise heat flux step dq with parametric solver to 1000 W/m 2 so that solver is able to converge system of nonlinear equations. The short boundaries below and above the vertical plate (1 and 4) are thermally insulated so that no conduction or convection occurs normal to the boundaries. Ideally you would not include the insulated parts, but they are needed to smoothen out air flow near the hot plate edges. On the bottom and the right boundaries (2 and 6), the model sets temperature equal to room temperature T. Air rises upwards through the upper horizontal boundary (5). Application of Convective Flux boundary condition 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 wall 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, and 4 in the boundary selection section while holding the Control (ctrl) key on your keyboard. 4. Enter 3e-4 in the Maximum element size edit field. 5. Switch to the Point tab

244 Free Convection of Air Over a Heated Vertical Plate ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE ME433 COMSOL INSTRUCTTIONS 6. Select point 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

245 Free Convection of Air Over a Heated Vertical Plate ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE 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_air in the field for Name of parameter. 4. Enter 1e e-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

246 Free Convection of Air Over a Heated Vertical Plate ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE 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 area 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 dq in the field for Name of parameter. 17. Enter 100:100:1000 in the List of parameter values edit field. 18. Switch to Stationary tab. 19. Disable Highly nonlinear problem check box

247 Free Convection of Air Over a Heated Vertical Plate ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE ME433 COMSOL INSTRUCTTIONS 20. Click OK to close Solver parameters window. We will now use the initial value solution to find solutions to higher plate 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 plate surface heat flux is 1000 W/m 2, 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 the air velocity and temperature fields. The next section (Postprocessing and Visualization) will help you in obtaining the above and other diagrams, such as 2D colormap of air density field, plots of axial velocity u(x, y o ) and temperature T(x, y o ) at y o = 6 cm, and a plot of surface temperature T s (y) on 0 y L. We will then use MATALB to compute and re plot COMSOL surface temperature T s (y) and verify this result against correlation 8.29a. A sample MATLAB script for COMSOL results verification is given in appendix

248 Free Convection of Air Over a Heated Vertical Plate ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE 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, plotting and extracting numerical data for surface temperature T s (y) to a text file, and 1D temperature distribution plots. You will then address the questions of COMSOL solution validity and compare the results to correlation 8.29a mainly by using MATLAB. 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

249 Free Convection of Air Over a Heated Vertical Plate ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE ME433 COMSOL INSTRUCTTIONS 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 237. 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

250 Free Convection of Air Over a Heated Vertical Plate ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE ME433 COMSOL INSTRUCTTIONS 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. Change the color of the arrow (see step 8). 11. Choose the quantity you wish to plot from Predefined quantities. 12. Click Apply. 13. 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

251 Free Convection of Air Over a Heated Vertical Plate ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE ME433 COMSOL INSTRUCTTIONS Displaying V(x, y) as a Colormap 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. 4. From Predefined quantities, select Velocity field. 5. Change the Colormap type from hot to jet. 6. Click Apply to refresh main view and keep the Plot Parameters window open. The 2D Velocity distribution will be displayed using the jet colormap. Displaying Air Density Field Colormap With the Plot Parameters window open, ensure that you are under the Surface tab, 7. Type rho in Expression field (without quotation marks). 8. Click Apply. (Note: The unit will change automatically) These steps produce a colormap that displays variations in air s density ρ. Note the values on the color scale and compare them with Appendix C of your textbook

252 Free Convection of Air Over a Heated Vertical Plate ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE ME433 COMSOL INSTRUCTTIONS Plotting Axial Temperature T(x, y o ) at y o = 6 cm 1. From Postprocessing menu select Cross Section Plot Parameters option. 2. Under General tab, select 1000 as the only Solution to use option. 3. Switch to the Line/Extrusion tab. 4. Change the Unit of temperature to degrees Celsius. 5. Change the x axis data from arc length to x. 6. Enter the following coordinates in the Cross section line data : x0 = 0, x1 = 0.105; y0 = y1 = Click Apply

253 Free Convection of Air Over a Heated Vertical Plate ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE ME433 COMSOL INSTRUCTTIONS These steps produce a plot of T(x) at y = 6 cm, from x = 0 cm (plate surface) to x = 10.5 cm (ambient environment conditions). Temperature T is plotted on the y axis and x 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 240 to finish with exporting the image. Plotting Axial Velocity u(x, y o ) at y o = 6 cm With Cross Section Plot Parameters window open, ensure that you are under the Line/Extrusion tab, 10. Type U_ns in Expression field (without quotation marks). 11. Click OK. (Note: The unit will change automatically) These steps produce a plot of u(x) at y = 6 cm, from x = 0 cm (plate surface) to x = 10.5 cm (ambient environment conditions). Axial velocity u is plotted on the y axis and x coordinates are plotted on the x axis. To save this plot, 12. Click the save button in your figure with results. This will bring up an Export Image window. 13. Follow steps 2 4 as instructed on page 240 to finish with exporting the image. Plotting Surface Temperature T s (y) on 0 y L To plot T s (y) on 0 y L using COMSOL, 1. Select Cross Section Plot Parameters option from Postprocessing menu. 2. Switch to the Line/Extrusion tab. 3. From Predefined quantities, select Temperature. 4. Change the Unit of temperature to degrees Celsius

254 Free Convection of Air Over a Heated Vertical Plate ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE ME433 COMSOL INSTRUCTTIONS 5. Change the x axis data from x to y. 6. Enter the following coordinates in the Cross section line data : x0 = x1 = 0; y0 = 0.01, and y1 = Click OK to close Cross Section Plot Parameters window. As a result of these steps, a new plot will be shown that graphs T s (y) on 0 y 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 Temperature time graph created in the previous step. 2. Click Browse and navigate to your saving folder (say Desktop ). 3. Name the file ts.txt. (Note: do not forget to type the.txt extension in the name of the file). 4. Click OK to save the file. This completes COMSOL modeling procedures for this problem

255 Free Convection of Air Over a Heated Vertical Plate ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE ME433 COMSOL INSTRUCTTIONS Modeling with MATLAB This part of modeling procedures describes how to create comparative graphs of plate surface temperature T s (y) using MATLAB. Obtain MATLAB script file named heated_vplate.m from Blackboard prior to following these procedures. Save this file in the same directory as the data file(s) (ts.txt) from COMSOL. (Note: heated_vplate.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 heated_vplate.m in a proper directory) Comparing COMSOL Solution with Correlation Solution MATLAB script (heated_vplate.m) is programmed to re plot exported COMSOL data for plate surface temperature T s (y). The script is also programmed to calculate analytic plate surface temperature T s (y) according to correlation 8.29a (even though one of its criteria is not strictly satisfied!) The script will ultimately produce comparative graphs that will plot both solutions. Follow the steps below to complete this problem: 1. Open MATLAB by double clicking its icon on the Desktop. 2. Load heated_vplate.m file by selecting File Open Desktop heated_vplate.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 and correlation based solutions will be plotted in Figure 1. Figure 2 plots the percent error between plate surface temperatures T s (y) according to the equation printed on the figure. These results are shown below. Results plotted with MATLAB:

256 Free Convection of Air Over a Heated Vertical Plate ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE ME433 COMSOL INSTRUCTTIONS While in MATLAB, you may zoom into the left plot to notice departures in results based on the solution methods. Error analysis shows that most of the error is concentrated at the bottom edge of the plate. Correlation 8.29a suggests that at y = 0, plate surface temperature should reach ambient temperature T. COMSOL solution gives temperature of nearly 48 degrees Celsius at y = 0. In practice, what do you think is closer to the truth? The following 2 graphs show axial velocity and temperature at y o = 6 cm. These graphs were previously obtained in COMSOL. They have been repotted with MATLAB. The range for abscissa was reduced to about 1.6 cm and 2.5 cm for velocity and temperature graphs, respectively, so that region of activity near the plate can be better examined. Armed with these results, you are in a position to answer most of the assigned questions

257 Free Convection of Air Over a Heated Vertical Plate ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE ME433 COMSOL INSTRUCTTIONS 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 Heat Transfer % Sample MATLAB Script For: % (X) Free Convection of Air over a Heated Vertical Plate % IMPORTANT: Save this file in the same directory with % "ts.txt" file. % ######################################################################### % %% Preliminaries clear % Clears variables from memory clc % Clears the UI prompt %% Constant Quantities Tinf = 20; % Ambient temperature, [degc] Tf = 90; % Film temperature, [degc] g = 9.81; % acc. due to gravity, [m/s^2] Cp = ; % at Tf rho = ; %% at Tf mu = 21.35e-6; % at Tf eta = 21.96e-6; % at Tf k = ; % at Tf Pr = 0.705; % at Tf alpha = eta/pr; % at Tf beta = 1/(Tf ); % in Kelvin^(-1) qs = 1000; % Applied heat flux, [W/m^2] %% Temperature Data Import from COMSOL Multiphysics: load ts.txt; % Loads T(0,y) as a 2 column vector y = ts(:,1); % y - coords vector, [m] Ts = ts(:,2); % COMSOL plate surface temperature, [degc] y = y - min(y); % y - coord shift (necessary for correlation eq.!), [m] %% Correlation 8.29a Ta = Tinf +... ((4+9*Pr^(1/2)+10*Pr)/Pr^2*(eta^2/(beta*g))*(qs/k)^4*y).^(1/5);%[degC] %% Error Analysis in h(y) errt = abs(ts - Ta)./Ta*100; % Error in Ts, [%] %% y[m]-->y[cm] y = y*100; % y - coord [m]-->[cm] conversion, [cm] %% Plotter figure1 = figure('inverthardcopy','off',... %\ 'Colormap',[1 1 1 ],... % -> Setting up the figure 'Color',[1 1 1]); %/ plot(y,ts,'k',y,ta,'k--'); % Plotting grid on box off title('\fontname{times New Roman} \fontsize{16} \bf Plate Surface Temperature T_s') xlabel('\fontname{times New Roman} \fontsize{14} \it \bf y, [cm]') ylabel('\fontname{times New Roman} \fontsize{14} \it \bf T_s, [\circc]') legend('comsol Solution','Correlation 8.29a','location','southeast') % % figure2 = figure('inverthardcopy','off',... %\

258 Free Convection of Air Over a Heated Vertical Plate ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE ME433 COMSOL INSTRUCTTIONS 'Colormap',[1 1 1 ],... % -> Setting up the figure 'Color',[1 1 1]); %/ plot(y,errt,'k'); % Plotting grid on box off title('\fontname{times New Roman} \fontsize{16} \bf Error Analysis') xlabel('\fontname{times New Roman} \fontsize{14} \it \bf y, [cm]') ylabel('\fontname{times New Roman} \fontsize{14} \it \bf Error in T_s, [%]') str1(1) = {'$${\%err={t_{s_{comsol}}-t_{s_{8.29a}}\over T_{s_{8.29a}}}\times 100} $$'}; text('units','normalized', 'position',[.32.9],... 'fontsize',14,... 'FontName', 'Times New Roman',... 'FontAngle', 'italic',... 'BackgroundColor',[1 1 1],... 'interpreter','latex',... 'string', str1); %% COMSOL u(x,y0) and T(x,y0) Re-plots % ######################################################################### % Unsuppress this portion only if you wich to re-plot COMSOL u(x,y0) and % T(x,y0). Prior to reploting, make sure to extract numerical data for % velocity and temperature to text files. You must name the files as: % "velfield.txt" and "tempfield.txt" for velocity and remperature fields, % respectively and place then in the same directory as this script. % ######################################################################### % load velfield.txt; % Loads u(x,y0) as a 2 column vector % load tempfield.txt; % Loads T(x,y0) as a 2 column vector % y1 = velfield(:,1)*100; % y - coords, [cm] % u1 = velfield(:,2); % u(x), [m/s] % t1 = tempfield(:,2); % T(x), [degc] % % figure3 = figure('inverthardcopy','off',... %\ % 'Colormap',[1 1 1 ],... % -> Setting up the figure % 'Color',[1 1 1]); %/ % plot(y1,u1,'k--'); % Plotting % grid on % box off % title('\fontname{times New Roman} \fontsize{16} \bf Axial velocity u at y_o = 6 cm') % xlabel('\fontname{times New Roman} \fontsize{14} \it \bf y, [cm]') % ylabel('\fontname{times New Roman} \fontsize{14} \it \bf u (x, y_o), [m/s]') % % figure4 = figure('inverthardcopy','off',... %\ % 'Colormap',[1 1 1 ],... % -> Setting up the figure % 'Color',[1 1 1]); %/ % plot(y1,t1,'k--'); % Plotting % grid on % box off % title('\fontname{times New Roman} \fontsize{16} \bf Axial temperature T at y_o = 6 cm') % xlabel('\fontname{times New Roman} \fontsize{14} \it \bf y, [cm]') % ylabel('\fontname{times New Roman} \fontsize{14} \it \bf T (x, y_o), [\circc]') This completes MATLAB modeling procedures for this problem

259 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 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

260 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 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(x o, y) and temperature T(x o, y) on y 0.16 at x o = Use COMSOL to plot and extract numerical data for cylinder surface heat flux q r, on Use Newton s law of cooling and extracted s o temperature data to determine COMSOL local surface heat transfer coefficient h(r o, θ). [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 [Extra Credit]:

261 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 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

262 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 [K] [K] Temperature Far Away dt 10[K] 10[K] Temperature Step rho [kg/m^3] [kg/m 3 ] 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 [W/(m*degC)] [W/(m K)] Air Conductivity (20ºC) Cp_air [J/(kg*degC)] [J/(kg K)] Air Heat Capacity (20ºC) g 9.81[m/s^2] 9.81[m/s 2 ] Acc. Due to Gravity 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

263 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 BASE Corner X 0 Y Click OK to close Rectangle definition window. 4. Click on Zoom Extents button in the main toolbar to zoom into the geometry. 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 the cut, as shown here

264 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, 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 3 ] 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 and heat 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 rho and mu_air in the fields for density ρ and dynamic viscosity η. 4. Type g*(rho0-rho) in the F y field. 5. Click OK

265 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 251. 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 signifies that 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

266 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_air, rho 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

267 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 Tinf in T 0 field 6, 7 Temperature Enter Tinf+dT in T 0 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 to converge 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 boundary condition 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 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

268 Free Convection of Air Over an Isothermal Cylinder ME433 COMSOL INSTRUCTTIONS 6. Select point 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

269 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_air in the field for Name of parameter. 4. Enter 1e e-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

270 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

271 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 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 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 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(r o, θ) from COMSOL surface heat flux data

272 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 q s r o,. 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(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

273 Free Convection of Air Over an Isothermal Cylinder ME433 COMSOL INSTRUCTTIONS 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 261. 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

274 Free Convection of Air Over an Isothermal Cylinder ME433 COMSOL INSTRUCTTIONS 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

275 Free Convection of Air Over an Isothermal Cylinder ME433 COMSOL INSTRUCTTIONS Displaying Velocity as a Colormap 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. 4. From Predefined quantities, select Velocity field. 5. Change the Colormap type from hot to jet. 6. Click Apply to refresh main view and keep the Plot Parameters window open. The 2D Velocity distribution will be displayed using the jet colormap. Displaying Air Density Field Colormap With the Plot Parameters window open, ensure that you are under the Surface tab, 7. Type rho in Expression field (without quotation marks). 8. Click Apply. (Note: The unit will change automatically) These steps produce a colormap that displays variations in air s density ρ. Note the values on the color scale and compare them with Appendix C of your textbook

276 Free Convection of Air Over an Isothermal Cylinder ME433 COMSOL INSTRUCTTIONS Plotting u(x o, y) and T(x o, y) on y 0.16 at x o = 0 Let us plot vertical temperature T(x o, y) development first, 1. From Postprocessing menu select Cross Section Plot Parameters option. 2. Under General tab, select 80 as the only Solution to use option. 3. Switch to the Line/Extrusion tab. 4. Change the Unit of temperature to degrees Celsius. 5. Change the x axis data from Arc length to y. 6. Enter the following coordinates in the Cross section line data : x0 = x1 =0; y0 = 0.055, and y1 = Click Apply

277 Free Convection of Air Over an Isothermal Cylinder ME433 COMSOL INSTRUCTTIONS These steps produce a plot of T(y) at x o = 0, from y = 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 264 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 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.txt. (Note: do not forget to type the.txt extension in the name of the file). 4. Click OK to save the file. To plot vertical velocity u(x o, y) development, 5. Type U_chns in 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 x o = 0, from y = 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.txt

278 Free Convection of Air Over an Isothermal Cylinder ME433 COMSOL INSTRUCTTIONS Plotting Local Surface Heat Flux q r To plot, s o On s o, q r for using COMSOL, 1. Select Domain Plot Parameters option from Postprocessing menu. 2. Under General tab, select 80 as the only Solution to use option. 3. Switch to the Line/Extrusion tab. 4. From Predefined quantities, select Normal total heat flux. 5. Change the x axis data from Arc length to y. 6. Select boundaries 6 and 7 in the boundary selection section while holding the Control (ctrl) key on your keyboard. 7. Click OK. As a result of these steps, a new plot will be shown that graphs, qs r o for 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 267. Be sure to name this file flux.txt

279 Free Convection of Air Over an Isothermal Cylinder ME433 COMSOL INSTRUCTTIONS Computing Average Surface Heat Transfer Coefficient To compute the average heat transfer coefficient with COMSOL, 1. From the Postprocessing menu, open Boundary Integration option. 2. Select boundaries 6 and 7 in the boundary selection section while holding the Control (ctrl) key on your keyboard. 3. Type -ntflux_htgh/((t-tinf)*pi*0.02[m]), in the Expression field. 4. Click OK. The value of the integral (solution) is displayed at program s prompt on the bottom. Average surface heat transfer coefficient determined in this way should be about 7.1 W/m 2 ºC. This completes COMSOL modeling procedures for this problem

280 Free Convection of Air Over an Isothermal Cylinder ME433 COMSOL INSTRUCTTIONS Modeling with MATLAB This part of modeling procedures describes how to create graphs of local surface heat transfer coefficient h(r o, θ) using MATLAB. Obtain MATLAB script file named isothermal_hcyl.m from Blackboard prior to following these procedures. Save this file in the same directory as the data file(s) ("t0.txt", "u0.txt", and "flux.txt") from COMSOL. (Note: isothermal_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 isothermal_hcyl.m in a proper directory) Computing and Plotting COMSOL Local Surface Heat Transfer Coefficient MATLAB script (isothermal_hcyl.m) is programmed to use exported COMSOL data for heat flux q s ro, and Newton s Law of cooling to determine the local heat transfer coefficient h r, along the surface of the cylinder. The script is also programmed to o calculate experimental 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 isothermal_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 h r, o 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:

281 Free Convection of Air Over an Isothermal Cylinder ME433 COMSOL INSTRUCTTIONS 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 r, o on Armed with these results, you are in a position to answer most of the assigned questions

282 Free Convection of Air Over an Isothermal Cylinder ME433 COMSOL INSTRUCTTIONS 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 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 = ; % at Tf rho = ; %% at Tf mu = 20.03e-6; % at Tf eta = 18.90e-6; % at Tf k = ; % at Tf Pr = 0.708; % at Tf alpha = eta/pr; % at Tf beta = 1/(Tf ); % 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 = ( *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 % #########################################################################

283 Free Convection of Air Over an Isothermal Cylinder ME433 COMSOL INSTRUCTTIONS % 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([ ]) % 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([ ]) % 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]') % This completes MATLAB modeling procedures for this problem

284

285 Radiation In a Triangular Cavity ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE ME433 COMSOL INSTRUCTTIONS RADIATION IN A TRIANGULAR CAVITY Problem Statement Three rectangular plates with lengths of 3, 4, and 5 meters form a triangular cavity. The plates have a width of 1 meter and are made out of copper. The vertical and inclined plates are subjected to heat fluxes q 2 and q 3 on their outer boundaries, respectively. Horizontal plate is subjected to ambient temperature T on its outer boundary. The three inner boundaries that form the cavity can exchange heat only by means of surface to surface radiation. All other outer boundaries are kept insulated. The plates themselves, however, transfer heat internally by conduction. Of general interest is to learn how to use COMSOL to model radiation heat transfer and determine the steady state of the cavity s interior boundaries. Specifically, knowing the value of the heat flux on the inclined and vertical boundaries, the sought quantity is the temperature along these boundaries. Conversely, knowing the temperature of the bottom boundary of the horizontal plate, the sought quantity is the heat flux that leaves through it. Radiation Cavity Setup Known quantities: Material: copper q 2000 W/m 2 q 1000 W/m T K L = 3, 4, 5 m (as shown) W = 1 m Observations This is a radiation and a conduction problem. Conduction takes place inside the plates. Surface to surface radiation occurs at the inner boundaries of the triangular cavity. Conditions at the outer boundaries are specified by heat fluxes, ambient temperature, and thermal insulation. The problem can be tackled analytically by omitting conduction and considering a triangle that forms the cavity. Same heat flux boundary conditions apply. Because of radiation effects, temperature condition on the bottom plate should be set somewhat higher than ambient temperature. COMSOL solution can be used first to obtain this temperature. A 2 dimensional model setup is appropriate to solve this problem in COMSOL. In COMSOL, the inner corners of the plates must be offset to ensure that the plates do not touch. This prevents heat being exchanged between the plates by conduction

286 Radiation In a Triangular Cavity ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE ME433 COMSOL INSTRUCTTIONS Assignment 1. Use COMSOL to determine temperature distribution in the plates. Show a 2D temperature colormap of the entire cavity in one plot. 2. Use COMSOL to show 2D temperature distributions for individual plates on separate plots. 3. Use COMSOL to plot temperature distribution along the inner boundaries of all plates. Based on these results, can you conclude that surface temperature is uniform? 4. Use COMSOL to plot radiosity along the inner boundary of the inclined plate. 5. Use COMSOL to determine total heat per unit length q 1 through horizontal plate. 6. Use COMSOL to determine average temperature of the inner boundaries of inclined and vertical plates. 7. [Extra Credit]: Verify COMSOL results you obtained in questions 4 and 6 analytically

287 Radiation In a Triangular Cavity ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE ME433 COMSOL INSTRUCTTIONS Modeling with COMSOL Multiphysics MODEL NAVIGATOR This is our starting point in the model where you define the very basics of the problem, such as the number of dimensions, type of coordinate system, and most importantly, the application mode which agrees with the physical phenomena of the problem. General heat transfer mode can handle conduction, convection, and radiation heat transfer. We will use it in setting up our conduction and radiation heat transfer model. For this setup: 1. Start COMSOL Multiphysics. 2. In the Space dimension list select 2D (under the New Tab). 3. From the list of application modes select Heat Transfer Module General Heat Transfer Steady State Analysis 4. Click OK

288 Radiation In a Triangular Cavity ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE 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 3 rectangles that form a cavity. To ensure that their corners do not touch, we will offset the rectangles by a very small amount to prevent them from exchanging heat by conduction. This is done as follows. 1. In the Draw menu, select Specify Objects Rectangle. 2. Start by entering information for RECTANGLE 1 from the following table. RECTANGLE 1 RECTANGLE 2 RECTANGLE 3 WIDTH HEIGHT ROTATION ANGLE α /pi*atan(3/4) X Y When done with step 2, click OK and repeat steps 1 to 3 for the other 2 rectangles. 4. Click on Zoom Extents button in the main toolbar to zoom into the geometry. You should see your completed geometry in the main program window. Try to investigate the geometry you just made. In particular, try to explore what the Geometric Properties button does: as you select parts of the geometry. See how the function of this button changes as you switch the program mode with these buttons:

289 Radiation In a Triangular Cavity ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE 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 types, initial conditions and modes of heat transfer (i.e. conduction, convection and/or radiation). The boundary conditions settings are used to specify what is happening at the boundaries of the geometry. General Heat Transfer Subdomain Settings By default, COMSOL Multiphysics is set to use thermal properties of copper. Since our problem involves plates that are also made out of copper, we simply need to verify and make slight adjustments to default subdomain settings. 1. From the Physics menu, select Subdomain Settings (equivalently, press F8). 2. Hold the Shift key on your keyboard and select subdomains 1, 2, and Enter 402 in the field for thermal conductivity k. 4. Click OK to close the subdomain settings window

290 Radiation In a Triangular Cavity ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE ME433 COMSOL INSTRUCTTIONS General Heat Transfer Boundary Settings 1. From the Physics menu open the Boundary Settings (F7) dialog box. 2. Apply the following boundary conditions: BOUNDARY BOUNDARY CONDITION RADIATION TYPE COMMENTS 2 Heat Flux - Enter 1000 in q 0 field 12 Heat Flux - Enter 2000 in q 0 field 5 Temperature - Enter 300 in T 0 field 3 Heat Flux Surface to surface Enter 0.8 in ε field Enter 300 in T amb field 6 Heat Flux Surface to surface Enter 0.4 in ε field Enter 300 in T amb field 9 Heat Flux Surface to surface Enter 0.6 in ε field Enter 300 in T amb field 1, 4, 7, 8, 10, 11 Insulation/Symmetry - 3. Click OK to close the boundary settings window. MESH GENERATION To minimize the computational time without compromising much accuracy of the solution, we must change the default meshing parameters. To do this, 1. Go to the Mesh menu and select Free Mesh Parameters option. 2. Switch to Boundary tab. 3. Select boundaries 3, 6, and 9 in the boundary selection section while holding the Control (ctrl) key on your keyboard. 4. Enter 5e-2 in the Maximum element size edit field. 5. Switch to the Point tab

291 Radiation In a Triangular Cavity ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE ME433 COMSOL INSTRUCTTIONS 6. Select points 2, 4, 6, 8, 9 and 10 in the point selection section while holding the Control (ctrl) key on your keyboard. 7. Enter 1e-2 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

292 Radiation In a Triangular Cavity ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE 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. 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 seconds 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. It is convenient in radiation problems to keep temperature field in absolute scale. The next section (Postprocessing and Visualization) will help you in determining and plotting quantities asked for in the assignment questions

293 Radiation In a Triangular Cavity ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE ME433 COMSOL INSTRUCTTIONS POSTPROCESSING AND VISUALIZATION After solving the problem, we would like to be able to look at the solution. The default temperature view already answers the first assigned question and may thus be saved as an image. Further, we need to produce the following plots: temperature colormaps of individual plates, temperature distribution along inner boundaries of the plates, and radiosity along the inner boundary of the inclined plate. Finally, we will use COMSOL to compute heat per unit length q that goes through horizontal plate and average temperatures of the inner boundaries of vertical and inclines plates. Displaying T(x, y) for Individual Plates 1. From the Postprocessing menu, select Domain Plot Parameters (F12). 2. Switch to Surface tab. 3. Select subdomain 1. This subdomain corresponds to the inclined plate. 4. Click Apply. The 2D temperature distribution for the inclined plate will be displayed in a new window. To plot temperature distribution for the other 2 plates, repeat the above steps and select subdomains 2 and 3 in step 3. Subdomains 2 and 3 correspond to horizontal and vertical plates, respectively. Do not close Domain Plot Parameters window yet. We will need it to create temperature distribution along the inner boundaries of the plates

294 Radiation In a Triangular Cavity ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE ME433 COMSOL INSTRUCTTIONS Saving Color Maps As you create temperature distribution colormaps for individual plates, you may want to save the results as an image for future discussion. This may be done as follows: 1. Click the save button in your figure with results. 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. Plotting Temperature Distribution along the Inner Boundaries of the Plates With Domain Plot Parameters window open, 1. Switch to Line/Extrusion tab. 2. From Predefined quantities, select Temperature

295 Radiation In a Triangular Cavity ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE ME433 COMSOL INSTRUCTTIONS 3. Select boundary 3. This boundary number corresponds to the inner boundary of the inclined plate. 4. Click Apply. Temperature distribution along the inner boundary of the inclined plate will be plotted in a new window. It is a good idea to save this plot as an image for future discussion. 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: 5. Click on Export Current Plot button in the Temperature plot created in the previous steps. 6. Click Browse and navigate to your saving folder (say Desktop ). 7. Name the files t_incl.txt. (Note: do not forget to type the.txt extension in the name of the file). 8. Click OK to save the file. To view temperature distribution plots of inner boundaries for horizontal and vertical plates, redo steps 1 4 above. In step 3, select boundaries 6, then 9 for horizontal and vertical plates, respectively. (Note: if you chose to export data for these plots as well, name them t_horz.txt, and t_vert.txt, for horizontal and vertical plates, respectively. Save the data in the same manner as instructed in steps 5 8 above)

296 Radiation In a Triangular Cavity ADOPTED FROM COMSOL HEAT TRANSFER MODULE USER GUIDE ME433 COMSOL INSTRUCTTIONS Plotting Radiosity along the Inner Surface of Inclined Plate With Domain Plot Parameters window open, 1. From Predefined quantities, select Surface radiosity expression. 2. Select boundary Click OK Surface radiosity along the inner boundary of the inclined plate will be plotted in a new window. Save the figure as an image for future discussion or export radiosity data to a text file. If you choose to export data to a text file, name it rad_incl.txt. You will need to re plot it later with another program (such as MATLAB). Computing Total Heat per Unit Length q 1 through Horizontal Plate To compute heat transfer rate per unit length using COMSOL, 1. Select Boundary Integration option from Postprocessing menu. 2. Select boundary 6 in the Boundary selection field. 3. Change Predefined Quantities setting to Normal conductive heat flux. 4. Click Apply. The value of the integral (solution) is displayed at program s prompt on the bottom. For this model, q = 10,966 W/m

Multiphysics Modeling

Multiphysics Modeling 11 Multiphysics Modeling This chapter covers the use of FEMLAB for multiphysics modeling and coupled-field analyses. It first describes the various ways of building multiphysics models. Then a step-by-step

More information

Example Resistive Heating

Example Resistive Heating Example Resistive Heating SOLVED WITH COMSOL MULTIPHYSICS 3.5a COPYRIGHT 2008. All right reserved. No part of this documentation may be photocopied or reproduced in any form without prior written consent

More information

Finite Element Modules for Enhancing Undergraduate Transport Courses: Application to Fuel Cell Fundamentals

Finite Element Modules for Enhancing Undergraduate Transport Courses: Application to Fuel Cell Fundamentals Finite Element Modules for Enhancing Undergraduate Transport Courses: Application to Fuel Cell Fundamentals Originally published in 007 American Society for Engineering Education Conference Proceedings

More information

Dimerization in a Tubular Reactor

Dimerization in a Tubular Reactor Dimerization in a Tubular Reactor Tubular reactors are very common in large-scale continuous, for example in the petroleum industry. One key design and optimization parameter is the conversion, that is

More information

Physics E-1ax, Fall 2014 Experiment 3. Experiment 3: Force. 2. Find your center of mass by balancing yourself on two force plates.

Physics E-1ax, Fall 2014 Experiment 3. Experiment 3: Force. 2. Find your center of mass by balancing yourself on two force plates. Learning Goals Experiment 3: Force After you finish this lab, you will be able to: 1. Use Logger Pro to analyze video and calculate position, velocity, and acceleration. 2. Find your center of mass by

More information

Task 1: Open ArcMap and activate the Spatial Analyst extension.

Task 1: Open ArcMap and activate the Spatial Analyst extension. Exercise 10 Spatial Analyst The following steps describe the general process that you will follow to complete the exercise. Specific steps will be provided later in the step-by-step instructions component

More information

Peristaltic Pump. Introduction. Model Definition

Peristaltic Pump. Introduction. Model Definition Peristaltic Pump Introduction In a peristaltic pump, rotating rollers are squeezing a flexible tube. As the pushed down rollers move along the tube, the fluid in the tube follows the motion. The main advantage

More information

Taylor Dispersion Created by Robert P. Hesketh, Chemical Engineering, Rowan University Fall 2005

Taylor Dispersion Created by Robert P. Hesketh, Chemical Engineering, Rowan University Fall 2005 Taylor Dispersion Created by Robert P. Hesketh, Chemical Engineering, Rowan University Fall 005 In this problem you will simulate a tubular reactor with fluid flowing in laminar flow. The governing equations

More information

v Prerequisite Tutorials GSSHA WMS Basics Watershed Delineation using DEMs and 2D Grid Generation Time minutes

v Prerequisite Tutorials GSSHA WMS Basics Watershed Delineation using DEMs and 2D Grid Generation Time minutes v. 10.1 WMS 10.1 Tutorial GSSHA WMS Basics Creating Feature Objects and Mapping Attributes to the 2D Grid Populate hydrologic parameters in a GSSHA model using land use and soil data Objectives This tutorial

More information

Generator. Introduction. Modeling in COMSOL Multiphysics

Generator. Introduction. Modeling in COMSOL Multiphysics Generator Introduction This example shows how the circular motion of a rotor with permanent magnets generates an induced EMF in a stator winding. The generated voltage is calculated as a function of time

More information

Using Microsoft Excel

Using Microsoft Excel Using Microsoft Excel Objective: Students will gain familiarity with using Excel to record data, display data properly, use built-in formulae to do calculations, and plot and fit data with linear functions.

More information

Mass Transfer in a Stirred Batch Reactor

Mass Transfer in a Stirred Batch Reactor Mass Transfer in a Stirred Batch Reactor In many processes, efficient reactor usage goes hand in hand with efficient mixing. The ability to accurately examine the effects of impeller placement, speed,

More information

Homework 4 in 5C1212; Part A: Incompressible Navier- Stokes, Finite Volume Methods

Homework 4 in 5C1212; Part A: Incompressible Navier- Stokes, Finite Volume Methods Homework 4 in 5C11; Part A: Incompressible Navier- Stokes, Finite Volume Methods Consider the incompressible Navier Stokes in two dimensions u x + v y = 0 u t + (u ) x + (uv) y + p x = 1 Re u + f (1) v

More information

1 Solution of Electrostatics Problems with COM- SOL

1 Solution of Electrostatics Problems with COM- SOL 1 Solution of Electrostatics Problems with COM- SOL This section gives examples demonstrating how Comsol can be used to solve some simple electrostatics problems. 1.1 Laplace s Equation We start with a

More information

Simulating Future Climate Change Using A Global Climate Model

Simulating Future Climate Change Using A Global Climate Model Simulating Future Climate Change Using A Global Climate Model Introduction: (EzGCM: Web-based Version) The objective of this abridged EzGCM exercise is for you to become familiar with the steps involved

More information

ELEC 1908 The Electric Potential (V) March 28, 2013

ELEC 1908 The Electric Potential (V) March 28, 2013 ELEC 1908 The Electric Potential (V) March 28, 2013 1 Abstract The objective of this lab is to solve numerically Laplace s equation in order to obtain the electric potential distribution in di erent electric

More information

How to Make or Plot a Graph or Chart in Excel

How to Make or Plot a Graph or Chart in Excel This is a complete video tutorial on How to Make or Plot a Graph or Chart in Excel. To make complex chart like Gantt Chart, you have know the basic principles of making a chart. Though I have used Excel

More information

Electromagnetic Forces on Parallel Current-

Electromagnetic Forces on Parallel Current- Page 1 of 5 Tutorial Models : Electromagnetic Forces on Parallel Current-Carrying Wires Electromagnetic Forces on Parallel Current- Carrying Wires Introduction One ampere is defined as the constant current

More information

module, with the exception that the vials are larger and you only use one initial population size.

module, with the exception that the vials are larger and you only use one initial population size. Population Dynamics and Space Availability (http://web.as.uky.edu/biology/faculty/cooper/population%20dynamics%20examples%2 0with%20fruit%20flies/TheAmericanBiologyTeacher- PopulationDynamicsWebpage.html

More information

Molecular Modeling and Conformational Analysis with PC Spartan

Molecular Modeling and Conformational Analysis with PC Spartan Molecular Modeling and Conformational Analysis with PC Spartan Introduction Molecular modeling can be done in a variety of ways, from using simple hand-held models to doing sophisticated calculations on

More information

WMS 9.0 Tutorial GSSHA Modeling Basics Infiltration Learn how to add infiltration to your GSSHA model

WMS 9.0 Tutorial GSSHA Modeling Basics Infiltration Learn how to add infiltration to your GSSHA model v. 9.0 WMS 9.0 Tutorial GSSHA Modeling Basics Infiltration Learn how to add infiltration to your GSSHA model Objectives This workshop builds on the model developed in the previous workshop and shows you

More information

Exercises for Windows

Exercises for Windows Exercises for Windows CAChe User Interface for Windows Select tool Application window Document window (workspace) Style bar Tool palette Select entire molecule Select Similar Group Select Atom tool Rotate

More information

Working with Digital Elevation Models in ArcGIS 8.3

Working with Digital Elevation Models in ArcGIS 8.3 Working with Digital Elevation Models in ArcGIS 8.3 The homework that you need to turn in is found at the end of this document. This lab continues your introduction to using the Spatial Analyst Extension

More information

let s examine pupation rates. With the conclusion of that data collection, we will go on to explore the rate at which new adults appear, a process

let s examine pupation rates. With the conclusion of that data collection, we will go on to explore the rate at which new adults appear, a process Population Dynamics and Initial Population Size (Module website: http://web.as.uky.edu/biology/faculty/cooper/population%20dynamics%20examples%20 with%20fruit%20flies/theamericanbiologyteacher-populationdynamicswebpage.html

More information

WORKING WITH DMTI DIGITAL ELEVATION MODELS (DEM)

WORKING WITH DMTI DIGITAL ELEVATION MODELS (DEM) WORKING WITH DMTI DIGITAL ELEVATION MODELS (DEM) Contents (Ctrl-Click to jump to a specific page) Manipulating the DEM Step 1: Finding the DEM Tiles You Need... 2 Step 2: Importing the DEM Tiles into ArcMap...

More information

ST-Links. SpatialKit. Version 3.0.x. For ArcMap. ArcMap Extension for Directly Connecting to Spatial Databases. ST-Links Corporation.

ST-Links. SpatialKit. Version 3.0.x. For ArcMap. ArcMap Extension for Directly Connecting to Spatial Databases. ST-Links Corporation. ST-Links SpatialKit For ArcMap Version 3.0.x ArcMap Extension for Directly Connecting to Spatial Databases ST-Links Corporation www.st-links.com 2012 Contents Introduction... 3 Installation... 3 Database

More information

Working with ArcGIS: Classification

Working with ArcGIS: Classification Working with ArcGIS: Classification 2 Abbreviations D-click R-click TOC Double Click Right Click Table of Content Introduction The benefit from the use of geographic information system (GIS) software is

More information

Empirical Gas Laws (Parts 1 and 2) Pressure-volume and pressure-temperature relationships in gases

Empirical Gas Laws (Parts 1 and 2) Pressure-volume and pressure-temperature relationships in gases Empirical Gas Laws (Parts 1 and 2) Pressure-volume and pressure-temperature relationships in gases Some of the earliest experiments in chemistry and physics involved the study of gases. The invention of

More information

Integrated Square-Shaped Spiral Inductor

Integrated Square-Shaped Spiral Inductor Page 1 of 9 Electrical Component Models : Integrated Square-Shaped Spiral Inductor Integrated Square-Shaped Spiral Inductor This example presents a model of a micro-scale square inductor, used for LC bandpass

More information

Lab 1: Numerical Solution of Laplace s Equation

Lab 1: Numerical Solution of Laplace s Equation Lab 1: Numerical Solution of Laplace s Equation ELEC 3105 last modified August 27, 2012 1 Before You Start This lab and all relevant files can be found at the course website. You will need to obtain an

More information

C:\Dokumente und Einstellungen \All Users\Anwendungsdaten \Mathematica. C:\Dokumente und Einstellungen \albert.retey\anwendungsdaten \Mathematica

C:\Dokumente und Einstellungen \All Users\Anwendungsdaten \Mathematica. C:\Dokumente und Einstellungen \albert.retey\anwendungsdaten \Mathematica Installation SmartCAE`HeatTransmission` is delivered as either a Microsoft Windows Installer Package (SmartCAEHeatTransmission-1.0.msi) or a ZIP-File. If you have trouble installing the package, please

More information

Designing a Quilt with GIMP 2011

Designing a Quilt with GIMP 2011 Planning your quilt and want to see what it will look like in the fabric you just got from your LQS? You don t need to purchase a super expensive program. Try this and the best part it s FREE!!! *** Please

More information

Appendix 4 Weather. Weather Providers

Appendix 4 Weather. Weather Providers Appendix 4 Weather Using weather data in your automation solution can have many benefits. Without weather data, your home automation happens regardless of environmental conditions. Some things you can

More information

Shape, Convection and Convergence

Shape, Convection and Convergence Presented at the COMSOL Conference 2008 Boston Shape, Convection and Convergence,VP Research, Inc. Who is? Who is? We are: A Technical Consultation firm in business since 1993 Who is? We are: A Technical

More information

Electric Fields and Equipotentials

Electric Fields and Equipotentials OBJECTIVE Electric Fields and Equipotentials To study and describe the two-dimensional electric field. To map the location of the equipotential surfaces around charged electrodes. To study the relationship

More information

Project 1: Analysis of an induction machine using a FEM based software EJ Design of Electrical Machines

Project 1: Analysis of an induction machine using a FEM based software EJ Design of Electrical Machines Project : Analysis of an induction machine using a FEM based software General instructions In this assignment we will analyze an induction machine using Matlab and the freely available finite element software

More information

August 7, 2007 NUMERICAL SOLUTION OF LAPLACE'S EQUATION

August 7, 2007 NUMERICAL SOLUTION OF LAPLACE'S EQUATION August 7, 007 NUMERICAL SOLUTION OF LAPLACE'S EQUATION PURPOSE: This experiment illustrates the numerical solution of Laplace's Equation using a relaxation method. The results of the relaxation method

More information

McIDAS-V Tutorial Displaying Point Observations from ADDE Datasets updated July 2016 (software version 1.6)

McIDAS-V Tutorial Displaying Point Observations from ADDE Datasets updated July 2016 (software version 1.6) McIDAS-V Tutorial Displaying Point Observations from ADDE Datasets updated July 2016 (software version 1.6) McIDAS-V is a free, open source, visualization and data analysis software package that is the

More information

EOS 102: Dynamic Oceans Exercise 1: Navigating Planet Earth

EOS 102: Dynamic Oceans Exercise 1: Navigating Planet Earth EOS 102: Dynamic Oceans Exercise 1: Navigating Planet Earth YOU MUST READ THROUGH THIS CAREFULLY! This exercise is designed to familiarize yourself with Google Earth and some of its basic functions while

More information

The Geodatabase Working with Spatial Analyst. Calculating Elevation and Slope Values for Forested Roads, Streams, and Stands.

The Geodatabase Working with Spatial Analyst. Calculating Elevation and Slope Values for Forested Roads, Streams, and Stands. GIS LAB 7 The Geodatabase Working with Spatial Analyst. Calculating Elevation and Slope Values for Forested Roads, Streams, and Stands. This lab will ask you to work with the Spatial Analyst extension.

More information

Assignment 1 Physics/ECE 176

Assignment 1 Physics/ECE 176 Assignment 1 Physics/ECE 176 Made available: Thursday, January 13, 211 Due: Thursday, January 2, 211, by the beginning of class. Overview Before beginning this assignment, please read carefully the part

More information

Ideal Gas Law and Absolute Zero

Ideal Gas Law and Absolute Zero Experiment IX Ideal Gas Law and Absolute Zero I. Purpose The purpose of this lab is to examine the relationship between the pressure, volume and temperature of air in a closed chamber. To do this, you

More information

ON SITE SYSTEMS Chemical Safety Assistant

ON SITE SYSTEMS Chemical Safety Assistant ON SITE SYSTEMS Chemical Safety Assistant CS ASSISTANT WEB USERS MANUAL On Site Systems 23 N. Gore Ave. Suite 200 St. Louis, MO 63119 Phone 314-963-9934 Fax 314-963-9281 Table of Contents INTRODUCTION

More information

Determination of the Equivalent Weight and the K a or K b for a Weak Acid or Base

Determination of the Equivalent Weight and the K a or K b for a Weak Acid or Base INTRODUCTION Determination of the Equivalent Weight and the K a or K b for a Weak Acid or Base Chemists frequently make use of the equivalent weight (eq. wt.) as the basis for volumetric calculations.

More information

Experiment 2: The Beer-Lambert Law for Thiocyanatoiron (III)

Experiment 2: The Beer-Lambert Law for Thiocyanatoiron (III) Chem 1B Saddleback College Dr. White 1 Experiment 2: The Beer-Lambert Law for Thiocyanatoiron (III) Objectives To use spectroscopy to relate the absorbance of a colored solution to its concentration. To

More information

Tutorial Number 18: Heat transfer analysis of a teapot

Tutorial Number 18: Heat transfer analysis of a teapot Tutorial Number 18: Heat transfer analysis of a teapot Stefano Morlacchi September 2014 T. 01608 811777 F. 01608811770 E.info@ssanalysis.co.uk W. www.ssanalysis.co.uk 1. Introduction In this tutorial,

More information

EXPERIMENT 7: ANGULAR KINEMATICS AND TORQUE (V_3)

EXPERIMENT 7: ANGULAR KINEMATICS AND TORQUE (V_3) TA name Lab section Date TA Initials (on completion) Name UW Student ID # Lab Partner(s) EXPERIMENT 7: ANGULAR KINEMATICS AND TORQUE (V_3) 121 Textbook Reference: Knight, Chapter 13.1-3, 6. SYNOPSIS In

More information

Watershed Modeling Orange County Hydrology Using GIS Data

Watershed Modeling Orange County Hydrology Using GIS Data v. 10.0 WMS 10.0 Tutorial Watershed Modeling Orange County Hydrology Using GIS Data Learn how to delineate sub-basins and compute soil losses for Orange County (California) hydrologic modeling Objectives

More information

LAB 2 - ONE DIMENSIONAL MOTION

LAB 2 - ONE DIMENSIONAL MOTION Name Date Partners L02-1 LAB 2 - ONE DIMENSIONAL MOTION OBJECTIVES Slow and steady wins the race. Aesop s fable: The Hare and the Tortoise To learn how to use a motion detector and gain more familiarity

More information

Create Satellite Image, Draw Maps

Create Satellite Image, Draw Maps Create Satellite Image, Draw Maps 1. The goal Using Google Earth, we want to create and import a background file into our Adviser program. From there, we will be creating paddock boundaries. The accuracy

More information

Assignment 1: Molecular Mechanics (PART 1 25 points)

Assignment 1: Molecular Mechanics (PART 1 25 points) Chemistry 380.37 Fall 2015 Dr. Jean M. Standard August 19, 2015 Assignment 1: Molecular Mechanics (PART 1 25 points) In this assignment, you will perform some molecular mechanics calculations using the

More information

Athena Visual Software, Inc. 1

Athena Visual Software, Inc. 1 Athena Visual Studio Visual Kinetics Tutorial VisualKinetics is an integrated tool within the Athena Visual Studio software environment, which allows scientists and engineers to simulate the dynamic behavior

More information

Learning ArcGIS: Introduction to ArcCatalog 10.1

Learning ArcGIS: Introduction to ArcCatalog 10.1 Learning ArcGIS: Introduction to ArcCatalog 10.1 Estimated Time: 1 Hour Information systems help us to manage what we know by making it easier to organize, access, manipulate, and apply knowledge to the

More information

A GUI FOR EVOLVE ZAMS

A GUI FOR EVOLVE ZAMS A GUI FOR EVOLVE ZAMS D. R. Schlegel Computer Science Department Here the early work on a new user interface for the Evolve ZAMS stellar evolution code is presented. The initial goal of this project is

More information

BOUNDARY MAP USER GUIDE

BOUNDARY MAP USER GUIDE BOUNDARY MAP USER GUIDE Get Exploring. Boundaries. The Northern Ontario Boundary Map provides users with the ability to explore the many community, administrative and service provider boundaries in the

More information

Spatial Data Analysis in Archaeology Anthropology 589b. Kriging Artifact Density Surfaces in ArcGIS

Spatial Data Analysis in Archaeology Anthropology 589b. Kriging Artifact Density Surfaces in ArcGIS Spatial Data Analysis in Archaeology Anthropology 589b Fraser D. Neiman University of Virginia 2.19.07 Spring 2007 Kriging Artifact Density Surfaces in ArcGIS 1. The ingredients. -A data file -- in.dbf

More information

Mnova Software for Analyzing Reaction Monitoring NMR Spectra

Mnova Software for Analyzing Reaction Monitoring NMR Spectra Mnova Software for Analyzing Reaction Monitoring NMR Spectra Version 10 Chen Peng, PhD, VP of Business Development, US & China Mestrelab Research SL San Diego, CA, USA chen.peng@mestrelab.com 858.736.4563

More information

Chem 1 Kinetics. Objectives. Concepts

Chem 1 Kinetics. Objectives. Concepts Chem 1 Kinetics Objectives 1. Learn some basic ideas in chemical kinetics. 2. Understand how the computer visualizations can be used to benefit the learning process. 3. Understand how the computer models

More information

Using the Stock Hydrology Tools in ArcGIS

Using the Stock Hydrology Tools in ArcGIS Using the Stock Hydrology Tools in ArcGIS This lab exercise contains a homework assignment, detailed at the bottom, which is due Wednesday, October 6th. Several hydrology tools are part of the basic ArcGIS

More information

Visual Studies Exercise, Assignment 07 (Architectural Paleontology) Geographic Information Systems (GIS), Part II

Visual Studies Exercise, Assignment 07 (Architectural Paleontology) Geographic Information Systems (GIS), Part II ARCH1291 Visual Studies II Week 8, Spring 2013 Assignment 7 GIS I Prof. Alihan Polat Visual Studies Exercise, Assignment 07 (Architectural Paleontology) Geographic Information Systems (GIS), Part II Medium:

More information

Lesson Plan 2 - Middle and High School Land Use and Land Cover Introduction. Understanding Land Use and Land Cover using Google Earth

Lesson Plan 2 - Middle and High School Land Use and Land Cover Introduction. Understanding Land Use and Land Cover using Google Earth Understanding Land Use and Land Cover using Google Earth Image an image is a representation of reality. It can be a sketch, a painting, a photograph, or some other graphic representation such as satellite

More information

Transient flow and heat equations - the Rayleigh-Benard instability

Transient flow and heat equations - the Rayleigh-Benard instability Transient flow and heat equations - the Rayleigh-Benard instability Directory: RayleighBenard Solvers: HeatSolve, FlowSolve Tools: ElmerGUI Dimensions: 2D, Transient Case definition This tutorial is about

More information

Experiment 0 ~ Introduction to Statistics and Excel Tutorial. Introduction to Statistics, Error and Measurement

Experiment 0 ~ Introduction to Statistics and Excel Tutorial. Introduction to Statistics, Error and Measurement Experiment 0 ~ Introduction to Statistics and Excel Tutorial Many of you already went through the introduction to laboratory practice and excel tutorial in Physics 1011. For that reason, we aren t going

More information

APBS electrostatics in VMD - Software. APBS! >!Examples! >!Visualization! >! Contents

APBS electrostatics in VMD - Software. APBS! >!Examples! >!Visualization! >! Contents Software Search this site Home Announcements An update on mailing lists APBS 1.2.0 released APBS 1.2.1 released APBS 1.3 released New APBS 1.3 Windows Installer PDB2PQR 1.7.1 released PDB2PQR 1.8 released

More information

AP Physics B SUMMER ASSIGNMENT Summer, Instructor: Rhett Butler

AP Physics B SUMMER ASSIGNMENT Summer, Instructor: Rhett Butler AP Physics B SUMMER ASSIGNMENT Summer, 2013 Instructor: Rhett Butler Welcome to AP Physics! I am delighted to be in the position to help further your understanding of the physical world around us. I also

More information

GIS Workshop UCLS_Fall Forum 2014 Sowmya Selvarajan, PhD TABLE OF CONTENTS

GIS Workshop UCLS_Fall Forum 2014 Sowmya Selvarajan, PhD TABLE OF CONTENTS TABLE OF CONTENTS TITLE PAGE NO. 1. ArcGIS Basics I 2 a. Open and Save a Map Document 2 b. Work with Map Layers 2 c. Navigate in a Map Document 4 d. Measure Distances 4 2. ArcGIS Basics II 5 a. Work with

More information

This tutorial is intended to familiarize you with the Geomatica Toolbar and describe the basics of viewing data using Geomatica Focus.

This tutorial is intended to familiarize you with the Geomatica Toolbar and describe the basics of viewing data using Geomatica Focus. PCI GEOMATICS GEOMATICA QUICKSTART 1. Introduction This tutorial is intended to familiarize you with the Geomatica Toolbar and describe the basics of viewing data using Geomatica Focus. All data used in

More information

Simple Harmonic Motion

Simple Harmonic Motion Physics Topics Simple Harmonic Motion If necessary, review the following topics and relevant textbook sections from Serway / Jewett Physics for Scientists and Engineers, 9th Ed. Hooke s Law (Serway, Sec.

More information

Bloomsburg University Weather Viewer Quick Start Guide. Software Version 1.2 Date 4/7/2014

Bloomsburg University Weather Viewer Quick Start Guide. Software Version 1.2 Date 4/7/2014 Bloomsburg University Weather Viewer Quick Start Guide Software Version 1.2 Date 4/7/2014 Program Background / Objectives: The Bloomsburg Weather Viewer is a weather visualization program that is designed

More information

Elementary charge and Millikan experiment Students worksheet

Elementary charge and Millikan experiment Students worksheet Tasks This experiment deals with the observation of charged oil droplets, which are accelerated between two capacitor plates.. Measure some rise and fall times of oil droplets at different voltages. Determine

More information

TECDIS and TELchart ECS Weather Overlay Guide

TECDIS and TELchart ECS Weather Overlay Guide 1 of 24 TECDIS and TELchart ECS provides a very advanced weather overlay feature, using top quality commercial maritime weather forecast data available as a subscription service from Jeppesen Marine. The

More information

Introduction to Hartree-Fock calculations in Spartan

Introduction to Hartree-Fock calculations in Spartan EE5 in 2008 Hannes Jónsson Introduction to Hartree-Fock calculations in Spartan In this exercise, you will get to use state of the art software for carrying out calculations of wavefunctions for molecues,

More information

Task 1: Start ArcMap and add the county boundary data from your downloaded dataset to the data frame.

Task 1: Start ArcMap and add the county boundary data from your downloaded dataset to the data frame. Exercise 6 Coordinate Systems and Map Projections The following steps describe the general process that you will follow to complete the exercise. Specific steps will be provided later in the step-by-step

More information

Figure 2.1 The Inclined Plane

Figure 2.1 The Inclined Plane PHYS-101 LAB-02 One and Two Dimensional Motion 1. Objectives The objectives of this experiment are: to measure the acceleration due to gravity using one-dimensional motion, i.e. the motion of an object

More information

v WMS Tutorials GIS Module Importing, displaying, and converting shapefiles Required Components Time minutes

v WMS Tutorials GIS Module Importing, displaying, and converting shapefiles Required Components Time minutes v. 11.0 WMS 11.0 Tutorial Importing, displaying, and converting shapefiles Objectives This tutorial demonstrates how to import GIS data, visualize it, and convert it into WMS coverage data that could be

More information

Location Intelligence Infrastructure Asset Management. Confirm. Confirm Mapping Link to ArcMap Version v18.00b.am

Location Intelligence Infrastructure Asset Management. Confirm. Confirm Mapping Link to ArcMap Version v18.00b.am Location Intelligence Infrastructure Asset Management Confirm Confirm Mapping Link to ArcMap Version v18.00b.am Information in this document is subject to change without notice and does not represent a

More information

1. Open IDV. There is a desktop link, choose version 3.0u1 or 3.0u2. It can take a few minutes to open.

1. Open IDV. There is a desktop link, choose version 3.0u1 or 3.0u2. It can take a few minutes to open. Page 1 Objectives: Become familiar with using a software package (IDV) to view satellite images Understand the differences between Visible, IR, and Microwave Imagery Observe the influence of dry air and

More information

CityGML XFM Application Template Documentation. Bentley Map V8i (SELECTseries 2)

CityGML XFM Application Template Documentation. Bentley Map V8i (SELECTseries 2) CityGML XFM Application Template Documentation Bentley Map V8i (SELECTseries 2) Table of Contents Introduction to CityGML 1 CityGML XFM Application Template 2 Requirements 2 Finding Documentation 2 To

More information

41. Sim Reactions Example

41. Sim Reactions Example HSC Chemistry 7.0 41-1(6) 41. Sim Reactions Example Figure 1: Sim Reactions Example, Run mode view after calculations. General This example contains instruction how to create a simple model. The example

More information

Using Excel to Implement the Finite Difference Method for 2-D Heat Transfer in a Mechanical Engineering Technology Course

Using Excel to Implement the Finite Difference Method for 2-D Heat Transfer in a Mechanical Engineering Technology Course Paper ID #9196 Using Excel to Implement the Finite Difference Method for -D Heat ransfer in a Mechanical Engineering echnology Course Mr. Robert Edwards, Pennsylvania State University, Erie Bob Edwards

More information

Tutorial 11. Use of User-Defined Scalars and User-Defined Memories for Modeling Ohmic Heating

Tutorial 11. Use of User-Defined Scalars and User-Defined Memories for Modeling Ohmic Heating Tutorial 11. Use of User-Defined Scalars and User-Defined Memories for Modeling Ohmic Heating Introduction The purpose of this tutorial is to illustrate the use of user-defined scalars (UDS) and user defined

More information

Stellarium Walk-through for First Time Users

Stellarium Walk-through for First Time Users Stellarium Walk-through for First Time Users Stellarium is the computer program often demonstrated during our planetarium shows at The MOST, Syracuse s science museum. It is our hope that visitors to our

More information

ArcGIS 9 ArcGIS StreetMap Tutorial

ArcGIS 9 ArcGIS StreetMap Tutorial ArcGIS 9 ArcGIS StreetMap Tutorial Copyright 2001 2008 ESRI All Rights Reserved. Printed in the United States of America. The information contained in this document is the exclusive property of ESRI. This

More information

ES205 Analysis and Design of Engineering Systems: Lab 1: An Introductory Tutorial: Getting Started with SIMULINK

ES205 Analysis and Design of Engineering Systems: Lab 1: An Introductory Tutorial: Getting Started with SIMULINK ES205 Analysis and Design of Engineering Systems: Lab 1: An Introductory Tutorial: Getting Started with SIMULINK What is SIMULINK? SIMULINK is a software package for modeling, simulating, and analyzing

More information

Computerlab 3. for Electrodynamics with Vector analysis C and Electrodynamics using Comsol Multiphysics. Induction heating

Computerlab 3. for Electrodynamics with Vector analysis C and Electrodynamics using Comsol Multiphysics. Induction heating 2013-10-01 Department of Physics Olexii Iukhymenko oleksii.iukhymenko@physics.umu.se Computerlab 3 for Electrodynamics with Vector analysis C and Electrodynamics using Comsol Multiphysics Induction heating

More information

Assignment #0 Using Stellarium

Assignment #0 Using Stellarium Name: Class: Date: Assignment #0 Using Stellarium The purpose of this exercise is to familiarize yourself with the Stellarium program and its many capabilities and features. Stellarium is a visually beautiful

More information

Projection and Reprojection

Projection and Reprojection Using Quantum GIS Tutorial ID: IGET_GIS_002 This tutorial has been developed by BVIEER as part of the IGET web portal intended to provide easy access to geospatial education. This tutorial is released

More information

WeatherHawk Weather Station Protocol

WeatherHawk Weather Station Protocol WeatherHawk Weather Station Protocol Purpose To log atmosphere data using a WeatherHawk TM weather station Overview A weather station is setup to measure and record atmospheric measurements at 15 minute

More information

VISIMIX TURBULENT. TACKLING SAFETY PROBLEMS OF STIRRED REACTORS AT THE DESIGN STAGE.

VISIMIX TURBULENT. TACKLING SAFETY PROBLEMS OF STIRRED REACTORS AT THE DESIGN STAGE. VISIMIX TURBULENT. TACKLING SAFETY PROBLEMS OF STIRRED REACTORS AT THE DESIGN STAGE. This example demonstrates usage of the VisiMix software to provide an Inherently Safer Design of the process based on

More information

WindNinja Tutorial 3: Point Initialization

WindNinja Tutorial 3: Point Initialization WindNinja Tutorial 3: Point Initialization 6/27/2018 Introduction Welcome to WindNinja Tutorial 3: Point Initialization. This tutorial will step you through the process of downloading weather station data

More information

Internet Resource Guide. For Chemical Engineering Students at The Pennsylvania State University

Internet Resource Guide. For Chemical Engineering Students at The Pennsylvania State University Internet Resource Guide For Chemical Engineering Students at The Pennsylvania State University Faith Tran 29 FEBRUARY 2016 Table of Contents 1 Front Matter 1.1 What is in the Guide... 2 1.2 Who this Guide

More information

Your work from these three exercises will be due Thursday, March 2 at class time.

Your work from these three exercises will be due Thursday, March 2 at class time. GEO231_week5_2012 GEO231, February 23, 2012 Today s class will consist of three separate parts: 1) Introduction to working with a compass 2) Continued work with spreadsheets 3) Introduction to surfer software

More information

A SHORT INTRODUCTION TO ADAMS

A SHORT INTRODUCTION TO ADAMS A. AHADI, P. LIDSTRÖM, K. NILSSON A SHORT INTRODUCTION TO ADAMS FOR ENGINEERING PHYSICS DIVISION OF MECHANICS DEPARTMENT OF MECHANICAL ENGINEERING LUND INSTITUTE OF TECHNOLOGY 2017 FOREWORD THESE EXERCISES

More information

Center of Mass. Evaluation copy

Center of Mass. Evaluation copy Center of Mass Experiment 19 INTRODUCTION In the most of the previous experiments you have examined the motion of a single object as it underwent a variety of motions. You learned that an object subject

More information

Application of COMSOL Multiphysics in Transport Phenomena Educational Processes

Application of COMSOL Multiphysics in Transport Phenomena Educational Processes Application of COMSOL Multiphysics in Transport Phenomena Educational Processes M. Vasilev, P. Sharma and P. L. Mills * Department of Chemical and Natural Gas Engineering, Texas A&M University-Kingsville,

More information

Simple Harmonic Motion

Simple Harmonic Motion Introduction Simple Harmonic Motion The simple harmonic oscillator (a mass oscillating on a spring) is the most important system in physics. There are several reasons behind this remarkable claim: Any

More information

Assignment 3: blood oxygen uptake. Lars Johansson IEI/mechanics Linköping university

Assignment 3: blood oxygen uptake. Lars Johansson IEI/mechanics Linköping university Assignment 3: blood oxygen uptake Lars Johansson IEI/mechanics Linköping university 1 Introduction In the human lung, the airway branches to the terminal structures which are the alveoli. The alveoli are

More information

M E R C E R W I N WA L K T H R O U G H

M E R C E R W I N WA L K T H R O U G H H E A L T H W E A L T H C A R E E R WA L K T H R O U G H C L I E N T S O L U T I O N S T E A M T A B L E O F C O N T E N T 1. Login to the Tool 2 2. Published reports... 7 3. Select Results Criteria...

More information

Parts II-V Sabbatical Leave Report

Parts II-V Sabbatical Leave Report Parts II-V Sabbatical Leave Report II. III. Re-statement of Sabbatical Leave Application I propose to spend my sabbatical updating all of the lab manuals for the five physics courses. The lab manuals are

More information

Astronomy 101 Lab: Stellarium Tutorial

Astronomy 101 Lab: Stellarium Tutorial Name: Astronomy 101 Lab: Stellarium Tutorial Please install the Stellarium software on your computer using the instructions in the procedure. If you own a laptop, please bring it to class. You will submit

More information