You are on page 1of 6

Use COMSOL Multiphysics to make a 2D simulation of Poiseuille flow

Understanding
We assume that you have successfully installed a copy of COMSOL Multiphysics software and that you can open and run the program by making a license accessible to the software in some form or another. Poiseuille flow is a simple model for how fluids flow in a straight cylindrical pipe. It assumes that the magnitude of the fluid velocity at the inner surface of the pipe is zero and gradually increases with decreasing cross-sectional radius towards its highest value along the central axis of the pipe. We can simplify this model to a 2D representation by only considering the length and height dimensions of a central, lengthwise cross-section of the pipe (length=x, height=y). We assume, as an example, that the finite length of the pipe in our simulation is 2 units long (as given by the COMSOL 'Graphics' panel), the height is 1 unit and the lower left corner of this rectangular cross-section is at the origin of an x-y coordinate system.

Method
using COMSOL version 4.2a

[edit]and the Windows 7 operating system [edit]using the start menu (alternatively see: using the desktop icon) 1. Start up COMSOL Multiphysics. 1. Click on the start button at the bottom left corner of your desktop screen. 2. Click on 'All Programs'. 3. Scroll down to the folder called 'COMSOL 4.2a'. 4. Click on that folder to see its contents. 5. Click on 'COMSOL Multiphysics 4.2a'. 6. Wait for the program window to load. 2. Under the heading 'Select space dimension' click on the "radio" button for 2D. 3. Click on the 'Next' button beside the heading of 'Select space dimension'. 4. Click on the 'Fluid Flow' category to expand it. 5. Click on the 'Single-Phase Flow' subcategory to expand it. 6. Click on 'Laminar Flow (spf)'. 7. Find the blue-green plus symbol at the bottom left of the present scroll window.

8. Click on it to add 'Laminar Flow (spf)' as a physical effect in your model. 9. Click the black and white (checkered flag-shaped) 'Finish' button. 10. Wait for the new model to be set up. 11. Create a rectangle in the right-hand-side 'Graphics' panel with height 1 and width 2 and with the lower left corner at the origin. 1. Find the 'Zoom Out' button in the top horizontal toolbar of the 'Graphics' panel. 2. Click on it twice. 3. In the top horizontal toolbar of the whole program window, click on the green rectangle symbol which has an orange dot at its lower left corner and gives the message 'Draw Rectangle' when you move the mouse cursor over it. 4. Line up the cursor with the zero mark of each axis and click once. 5. Move the mouse cursor diagonally right and up until you've lined up the mouse cursor with the x=2 and y=1 marks. 6. Click on that new position. 12. In the top horizontal toolbar of the 'Graphics' panel, find the 'Zoom Extents' button and click on it. 13. Set the boundary conditions. 1. In the model builder menu right click on 'Laminar flow'. 2. In the menu that opens click on 'Inlet'. 3. In the model builder menu right click on 'Laminar flow' again. 4. In the menu that opens click on 'Outlet'. 5. In the model builder menu under 'Laminar Flow (spf)' click on 'Inlet'. 6. In the Graphics window, in the top toolbar, click on 'Select Boundaries'. 7. In the Graphics window click on the left hand side edge of the rectangular model you have created. 8. In the settings window for Inlet under the 'Selection' heading, click on the blue-green plus button. 9. In the same settings window under 'Velocity', click on the box for U0. 10. Type in '1'. 11. In the model builder menu under 'Laminar Flow (spf)' click on 'Outlet'. 12. In the Graphics window, in the top toolbar, click on 'Select Boundaries'. 13. In the Graphics window click on the right hand side edge of the rectangular model you have created.

14. In the settings window for Outlet under the 'Selection' heading, click on the blue-green plus button. 14. Choose a material for the fluid that makes up the rectangle. 1. In the model builder menu right click on 'Materials'. 2. In the new menu that appears click on 'Material'. 3. Under 'Materials' click on the new option that appears called 'Material 1'. 4. In the settings window in the list called 'Selection', click on '1' to highlight that domain. 5. In the settings window under 'Material Contents' click on the value box for Density and type in '1'. 6. In the settings window under 'Material Contents' click on the value box for Dynamic viscosity and type in '1/Re'. 7. In the model builder menu right click on 'Definitions'. 8. In the menu that opens click on 'Variables'. 9. In the settings window under the Variables heading click on the first box of the 'Name' column and type 'Re'. 10. In the same table under the 'Expression' column type in '1'. 11. In the settings window click on the 'Geometric entity level' drop-down menu. 12. Select 'Domain'. 13. In the 'Graphics' window click on the rectangle that you created. 14. In the settings window click on the blue-green plus button. 15. Define the mesh settings. 1. In the model builder menu click on 'Mesh 1'. 2. In the settings menu for Mesh under 'Element size', select 'Finer' from the drop down menu. 16. Add a "study" to compute some results. 1. In the model builder menu, right click on the root label at the very top which will be called 'Untitled.mph (root)' by default (before renaming the file). 2. In the menu that opens click on 'Add Study'. 3. In the 'Model Wizard' window under 'Preset Studies' choose 'Stationary'. 4. In the 'Model Wizard' window click the black and white (checkered flagshaped) 'Finish' button. 17. Compute the results. 1. In the model builder menu right click on 'Study 1'.

