Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to COMSOL Travis Campbell Developed for CHE 331 – Fall 2012 Oregon State University School of Chemical, Biological and Environmental Engineering.

Similar presentations


Presentation on theme: "Introduction to COMSOL Travis Campbell Developed for CHE 331 – Fall 2012 Oregon State University School of Chemical, Biological and Environmental Engineering."— Presentation transcript:

1 Introduction to COMSOL Travis Campbell Developed for CHE 331 – Fall 2012 Oregon State University School of Chemical, Biological and Environmental Engineering

2 What is COMSOL? Course requirement Modeling and simulation software Tool for system design/optimization Method for checking work

3 A Brief History of Modeling Software “A computer model refers to the algorithms and equations used to capture the behavior of the system being modeled. However, a computer simulation refers to the actual running of the program which contains these equations or algorithms.” 1 http://en.wikipedia.org/wiki/Computer_model Developed rapidly with computers Influencing research

4 The General Idea Behind Numerical Modeling User builds a model with significant variables User builds a model mesh COMSOL solves the model numerically at every mesh intersection Intersections are connected to provide “continuous” data

5 How is the model solved at every intersection? Several methods exist - one example is the Finite Element Method:

6 Finite Element Method Results

7 COMSOL Step by Step for 4 Models Model 1 – Laminar Flow in a Pipe Model 2 – Turbulent Flow in a Pipe Model 3 – Laminar Flow between Parallel Plates Model 4 – Flow of a Falling Film These notes apply to Version 4.2, only!

8 COMSOL Model 1 – Laminar Flow in a Pipe 1.Open COMSOL 2.Select Space Dimension 2D, click 3.Add Physics Laminar Flow, click 4.Select Study Type Stationary, click 5.In Main Menu, select View > Desktop Layout > Reset Desktop MAIN MENU GRAPHICS MODEL SUB MENU MODEL BUILDER MENU

9 COMSOL Model 1 – Laminar Flow in a Pipe 6.In Model Builder Menu, right-click Geometry 1 and select Rectangle 7.Select Rectangle 1 8.In Model Sub Menu, enter Width: 5 m, Height: 0.1 m 9.Click Build Selected 10.In Model Builder Menu, right-click Materials and select Open Material Browser 11.In Model Sub Menu, select Liquids and Gases > Liquids > Water 12.Click Add Material to Model (click twice) 13.In Model Builder Menu, click Laminar Flow 14.In Model Sub Menu, select Physical Model > Compressibility > Incompressible flow 15.In Model Builder Menu, right-click Laminar Flow and select Inlet 16.Select Inlet 1

10 COMSOL Model 1 – Laminar Flow in a Pipe 17.Define first Boundary Condition by describing the inlet velocity (average velocity). On the Graphic, select the left boundary 18.In Model Sub Menu, click Add to Selection 19.In Model Sub Menu, select Boundary Condition > Velocity. Click Normal Inflow Velocity. Enter U o = 0.001 m/s. 20.In Model Builder Menu, right click Laminar Flow and select Outlet 21.Select Outlet 1 22.Define second Boundary Condition by describing the outlet pressure. On the Graphic, select the right boundary 23.In Model Sub Menu, click Add to Selection 24.In Model Sub Menu, select Boundary Condition > Pressure, no viscous stress. Enter p o = 0 Pa.

11 COMSOL Model 1 – Laminar Flow in a Pipe 25.Add no slip conditions at the pipe walls. In Model Builder Menu, click Laminar Flow > Wall 1 26.In Model Sub Menu, confirm that Boundaries 2, 3 only are selected 27.In Model Sub Menu, select Boundary Condition > No slip 28.In Model Builder Menu, click Mesh 29.Select Physics-controlled mesh, Normal Element size 30.In Model Builder Menu, right-click Study 1 and select Compute to simulate your model. Note the Reynolds number:

12 COMSOL Model 1 – Laminar Flow in a Pipe Time required to run your simulation depends on many factors: Processor speed Connection speed Model size Mesh granularity Results can be analyzed in many ways. We will find the velocity profile as a function of pipe cross-section.

13 COMSOL Model 1 – Laminar Flow in a Pipe 31.In Model Builder Menu, expand Results. Right-click Data Sets and select Cut Line 2D. 32.Select Cut Line 2D 1 33.In Model Sub Menu, select Data set > Solution 1 and enter Line Data: 31.Click Plot 32.In Model Builder Menu, right-click Results and select 1D Plot Group 33.Select 1D Plot Group 1 34.In Model Sub Menu, select Data > Data set > Cut Line 2D 1 35.In Model Builder Menu, right-click 1D Plot Group 1 and select Line Graph 36.Select Line Graph 1 37.In Model Sub Menu, select Data > Data set > From parent 38.Confirm that the y-Axis Data is velocity, spf.U [m/s] 39.Click Plot x: y: Point 1:2.50 Point 2:2.50.1

14 Result

15 COMSOL Step by Step Models to be completed Model 1 – Laminar Flow in a Pipe Model 2 – Turbulent Flow in a Pipe Model 3 – Laminar Flow between Parallel Plates Model 4 – Flow of a Falling Film

16 COMSOL Model 2 - Turbulent Flow in a Pipe Similar to Laminar Flow in a Pipe Differences: 3. Turbulent Flow (k-ε) 19. Enter U o = 10 m/s 27. In Model Sub Menu, select Boundary Condition > Wall Functions Re = 1e6

17 COMSOL Model 2 - Turbulent Flow in a Pipe

18 COMSOL Step by Step Models to be completed Model 1 – Laminar Flow in a Pipe Model 2 – Turbulent Flow in a Pipe Model 3 – Laminar Flow between Parallel Plates Model 4 – Flow of a Falling Film

19 COMSOL Model 3 – Laminar Flow between Parallel Plates Also similar to Laminar Flow in a Pipe Differences: 19. In Model Sub Menu, select Boundary Condition > Pressure, no viscous stress. Enter p o = 0 Pa. Note that both Inlet and Outlet Boundary Conditions are zero pressure. What does this mean? After 19: In Model Builder Menu, right click Laminar Flow and select Wall Select Wall 2 Define third Boundary Condition by describing the upper plate velocity. On the Graphic, select the top boundary In Model Sub Menu, click Add to Selection In Model Sub Menu, select Boundary Condition > Moving Wall. Enter u w = (0.001, 0) Pa. 26. In Model Sub Menu, confirm that Boundary 2 only is selected

20 COMSOL Model 3 – Laminar Flow between Parallel Plates

21 COMSOL Step by Step Models to be completed Model 1 – Laminar Flow in a Pipe Model 2 – Turbulent Flow in a Pipe Model 3 – Laminar Flow between Parallel Plates Model 4 – Flow of a Falling Film

22 COMSOL Model 4 – Flow of a Falling Film Most similar to Laminar Flow between Parallel Plates Differences: Make rectangle tall and skinny (W: 0.001 m, H: 0.05 m) Boundary conditions: Wall 1 – No Slip Wall 2 – Outlet, zero pressure Wall 3 – Inlet, zero velocity Wall 4 – Open boundary, zero normal stress Add Volume Force to Laminar Flow with -9810 N/m 3 in the y-direction Make a horizontal cut line near the bottom of your geometry, to capture the “fully developed” film flow

23 COMSOL Model 4 – Flow of a Falling Film


Download ppt "Introduction to COMSOL Travis Campbell Developed for CHE 331 – Fall 2012 Oregon State University School of Chemical, Biological and Environmental Engineering."

Similar presentations


Ads by Google