09 laminar flow in a tube
TRANSCRIPT
8/2/2019 09 Laminar Flow in a Tube
http://slidepdf.com/reader/full/09-laminar-flow-in-a-tube 1/13
Laminar Flow in a Tube ME433 COMSOL INSTRUCTIONS
- 1 -
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 hydrodynamicportion in the inlet region of the tube. Air velocity in this region is developing. At andafter a certain hydrodynamic length Lh, the velocity distribution is developed and
resembles a parabolic profile. This portion of the tube is referred to as fully – developed
velocity region (FDVR). 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 quantitativeperspectives about the entrance and fully – developed flow field regions from COMSOL
solution.
Known quantities:
Fluid: Air
V i = 0.04 m/s
T air = 20 ºC
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 h
L L , fully – developed flow region will form in the tube as
well. If h L 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 asuitable model for lateral cross – section of the tube.
The problem can be modeled with constant air properties determined at incomingair temperature T air .
COMSOL can introduce marginal errors near the exit of the tube. To avoid thesesmall errors, we should always make the tube larger in length by 10 cm. Thus, the
modeling length of the tube will be 110 cm.
Velocity Development in a Tube
L = 100 cm
D = 6 cm
8/2/2019 09 Laminar Flow in a Tube
http://slidepdf.com/reader/full/09-laminar-flow-in-a-tube 2/13
Laminar Flow in a Tube ME433 COMSOL INSTRUCTIONS
- 2 -
Assignment
1. State the experimental criterion which permits analyzing flow in a tube as
d aof
. Use COMSOL to solve for velocity distribution in the given tube. [Note: Please
ve
3. Use COMSOL to graph a vector field showing the development of velocity
4. Use COMSOL to plot axial velocity u(r, x o ) at xo = 5, 10, 25, 75, and 100.
5. Use COMSOL to plot centerline velocity uc as a function of x on
laminar. Determine De for a circular tube of diameter d . Use table 7.2 to fincorrect C h for a circular tube. Rearrange equation 7.43a to solve for Re in terms
Lh, C h, and hydraulic diameter for a circular tube.
2
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 ha
COMSOL velocity solution].
profile. Show a 2D colormap of velocity distribution.
0 x L . Does
6. Use the plot of centerline velocity uc to find the hydrodynamic entrance length Lh.
7. Use the results of questions 1 and 6 to calculate the Reynold’s number based on
8. [Extra Credit]: Compute velocity profile in FDVR according to equation 7.48.
9. [Extra Credit]: Compute mean velocity
the velocity profile become invariant with distance? What observations do youmake regarding uc?
hydrodynamic entrance length Lh. State whether the flow is laminar or turbulent.
Compare this result with axial velocity u(r, x o ) at x
o that is in FDVR fromCOMSOL solution. Comment on COMSOL solution validity.
u in FDVR. [Hint: Recall from fluid
mechanics that velocity distribution in fully developed velocity region is given by
2
1c ou u r r . Compare this equation with equation 7.48 and use COMSOL
xial velocity u(r, x o ) at xo that is in FDVR to compute
solution to a u ].
10. [Extra Credit]: Perform parametric study in COMSOL that solves the problem formultiple 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.
8/2/2019 09 Laminar Flow in a Tube
http://slidepdf.com/reader/full/09-laminar-flow-in-a-tube 3/13
Laminar Flow in a Tube ME433 COMSOL INSTRUCTIONS
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 PDEsystem, 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 WeaklyCompressible Navier – Stokes Steady – state analysis”.
3. Click “OK”.
- 3 -
8/2/2019 09 Laminar Flow in a Tube
http://slidepdf.com/reader/full/09-laminar-flow-in-a-tube 4/13
Laminar Flow in a Tube ME433 COMSOL INSTRUCTIONS
GEOMETRY MODELING
We will model tube’s lateral cross – section only, as it saves computation time and isphysically 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 “-0.03” 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 boundaryconditions 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.
- 4 -
8/2/2019 09 Laminar Flow in a Tube
http://slidepdf.com/reader/full/09-laminar-flow-in-a-tube 5/13
Laminar Flow in a Tube ME433 COMSOL INSTRUCTIONS
Subdomain Settings:
1. From the “Physics” menu select “Subdomain Settings” (F8).
2. Select “Subdomain 1” in the subdomain selection field.
3. Enter “1.2042” 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:
BOUNDARYBOUNDARY
TYPE
BOUNDARY
CONDITIONCOMMENTS
1 Inlet VelocityEnter “0.04” in “U0” field
(Normal Inflow velocity)2, 3 Wall No Slip
4Open
boundaryNormal stress Verify that field “f0” is set to “0”
3. Click “OK” to close the “Boundary Settings” window.
- 5 -
8/2/2019 09 Laminar Flow in a Tube
http://slidepdf.com/reader/full/09-laminar-flow-in-a-tube 6/13
Laminar Flow in a Tube ME433 COMSOL INSTRUCTIONS
MESH GENERATION
To minimize the computational time without compromising much accuracy of thesolution, 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”.
- 6 -
8/2/2019 09 Laminar Flow in a Tube
http://slidepdf.com/reader/full/09-laminar-flow-in-a-tube 7/13
Laminar Flow in a Tube ME433 COMSOL INSTRUCTIONS
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. Inaddition 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 xo, and a plot of centerline velocity uc. With these
results available, you should be able to determine the hydrodynamic entrance length Lh
and a corresponding Reynolds number. Furthermore, you will be able to determine
whether the flow is laminar or turbulent. With hydrodynamic entrance length Lh 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.
- 7 -
8/2/2019 09 Laminar Flow in a Tube
http://slidepdf.com/reader/full/09-laminar-flow-in-a-tube 8/13
Laminar Flow in a Tube ME433 COMSOL INSTRUCTIONS
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 7 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 “PlotParameters” 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
- 8 -
8/2/2019 09 Laminar Flow in a Tube
http://slidepdf.com/reader/full/09-laminar-flow-in-a-tube 9/13
Laminar Flow in a Tube ME433 COMSOL INSTRUCTIONS
the difference in velocity vector field representation. Try other values. Click “OK” whenyou are done displaying these quantities to close the “Plot Parameters” window.
Saving Color Maps:
After you have selected a view that shows the results clearly, you may want to save it asan image for future discussion. This may be done as follows:
1. Go to the “File” menu and select “Export Image”. This will bring up an
“Export Image” window.
For a 4” by 6” image, acceptable image quality settings are given in the figure below. If
you need higher image quality, increase the DPI value.
2. Change your “Export Image” value settings to the ones in the above figure.
3. Click the “Export” button.
4. Name and save the image.
- 9 -
8/2/2019 09 Laminar Flow in a Tube
http://slidepdf.com/reader/full/09-laminar-flow-in-a-tube 10/13
Laminar Flow in a Tube ME433 COMSOL INSTRUCTIONS
Plotting Axial Veloci ty as a Function of Radius at Specified x o Values
To make axial velocity u(r, x o ) plots at specified xo, we simply need to know the end
coordinates of axial lines along which u(r, x o ) is to be plotted. Vertical axial lines aredescribed by the radius of the tube in y – coordinate (or r coordinate). Let us begin by
plotting axial velocity u(r, x o ) at xo = 100 cm.
1. Under “Postprocessing” menu, select “Cross – Section Plot Parameters”.
2. Switch to “Line/Extrusion” tab.
3. Type “y” in the “Expression” field under “ y – axis data” section of the tab.
4. Under “ x – axis data”, use radio button to enable the “Expression” option.
5. Click on “Expression” button.
6. In new “ x – axis data” window, type “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-2.
9. 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
- 10 -
8/2/2019 09 Laminar Flow in a Tube
http://slidepdf.com/reader/full/09-laminar-flow-in-a-tube 11/13
Laminar Flow in a Tube ME433 COMSOL INSTRUCTIONS
save this plot,
1. Click the save “ ” button in your figure with results. This will bring up an“Export Image” window.
2. Follow steps 2 – 4 as instructed on page 9 to finish with exporting the image.
To display axial velocity at other x0 values, repeat steps 8 and 9 on page 10. In step 8,change the x0 and x1 coordinates to those given in assignment question 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 filename), use the “Browse” button to navigate to your saving folder, and save the file].
Plotting C enterline Velocity uc as a Function of x
Similar to axial velocity plots, we simply need to specify the proper coordinates of a linealong 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 thedrop – down menu.
5. Enter the following coordinates in the “Cross – section line data” section: x0 = 0, x1 = 1; y0 = y1 = 0.
6. Click “OK”.
- 11 -
8/2/2019 09 Laminar Flow in a Tube
http://slidepdf.com/reader/full/09-laminar-flow-in-a-tube 12/13
Laminar Flow in a Tube ME433 COMSOL INSTRUCTIONS
Centerline velocity uc will be displayed as a function of x on0 x L . This graph is
shown below. It has been re – plotted with MATLAB.
MATLAB Re – Plot of C enterline Velocity uc
This completes COMSOL modeling procedures for this problem.
- 12 -
8/2/2019 09 Laminar Flow in a Tube
http://slidepdf.com/reader/full/09-laminar-flow-in-a-tube 13/13
Laminar Flow in a Tube ME433 COMSOL INSTRUCTIONS
- 13 -
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 thefile 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.