2. In the menu that appears click on 'Compute'. 1. Start up COMSOL Multiphysics. 1. Double click on the desktop shortcut icon for the version of COMSOL that you intend to use. 2. Wait for the program window to load. 2. Under the heading 'Select space dimension' click on the "radio" button for 2D. 3. Click on the 'Next' button beside the heading of 'Select space dimension'. 4. Click on the 'Fluid Flow' category to expand it. 5. Click on the 'Single-Phase Flow' subcategory to expand it. 6. Click on 'Laminar Flow (spf)'. 7. Find the blue-green plus symbol at the bottom left of the present scroll window. 8. Click on it to add 'Laminar Flow (spf)' as a physical effect in your model. 9. Click the black and white (checkered flag-shaped) 'Finish' button. 10. Wait for the new model to be set up. 11. Create a rectangle in the right-hand-side 'Graphics' panel with height 1 and width 2 and with the lower left corner at the origin. 1. Find the 'Zoom Out' button in the top horizontal toolbar of the 'Graphics' panel. 2. Click on it twice. 3. In the top horizontal toolbar of the whole program window, click on the green rectangle symbol which has an orange dot at its lower left corner and gives the message 'Draw Rectangle' when you move the mouse cursor over it. 4. Line up the cursor with the zero mark of each axis and click once. 5. Move the mouse cursor diagonally right and up until you've lined up the mouse cursor with the x=2 and y=1 marks. 6. Click on that new position. 12. In the top horizontal toolbar of the 'Graphics' panel, find the 'Zoom Extents' button and click on it. 13. Set the boundary conditions. 1. In the model builder menu right click on 'Laminar flow'. 2. In the menu that opens click on 'Inlet'. 3. In the model builder menu right click on 'Laminar flow' again. 4. In the menu that opens click on 'Outlet'. 5. In the model builder menu under 'Laminar Flow (spf)' click on 'Inlet'.

6. In the Graphics window, in the top toolbar, click on 'Select Boundaries'. 7. In the Graphics window click on the left hand side edge of the rectangular model you have created. 8. In the settings window for Inlet under the 'Selection' heading, click on the blue-green plus button. 9. In the same settings window under 'Velocity', click on the box for U0. 10. Type in '1'. 11. In the model builder menu under 'Laminar Flow (spf)' click on 'Outlet'. 12. In the Graphics window, in the top toolbar, click on 'Select Boundaries'. 13. In the Graphics window click on the right hand side edge of the rectangular model you have created. 14. In the settings window for Outlet under the 'Selection' heading, click on the blue-green plus button. 14. Choose a material for the fluid that makes up the rectangle. 1. In the model builder menu right click on 'Materials'. 2. In the new menu that appears click on 'Material'. 3. Under 'Materials' click on the new option that appears called 'Material 1'. 4. In the settings window in the list called 'Selection', click on '1' to highlight that domain. 5. In the settings window under 'Material Contents' click on the value box for Density and type in '1'. 6. In the settings window under 'Material Contents' click on the value box for Dynamic viscosity and type in '1/Re'. 7. In the model builder menu right click on 'Definitions'. 8. In the menu that opens click on 'Variables'. 9. In the settings window under the Variables heading click on the first box of the 'Name' column and type 'Re'. 10. In the same table under the 'Expression' column type in '1'. 11. In the settings window click on the 'Geometric entity level' drop-down menu. 12. Select 'Domain'. 13. In the 'Graphics' window click on the rectangle that you created. 14. In the settings window click on the blue-green plus button. 15. Define the mesh settings. 1. In the model builder menu click on 'Mesh 1'.

2. In the settings menu for Mesh under 'Element size', select 'Finer' from the drop down menu. 16. Add a "study" to compute some results. 1. In the model builder menu, right click on the root label at the very top which will be called 'Untitled.mph (root)' by default (before renaming the file). 2. In the menu that opens click on 'Add Study'. 3. In the 'Model Wizard' window under 'Preset Studies' choose 'Stationary'. 4. In the 'Model Wizard' window click the black and white (checkered flagshaped) 'Finish' button. 17. Compute the results. 1. In the model builder menu right click on 'Study 1'. 2. In the menu that appears click on 'Compute'.

You might also like