Software Implementation: What to Solve (Preprocessing)

Size: px
Start display at page:

Download "Software Implementation: What to Solve (Preprocessing)"

Transcription

1 Chapter 2 Software Implementation: What to Solve (Preprocessing) I really hate this damned machine. It never does quite what I want. But only what I tell it. In the previous chapter, the physical problem was transformed into a mathematical model consisting of the governing equations and boundary conditions. We solve these equations using a computational software, also known as computer aided engineering (CAE) software. Implementation of the model, i.e., solution of the equations in a computational software requires that we tell the software 1) What equations to solve; and 2) How to solve. The former is the subject of this chapter while how to solve is the topic of next chapter. Telling the software what equations to solve is critical since the computer will solve the exact problem it is told to solve, not necessarily what we intend to. Implementation of model in software This chapter Biomedical Problem Mathematical Analog Solution Design and Optimization Figure 2.1: Implementation in a computational software of the problem formulated in Chapter 1 is the subject of this chapter 45

2 46 CHAPTER 2. SOFTWARE IMPLEMENTATION: WHAT TO SOLVE (PREPROCESSING) 2.1 Choosing a software Several factors need to be considered in choosing a software for a particular problem or type of problems. The very first question, of course, is, can the software solve the needed physics? Often, it is better to assume a more complex version of the problem at hand as it can be the future need. The answer to the capabilities of a software with respect to a complex physics is not straightforward and one has to dig deeper into the documentation available for the software, beyond the sales literature. If the software cannot solve the needed physics in its exact form, how difficult is it to customize it for the intended purpose? Ease of use or the user interface is perhaps the next most important question to ask. An easy to use interface can save a tremendous amount of time, particularly in the early stages of learning. Another important item is the cost (of the software and the required hardware), although, for university uses, access seem to be easy to come by from department, college, university or even national facilities such as the National Center for Supercomputing Applications (NCSA) in the U.S. located at the University of Illinois at Urbana-Champaign. Situations arise when available software does not solve the most comprehensive version of the equations needed but time and resources do not permit moving to the most appropriate software right away. Some initial insight into the model needs to be obtained before making greater investments. The obvious choice in such circumstances is to simplify the problem so that it can be solved in the available software, even if with limited utility. 2.2 Software is not to be used as a blackbox Before we even begin to discuss the details of implementing the equations in a software, it is critical to remind ourselves that a computational software can easily provide results that are colorful, but garbage. Although working with the computational software is conceptually analogous to pressing buttons on a calculator, the type of computation that we are talking about here is not nearly as well behaved as calculating a sine function, for example. The user is solely responsible for making sure the results are accurate. For example, before running the software, one should be able to describe the problem and have sufficient understanding of the physics to be able to recognize when a valid solution is obtained. In other words, one should have a qualitative picture of what to expect before using the software. 2.3 Organization of a typical CAE software: Preprocessing, Processing and Postprocessing There is a large number of computer-aided engineering (CAE) software available today. The group of software programs that solves fluid flow, heat transfer and mass transfer are generally referred to as computational fluid dynamic (CFD) software. Computational software exists for other types of physics such as mechanics and electromagnetics (not surprisingly called Computational Mechanics and Computational Electromagnetics). A website that lists a number of CFD software is

3 2.3. ORGANIZATION OF A TYPICAL CAE SOFTWARE: PREPROCESSING, PROCESSING AND POSTPROCESSING 47 The organization of a typical computer aided engineering (CAE) software is generally divided into three parts Preprocessing, Processing and Postprocessing. These steps are illustrated in Figure 2.2 and are now discussed individually. Choose Geometry Choose GE, BC, Properties Pre-processing (Chapters 2 and 3) Choose Mesh Choose Time step Generate algebraic equations, linearize Solve Processing (automated) Estimate error and check convergence Display results Post-processing (Chapter 4) Acceptable? Display final results Figure 2.2: Flow chart for model development and solution, showing the steps of Preprocessing, Processing and Postprocessing Pre-processing This step comprises of inputting the required data in the CAE software. The required data comprises of: a) What to solve and b) How to solve. The items needed to specify what to solve typically involves the following Geometry: In this step, the computational domain for the problem is specified (drawn) in the software.

4 48 CHAPTER 2. SOFTWARE IMPLEMENTATION: WHAT TO SOLVE (PREPROCESSING) Governing Equations: The set of mathematical equations that describe the physical problem are chosen in the software in this step. Boundary Conditions: The appropriate boundary conditions corresponding to each governing equation being solved are specified. Initial Conditions: The initial conditions for the problem are set in this step. Properties: The material properties (such as thermal conductivity, density, etc.) needed for the problem are specified. The items needed to specify how to solve typically involve solution strategies including the following Meshing: In this step, the computational domain is divided into small simple shapes (known as elements) to help solve the governing equations numerically. Time steps (for a transient problem): If the problem is time-dependent, the time for which the problem needs to be solved for and the time step increment to be used by the solver are specified. Approach for solving algebraic equations: To solve the set of algebraic equations obtained from the original set of partial differential equations in the processing (or solution) stage, there are a number of different solvers available. In this step, an appropriate solver that is expected to work for the problem is chosen. Tolerances: In order to control the error in the calculated solution, tolerances are set in the CAE software in this step. Processing This step is typically automated and done by the CAE software based on the input provided in the previous pre-processing step. The governing partial differential equations are transformed into a system of algebraic equations and the unknown values (such as temperature, concentration, velocity, etc.) are determined. Post-processing This step involves visualizing the solution obtained at the previous step. The CAE software COMSOL will be used in this text for all these steps. In this chapter, we will look at implementing the items related to what to solve under the pre-processing step in COMSOL. The implementation of items related to how to solve the problem under the pre-processing step will be discussed in the next chapter (Chapter 3). Chapters 4 and 5 include processing and postprocessing in COMSOL. 2.4 Some general guidelines to pre-processing General guidelines to choosing the geometry and dimensions are discussed in Chapter 1. Governing equations are mentioned in Chapter 1 with guidelines on how to drop any individual term in these equations. The governing equations are also derived in Chapter 7 showing the origin of each of the terms. The same for boundary and initial conditions, i.e., guidelines are provided in Chapter 1 (Page 24) and basics are provided in Chapter 7

5 2.5. INTRODUCTION TO PRE-PROCESSING IN A COMPUTATIONAL SOFTWARE (COMSOL) 49 (Page 393). Origins of the source terms and their mathematical formulations are discussed in Chapter 8. Properties and where to get them are discussed at length in Chapter 9. Units of input data need to be consistent and the user is responsible for ensuring the consistency. Most CAE software never check for units. Figure 2.3 shows one consistent set of units. In this example, the geometry is drawn using the units as m. Then, the velocities are entered in m/s, time in s, temperature in ı C, thermal conductivity in W/m ı C, density in kg/m 3, specific heat capacity in J/kg ı C and heat source term in W/m 3 in order to maintain the consistency of the units. Likewise, for the boundary conditions. It must be noted that temperatures in COMSOL are in K (Kelvin) by default. Sometimes we prefer to solve the governing equations in a non-dimensional form. Non-dimensionalization of the governing equations is discussed on Page 388 in Chapter 7. Governing equation (heat transfer) [ o C] [m/s] [W/m o C] [W/m 3 ] T + u T t x k = ρc p 2 T + 2 x [s] [m] [J/kg o C] [kg/m 3 ] Q ρc p Boundary conditions (heat transfer) Flux specified [W/m o C] [ o C] -k T x = q'' [W/m 2 ] [m] Convection [W/m o C] [ o C] -k T x = h(t-t ) [W/m 2o C] [m] Figure 2.3: Use of a consistent set of units for the variables, with the governing equation and boundary conditions for heat transfer as an example. 2.5 Introduction to Pre-processing in a Computational Software (COMSOL) COMSOL is a general purpose computational software that solves the governing equations and boundary conditions using a numerical method called the finite-element method

6 50 CHAPTER 2. SOFTWARE IMPLEMENTATION: WHAT TO SOLVE (PREPROCESSING) (FEM). For a discussion on FEM, see Section 10.6 (page 488). The software can simulate many different physics by being able to solve the corresponding equations. Such physics includes, but is not limited to, heat transfer, mass transfer, fluid flow, electromagnetics and solid mechanics. Such multi-physics capabilities allows the user to incorporate various kinds of physics (such as electromagnetics and heat transfer) for solving a particular problem. One-dimensional, two-dimensional, axi-symmetric and three-dimensional steady state or transient simulations in complex geometries are possible in COMSOL. In the next few section of this chapter, we will look at the various capabilities in COMSOL related to our interest in heat transfer, mass transfer and fluid flow and the implementation of different pre-processing steps discussed earlier. Geometry Governing Equation(s) Context menu (Right click) Boundary Conditions Properties Other Parameters Solution Results visualization Figure 2.4: The model tree of the COMSOL user interface and its relationship to various steps in modeling shown earlier The user interface streamlines the modeling workflow with the Model Builder (see

7 2.6. GETTING STARTED WITH COMSOL IMPLEMENTATION: GEOMETRY AND ANALYSIS TYPE 51 Figure 2.4). Model typically includes geometry, governing equations, boundary conditions, material properties, mesh, solver details and results visualization. All of these steps are displayed in the model tree of the Model Builder window. Right clicking any node in this model tree, a context menu shows the available features, as shown in this figure for heat transfer in solids. The two other windows next to Model Builder window (see Figure 2.5) are for user data input and graphical display, respectively. For detailed overview of the COMSOL user interface, please refer to the COMSOL documentation that comes with the product and can be found under Help in the main menu. We will now look at the COMSOL how to select the geometry and analysis type in COMSOL. 2.6 Getting Started with COMSOL Implementation: Geometry and Analysis Type The first steps in implementing the model in COMSOL is to choose the dimension of the problem (1D/2D..) and the physics (fluid flow, heat transfer, etc., and whether the problem is transient or steady-state). All of these steps are shown in Figure Geometry Methods to obtain the geometry can be divided into two broad classes 1) Drawing of the geometry inside the analysis software or in some cases in another software included with the analysis software; or 2) obtaining it from a computer aided design (CAD) program where it was drawn or automatically obtained. In this book, the discussion on geometry creation will primarily be limited to the first type, i.e., the geometry created inside COM- SOL itself. A brief discussion on obtaining geometry from a CAD program is included in Section (Page 64). For now, simply the type of geometry (1D/2D/..) needs to chosen, for which instructions are in Figure 2.5. Geometry itself will be drawn later, as discussed in Section 2.7. Choice of the geometry is based on simplifications made as part of problem formulation, discussed in Section Analysis Choosing the type of analysis (physics) is the next step in COMSOL, the options for which are shown in Figure 2.6. We will be dealing with fluid flow and heat and mass transfer analysis in this text steps in choosing one of these analysis is shown in Figures , respectively. COMSOL has additional options for other types of analysis such as electromagnetics and ultrasonics, discussed in Chapter 8, whose implementation will not be covered in this text. In the COMSOL structure, the last step in choosing the analysis type is to select whether it is steady-state or transient. This is shown in the bottom portion of Figure 2.5.

8 52 CHAPTER 2. SOFTWARE IMPLEMENTATION: WHAT TO SOLVE (PREPROCESSING) To open the initial window of COMSOL Model Wizard 1. Double-click the COMSOL icon on the desktop or, if COMSOL is already open, 2. Select File>New from the main menu (Following window should appear) ❹ ❸ Choosing dimension (1D/2D/3D) 3. In the Model Wizard above, choose the dimension in Select Space Dimension 4. Click on the blue right arrow (next button) (Following window should appear) ❻ ❺ Choosing analysis type 5. In the Add Physics window of Model Wizard above, choose physics (see following pages) 6. Click on the blue right arrow (next button) (Following window should come up) ❽ ❼ Choosing analysis type (continued) 7. In the Select Study Type window of Model Wizard above, choose Time Dependent (transient) or Stationary (stady-state) 8. Click the flag (Finish button) to complete the process. Figure 2.5: Starting up COMSOL and choosing dimensions and type of physics to be solved (including steady-state or transient)

9 2.6. GETTING STARTED WITH COMSOL IMPLEMENTATION: GEOMETRY AND ANALYSIS TYPE 53 Choosing simple (single phase, laminar) fluid flow as an analysis option 1. Click on arrow left of Fluid Flow 2. Click on arrow left of Single-Phase flow 3. Click on Laminar Flow 4. Click next (right arrow on Add Physics line) ❹ ❶ ❷ ❸ Figure 2.6: Choosing fluid flow analysis options in COMSOL. Shown is the choice for single-phase, laminar) conditions.

10 54 CHAPTER 2. SOFTWARE IMPLEMENTATION: WHAT TO SOLVE (PREPROCESSING) Choosing heat transfer as an analysis option 1. Click on arrow left of Heat Transfer 2. Click on arrow left of Heat Transfer in Solids 3. Click next (right arrow on Add Physics line) ❸ ❶ ❷ Figure 2.7: Choosing conduction heat transfer analysis option in COMSOL.

11 2.6. GETTING STARTED WITH COMSOL IMPLEMENTATION: GEOMETRY AND ANALYSIS TYPE 55 Choosing simple mass transfer as an analysis option 1. Click on arrow left of Chemical Species Transport 2. Click on arrow left of Transport of Diluted Species 3. Click next (right arrow on Add Physics line) ❸ ❶ ❷ Figure 2.8: Choosing diffusion mass transfer analysis option in COMSOL.

12 56 CHAPTER 2. SOFTWARE IMPLEMENTATION: WHAT TO SOLVE (PREPROCESSING) 2.7 Geometry Creation Drawing geometry in COMSOL We will briefly look at geometry creation within COMSOL. The geometry is referred to as the computational domain or just domain. The domain can be divided into subdomains as needed. The COMSOL user s guide includes a detailed discussion of geometry creation capabilities in COMSOL. Additionally each of the ten Case Studies in Chapter 6 uses a different geometry and shows their implementation in COMSOL. For a quick reference, see table on page 19 for the geometries used in the different Case Studies. Geometry in 1D The geometry in 1D is a line or a collection of lines. Points may be created to specify a boundary condition or to divide the computational domain into subdomains.

13 2.7. GEOMETRY CREATION 57 Geometry in 1D 1. Right click on Geometry 1 (context menu of various shape opens) 2. Left click on Interval (window on the right opens) 3. Enter endpoints for a line 4. Click Build Selected ❹ ❸ ❶ ❷ Figure 2.9: Drawing a 1D (line) in COMSOL

14 58 CHAPTER 2. SOFTWARE IMPLEMENTATION: WHAT TO SOLVE (PREPROCESSING) Geometry in 2D The geometrical shapes such as polygons (rectangle, square, triangle, etc.), circles and ellipses, or their combinations can be created either starting from lines and points, or directly, using built-in templates. For example, to create a rectangle, we may first create four different lines and join them (not shown here) using the line tool shown in Figure 2.10 or specify the width and height of the rectangle to directly create it, following Figure Geometry in 2D, by clicking points ❶ 1. Click on line as the mode of drawing 2. Click on the first point in the Graphics window 3. Click on the second point, and so on 4. To make a closed polygon, Right Click on the starting point as the last point Figure 2.10: Drawing a 2D geometry in COMSOL, by clicking points. Shown is selection for drawing a line by left clicking two points on the Geometry window. To complete a polygon, right click for the last point over the starting point

15 2.7. GEOMETRY CREATION Right click on Geometry 1 (context menu of various shape opens) 2. Left click on Rectangle (window on the right opens) Geometry in 2D, by choosing built-in shapes; Rectangle 3. Enter rectangle dimensions 4. Enter rectangle position (can leave the default (0,0)) ❸ ❶ ❹ ❷ Figure 2.11: Drawing a 2D geometry in COMSOL. Shown is the example of drawing a rectangle. Other geometric shapes can be drawn similarly.

16 60 CHAPTER 2. SOFTWARE IMPLEMENTATION: WHAT TO SOLVE (PREPROCESSING) Geometry in 3D In 3D, different shapes such as block, cone, cylinder, sphere, etc. can be drawn in COM- SOL, either by directly choosing the 3D shape or by drawing 2D geometries and using extrusion or revolution tools to produce the 3D shape. Figure 2.12 shows how to draw the shapes directly. Figures show how to do a 3D geometry by extruding from a 2D geometry. Geometry in 3D, by choosing built-in shapes; rectangular block 1. Right click on Geometry 1 (context menu of various shape opens) 2. Left click on Block (window on the right opens) 3. Enter rectangular block dimensions 4. Enter block position (can leave the default (0,0,0)) 5. Enter orientation (can leave the default (0,0,1)) ❸ ❶ ❷ ❹ ❺ (a) (b) Figure 2.12: Drawing a 3D geometry in COMSOL. Shown is the example of drawing a 3D rectangular block. Other geometric shapes can be drawn similarly.

17 2.7. GEOMETRY CREATION 61 Geometry in 3D, extruded from a 2D 1. Right Click Geometry 1 2. Click Work Plane (opens the bottom figure) ❶ ❷ Figure 2.13: Drawing a 3D geometry in COMSOL by extruding from a 2D geometry.

18 62 CHAPTER 2. SOFTWARE IMPLEMENTATION: WHAT TO SOLVE (PREPROCESSING) Geometry in 3D, extruded from a 2D--continued 3. Click on Plane Geometry under Work Plane 1 under Geometry 1 4. Right Click on Work Plane 1 and select Extrude from list (This opens up panel on right and top figure on next page) 5. Enter distance to extrude (in the direction of arrow) 6. Click on Build Selected in the Extrude window (final 3D geometry is shown in bottom figure on next page) ❻ ❹ ❺ Figure 2.14: Drawing a 3D geometry in COMSOL by extruding from a 2D geometry continued from previous figure.

19 2.7. GEOMETRY CREATION 63 Geometry in 3D, extruded from a 2D--continued Figure 2.15: Drawing a 3D geometry in COMSOL by extruding from a 2D geometry continued from previous figure.

20 64 CHAPTER 2. SOFTWARE IMPLEMENTATION: WHAT TO SOLVE (PREPROCESSING) Obtaining Exact Geometry from a CAD Program A CAD (computer-aided design) software is typically used to build the geometry (especially complex ones) on the computer. Examples of such software include AutoCAD, CADAM, CADKEY, and Pro/Engineer. These software can export the geometry in a number of formats that an analysis program (such as COMSOL) can read. Such formats include Parasolid, ACIS, STEP, STL, IGES, Native CATIA V4 and Pro/E. Sometimes these files are imported into another software that specializes in mesh generation (see example in the following section). Another example of mesh generation software is GAMBIT that can import many of the above formats. Obtaining complex geometries is a difficult job and automated ways of obtaining them are constantly being pursued. There are several competing 3D scanning technologies. One such technology of particular interest to biomedical applications is 3D geometry generation using data from CT scan machines. MRI (Magnetic Resonance Imaging) can also be used to obtain images that can be reconstructed to form a 3D geometry. Another method to obtain exterior geometry is to use laser scanning. As an example, Figure 2.16 shows the upper airway of a horse in the software GAMBIT. This geometry was obtained by stitching the 2D CT scanned images of the horse in a geometry reconstruction software to obtain a 3D geometry in STL format. After making some necessary changes in the geometry like smoothing, creating flow boundaries and removing unwanted parts using a geometry manipulation software, it was imported in GAMBIT and meshed. The sequence of steps used to obtain the geometry is shown in Figure Another example is shown in Figure In this case, laser scanning is done by VI- TUS/smart 3D Body Scanner (Human Solutions, Troy, MI). Figure 2.17 shows the setup for such scanning and the 3D laser scan. The scanner provides a wireframe representation of the surface with a triangulated surface.

21 2.7. GEOMETRY CREATION 65 (a) (b) (c) (d) Figure 2.16: Obtaining geomtery of a horse upper airway for airflow analysis: (a) CT scanned images; (b) 3D geometry reconstructed from CT scanned images, in the software MIMICS; (c) smoothed 3D geometry with inflow and outflow surfaces and unwanted parts removed in the software MAGICS (d) final geometry with the 3D mesh in software GAM- BIT (see Rakesh et al., 2008, for more details).

22 66 CHAPTER 2. SOFTWARE IMPLEMENTATION: WHAT TO SOLVE (PREPROCESSING) (a) (b) (c) (d) (e) Figure 2.17: 3D laser scan of human body (a), (b) setup for the laser scan by VITUS/smart 3D Body Scanner; (c) wireframe geometry obtained after the scan as seen in GAMBIT (d) detailed view of the chest (e) detailed view of the legs (Courtesy of Cornell Body Scan Research Group, Dept. of Textiles and Apparel, Ashdown, Loker and Schoenfelder)

23 2.8. CREATING MULTIPLE DOMAINS Creating Multiple Domains Often, material properties or physics vary within the overall geometry (computational domain). To make it possible to use different properties in different regions, for example, the domain is subdivided accordingly into subdomains. This is illustrated in Figures Creating multiple domains with different properties Shown are two different domains 1 and 2, drawn in Geometry 1 This assumes instructions in FIgure 2.7 has been executed 1. Click on Heat Transfer in Fluids 1 (window Heat Transfer in Fluids opens up) 2. Enter 0.4 under thermal conductivity (Both domains 1 and 2 now have the same value) 3. Right click on Heat Transfer in Fluids and select Heat Transfer in Fluids (This creates Heat Transfer in Fluids 2; see figure on next page) ❸ ❶ ❷ 2 1 Figure 2.18: When properties are different for two different domains within the overall geometry. Shown are two different domains where different thermal conductivities will be prescribed. Figure continues.

24 68 CHAPTER 2. SOFTWARE IMPLEMENTATION: WHAT TO SOLVE (PREPROCESSING) Creating multiple domains--continues from previous 4. Click on domain 2 5. Click on + sign below domain slelection 6. Enter 0.5 under thermal conductivity (The two domains now have different thermal conductivity values) ❺ ❹ 2 1 ❻ Figure 2.19: When properties are different for two different domains within the overall geometry. Shown are two different domains where different thermal conductivities will be prescribed. Figure continues.

25 2.8. CREATING MULTIPLE DOMAINS 69 Creating multiple domains--continues from previous 7. Clicking on Heat Transfer in Fluids 1 shows domain 2 is overridden or no longer controlled by this screen ❼ 2 1 Figure 2.20: When properties are different for two different domains within the overall geometry. Shown are two different domains where different thermal conductivities will be prescribed.

26 70 CHAPTER 2. SOFTWARE IMPLEMENTATION: WHAT TO SOLVE (PREPROCESSING) 2.9 Governing Equations Once the geometry is decided, the appropriate equations representing the physics that will be solved over the geometry (computational domain or its subdomains) are decided. The governing equations are introduced in Chapter 1 starting from page 1.7 and their details and derivations are provided in Chapter 7. Depending on the problem, the appropriate terms in the energy, species or momentum (Navier-Stokes) equations need to be selected in the software. This is illustrated for fluid flow (Figure 2.21), heat transfer (Figures 2.22 and 2.23) and mass transfer (Figures 2.24 and 2.25). Governing Equation: Laminar Fluid Flow 1. Click on Laminar flow in the Model Builder window to get this window (assumes completed Fig. 2.6) 2. Click and select domain in Graphics window and Click + sign Choose governing equation Transient term Keep (transient fluid flow) 3. Choose Time dependent Remove (steady fluid flow) 3. Choose Stationary Continuity equation is always included 4. Choose incompressible flow Figure 2.21: Selecting governing equation for fluid flow. This assumes instructions in Figure 2.6 have already been executed.

27 2.9. GOVERNING EQUATIONS 71 Governing Equation: Heat transfer 1. Click on Heat Transfer in Fluids in the Model Builder window to get this window (assumes completed Fig. 2.7) Choose domain 2. Click on the domain in the Graphics window 3. Click on + sign to add to the list Choose governing equation Transient term Keep (transient problem): 4. Do nothing Remove (steady-state problem): 4. Start over or Add Physics & delete existing Convection term Keep (convection problem): 5. Enter velocities From fluid flow analysis (Letter u in x field & letter v in y) or Your own values (Enter appropriate values) Remove (conduction only problem): 5. Do nothing (default velocity is 0) Conduction term Keep (conduction present): 6. Enter conductivity (see Section on Properties) Remove (conduction absent): 6. Enter 0 value for conductivity Source term Keep (heat source present): 7. Enter value (see next page) Remove (heat source absent): 7. Do nothing (default is zero) Other source terms 8. Do nothing (These terms have 0 default value) Figure 2.22: Selecting governing equation with appropriate terms in COMSOL. This assumes instructions in Figure 2.7 have already been executed.

28 72 CHAPTER 2. SOFTWARE IMPLEMENTATION: WHAT TO SOLVE (PREPROCESSING) Governing Equation: Heat source term in heat transfer 1. Right click on Heat Transfer in Fluids 2. Left click on Heat Source (This adds Heat Source 1 under Heat Transfer in Fluids) 3. Left click on Heat Source 1 (should open window below) Choose domain 4. Click on the domain in the Graphics window 5. Click on + sign to add to the list to apply heat source 6. Enter value (constant rate) 6. or Enter algebraic expression Ex: Blood flow term (Eqn. 7.36) Enter rho_b*c_b*v_b*(t_a-t) where rho_b, c_b, V_b and T_a needs to be defined (see Defining Parameters) Figure 2.23: Details of choosing the heat source term in the governing equation. Example of a complex heat source term is the blood flow term in bioheat equation is given by (see Section 7.5, Page 381 for theory): Q D b c b PV v b.t a T /

29 2.9. GOVERNING EQUATIONS 73 Governing Equation: Mass transfer 1. Click on Transport of Diluted Species in the Model Builder window to get this window (assumes completed Fig. 2.8) Choose domain 2. Click on the domain in the Graphics window 3. Click on + sign to add to the list to apply reaction Choose governing equation Transient term Keep (transient problem): 4. Do nothing Remove (stead-state problem): 4. Start over or Add Physics & delete existing Diffusion term Keep (diffusion present): 5. Enter diffusivity (See Section on Properties) Remove (diffusion absent): 5. Enter 0 value for diffusivity Convection term Keep (convection problem): 6. Enter velocities From fluid flow analysis (Letter u in x field and v in y) or Your own values (Enter appropriate values) Remove (diffusion only problem): 6. Do nothing (default velocity is 0) Mass source (Reaction) term Keep (reaction present): 7. Enter value later (see next page) Remove (reaction absent): 7. Do nothing (default is zero) Figure 2.24: Selecting governing equation with appropriate terms in COMSOL. This assumes instructions in Figure 2.8 have already been executed.

30 74 CHAPTER 2. SOFTWARE IMPLEMENTATION: WHAT TO SOLVE (PREPROCESSING) Governing Equation: Mass source (reaction) term in mass transfer 1. Right click on Transport of Diluted Species 2. Left click on Reactions (This adds Reactions 1 under Transport of Diluted Species) 3. Left click on Reactions 1(should open window below) Choose domain 4. Click on the domain in the Graphics window 5. Click on + sign to add to the list to apply reaction Choose reaction rate 6. Enter value (Zeroth order) 6. or Enter kr*c (First order, species c) 6. or Enter kr*c*exp(ea/rg*t) for first order, species c with temperature dependence (kr, Ea, Rg needs to be defined) Figure 2.25: Details of choosing the mass source term in the governing equation. The values of reaction rate constant (kr), activation energy for the reaction (Ea) and the universal gas constant (Rg) can be specified as illustrated in Figure 2.43.

31 2.10. BOUNDARY CONDITIONS Boundary Conditions Depending upon the problem at hand, i.e., whether solving the fluid flow, heat transfer or mass transfer equation (or a combination of these), we need the corresponding boundary conditions. The types of boundary conditions are introduced on page 24 and their details are provided in Chapter 7 starting from page 393. Implementation in COMSOL of the different types of boundary conditions needed for the fluid flow, heat transfer and mass transfer equations, respectively, are described in Figures Boundary condition in fluid flow 1. Right click on Laminar Flow (This shows the possible boundary conditions) 2. Left click on Inlet (This adds Inlet 1 under Laminar Flow) 3. Left click on Inlet 1 (This opens the Inlet window (following page) ❶ ❷ Possible boundary conditions ❸ Figure 2.26: Setting the boundary conditions for fluid flow. Figure continued

32 76 CHAPTER 2. SOFTWARE IMPLEMENTATION: WHAT TO SOLVE (PREPROCESSING) Boundary condition in fluid flow--continues from previous ❷ ❸ Choose boundary 1. Click on the boundary in the Graphics window 2. Click on + sign to add boundary to the list to apply condition Velocity boundary condition 3. Select Velocity 4. Click Normal inflow velocity when velocity is constant over boundary 5. Enter value or 4. Click Velocity field when velocity is varying over boundary 5. Enter expression ❹ ❺ ❹ ❺ Pressure boundary condition 3. Select Pressure 4. Enter pressure value ❸ ❹ Figure 2.27: Setting the boundary conditions for fluid flow.

33 2.10. BOUNDARY CONDITIONS 77 Boundary condition in heat transfer 1. Right click on Heat Transfer in Fluids (This shows the possible boundary conditions) Temperature boundary condition 2. Click on Temperature (This adds Temperature 1 under Heat Transfer in Fluids) 3. Click on Temperature1 (This opens the Temperature window on the following page) Heat flux or Convection boundary condition 2. Click on Heat Flux (This adds Heat Flux 1 under Heat Transfer in Fluids; not shown) 3. Click on Heat Flux 1 (This opens the Heat Flux window on the following page) ❶ ❷ Possible boundary conditions ❸ Figure 2.28: Setting the boundary conditions for heat transfer. Figure continued

34 78 CHAPTER 2. SOFTWARE IMPLEMENTATION: WHAT TO SOLVE (PREPROCESSING) Boundary condition in heat transfer--continues from previous Temperature boundary condition 4. Choose boundary by clicking on it in Graphics 5. Click on + 6. Enter temperature value ❺ Flux and Convection boundary condition 4. Choose boundary by clicking it in Graphics 5. Click on + For heat flux boundary condition 6. Click General inward heat flux 7. Enter flux value (+ve for inward) For convection boundary condition 6. Click Inward heat flux 7. Enter Heat transfer coefficeint 8. Enter External temperature ❺ ❻ ❻ ❻ ❼ ❼ ❽ Figure 2.29: Setting the boundary conditions for heat transfer.

35 2.10. BOUNDARY CONDITIONS 79 Boundary condition in mass transfer 1. Right click on Transport of Diluted Species (This shows the possible boundary conditions) Concentration Mass flux or Convection boundary condition boundary condition 2. Click on Concentration 2. Click on Flux (This adds Concentration 1 (This adds Flux 1 under under Transport of Diluted Species) Transport of Diluted Species; not shown) 3. Click on Concentration 1 3. Click on Flux 1 (This opens the Concentration (This opens the Flux window on the following page) window on the following page) ❶ ❷ Possible boundary conditions ❸ Figure 2.30: Setting the boundary conditions for fluid flow. Figure continued

36 80 CHAPTER 2. SOFTWARE IMPLEMENTATION: WHAT TO SOLVE (PREPROCESSING) Boundary condition in mass transfer--continues from previous Concentration boundary condition 4. Choose boundary by clicking on it in Graphics 5. Click on + 6. Click on Species 7. Enter concentration value Flux and Convection boundary condition 4. Choose boundary by clicking it in Graphics 5. Click on + 6. Click on Species For mass flux boundary condition 7. Enter flux value (+ve for inward) For convection boundary condition 7. Enter h_m*(c_inf-c) for convection b.c., with h_m and c_inf defined ❺ ❺ ❻ ❼ ❻ ❼ Figure 2.31: Setting the boundary conditions for species mass transfer.

37 2.11. INITIAL CONDITIONS Initial Conditions As shown in Figure 2.32, initial temperature, concentration, velocity or pressure for a time dependent problem can be set in COMSOL by clicking on Initial Values 1 under the respective physics. Shown is for heat transfer but the same button (Initial Values 1) would be present for other physics as well. Initial condition 1. Click on Initial Values 1 (For fluid, heat or mass transport) (This choice should already exist for transient problems, as chosen in Figure 2.5) ❶ Choose domain 2. Click on the domain in the Graphics window 3. Click on + sign to add to the list to apply condition 4. Choose value ❸ ❹ Figure 2.32: Setting initial condition in COMSOL. Shown is the example for heat transfer.

38 82 CHAPTER 2. SOFTWARE IMPLEMENTATION: WHAT TO SOLVE (PREPROCESSING) 2.12 Material Properties Material properties such as thermal conductivity, density, specific heat, diffusivity, and viscosity need to be specified in the computational software depending upon the particular problem. For a fluid flow problem, density () and viscosity() are needed. For a heat transfer problem, the material properties that are needed are thermal conductivity (k), density () and specific heat (c p ). For a mass transfer problem, mass diffusivity (D) is needed. Table 1.4 on page 31 provides a list of the material properties and their implementation in the different Case Studies in Chapter 6. Figures show the material properties window for the three types of problems. For material properties that are constant, the constant values are directly entered. Variation of properties with temperature, time, space are also easily entered depending on the situation, either directly or following discussion on Section One example of variable property values is covered in the Case Study II (Page 233), where thermal conductivity and specific heat are specified as a function of temperature by using a set of data points. Another example is shown in Figure 2.35 where diffusivity is specified as a function of distance for mass transfer problem.

39 2.12. MATERIAL PROPERTIES 83 Material properties for fluid flow ❶ 1. Click on Fluid Properties 1 ❸ Choose domain 2. Click on the domain in the Graphics window 3. Click on + sign to choose Choose properties (ρ and µ) 4. Click to select User defined 5. Enter value ❹ ❺ ❹ ❺ Figure 2.33: Providing material properties data for fluid flow problems

40 84 CHAPTER 2. SOFTWARE IMPLEMENTATION: WHAT TO SOLVE (PREPROCESSING) Material properties for heat transfer ❸ ❶ 1. Click on Heat Transfer in Fluids 1 Choose domain 2. Click on the domain in the Graphics window 3. Click on + sign to add to the list to apply condition ❹ ❺ Choose properties 4. Click to select User defined 5. Enter value ❹ ❺ ❹ ❺ Figure 2.34: Providing material properties data for heat transfer problems

41 2.12. MATERIAL PROPERTIES 85 Material properties for mass transfer ❶ 1. Click on Convection and Diffusion 1 ❸ Choose domain 2. Click on the domain in the Graphics window 3. Click on + sign to add to the list to apply condition ❹ ❺ Choose properties 4. Click to select User defined 5. Enter constant value or 5. Enter expression for variable diffusivity (see also section on variable properties) ❺ Figure 2.35: Providing material properties data for mass transfer problems

42 86 CHAPTER 2. SOFTWARE IMPLEMENTATION: WHAT TO SOLVE (PREPROCESSING) 2.13 Adding Multiple Physics In many real world problems, more than one physics (fluid flow, heat transfer, mass transfer) can be present simultaneously. The COMSOL interface makes it particularly convenient to combine several physics. Conceptually, processes described earlier for choosing governing equation, boundary conditions and initial condition for a physics can be repeated within a model. This is described in Figures Figure 2.36 shows how to combine one steady-state with another transient physics while Figure 2.38 shows how to combine two physics where both are transient.

43 2.13. ADDING MULTIPLE PHYSICS 87 Multiple physics: Steady-state fluid flow with steady-state heat transfer (Individual physics is included following Section Figure below assumes Model already includes Stationary Laminar Flow) 1. Right click on Model 1 and select Add Physics 2. Choose Heat Transfer in Fluids in Add Physics panel 3. Click on flag (not the right arrow) to finish ❶ 4. Click Stationary (same as existing Stationary study) 5. Click the finish button (the flag) ❸ ❷ Figure 2.36: Modeling multiple physics when both physics have same time dependencies (transient or steady-state). Shown is stationary fluid flow and heat transfer. Figure continues to next page.

44 88 CHAPTER 2. SOFTWARE IMPLEMENTATION: WHAT TO SOLVE (PREPROCESSING) Multiple physics: Steady-state fluid flow with steady-state heat transfer (continued from previous figure) 4. Left click on Study 1 to see the window below showing both physics (Laminar flow and Heat Transfer) chosen ❹ Figure 2.37: Figure 2.36 continued.

45 2.13. ADDING MULTIPLE PHYSICS 89 Multiple physics: Steady-state fluid flow with transient heat transfer (Individual physics is included following Section Figure below assumes Model already includes Stationary Laminar Flow) 1. Right click on Model 1 and select Add Physics 2. Choose Heat Transfer in Fluids in Add Physics panel 3. Click the right arrow in Add Physics panel to get Select Study Type panel ❶ 4. Click Time Dependent (different from existing Stationary study) 5. Click the finish button (the flag) ❸ ❺ ❹ Figure 2.38: Modeling multiple physics when the two physics have different time dependencies. Example is for steady-state fluid flow with transient heat transfer. To complete the computations, one or more Studies (i.e., Study 1 or Study 2 in this figure) have to be computed. Figure continues on next page.

46 90 CHAPTER 2. SOFTWARE IMPLEMENTATION: WHAT TO SOLVE (PREPROCESSING) Multiple physics: Steady-state fluid flow with transient heat transfer (Continued from previous) 6. Notice Study 2 appears 7. Click on Step 1 under Study 1 to see the second physics deactivated (X sign) in this study 8. You can later compute using this study when you need only the stationary fluid flow ❼ ❻ ❽ 9. Click on Step 1 under Study 2 to see the both physics activated in this study 10. Deactivate Laminar Flow by clicking 11. To use the velocities calculated from Fluid Flow in Heat Transfer in Fluids, first compute Study 1 (right click on Study 1 to select Compute from menu) 12. Compute Study 2 ❿ ⓫ ❾ ⓬ Figure 2.39: Figure continued from 2.38

47 2.14. MISCELLANEOUS IMPLEMENTATION ASPECTS Miscellaneous Implementation Aspects 2.15 Variable properties or boundary condition: Defining Arbitrary Functions Properties can be function of temperature, for example. Likewise, boundary conditions of temperature, species concentration, flux (heat and species), velocity and pressure values can vary with time. We can easily include such changing quantities in one of two ways: By specifying a set of data points (dependant variable vs. time) as shown in detail in Figures 2.40 and By specifying the algebraic expression representing the dependant variable as a function of time, discussed in detail in Figures 2.41 and This is illustrated in Figures 2.40 and 2.42 where boundary heat flux has been defined as a function of time. Other boundary conditions and properties can be defined similarly. Arbitrary functions (for use anywhere) 1. Right click on Global Definitions 2. Click on Functions and choose Interpolation Figure 2.40: Setting up a time varying boundary condition: using tabulated data or function

48 92 CHAPTER 2. SOFTWARE IMPLEMENTATION: WHAT TO SOLVE (PREPROCESSING) Arbitrary functions: Using data points (continued from previous figure) 3. Enter argument (time) 4. Enter function value (heat flux) Repeat as needed Interpolates linearly in between values provided above Extrapolates using the end value provided above 5. Enter units (optional) Figure 2.41: Defining a function to be used in the model, using data points. Example shows the setting up of a time varying boundary condition.

49 2.15. VARIABLE PROPERTIES OR BOUNDARY CONDITION: DEFINING ARBITRARY FUNCTIONS 93 Arbitrary functions: Using algebraic expression 1. Right click on Global Definitions (see Figure 2.40) 2. Click on Functions and choose Piecewise (see Figure 2.40) 3. Enter the argument Stays constant outside the intervals provided below Uses the exact function provided below 4. Enter the interval (start, end) and function with argument defined above Repeat for multiple domains as needed 5. Enter units (optional) Figure 2.42: Defining a function to be used in the model, using algebraic expressions. Example shows the setting up of a time varying boundary condition.

50 94 CHAPTER 2. SOFTWARE IMPLEMENTATION: WHAT TO SOLVE (PREPROCESSING) Defining Parameters to be Used in the Model Some parameter values in our model are needed at multiple places. Also, it is a good practice to define parameter values at one place for easy debugging and changing. In COMSOL, parameters are defined in the Parameters window, as shown in Figure Defining global parameters 1. Right click on Global Defintions in Model Builder window 2. Click on Parameters from the list (This adds Parameters to the list and opens the Parameters window This column is computed from what is entered in second column 4. Enter variable name as used in your model in this column 5. Enter value in this column (can be algebraic expression of numbers) 6. Enter optional description in this column Figure 2.43: Defining globally available parameters for the model. Example shows values used in connection with reaction (mass source) Solving Ordinary Differential Equations Ordinary differential equations (ODEs) are needed to solve certain types of problem. For example, burn injury discussed and implemented in Case Study VIII (Page 309) is quantified by the term,, given by: d dt D A exp E RT (2.1) where A is defined as the frequency factor, E as the activation energy and R is the universal gas constant. T is the temperature at any point obtained from solving the heat transfer equation.

51 2.15. VARIABLE PROPERTIES OR BOUNDARY CONDITION: DEFINING ARBITRARY FUNCTIONS 95 COMSOL has templates for solving ordinary differential equations (ODEs) and partial differential equations (PDEs). Equation 2.1 can be solved by using a built-in template for ODEs. This is shown in Figures Solving an ordinary differential equation in a domain 1. Click on Mathematics in Add Physics window to expand menu 2. Click on ODE and DAE Interfaces to expand menu 3. Click on Domain ODEs and DAEs 4. Click on right arrow 5. Click on Time Dependent 6. Click on finish (flag) ❹ ❻ ❶ ❺ ❷ ❸ Figure 2.44: Solving an ordinary differential equation in one or more domains. Example shows implementation of Equation 2.1.

52 96 CHAPTER 2. SOFTWARE IMPLEMENTATION: WHAT TO SOLVE (PREPROCESSING) Solving an ordinary differential equation in a domain (continued from previous) 7. Click Distributed ODE 1 8. Click Equation tab to see equation 9. Enter A*exp-Ea/RT) for f (under Source Term) 10. Enter 1 for coefficient da 11. Enter 0 for coefficient ea ❼ ❽ ❾ ❿ ⓫ Figure 2.45: Continued from previous figure.

53 2.15. VARIABLE PROPERTIES OR BOUNDARY CONDITION: DEFINING ARBITRARY FUNCTIONS Using Logical Expressions Sometimes logical expressions are needed to define certain quantities. For example, take the case of a drug delivery problem where the drug is supplied to the surface of the skin through a patch. The patch is applied in a cyclic way such that it is applied to the body for one day, taken off the next day and then placed back on the third day. Assuming that we can use a constant flux boundary condition on the skin surface to model the diffusion of drug from the patch to the skin, we need to implement the cyclic application and removal in the model. We can incorporate this by using a logical expression for the flux at the skin surface in COMSOL: Flux D 8E 7.t < 86400/ C 0.t >D 86400/.t < // C 8E 7.t >D //.t < // where t is the time in s and (in g/m 2 s) is the flux supplied by patch when it is applied to the skin. The expressions in the parentheses are 1, if they are true and 0, if false. For example, if the time (during the solution process) is 3600 s then.t < 86400/ is true and hence, its value is 1. On the other hand, the expressions.t >D 86400/,.t < //,.t >D // and.t < // are false and therefore equal to zero. Therefore, for the first day (up to 86400s), when.t < 86400/ is true: F lux D 8E 7 Similarly, if.t >D 86400/ and.t < //: F lux D 0 Finally, if.t >D // and.t < //: F lux D 8E 7 Similarly material properties, initial conditions and source terms can be defined using logical expressions. References Anonymous Additional resources on computer implementation, from the work of students at Cornell University. On the web at >> Software Resources. Rakesh, V., Datta, A.K., Ducharme, N.G. and Pease, A.P. (2008). Simulation of turbulent airflow using a CT based upper airway model of a racehorse. Journal of Biomechanical Engineering-Transactions of the ASME 130(3):

54 98 CHAPTER 2. SOFTWARE IMPLEMENTATION: WHAT TO SOLVE (PREPROCESSING) 2.16 Problems Short Questions 1. What are the three steps in a computer-aided engineering software (such as COM- SOL)? Hint: One of the steps is processing. 2. Show a set of consistent units that you will use in a software for the rest of the variables in the following equation, where c is measured D C r 2 A (2.2) 3. Show a consistent set of units that you will use in a software for the variables in solving fluid flow (Navier-Stokes equations, only the x component is C 2 u D g u (2.3) Questions on Software Implementation For each problem formulation question in Chapter 1 (Page 34), state how the following items will be implemented by selecting from the various choices available in COMSOL: 1. Geometry type 2. Analysis type 3. Governing equation 4. Boundary conditions 5. Initial conditions 6. Material properties

55 Chapter 3 Software Implementation: How to Solve (Preprocessing) In the previous chapter, the mathematical model consisting of the geometry, governing equations and boundary conditions were implemented in a software. That is, the software now knows the computational domain and which equations to solve. We still have to tell the software how to solve the equations (from a set of parameter choices built into the software), which is the subject of this chapter. Choose solution technique to be used in software This chapter Biomedical Problem Mathematical Analog Solution Design and Optimization Figure 3.1: Instructing the software with detailed solution techniques to solve the model (set of equations) defined in Chapter 2 is the subject of this chapter 3.1 Which numerical method to use Today there is a choice of many numerical methods to solve the governing equations for example, finite difference method, finite volume method and finite element method. Selection of a method is typically via the software chosen since a given software is based on one of these methods. Thus, once the software is chosen, the basic numerical method 99

56 100 CHAPTER 3. SOFTWARE IMPLEMENTATION: HOW TO SOLVE (PREPROCESSING) is fixed. For example, COMSOL uses the finite element method to solve the governing equations. Details of the finite element method are provided in Chapter 10. Selection of the software is typically based on many considerations including whether it can solve the type of problems one is interested in, ease of use and cost. 3.2 Items needed in specifying the solution methodology The items that need to be supplied to the computational software for it to solve the governing equation in the computational domain (Page 48) are: Mesh Time steps (for a transient problem) Approach for solving algebraic equations Tolerances for how accurate a solution is needed In this chapter, we will look at what these items mean and how they are implemented in COMSOL. 3.3 How to Discretize the Domain: Mesh Elements and Mesh For finite element method, a mesh is a discretization of a geometric domain into small simple shapes. The small discretized regions are known as elements and the set of points defining the elements are known as nodes. Examples of different types of elements that are possible are shown in Figure 3.2 line elements in one dimension, triangles or quadrilaterals in two dimensions and tetrahedra or hexahedra or prisms in three dimensions. An example of a computational domain consisting of a mesh having two-dimensional quadrilateral elements is shown in Figure Structured (Mapped) vs. Unstructured (Free) Mesh A structured or mapped mesh can be recognized by all interior nodes of the mesh having an equal number of adjacent elements. The mesh generated by a structured mesh generator is typically all quadrilateral (in 2D) or hexahedral (in 3D). Structured mesh generators employ unique iterative smoothing algorithms that attempt to align elements with boundaries or physical domains. For difficult boundaries, structured mesh generation requires the domain to be split up into simple blocks which are then meshed automatically. Unstructured or free mesh generation, on the other hand, allows any number of elements to meet at a single node. The most common unstructured meshes are triangular (in 2D) and tetrahedral (in 3D), although quadrilateral and hexahedral unstructured meshes are possible. Unstructured meshes are more flexible in fitting complicated domains, can provide rapid grading from small to large elements and are relatively easier to refine (increase

57 3.3. HOW TO DISCRETIZE THE DOMAIN: MESH 101 Node (a) Element (b) (c) Figure 3.2: Types of finite elements. (a) One-dimensional line elements; (b) twodimensional elements: three-node triangle, four-node quadrilateral; (c) three-dimensional elements: four-node tetrahedron, eight-node hexahedron, six-node prism (wedge) the number of elements) and de-refine (decrease the number of elements). Unstructured meshes can also be easy to create using built-in features. However, unstructured meshing may sometimes lead to very large number of elements and therefore structured meshing may be needed. The choice between structured and unstructured meshes for a simple domain is determined mainly by the discretization method (finite difference, finite element, etc.). A structured mesh generally helps to reduce the problem size by efficiently meshing the domain as needed. For a complex domain, however, unstructured meshes are preferred since the meshing process can be fully automatic and fast. Figure 3.4 shows an example of a structured and unstructured mesh created for the same rectangular geometry. Both structured and unstructured meshes can be generated in COMSOL. We now look at the different meshing capabilities of COMSOL Decisions before Meshing Some of the decisions needed in building a mesh are Unstructured vs. Structured (discussed above) Size No real basis to decide on absolute size. One starts with a reasonable number (such as the default values in COMSOL). See section Distribution Should there be a denser mesh in one region vs. another? This depends on physics. More nodes are needed where the variables are changing more rapidly

58 102 CHAPTER 3. SOFTWARE IMPLEMENTATION: HOW TO SOLVE (PREPROCESSING) A domain A (very coarse) mesh of the domain Figure 3.3: A geometry and its corresponding (very coarse) mesh formed using 2- dimensional 4-noded quadrilateral elements. Note that for this very coarse mesh, the curved boundary of the domain and the boundary of the mesh do not match that well Multiple domains? Do various subdomains within the overall geometry need to be meshed differently? In COMSOL, the above steps of structured/unstructured, size and distribution can be done separately for each domain

59 3.3. HOW TO DISCRETIZE THE DOMAIN: MESH 103 An unstructured mesh using triangular elements An structured mesh using quadrilateral elements Figure 3.4: Example of a) a structured mesh; (b) an unstructured mesh

60 104 CHAPTER 3. SOFTWARE IMPLEMENTATION: HOW TO SOLVE (PREPROCESSING) Meshing in COMSOL: 1D geometry In 1D problems, the computational domain is a line and meshing it leads to the creation of 1D line elements. Meshing in 1D always leads to a structured mesh. Example of a 1D mesh and its creation are shown in Figure 3.5.

61 3.3. HOW TO DISCRETIZE THE DOMAIN: MESH 105 (Easiest) Meshing in 1D, built-in size 1. Click on Mesh 1 in Model Builder window 2. Click on menu to select Physics controlled mesh 3. Click on menu below Element size to choose Normal 4. Click on Build All ❹ ❷ ❶ ❸ Nodes Element (1D domain with mesh consisting of sixteen 2-noded line elements) Figure 3.5: Meshing a 1D geometry using the default 2-node line elements (15 elements and 16 nodes

62 106 CHAPTER 3. SOFTWARE IMPLEMENTATION: HOW TO SOLVE (PREPROCESSING) Meshing in COMSOL: 2D geometry Unstructured (Free) mesh For 2D problems, unstructured mesh can be easily created in COMSOL using triangular elements. Even in an unstructured mesh, controls of size and distribution of elements are possible. Figures 3.6 shows creation of unstructured mesh, using all default values this is the easiest to create and its size can be easily changed as explained in the figure. Figures show control of size in the creation of an unstructured mesh while Figures show control of distribution of elements in the creation of an unstructured mesh. Structured (Mapped) mesh Structured mesh in 2D consists of quadrilateral elements. In COMSOL, structured mesh can be created using the default setting (Figure 3.12) or with control over size of quadrilateral elements(figures ) or distribution of quadrilateral elements(figures ). For domains with complex shapes, the boundaries have to be divided and meshed manually in order to create a structured mesh. (Easiest) Meshing in 2D, triangular elements, predefined sizes ❹ ❷ ❶ ❸ 1. Click on Mesh 1 2. Click on menu to select Physics-controlled mesh 3. Click on menu below Element size and choose Normal or any other 4. Click Build All Figure 3.6: Meshing a 2D domain the easiest way (with least amount of control), using free (unstructured) meshing technique consisting of triangular elements and predefined element sizes.

63 3.3. HOW TO DISCRETIZE THE DOMAIN: MESH 107 Meshing in 2D, triangular elements, predefined or custom size 1. Click on Mesh 1 2. Click and select User-controlled mesh 3. Right click on Mesh 1 and select Free Triangular (This creates an option Free Triangular 1 under Mesh 1) ❷ ❶ ❸ Figure 3.7: Meshing a 2D domain using free (unstructured) meshing technique consisting of triangular elements, with intent to control element size and distribution by choosing appropriate options as shown in following figures

64 108 CHAPTER 3. SOFTWARE IMPLEMENTATION: HOW TO SOLVE (PREPROCESSING) Meshing in 2D, triangular elements, predefined or custom size (continued from previous) 4. Right click on Free Triangular 1 and Select Size 5. Select Domain under Geometric entry level in Free Triangular window 6. Click on the chosen domain (can be the entire geometry) 7. Click on + sign (Domain number should appear under selection) ❺ ❼ ❹ Figure 3.8: Figure continued. Control of element size of free (unstructured) meshing using triangular elements.

65 3.3. HOW TO DISCRETIZE THE DOMAIN: MESH 109 Meshing in 2D, triangular elements, predefined or custom size (continued from previous) Predefined element sizes 8. Click next to predefined, to see drop-down menu 9. Choose from Normal, Fine, etc. Custom element sizes 8. Click on Custom 9. Choose from the list of Element Size Parameters, selecting only the ones needed ❽ ❽ ❾ ❾ Figure 3.9: Figure continued. Control of element size of free (unstructured) meshing technique using triangular elements, using predefined element sizes (left) or with complete control of element sizes (right)

66 110 CHAPTER 3. SOFTWARE IMPLEMENTATION: HOW TO SOLVE (PREPROCESSING) Meshing in 2D, triangular elements, custom distribution 1. Click on Mesh 1 2. Click and select User-controlled mesh in Mesh Settings window 3. Right click on Mesh 1 and select Free Triangular (This creates an option Free Triangular 1 under Mesh 1) 4. Right click on Free Triangular 1 and Select Distribution ❷ ❶ ❸ Figure 3.10: Control of element distribution of free (unstructured) meshing using triangular elements. ❹

67 3.3. HOW TO DISCRETIZE THE DOMAIN: MESH 111 Meshing in 2D, triangular elements, custom distribution (continued from previous) 5. Click on the chosen boundary 6. Click on + sign (Boundary number should appear under selection) 7. Click under Distribution properties and Select Predefined distribution type 8. Select the number of elements desired for this boundary 9. Select the ratio of the largest to smallest dimension 10. If needed, click on Reverse direction 11. Click on Build Selected ⓫ Chosen boundary ❻ ❼ ❺ ❽ 5 elements on this boundary ❾ (Largest/Smallest) Largest size Smallest size ❿ Figure 3.11: Figure continued from previous. Control of element distribution of free (unstructured) meshing using triangular elements.

68 112 CHAPTER 3. SOFTWARE IMPLEMENTATION: HOW TO SOLVE (PREPROCESSING) Meshing in 2D, quadrilateral elements (structured), predefined or custom sizes 1. Click on Mesh 1 2. Click and select User-controlled mesh in Mesh Settings window 3. Right click on Mesh 1 and select Mapped (This creates an option Mapped 1 under Mesh 1) 4. Right Click on Mapped 1 and Select Size (This creates Size window in Figures 3.13 or 3.14) 5. To select predefined size, Go to Figure 3.13; To select custom size Go to Figure 3.14 ❷ ❶ ❸ ❹ Figure 3.12: Meshing a 2D domain using mapped (structured) meshing technique consisting of quad (quadrilateral) elements, with intent to control element size by choosing appropriate options as shown in following figures.

69 3.3. HOW TO DISCRETIZE THE DOMAIN: MESH 113 Meshing in 2D, quadrilateral elements (structured), predefined sizes (continued from previous) ❺ ❼ 5. Select Domain under Geometric entry level in Size window 6. Click on the chosen domain in Graphics window (can be the entire geometry) 7. Click on + sign (Domain number should appear under selection) 8. Click next to predefined, to see drop-down menu 9. Choose from Normal, Fine, etc. 10. Click Build Selected (mesh below appears; note that the exact size was not in our control) ❽ ❾ Figure 3.13: Meshing a 2D domain using mapped (structured) meshing technique consisting of quad elements, using predefined element sizes

70 114 CHAPTER 3. SOFTWARE IMPLEMENTATION: HOW TO SOLVE (PREPROCESSING) Meshing in 2D, quadrilateral elements (structured), custom size (continued from Figure 3.12) ❿ ❺ ❼ ❽ ❾ 5. Select Domain under Geometric entry level in Size window 6. Click on the chosen domain (can be the entire geometry) 7. Click on + sign (Domain number should appear under selection) 8. Click on Custom 9. Choose from the list of Element Size Parameters, selecting only the ones needed 10. Click Build Selected (mesh below appears; note that the mesh uses the exact size of 0.05) Figure 3.14: Meshing a 2D domain using mapped (structured) meshing technique consisting of quad elements, with complete control over element size

71 3.3. HOW TO DISCRETIZE THE DOMAIN: MESH 115 Meshing in 2D, quadrilateral elements (structured), custom distribution 1. Click on Mesh 1 2. Click and select User-controlled mesh in Mesh Settings window 3. Right click on Mesh 1 and select Mapped (This creates an option Mapped 1 under Mesh 1) 4. Right Click on Mapped 1 and Select Distribution (This creates Distribution window; see following figure) ❷ ❶ ❸ ❹ Figure 3.15: Meshing a 2D domain using mapped (structured) meshing technique consisting of quad elements, with control over element distribution. Figure continued

72 116 CHAPTER 3. SOFTWARE IMPLEMENTATION: HOW TO SOLVE (PREPROCESSING) Meshing in 2D, quadrilateral elements (structured), custom distribution (continued from previous) 5. Click on the chosen boundary 6. Click on + sign (Boundary number should appear under selection) 7. Repeat steps 5 and 6 for the opposite boundary 8. Click under Distribution properties and Select Predefined distribution type 9. Select the number of elements desired for this boundary 10. Select the ratio of the largest to smallest dimension 11. If needed, click on Reverse direction 12. Repeat steps 5-11 for the other two sides 13. Click Build Selected (mesh shown below appears) ⓭ ❻ ❼ ❽ ❾ ❿ Largest/smallest = 3 ⓫ 5 elements on this boundary First ❺ boundary chosen Second (opposite) boundary chosen Figure 3.16: Meshing a 2D domain using mapped (structured) meshing technique consisting of quad elements, with control over element distribution

73 3.3. HOW TO DISCRETIZE THE DOMAIN: MESH 117 Meshing in COMSOL: 3D geometry For a 3D geometry, three different types of meshes are possible a) fully structured mesh, b) fully unstructured mesh, c) combination of unstructured and structured mesh. Unstructured mesh Unstructured mesh in a 3D geometry consists of tetrahedral elements as shown in Figure 3.17 this is also the easiest way to mesh a 3D geometry, instructions for which are shown in this figure. Combination Unstructured and Structured mesh Structured mesh in 3D consists of hexahedral or prism shaped elements as shown in Figure Instead of making a fully structured mesh, one can combine unstructured and structured mesh. For this, as shown in Figure 3.19, the boundary can be meshed using unstructured elements (triangles) and then this triangular mesh can be swept to create the 3D mesh. In this case the 3D elements that are formed are prismatic in shape and are structured in the direction of the sweep. In the direction perpendicular to the direction of the sweep, the mesh is unstructured. To create a fully structured mesh in COMSOL for a 3D problem, instead of Triangular under Face meshing method, Quadrilateral can be chosen (not shown here).

74 118 CHAPTER 3. SOFTWARE IMPLEMENTATION: HOW TO SOLVE (PREPROCESSING) (Easiest) Meshing in 3D, tetrahedral elements (unstructured), predefined sizes 1. Click on Mesh 1 2. Click on menu to choose Physics-controlled mesh 3. Click on menu below Element size and choose Normal or any other 4. Click Build All (mesh shown below appears) ❹ ❷ ❶ ❸ Figure 3.17: Meshing a 3D geometry, the easiest way, using default tetrahedral elements

75 3.3. HOW TO DISCRETIZE THE DOMAIN: MESH 119 Meshing in 3D, sweeping a 2D triangular or quadrilateral mesh on a face 1. Right Click on Mesh 1 2. Select Swept 3. Size and Swept 1 appears (right figure) 4. Click on Swept 1 (window Swept on following page appears) ❶ ❷ ❸ ❹ Figure 3.18: Meshing a 3D geometry, by first meshing a face and sweeping the face through the volume. Continued

76 120 CHAPTER 3. SOFTWARE IMPLEMENTATION: HOW TO SOLVE (PREPROCESSING) Meshing in 3D, sweeping a 2D triangular or quadrilateral mesh on a face (continued from previous) ❿ ❺ ❼ ❻ ❽ 5. Click on menu next to Geometry entry level and select Domain 6. Click on the domain needed and Click + 7. Click on Source Faces window 8. Click on one face and Click + 9. Click menu below Face meshing method and select Triangular or Quadrilateral 10. Click Build Selected (mesh below appears) Chosen face ❾ Figure 3.19: Meshing a 3D geometry, by first meshing a face and sweeping the face through the volume

77 3.3. HOW TO DISCRETIZE THE DOMAIN: MESH Deciding on a Mesh The right number of elements to use in a problem is not very obvious. The choice depends on many solution parameters. In practice, one refines the mesh until the solution does not change (see Figure 3.20). The correct solution should not depend on mesh and it is important to show this step to convince the validity of the results. This process is known as mesh convergence analysis and is discussed in detail in Section 5.3 (Page 174). The idea is to use as few elements as possible, but use enough. Computation can easily become intensive. The amount of time needed to form the element matrices increases linearly with number of elements and can take 20-80% of the total time. The rest of the time is taken to solve the equations and depends on the solution methods used. Figure 3.21 shows how the computational time increases with increase in number of elements in the mesh for a drug diffusion example (Case Study III on Page 253). Increased mesh density, therefore, can reduce error but increases computing time. Uniform mesh may require very large number of nodes to solve some problems. To reduce the total number of elements, a non-uniform mesh is used with more elements in the region where spatial variations are more significant.

78 122 CHAPTER 3. SOFTWARE IMPLEMENTATION: HOW TO SOLVE (PREPROCESSING) Choose a mesh based on preliminary understanding of the physics Solve Does solution look realistic? No Refine mesh (also, check time step) Yes Does solution look smooth and converged, compared to the previous solution? No Yes Accept solution Figure 3.20: Typical procedure for mesh refinement, to obtain an acceptable mesh

79 3.3. HOW TO DISCRETIZE THE DOMAIN: MESH Computation time (CPU seconds) Number of elements used in the mesh Figure 3.21: As the number of elements in the mesh increases, computation time also increases. Somewhat linear increase, as shown for this problem, is not always true and computation time can increase faster than increase in the number of elements.

80 124 CHAPTER 3. SOFTWARE IMPLEMENTATION: HOW TO SOLVE (PREPROCESSING) 3.4 How to Choose a Time Step For numerical solution of a time-dependent (transient) problem, the end time for which the problem needs to be solved can only be approached in small increments. For such problems, the time step increments (t) that the solver takes to solve the governing equations is critical. If the time step size is too large, the solution may be unrealistic or unstable (see discussion in Section 10.13, Page 507 for theory and details). Small time step generally provides more accurate results, but needs more computation. Therefore the choice of time step increment in the solver is critical and once the mesh is decided (see previous section), the next task is to select an appropriate time step. Time steps can be fixed or variable. Fixed time stepping refers to the case when the time steps (t) taken by the solver are the same from the beginning to the end of the solution process. In case of variable time stepping, the solver automatically changes the time steps by calculating errors at each increment and modifying the time step accordingly. Deciding on the time step is far from trivial. It is topic for many researchers and many research articles have been written on it. When the solution is changing rapidly with time, smaller time steps are necessary. Conversely, when variables are not changing rapidly with time, large time steps may be acceptable. In a transient problem, it is generally a good idea to use variable t such that small time steps are used when the solution is changing rapidly and large time steps are used when the solution is not changing rapidly. Sometimes, very small time steps need to be forced, particularly initially. In practice, time step is chosen primarily by trial and error. Figure 3.22 shows a schematic of the typical iterative process for a transient problem.

81 3.4. HOW TO CHOOSE A TIME STEP 125 Choose a time step Solve Does solution look realistic? No Reduce time step (also, check mesh) Yes Does solution look converged, compared to the previous solution? No Yes Accept solution Figure 3.22: Typical procedure for choosing time step in a transient calculation

82 126 CHAPTER 3. SOFTWARE IMPLEMENTATION: HOW TO SOLVE (PREPROCESSING) Implementation of Time step in COMSOL Before specifying the time steps (that the solver takes for obtaining the solution) in COM- SOL, we need to specify the times at which the solution is saved. Specifying End Times and Times at which Variables are Saved To save the solution to the time-dependent model at specific times, the output times are entered in the Times field under Study Settings as shown in Figure The notation range(0,0.1,1) directs COMSOL to save the solution starting at time, t = 0 s, with steps of 0.1 s up to the end time t = 1s. Here, 1 is the end time of the simulation. 1. Click on Step 1: Time Dependent under Study 1 2. Specify Times under Study Settings in the Time-Dependent Window 1 2 Figure 3.23: Specifying output times (specific times in a transient calculation for which the solution is saved). Specifying the Solver Time Steps There are three options to specify time increments in COMSOL: 1. Default: By default, COMSOL uses variable time steps. It decides on the variable time step size automatically depending on the problem using either backward differentiation formulas (BDF) (Brown et al., 1994) or Generalized alpha time stepping algorithm. The time stepping algorithm can be chosen as shown in Figure Fixed Time Steps: The problem can be made to run with fixed time steps in COM- SOL. These settings are described in Figure Variable Time Steps: Parameters in variable time step integration can also be controlled by the user as shown below. For variable time step integration, the time

83 3.4. HOW TO CHOOSE A TIME STEP 127 increments for successive steps are determined by the error control via the tolerances set by the user (discussed in the Section 3.5.2). The parameters used to control the time step size in the Solver Parameters panel in COM- SOL are shown in Figure Click on Time-Dependent Solver 1 under Study 1 >> Solver Configurations 2. Select Time Stepping method in the Time-Dependent Solver Window 3. Select the Steps taken by solver as Free, Strict, or Intermediate 4. Provide the Initial time step 5. Provide the Maximum time step Figure 3.24: Time Stepping Options in COMSOL We will now describe some of the parameters shown in Figure Steps taken by solver can be specified as Free, Intermediate or Strict. The Free options allows the solver to select the time steps freely without considering the times specified for saving the variables. This is generally not desirable as variable values at the intermediate times needed for storing the solution would be interpolated. The Intermediate option makes sure that at least one solver time step is taken in each interval of the times specified for storing the solution. For example, as shown in Figure 3.23, if the Times are specified as range(0,0.1,1), at least one solver time step will be used in each 0.1 s time interval. The Strict option enforces solver to take time steps at the times for storing the solution. In the above example, the solver would use steps at 0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9 and 1 s. Additional steps in between these intervals would be taken if needed. Initial Step is the time step size entered by the user that the solver uses for the first time increment. Maximum Step is the time step size entered by the user to limit the time

84 128 CHAPTER 3. SOFTWARE IMPLEMENTATION: HOW TO SOLVE (PREPROCESSING) increment taken by the solver at any step. Set the Initial Step equal to the Maximum Step to force fixed time stepping for the problem. Set the Initial Step and Maximum Step differently to use variable time stepping for the problem (default in COMSOL). 3.5 How to Choose a Solver to Solve the System of Linear Equations Using the finite element method, the governing partial differential equations are converted to a linear system of equations. Therefore a linear system of equations is solved eventually by the computational software to obtain the solution. Two different approaches exist for solving the linear set of equations direct or iterative method. Direct method uses Gaussian elimination for obtaining the solution. The advantage of the direct method is that a solution is always obtained after a finite number of operations. However, for large simulations (more than about 100,000 degrees of freedom), the computer memory and CPU time required by a direct solver becomes very large. Iterative methods obtain solution starting from an initial guess and converging to the exact solution in a finite number of iterations. The advantage of iterative methods is that it may reduce storage and CPU time requirements. However, it may also lead to slow or irregular convergence depending on the problem. Therefore depending on the solver chosen, memory requirement and speed of the solution varies. It is hard to have general guidelines. For small sets of equations, it is not critical to choose a solver. COMSOL uses its in-built algorithm to decide on the default solver based on the problem type. For example, for large 3D problems it may select an iterative solver. You can always change the default solver selected by COMSOL. The reader is directed to Chapter 10 (starting Page 488) for the detailed theory behind the finite element method, solution of linear system of equations, and discussion about direct and iterative solvers Solver Selection in COMSOL The type of linear system solver to be used for solving the equations can be selected in COMSOL as shown in Figure The different direct and iterative linear system solvers available in COMSOL are: Direct Solvers: 1. PARDISO- Parallel Direct Sparse Solver 2. SPOOLES- Sparse Object Oriented Linear Equations Solver 3. MUMPS- Multifrontal Massively Parallel sparse direct Solver Iterative Solvers: 1. GMRES- Generalized Minimum Residual iterative method 2. Conjugate Gradients 3. FGMRES- Flexible Generalized Minimum Residual iterative method 4. BiCGStab-Biconjugate Gradient Stabilized iterative method

85 3.5. HOW TO CHOOSE A SOLVER TO SOLVE THE SYSTEM OF LINEAR EQUATIONS Click on Fully Coupled 1 under: Study 1>>Solver Configurations>>Solver 1>>Time Dependent Solver 1 2. Select Direct or Iterative under Linear Solver in the Fully Coupled Window 3. Open the Direct or Iterative solver parameters window by clicking on Direct or Iterative under Time Dependent Solver 1 4. Set the solver parameters Figure 3.25: Choosing a solver in COMSOL to solve the linear system of equations from the finite element formulation of governing equation and boundary condition.

86 130 CHAPTER 3. SOFTWARE IMPLEMENTATION: HOW TO SOLVE (PREPROCESSING) We will discuss two most common solvers that are used for solving the types of problems covered in this text. One is a direct solver and the other one is iterative. 1. PARDISO: The direct solvers PARDISO is preferable for 1D and 2D models as well as 3D models with few degrees of freedom. 2. GMRES: GMRES linear system solver uses the restarted generalized minimum residual method, which is an iterative method for solution of general linear systems of equations. This solver should be used for models with many degrees of freedom (more than 100,000) for which the direct solver needs too much memory Setting Tolerances for a Time Dependent Problem At the end of each iteration, the solution obtained needs to be checked to see whether it has converged within the preset tolerances if it is diverging. This is done automatically by the solver depending on the values of absolute and relative tolerances set by the user. These tolerances control the error due to discretization in time for each time step. For details about the different errors and their definition, refer to Section (Page 505). In COMSOL, the tolerance values for a problem can be changed by entering new values in the Relative tolerance (shown in Figure 3.23) and Absolute tolerance fields (shown in Figure 3.24). The default value of Relative tolerance in COMSOL is It may be desirable in some problems to increase or decrease this value to control the accuracy or performance of the solver. Similarly the absolute tolerance, which has a default value of 0.001, needs to be changed for a particular problem depending on the absolute values of the solution parameters. For example, for a heat transfer problem with expected temperatures in the range of K, the value of absolute tolerance is very small compared to temperatures obtained in the simulations (0.001 << 273 K) and therefore the absolute tolerance may need to be increased for faster solution of the problem. 3.6 Problems Guidelines for mesh and time-step What are the general guidelines for 1) selecting the mesh (number of nodes and their placements); 2) selecting the time step in a transient problem? Need for non-uniform mesh We prefer to use a non-uniform mesh in the problem of therapeutic heating (See Problem on page 40) for which a schematic is shown in Figure Sketch how you would like to mesh the domain, giving reasons for your choice Choice of mesh For each problem formulation question in Chapter 1 (Page 34), determine what kind of mesh is needed from these choices: structured or unstructured, uniform or non-uniform. If

87 3.6. PROBLEMS 131 a non-uniform mesh is required, show the regions with higher density of mesh elements. Explain the reason for your choice Choice of mesh: Case Studies VI, VIII, IX and X Consider the software implementation of Case Studies VI (page 285), VIII (page 309), IX (page 319) and X (page 335). Specify the type of mesh used for each case study: structured/ unstructured, uniform/ non-uniform. Comment whether the meshing strategies are appropriate. Explain why or why not Choice of time steps- Case Studies I, II, III and IV Complete Case Studies 1 (page 217), II (page 233), III (page 253) and IV (page 267). Demonstrate that the results are independent of the time steps chosen for each case study. Refer to the discussion in Section 3.4 (page 124) and flowchart shown in Figure 3.22 (page 125) to perform the analysis.

88 132 CHAPTER 3. SOFTWARE IMPLEMENTATION: HOW TO SOLVE (PREPROCESSING)

89 Chapter 4 Software Implementation: Visualizing and Manipulating Solution (Postprocessing) In the previous two chapters, the mathematical model consisting of the governing equations and boundary conditions were implemented in a software, together with instructing the software how to solve the equations. These steps together are called preprocessing as discussed earlier. After these steps, the computer simply solves the equations a step called processing that is completely automated. Once a solution is available, we can visualize and analyze it to make sense of it. Remember computational results are not a solution to our problem until we have validated the results (topic of next chapter). This chapter simply presents ways of visualizing and manipulating the results of computation using a software, and its relation to other chapters is shown in Figure 4.1. This stage is also called post-processing. Post processing is the further processing of the raw data produced by the computation. A simple post-processing step could be the display as a graph of the data produced by computations, for example, a plot of concentration calculated at a point as a function of time. Standard quantities to be displayed or standard computations to be made are built into a typical software. If this is all that is needed, one simply learns the respective commands from the software interface. Sometimes and especially for a newcomer to modeling, it may not be obvious as to which raw or derived information is most relevant in relating back to the physical problem. Thus, in this chapter, we first give examples of the different types of information that are useful in various biomedical situations. The rest of the chapter simply shows how to obtain the information in one particular software, namely COMSOL. We skip details when the software makes it quite obvious to get a particular parameter. 133

90 134 CHAPTER 4. SOFTWARE IMPLEMENTATION: VISUALIZING AND MANIPULATING SOLUTION (POSTPROCESSING) Tell software what results to be displayed and how This chapter Biomedical Problem Mathematical Analog Solution Design and Optimization Figure 4.1: Visualization and manipulation of the solution are the subjects of this chapter. 4.1 Useful Information in Biomedical Context Information at a Location Temperature or concentration at a location, at any time or as a function of time, is the simplest type of information that may be necessary. Spatial Average Sometimes detailed variation is not that important and an average value over a region is all that is needed. For example, in therapeutic heating, average temperature for a region may be of interest. In drug delivery, average concentration over a region may be the quantity we are interested in. Spatial Variation Simplest information on spatial variation is to locate the point or region for maximum or minimum values. For example, in cryosurgery, we may be interested in the boundary of the region over which the temperature is less than 45 ı C, which would be the region where tissue destruction by freezing occurs. A more comprehensive way to provide spatial variation over a region for a continuous variable such as temperature or concentration is to have contours. For a quantitative representation of variations or uniformity in a region, a statistical measure such as standard deviation can be used. Time Variation Time variation for a single location can be provided as a function of time as a line graph. Time variation for an entire region as a function of time can be provided as a series of contour plots or, more effectively, as a movie. Although mostly qualitative, a movie is very effective in obtaining a visual picture of how the quantities change with time. One may be interested in how much of drug entered through a particular boundary as function of time. This means the time-varying flux has to be integrated over time. Secondary quantities Example of a secondary quantity is heat or mass flux at a location on a surface. This is useful for example, when a certain amount of drug per unit area and per unit time has to enter a surface. Time variation of flux is also important in drug delivery as in many cases an attempt is made to obtain more or less a constant rate of release over time.

91 4.1. USEFUL INFORMATION IN BIOMEDICAL CONTEXT 135 Another example of a secondary quantity is mass balance at a location. For example, often in drug delivery, we would like to know how much drug has left the drug capsule. This can be found by knowing how much drug is remaining at the drug capsule and subtracting that from the initial amount of drug in the capsule. Arbitrary Functions We often require customized information that depends on the variables calculated. For example, thermal conductivity may be some function of temperature (e.g., k D 0:4692 C 0:001161T ) and we would like to plot the variation of thermal conductivity in the domain. We can define functions of concentration or temperature according to our need. Examples of various postprocessing options (computation and display of above quantities) from the Case Studies in Chapter 6 are listed in Table 4.1. The reader is referred to the appropriate pages of these Case Studies. Table 4.1: Postprocessing used in the different case studies. Reader is referred to the corresponding Case Studies (listed on Page 212) for examples of use. Postprocessing Example in Case Study Information at a Location Spatial Average Spatial Variation Time Variation Secondary Quantities Arbitrary Functions I, II, III, IV, IX X I, II, III, V, VI, VII, VIII, IX, X I, II, III, IV, VII, IX V II (objective function), IV (amount absorbed) Table 4.2: Commonly used variables in COMSOL. Variable Symbol Time Location Temperature Concentration Velocity t x, y, z (for 3D problem); x, y (for 2D); r, z (for axi-symmetric) T c, c2, c3, etc. u, v, w We will now look at the detailed steps of how to obtain the plots of the quantities just mentioned, in COMSOL. Table 4.2 lists the most commonly used variables in COMSOL.

92 136 CHAPTER 4. SOFTWARE IMPLEMENTATION: VISUALIZING AND MANIPULATING SOLUTION (POSTPROCESSING) The symbols shown in the table can be used to access the solution variables to define expressions and functions during postprocessing (as well as preprocessing). 4.2 Obtaining data at a particular location The value of a computed variable at any particular location in the domain may be needed during post processing. The point of interest may either be a vertex that was created during the geometry creation process or any other arbitrary location inside the geometry. To obtain data at a vertex, right click on Derived Values under the Results node and select Point Evaluation: Path: Results >> Derived Values >> Point Evaluation Inputs: 1. In the Graphics window, left click on the appropriate point to highlight it and then right click anywhere else to add it to the Selection under Manual setting.

93 4.2. OBTAINING DATA AT A PARTICULAR LOCATION Select the variable for which the data is needed from Insert Expression list or Replace Expression list or type an expression using the computed variables in the Expression field. For example, to get temperature at the point, select Temperature, which can be found in Heat Transfer variables, under the Insert Expression list. For obtaining some function of temperature at the selected point such as 0:4692 C 0:001161T, set 0:4692 C 0: T as Expression. Similarly, different mathematical functions can be used using any combination of variables that are solved in the problem. 3. If the problem is time-dependent, select the time at which the data is needed from Time Selection menu. Make sure that Data Set is selected as Solution 1 (the current solution). 4. Right click on the previously added Point Evaluation node in the Model Builder window and select a Table under Evaluate to display the data.

94 138 CHAPTER 4. SOFTWARE IMPLEMENTATION: VISUALIZING AND MANIPULATING SOLUTION (POSTPROCESSING) To obtain data at any arbitrary location, first define the location: Right click on Data Sets under the Results node and select Cut Point 1D, Cut Point 2D or Cut Point 3D for a 1D, 2D or 3D problem accordingly: Path: Results >> Data Sets >> Cut Point 1D/2D/3D Then to obtain the data at the defined location, right click on Derived Values under the Results node and select Point Evaluation: Path: Results >> Derived Values >> Point Evaluation

95 4.2. OBTAINING DATA AT A PARTICULAR LOCATION 139 Inputs: 1. Under Cut Point 1D/2D/3D, set the coordinates of the desired point under Point Data. For a 2D problem specify x and y coordinates, for an axi-symmetric problem specify r and z and for a 3D problem set x, y and z. 2. Under Point Evaluation, set Data Set as Cut Point 1D/2D/3D making sure it matches with the cut point defined under Data Set node in the Model Builder window. 3. Use other settings as described for obtaining data at a vertex above. The value of the selected variable is shown in form of a table in the message log (which is the area below the graphics panel in the main COMSOL window). Example: Using the Burn Injury in Blood-Perfused Skin case study (Page 309), we will now obtain the degree of tissue injury at the location (0.002, 0.004) at 15 s. 1. Select Results >> Data Sets >> Cut Point 2D. 2. Set r as and z as under Point Data with Entry Method set as Coordinates. 3. Select Results >> Derived Values >> Point Evaluation. 4. Set Data Set to Cut Point 2D Select Transport of Diluted Species >> Species(c) >> Concentration (c) in the Replace Expression list. 6. Set Time Selection as From list and select 15 under Time. 7. Select Point Evaluation 1 >> Evaluate >> New Table. The result is displayed in a table in the message log. The value of degree of tissue injury is given as at the specified location which corresponds to second to third degree burn (refer to the case study for details).

96 140 CHAPTER 4. SOFTWARE IMPLEMENTATION: VISUALIZING AND MANIPULATING SOLUTION (POSTPROCESSING) 4.3 Plotting transient data at one or more points, line or surface as function of time To plot a variable as a function of time (for a time-dependent problem) at a vertex, right click on 1D Plot Group under the Results node and then select Point Graph under 1D Plot Group: Path: Results >> 1D Plot Group >> Point Graph Inputs: 1. Select the variable to plot from Insert Expression list or Replace Expression list or type an expression using the list of computed variables in the Expression field. 2. In the Graphics window, left click on the appropriate point to highlight it and then right click anywhere else to add it to the Selection under Manual setting. 3. In the 1D Plot Group node, select the times to be used in the plot under Time selection. By default, all output times are selected.

97 4.3. PLOTTING TRANSIENT DATA AT ONE OR MORE POINTS, LINE OR SURFACE AS FUNCTION OF TIME141 To plot a variable as a function of time, first define the location: Right click on Data Sets under the Results node and select Cut Point 1D, Cut Point 2D or Cut Point 3D for a 1D, 2D or 3D problem accordingly: Path: Results >> Data Sets >> Cut Point 1D/2D/3D Then to obtain the plot at the defined location, right click on 1D Plot Group under the Results node and then select Point Graph under 1D Plot Group: Path: Results >> 1D Plot Group >> Point Graph Inputs: 1. Under Cut Point 1D/2D/3D, set the coordinates of the desired point under Point Data. For a 2D problem specify x and y coordinates, for an axi-symmetric problem specify r and z and for a 3D problem set x, y and z. 2. Under 1D Plot Group, set Data Set as Cut Point 1D/2D/3D making sure it matches with the cut point defined under Data Set node in the Model Builder window.

98 142 CHAPTER 4. SOFTWARE IMPLEMENTATION: VISUALIZING AND MANIPULATING SOLUTION (POSTPROCESSING) 3. Use other settings as described for plotting a variable at a vertex above. To plot the transient data at more than one point on the same graph, define desired number of points by adding Cut Point 1D/2D/3D for each point. Then, add the corresponding number of Point Graphs under the same 1D Plot Group node and use the settings as described above. Similarly, any variable can be plotted along a specified line (in case of 1D/2D/3D problem) or surface (in 2D/ 3D problem) by using Cut Line 2D/3D option under Data Sets for defining the line first and then adding a Line Graph under 1D Plot Group. Examples: We will use Case Study X (Page 335) to demonstrate this transient line plot. Let s say we want to plot the pressure at a line along the z-axis in the capillary at 3 different times.

99 4.4. OBTAINING SURFACE/ CONTOUR PLOTS (IN 2D PROBLEMS) FOR OBSERVING VARIATION WITHIN A REGION Right click on Data Sets under the Results node and select Cut Line 2D 2. Under Cut Line 2D, define the line by selecting Line entry method as Two points and setting r and z for Point 1 as 1E-6 and 0, respectively and for Point 2 as 1E-6 (r) and 100E-6 (z). 3. Right click on the Results node and select 1D Plot Group. 4. Under 1D Plot Group, set Data Set as Cut Line 2D created above. 5. Under 1D Plot Group, set Time selection as From list and select 0, 600 and 1200 under Time. 6. Right click on the 1D Plot Group node created above and select Line Graph. 7. Under Line Graph, select Pressure (p) from the Laminar Flow variables by clicking on the Replace Expression button. 8. Right click on the previously added Line Graph node in the Model Builder window and select Plot. It is seen that the pressure falls linearly from 2307 to 1160 (specified boundary conditions) along the length of the capillary. The pressure drop is same at different times. Another example of transient data plot at a vertex can be seen in the Case Study IX (Page 319). Examples of transient data plot at arbitrary points can be seen in Case Studies I (Page 217), II (Page 233) and III (Page 253). An example of line plot at different times can be seen in Case Study VII (Page 299). An example of line plot at steady state (for a steady state problem) can be seen in Case Study V (Page 277). 4.4 Obtaining surface/ contour plots (in 2D problems) for observing variation within a region To plot a variable over a subdomain (in 2D problems) in order to look at the spatial variation, use the Contour or Surface plot option under Results >> 2D Plot Group. Contour plots in COMSOL are plots that show the variation of a particular variable in a subdomain by lines of constant magnitude. Surface plots (in COMSOL) are color-filled plots that show the variation using a continuous color display instead of discrete lines representing specific values. Both types of plots (contour and surface) essentially display the same information and should be used as needed. As a result, in some places in the text, the phrase contour plot has been used interchangeably with surface plot and describes both these types of plots. To generate a contour plot, right click on 2D Plot Group under the Results node and then select Contour under 2D Plot Group: Path: Results >> 2D Plot Group >> Contour (in 2D problems)

100 144 CHAPTER 4. SOFTWARE IMPLEMENTATION: VISUALIZING AND MANIPULATING SOLUTION (POSTPROCESSING) Inputs: 1. Select the variable to plot from Insert Expression list or Replace Expression list or type an expression using the list of computed variables in the Expression field. 2. Set the number of contour levels in the Total levels field by selecting Entry method as Number of levels. This will divide the data automatically into the number of levels that are specified. You can also plot the data at specific levels. Use the Levels option under Entry method and specify the levels in this case. 3. In the 2D Plot Group node, select the time to be used in the plot under Time dropdown list. 4. Right click on the 2D Plot Group node in the Model Builder window and select Plot. To generate a surface plot, right click on 2D Plot Group under the Results node and then select Surface under 2D Plot Group: Path: Results >> 2D Plot Group >> Surface (in 2D problems)

101 4.4. OBTAINING SURFACE/ CONTOUR PLOTS (IN 2D PROBLEMS) FOR OBSERVING VARIATION WITHIN A REGION 145 Inputs: 1. Select the variable to plot from Insert Expression list or Replace Expression list or type an expression using the list of computed variables in the Expression field. 2. The plots will be created using a range of values automatically calculated by the software. To change this range select Range and specify the minimum and maximum values. 3. In the 2D Plot Group node, select the time to be used in the plot under Time dropdown list. 4. Right click on the 2D Plot Group node in the Model Builder window and select Plot. Additional options for surface and contour plots For both these contour and surface plots, additional conditions can be specified so that the output satisfies these constraints. For example, if the domain for the problem is 1 m and you want to look at the variation only for distances in the x direction up to 0.1 m. This can be specified under the Filter option in the Surface/Contour node under the 2D Plot Group node as shown below. Any logical expression involving any variable in the problem may be used as the condition. This condition is particularly important in 3D geometries if you want a surface/contour plot for only one particular subdomain.

102 146 CHAPTER 4. SOFTWARE IMPLEMENTATION: VISUALIZING AND MANIPULATING SOLUTION (POSTPROCESSING) Path: Results >> 2D Plot Group >> Contour/Surface>> Filter Input: Specify the constraint under Logical expression for inclusion under Filter. These settings are used in addition to the surface/contour plot settings discussed earlier. Examples: We will now use the case study on Thermal Ablation of Hepatic Tumors (Page 217) to obtain surface plot of temperature and plot the region that has temperature greater than 50 ı C (323 K) at the end time. 1. Right click on the Results node and select 2D Plot Group. 2. Under 2D Plot Group, set Time as Right click on the 2D Plot Group node created above and select Surface. 4. Under Surface, select Temperature (T) from the Heat Transfer variables by clicking on the Replace Expression button. 5. Right click on the Surface node created above and select Filter. 6. Under Filter, set Logical expression for inclusion as T> Right click on the previously added Surface node in the Model Builder window and select Plot. An alternate method to obtain the same plot would be to change Range of temperatures to be plotted in the options under Surface. It is seen that only the region of the tumor close to the probe is heated to temperatures greater than 50 ı C and locations of the tissue farther away from the probe are not heated. This confirms that the procedure is effective. Additional examples of surface and contour plots can be seen in Case Studies I (Page 217), II (Page 233), III (Page 253), V (Page 277), VIII (Page 309) and X (Page 335).

103 4.4. OBTAINING SURFACE/ CONTOUR PLOTS (IN 2D PROBLEMS) FOR OBSERVING VARIATION WITHIN A REGION 147

104 148 CHAPTER 4. SOFTWARE IMPLEMENTATION: VISUALIZING AND MANIPULATING SOLUTION (POSTPROCESSING) 4.5 Obtaining surface plot in a 3D problem In 3D problems, spatial variations can be plotted using surface plot for the entire geometry (or a part of it) or taking cross sections at different parts of the geometry and obtaining surface plots at those sections. To generate a surface plot for the entire geometry, right click on 3D Plot Group under the Results node and then select Surface under 3D Plot Group: Path: Results >> 3D Plot Group >> Surface (in 3D problems) Inputs: 1. Select the variable to plot from Insert Expression list or Replace Expression list or type an expression using the list of computed variables in the Expression field. 2. The plots will be created using a range of values automatically calculated by the software. To change this range select Range and specify the minimum and maximum values.

105 4.5. OBTAINING SURFACE PLOT IN A 3D PROBLEM In the 3D Plot Group node, select the time to be used in the plot under Time dropdown list. 4. Right click on the 3D Plot Group node in the Model Builder window and select Plot. 5. To plot a particular region of the geometry: Right click on the Surface node created above, select Filter and then under Filter, set the Logical expression for inclusion (usage described in detail in the previous section). To generate surface plots at different sections of the geometry,right click on 3D Plot Group under the Results node and then select Slice under 3D Plot Group: Path: Results >> 3D Plot Group >> Slice (in 3D problems)

106 150 CHAPTER 4. SOFTWARE IMPLEMENTATION: VISUALIZING AND MANIPULATING SOLUTION (POSTPROCESSING) Inputs: 1. Select the variable to plot from Insert Expression list or Replace Expression list or type an expression using the list of computed variables in the Expression field. 2. Define the Plane as xy, yz or zx. 3. Set the number of slices (cross sections) in the Planes field keeping Entry Method as Number of planes. This is will divide the geometry automatically into the number of planes (slices) that are specified. You can also plot the data at a specific plane (slice). Use the Coordinates option under Entry Method and specify the coordinates. Examples: The case study on Flow in human carotid artery bifurcation (Page 285) will be used to demonstrate the process of obtaining surface plot in the geometry at the end time. 1. Right click on the Results node and select 3D Plot Group.

107 4.6. OBTAINING AVERAGE VALUES AT A PARTICULAR TIME OR AS A FUNCTION OF TIME Under 3D Plot Group, set Time as 0.75 (end time). 3. Right click on the 3D Plot Group node created above and select Surface. 4. Under Surface, select Velocity Magnitude (spf.u) from the Laminar Flow variables by clicking on the Replace Expression button. 5. Right click on the previously added Surface node in the Model Builder window and select Plot. We can confirm from the figure that no slip boundary condition is satisfied at the wall. It is also observed that near the bifurcation the flow stagnates at the outer side of the internal carotid artery. Another example of obtaining a slice plot in a 3D problem can also be found in the same case study. 4.6 Obtaining average values at a particular time or as a function of time The average value of a variable in the entire region or a part of it and its variation with time (for a time dependent problem) can be obtained in COMSOL. To obtain average values of a variable at any particular time or as a function of time, right click on Derived Values under the Results node and select Volume/Surface/Line Average based on the dimensions (3D/2D/1D) of your problem: Path: Results >> Derived Values >> Average >> Volume/Surface/Line Average Inputs: 1. Select the variable for which you would like to find the average from Insert Expression list or Replace Expression list or type an expression using the list of computed variables in the Expression field. 2. Select the appropriate region (subdomain) for which the average value needs to be obtained from the Selection list. 3. Select the times for which the average values are needed from the Time Selection list. 4. For axi-symmetric problems, check Compute volume integral under Integration Settings. 5. Right click on the previously added Volume/Surface/Line Average node in the Model Builder window and select a Table under Evaluate to display the data. The average value of the selected variable is shown in form of a table in the message log (area below the graphics panel in the main COMSOL window).

108 152 CHAPTER 4. SOFTWARE IMPLEMENTATION: VISUALIZING AND MANIPULATING SOLUTION (POSTPROCESSING) Integral, maximum and minimum value of any variable can be determined similarly. Select the appropriate operator under the Derived Values node. Example: The case study on Elimination of nitrogen from the blood stream to the alveoli during deep sea diving (Page 277) is now used to demonstrate the process of obtaining average values. We obtain the average concentration at steady state (since the problem is not time dependent) in the blood. 1. Right click on the Derived Values node under the Results node and select Surface Average under Average. 2. Under Surface Average, select Concentration (c) from the Transport of Diluted Species variables by clicking on the Replace Expression button. 3. Select subdomain 1 under Selection. 4. Select Surface Average 1 >> Evaluate >> New Table. The result is displayed in a table in the message log as shown below.

109 4.6. OBTAINING AVERAGE VALUES AT A PARTICULAR TIME OR AS A FUNCTION OF TIME 153 To plot average values of a variable as a function of time, first define the average data set: Right click on Data Sets under the Results node and select Average from options under More Data Sets: Path: Results >> Data Sets >> Average (under More Data Sets) Then to plot the average value with time, right click on 1D Plot Group under the Results node and select Global plot: Path: Results >> 1D Plot Group >> Global

110 154 CHAPTER 4. SOFTWARE IMPLEMENTATION: VISUALIZING AND MANIPULATING SOLUTION (POSTPROCESSING)

111 4.6. OBTAINING AVERAGE VALUES AT A PARTICULAR TIME OR AS A FUNCTION OF TIME 155

112 156 CHAPTER 4. SOFTWARE IMPLEMENTATION: VISUALIZING AND MANIPULATING SOLUTION (POSTPROCESSING) Inputs: 1. Retain default settings under Average. 2. Under 1D Plot Group, set Data Set as Average making sure it matches with the average data set defined in the Model Builder window. 3. Select the time for which the plot is needed under Time selection. 4. Under Global plot, type the variable name under Expression. 5. Right click on the Global node and select Plot. Example: We will use the case study on Radio-frequency cardiac ablation (Page 319), to demonstrate how to obtain the average temperatures as a function of time.

113 4.7. OBTAINING ARBITRARY FUNCTIONS OF COMPUTED VARIABLES Right click on the Data Sets under the Results node and select Average under More Data Sets. 2. Right click on the Results node and select 1D Plot Group. 3. Under 1D Plot Group, set Data Set as Average created above. 4. Right click on the 1D Plot Group node created above and select Global. 5. Under Global, type T under Expression. 6. Right click on the previously added Global node in the Model Builder window and select Plot. The average temperature plot shows that the temperature of the entire domain does not rise significantly. Another example of plotting average values as a function of time can be seen in Case Study X (Page 335) where average tumor temperature is plotted as a function of time and the data is exported in a text format. Using the procedure described above, variables such as total amount lost or absorbed in a particular region can be determined for the problem. For an example showing such a plot, see Case Study IV (Page 267). 4.7 Obtaining arbitrary functions of computed variables Arbitrary functions involving the computed variables can be obtained by specifying the expression in the Expression field (instead of choosing the variable from the Insert/Replace Expression drop-down lists) in all the post processing methods discussed above. For example, as in page 137, a function of T such as 0:4692 C 0:001161T can be plotted by setting 0:4692 C 0: T in the Expression field in any post processing window to look at the variation of the function of T instead of T (temperature). 4.8 Creating animations Animations/ movies provide an excellent way to present results during a presentation. They can be created in COMSOL using the Animation option under Export in the Results node: Path: Results > Export > Animation Inputs: 1. Select Subject under Scene to specify the type of plot (surface, contour, slice, etc.) to be used for the movie. The plot is defined by using the methods described in the sections above.

114 158 CHAPTER 4. SOFTWARE IMPLEMENTATION: VISUALIZING AND MANIPULATING SOLUTION (POSTPROCESSING) 2. Select the different animation settings such as Output to specify the file location, filename and movie format, Frame Settings to specify resolution and aspect ratio, and Time list to set the times to be used. Remember by default all times are selected. You do not want to use that setting as the computer may need a lot of memory to make the movie file. 4.9 Dedicated Plotting and Post-processing Software Software such as Microsoft Excel, Matlab, Tecplot and Ensight can be used for additional post-processing of the data obtained from the analysis in COMSOL. For example, transient data at a point can be exported from COMSOL as shown in the Case Study X (Page 335). Once exported it can be used to do calculations inside another software program such as a spreadsheet application (e.g. Excel) or Matlab.

115 4.9. DEDICATED PLOTTING AND POST-PROCESSING SOFTWARE 159 To export data in text format for any plot, use the Data option under Export in the Results node: Path: Results > Export > Data 1. Select Data set under Data to specify the plot (1D time variation, line plot, average plot, etc.) for which data would exported. The plot is previously defined by using the methods described in the sections above. 2. Select the variable from the Insert/Replace Expression drop-down lists or type the expression in the Expression field. 3. Specify the export file location and filename under Output. The most common need for exporting data is for a transient plot at a point or for a plot along any line. Details of post-processing by exporting data can be seen in the Case Study X.

Outline. COMSOL Multyphysics: Overview of software package and capabilities

Outline. COMSOL Multyphysics: Overview of software package and capabilities COMSOL Multyphysics: Overview of software package and capabilities Lecture 5 Special Topics: Device Modeling Outline Basic concepts and modeling paradigm Overview of capabilities Steps in setting-up a

More information

Step 1: Problem Type Specification. (1) Open COMSOL Multiphysics 4.1. (2) Under Select Space Dimension tab, select 2D Axisymmetric.

Step 1: Problem Type Specification. (1) Open COMSOL Multiphysics 4.1. (2) Under Select Space Dimension tab, select 2D Axisymmetric. Step 1: Problem Type Specification (1) Open COMSOL Multiphysics 4.1. (2) Under Select Space Dimension tab, select 2D Axisymmetric. (3) Click on blue arrow next to Select Space Dimension title. (4) Click

More information

Implementation in COMSOL

Implementation in COMSOL Implementation in COMSOL The transient Navier-Stoke equation will be solved in COMSOL. A text (.txt) file needs to be created that contains the velocity at the inlet of the common carotid (calculated as

More information

Strömningslära Fluid Dynamics. Computer laboratories using COMSOL v4.4

Strömningslära Fluid Dynamics. Computer laboratories using COMSOL v4.4 UMEÅ UNIVERSITY Department of Physics Claude Dion Olexii Iukhymenko May 15, 2015 Strömningslära Fluid Dynamics (5FY144) Computer laboratories using COMSOL v4.4!! Report requirements Computer labs must

More information

1.2 Numerical Solutions of Flow Problems

1.2 Numerical Solutions of Flow Problems 1.2 Numerical Solutions of Flow Problems DIFFERENTIAL EQUATIONS OF MOTION FOR A SIMPLIFIED FLOW PROBLEM Continuity equation for incompressible flow: 0 Momentum (Navier-Stokes) equations for a Newtonian

More information

For this week only, the TAs will be at the ACCEL facility, instead of their normal office hours.

For this week only, the TAs will be at the ACCEL facility, instead of their normal office hours. BEE 3500 Homework Assignment 5 Notes: For this assignment, you will use the computational software COMSOL Multiphysics 5.3, available in Academic Computing Center Engineering Library (ACCEL) at the Carpenter

More information

Smoothing the Path to Simulation-Led Device Design

Smoothing the Path to Simulation-Led Device Design Smoothing the Path to Simulation-Led Device Design Beverly E. Pryor 1, and Roger W. Pryor, Ph.D. *,2 1 Pryor Knowledge Systems, Inc. 2 Pryor Knowledge Systems, Inc. *Corresponding author: 4918 Malibu Drive,

More information

Solved with COMSOL Multiphysics 4.2

Solved with COMSOL Multiphysics 4.2 Laminar Static Mixer Introduction In static mixers, also called motionless or in-line mixers, a fluid is pumped through a pipe containing stationary blades. This mixing technique is particularly well suited

More information

Porous Reactor with Injection Needle

Porous Reactor with Injection Needle Porous Reactor with Injection Needle Introduction This model treats the flow field and species distribution in an experimental reactor for studies of heterogeneous catalysis. The model exemplifies the

More information

Computation of Velocity, Pressure and Temperature Distributions near a Stagnation Point in Planar Laminar Viscous Incompressible Flow

Computation of Velocity, Pressure and Temperature Distributions near a Stagnation Point in Planar Laminar Viscous Incompressible Flow Excerpt from the Proceedings of the COMSOL Conference 8 Boston Computation of Velocity, Pressure and Temperature Distributions near a Stagnation Point in Planar Laminar Viscous Incompressible Flow E. Kaufman

More information

ANSYS AIM Tutorial Turbulent Flow Over a Backward Facing Step

ANSYS AIM Tutorial Turbulent Flow Over a Backward Facing Step ANSYS AIM Tutorial Turbulent Flow Over a Backward Facing Step Author(s): Sebastian Vecchi, ANSYS Created using ANSYS AIM 18.1 Problem Specification Pre-Analysis & Start Up Governing Equation Start-Up Geometry

More information

The viscous forces on the cylinder are proportional to the gradient of the velocity field at the

The viscous forces on the cylinder are proportional to the gradient of the velocity field at the Fluid Dynamics Models : Flow Past a Cylinder Flow Past a Cylinder Introduction The flow of fluid behind a blunt body such as an automobile is difficult to compute due to the unsteady flows. The wake behind

More information

Microwell Mixing with Surface Tension

Microwell Mixing with Surface Tension Microwell Mixing with Surface Tension Nick Cox Supervised by Professor Bruce Finlayson University of Washington Department of Chemical Engineering June 6, 2007 Abstract For many applications in the pharmaceutical

More information

How TMG Uses Elements and Nodes

How TMG Uses Elements and Nodes Simulation: TMG Thermal Analysis User's Guide How TMG Uses Elements and Nodes Defining Boundary Conditions on Elements You create a TMG thermal model in exactly the same way that you create any finite

More information

Non-Isothermal Heat Exchanger

Non-Isothermal Heat Exchanger Non-Isothermal Heat Exchanger The following example builds and solves a conduction and convection heat transfer problem using the Heat Transfer interface. The example concerns a stainless-steel MEMS heat

More information

Program: Advanced Certificate Program

Program: Advanced Certificate Program Program: Advanced Certificate Program Course: CFD-Vehicle Aerodynamics Directorate of Training and Lifelong Learning #470-P, Peenya Industrial Area, 4th Phase Peenya, Bengaluru 560 058 www.msruas.ac.in

More information

Velocity and Concentration Properties of Porous Medium in a Microfluidic Device

Velocity and Concentration Properties of Porous Medium in a Microfluidic Device Velocity and Concentration Properties of Porous Medium in a Microfluidic Device Rachel Freeman Department of Chemical Engineering University of Washington ChemE 499 Undergraduate Research December 14,

More information

FEMLAB Exercise 1 for ChE366

FEMLAB Exercise 1 for ChE366 FEMLAB Exercise 1 for ChE366 Problem statement Consider a spherical particle of radius r s moving with constant velocity U in an infinitely long cylinder of radius R that contains a Newtonian fluid. Let

More information

SolidWorks Flow Simulation 2014

SolidWorks Flow Simulation 2014 An Introduction to SolidWorks Flow Simulation 2014 John E. Matsson, Ph.D. SDC PUBLICATIONS Better Textbooks. Lower Prices. www.sdcpublications.com Powered by TCPDF (www.tcpdf.org) Visit the following websites

More information

NUMERICAL INVESTIGATION OF THE FLOW BEHAVIOR INTO THE INLET GUIDE VANE SYSTEM (IGV)

NUMERICAL INVESTIGATION OF THE FLOW BEHAVIOR INTO THE INLET GUIDE VANE SYSTEM (IGV) University of West Bohemia» Department of Power System Engineering NUMERICAL INVESTIGATION OF THE FLOW BEHAVIOR INTO THE INLET GUIDE VANE SYSTEM (IGV) Publication was supported by project: Budování excelentního

More information

CFD Analysis of 2-D Unsteady Flow Past a Square Cylinder at an Angle of Incidence

CFD Analysis of 2-D Unsteady Flow Past a Square Cylinder at an Angle of Incidence CFD Analysis of 2-D Unsteady Flow Past a Square Cylinder at an Angle of Incidence Kavya H.P, Banjara Kotresha 2, Kishan Naik 3 Dept. of Studies in Mechanical Engineering, University BDT College of Engineering,

More information

Terminal Falling Velocity of a Sand Grain

Terminal Falling Velocity of a Sand Grain Terminal Falling Velocity of a Sand Grain Introduction The first stop for polluted water entering a water work is normally a large tank, where large particles are left to settle. More generally, gravity

More information

Solved with COMSOL Multiphysics 4.2

Solved with COMSOL Multiphysics 4.2 Peristaltic Pump Solved with COMSOL Multiphysics 4.2 Introduction In a peristaltic pump, rotating rollers squeeze a flexible tube. As the pushed-down rollers move along the tube, fluids in the tube follow

More information

Comparison of Classic and Finned Piston Reciprocating Linear Air Compressor Using COMSOL Multiphysics

Comparison of Classic and Finned Piston Reciprocating Linear Air Compressor Using COMSOL Multiphysics Comparison of Classic and Finned Piston Reciprocating Linear Air Compressor Using COMSOL Multiphysics M. Heidari*, P. Barrade, and A. Rufer LEI, École Polytechnique Fédérale de Lausanne, Lausanne, Switzerland

More information

Solved with COMSOL Multiphysics 4.2

Solved with COMSOL Multiphysics 4.2 Backstep Introduction This tutorial model solves the incompressible Navier-Stokes equations in a backstep geometry. A characteristic feature of fluid flow in geometries of this kind is the recirculation

More information

Coupled Analysis of FSI

Coupled Analysis of FSI Coupled Analysis of FSI Qin Yin Fan Oct. 11, 2008 Important Key Words Fluid Structure Interface = FSI Computational Fluid Dynamics = CFD Pressure Displacement Analysis = PDA Thermal Stress Analysis = TSA

More information

The Nagumo Equation with Comsol Multiphysics

The Nagumo Equation with Comsol Multiphysics The Nagumo Equation with Comsol Multiphysics Denny Otten 1 Christian Döding 2 Department of Mathematics Bielefeld University 33501 Bielefeld Germany Date: 25. April 2016 1. Traveling Front in the Nagumo

More information

Lab 9: FLUENT: Transient Natural Convection Between Concentric Cylinders

Lab 9: FLUENT: Transient Natural Convection Between Concentric Cylinders Lab 9: FLUENT: Transient Natural Convection Between Concentric Cylinders Objective: The objective of this laboratory is to introduce how to use FLUENT to solve both transient and natural convection problems.

More information

MESHLESS SOLUTION OF INCOMPRESSIBLE FLOW OVER BACKWARD-FACING STEP

MESHLESS SOLUTION OF INCOMPRESSIBLE FLOW OVER BACKWARD-FACING STEP Vol. 12, Issue 1/2016, 63-68 DOI: 10.1515/cee-2016-0009 MESHLESS SOLUTION OF INCOMPRESSIBLE FLOW OVER BACKWARD-FACING STEP Juraj MUŽÍK 1,* 1 Department of Geotechnics, Faculty of Civil Engineering, University

More information

Free Convection in a Water Glass

Free Convection in a Water Glass Solved with COMSOL Multiphysics 4.1. Free Convection in a Water Glass Introduction This model treats free convection in a glass of water. Free convection is a phenomenon that is often disregarded in chemical

More information

CHAPTER 1. Introduction

CHAPTER 1. Introduction ME 475: Computer-Aided Design of Structures 1-1 CHAPTER 1 Introduction 1.1 Analysis versus Design 1.2 Basic Steps in Analysis 1.3 What is the Finite Element Method? 1.4 Geometrical Representation, Discretization

More information

Driven Cavity Example

Driven Cavity Example BMAppendixI.qxd 11/14/12 6:55 PM Page I-1 I CFD Driven Cavity Example I.1 Problem One of the classic benchmarks in CFD is the driven cavity problem. Consider steady, incompressible, viscous flow in a square

More information

An Introduction to SolidWorks Flow Simulation 2010

An Introduction to SolidWorks Flow Simulation 2010 An Introduction to SolidWorks Flow Simulation 2010 John E. Matsson, Ph.D. SDC PUBLICATIONS www.sdcpublications.com Schroff Development Corporation Chapter 2 Flat Plate Boundary Layer Objectives Creating

More information

CFD in COMSOL Multiphysics

CFD in COMSOL Multiphysics CFD in COMSOL Multiphysics Christian Wollblad Copyright 2017 COMSOL. Any of the images, text, and equations here may be copied and modified for your own internal use. All trademarks are the property of

More information

Introduction to C omputational F luid Dynamics. D. Murrin

Introduction to C omputational F luid Dynamics. D. Murrin Introduction to C omputational F luid Dynamics D. Murrin Computational fluid dynamics (CFD) is the science of predicting fluid flow, heat transfer, mass transfer, chemical reactions, and related phenomena

More information

Middle East Technical University Mechanical Engineering Department ME 413 Introduction to Finite Element Analysis Spring 2015 (Dr.

Middle East Technical University Mechanical Engineering Department ME 413 Introduction to Finite Element Analysis Spring 2015 (Dr. Middle East Technical University Mechanical Engineering Department ME 413 Introduction to Finite Element Analysis Spring 2015 (Dr. Sert) COMSOL 1 Tutorial 2 Problem Definition Hot combustion gases of a

More information

Modelling With Comsol: Gradients and Pattern Formation Direct questions and suggestions to Denis

Modelling With Comsol: Gradients and Pattern Formation Direct questions and suggestions to Denis Modelling With Comsol: Gradients and Pattern Formation Direct questions and suggestions to Denis (dzianis.menshykau@bsse.ethz.ch) Problem 1 Solve simple diffusion equation (no reactions!) on a 1D domain.

More information

ANSYS AIM 16.0 Overview. AIM Program Management

ANSYS AIM 16.0 Overview. AIM Program Management 1 2015 ANSYS, Inc. September 27, 2015 ANSYS AIM 16.0 Overview AIM Program Management 2 2015 ANSYS, Inc. September 27, 2015 Today s Simulation Challenges Leveraging simulation across engineering organizations

More information

Convection Cooling of Circuit Boards 3D Natural Convection

Convection Cooling of Circuit Boards 3D Natural Convection Convection Cooling of Circuit Boards 3D Natural Convection Introduction This example models the air cooling of circuit boards populated with multiple integrated circuits (ICs), which act as heat sources.

More information

Tutorial 2. Modeling Periodic Flow and Heat Transfer

Tutorial 2. Modeling Periodic Flow and Heat Transfer Tutorial 2. Modeling Periodic Flow and Heat Transfer Introduction: Many industrial applications, such as steam generation in a boiler or air cooling in the coil of an air conditioner, can be modeled as

More information

Turbulent Premixed Combustion with Flamelet Generated Manifolds in COMSOL Multiphysics

Turbulent Premixed Combustion with Flamelet Generated Manifolds in COMSOL Multiphysics Turbulent Premixed Combustion with Flamelet Generated Manifolds in COMSOL Multiphysics Rob J.M Bastiaans* Eindhoven University of Technology *Corresponding author: PO box 512, 5600 MB, Eindhoven, r.j.m.bastiaans@tue.nl

More information

Estimation of Flow Field & Drag for Aerofoil Wing

Estimation of Flow Field & Drag for Aerofoil Wing Estimation of Flow Field & Drag for Aerofoil Wing Mahantesh. HM 1, Prof. Anand. SN 2 P.G. Student, Dept. of Mechanical Engineering, East Point College of Engineering, Bangalore, Karnataka, India 1 Associate

More information

µ = Pa s m 3 The Reynolds number based on hydraulic diameter, D h = 2W h/(w + h) = 3.2 mm for the main inlet duct is = 359

µ = Pa s m 3 The Reynolds number based on hydraulic diameter, D h = 2W h/(w + h) = 3.2 mm for the main inlet duct is = 359 Laminar Mixer Tutorial for STAR-CCM+ ME 448/548 March 30, 2014 Gerald Recktenwald gerry@pdx.edu 1 Overview Imagine that you are part of a team developing a medical diagnostic device. The device has a millimeter

More information

Computational Modeling and Simulation of the Human Duodenum

Computational Modeling and Simulation of the Human Duodenum Computational Modeling and Simulation of the Human Duodenum Bostjan Hari 1, Serafim Bakalis 1, Peter Fryer 1 1 The University of Birmingham, School of Chemical Engineering, Edgbaston, Birmingham, United

More information

CFD MODELING FOR PNEUMATIC CONVEYING

CFD MODELING FOR PNEUMATIC CONVEYING CFD MODELING FOR PNEUMATIC CONVEYING Arvind Kumar 1, D.R. Kaushal 2, Navneet Kumar 3 1 Associate Professor YMCAUST, Faridabad 2 Associate Professor, IIT, Delhi 3 Research Scholar IIT, Delhi e-mail: arvindeem@yahoo.co.in

More information

2D & 3D Finite Element Method Packages of CEMTool for Engineering PDE Problems

2D & 3D Finite Element Method Packages of CEMTool for Engineering PDE Problems 2D & 3D Finite Element Method Packages of CEMTool for Engineering PDE Problems Choon Ki Ahn, Jung Hun Park, and Wook Hyun Kwon 1 Abstract CEMTool is a command style design and analyzing package for scientific

More information

Verification and Validation in CFD and Heat Transfer: ANSYS Practice and the New ASME Standard

Verification and Validation in CFD and Heat Transfer: ANSYS Practice and the New ASME Standard Verification and Validation in CFD and Heat Transfer: ANSYS Practice and the New ASME Standard Dimitri P. Tselepidakis & Lewis Collins ASME 2012 Verification and Validation Symposium May 3 rd, 2012 1 Outline

More information

Engineering designs today are frequently

Engineering designs today are frequently Basic CAD Engineering designs today are frequently constructed as mathematical solid models instead of solely as 2D drawings. A solid model is one that represents a shape as a 3D object having mass properties.

More information

Flow and Heat Transfer in a Mixing Elbow

Flow and Heat Transfer in a Mixing Elbow Flow and Heat Transfer in a Mixing Elbow Objectives The main objectives of the project are to learn (i) how to set up and perform flow simulations with heat transfer and mixing, (ii) post-processing and

More information

CHAPTER 5 USE OF STL FILE FOR FINITE ELEMENT ANALYSIS

CHAPTER 5 USE OF STL FILE FOR FINITE ELEMENT ANALYSIS CHAPTER 5 USE OF STL FILE FOR FINITE ELEMENT ANALYSIS 5.1 Introduction: Most CAD software in the market can generate STL files, and these are generally used for prototyping and rendering purposes. These

More information

An Overview of Computational Fluid Dynamics

An Overview of Computational Fluid Dynamics An Overview of Computational Fluid Dynamics Dr. Nor Azwadi bin Che Sidik Faculty of Mechanical Engineering Universiti Teknologi Malaysia INSPIRING CREATIVE AND INNOVATIVE MINDS 1 What is CFD? C computational

More information

Evaluation of Parametric Study on Submarine Using CFD

Evaluation of Parametric Study on Submarine Using CFD Evaluation of Parametric Study on Submarine using CFD 53 Evaluation of Parametric Study on Submarine Using CFD Mohd Zubair Nizami 1 and Mohammed Ahmed Khan 2 1,2 Research Scholar, Department of Mechanical

More information

CIBSE Application Manual AM11 Building Performance Modelling Chapter 6: Ventilation Modelling

CIBSE Application Manual AM11 Building Performance Modelling Chapter 6: Ventilation Modelling Contents Background Ventilation modelling tool categories Simple tools and estimation techniques Analytical methods Zonal network methods Computational Fluid Dynamics (CFD) Semi-external spaces Summary

More information

Tutorial to simulate a thermoelectric module with heatsink in ANSYS

Tutorial to simulate a thermoelectric module with heatsink in ANSYS Tutorial to simulate a thermoelectric module with heatsink in ANSYS Few details can be found in the pictures attached. All the material properties can be found in Dr. Lee s book and on the web. Don t blindly

More information

The Level Set Method THE LEVEL SET METHOD THE LEVEL SET METHOD 203

The Level Set Method THE LEVEL SET METHOD THE LEVEL SET METHOD 203 The Level Set Method Fluid flow with moving interfaces or boundaries occur in a number of different applications, such as fluid-structure interaction, multiphase flows, and flexible membranes moving in

More information

Computer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture - 24 Solid Modelling

Computer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture - 24 Solid Modelling Computer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture - 24 Solid Modelling Welcome to the lectures on computer graphics. We have

More information

First Steps - Ball Valve Design

First Steps - Ball Valve Design COSMOSFloWorks 2004 Tutorial 1 First Steps - Ball Valve Design This First Steps tutorial covers the flow of water through a ball valve assembly before and after some design changes. The objective is to

More information

Modeling and Simulation of Single Phase Fluid Flow and Heat Transfer in Packed Beds

Modeling and Simulation of Single Phase Fluid Flow and Heat Transfer in Packed Beds Modeling and Simulation of Single Phase Fluid Flow and Heat Transfer in Packed Beds by:- Balaaji Mahadevan Shaurya Sachdev Subhanshu Pareek Amol Deshpande Birla Institute of Technology and Science, Pilani

More information

Module 3 Mesh Generation

Module 3 Mesh Generation Module 3 Mesh Generation 1 Lecture 3.1 Introduction 2 Mesh Generation Strategy Mesh generation is an important pre-processing step in CFD of turbomachinery, quite analogous to the development of solid

More information

Use of CFD in Design and Development of R404A Reciprocating Compressor

Use of CFD in Design and Development of R404A Reciprocating Compressor Purdue University Purdue e-pubs International Compressor Engineering Conference School of Mechanical Engineering 2006 Use of CFD in Design and Development of R404A Reciprocating Compressor Yogesh V. Birari

More information

Steady Flow: Lid-Driven Cavity Flow

Steady Flow: Lid-Driven Cavity Flow STAR-CCM+ User Guide Steady Flow: Lid-Driven Cavity Flow 2 Steady Flow: Lid-Driven Cavity Flow This tutorial demonstrates the performance of STAR-CCM+ in solving a traditional square lid-driven cavity

More information

3. Preprocessing of ABAQUS/CAE

3. Preprocessing of ABAQUS/CAE 3.1 Create new model database 3. Preprocessing of ABAQUS/CAE A finite element analysis in ABAQUS/CAE starts from create new model database in the toolbar. Then save it with a name user defined. To build

More information

Unsteady-State Diffusion in a Slab by Robert P. Hesketh 3 October 2006

Unsteady-State Diffusion in a Slab by Robert P. Hesketh 3 October 2006 Unsteady-State Diffusion in a Slab by Robert P. Hesketh 3 October 2006 Unsteady-State Diffusion in a Slab This simple example is based on Cutlip and Shacham Problem 7.13: Unsteady-State Mass Transfer in

More information

Adarsh Krishnamurthy (cs184-bb) Bela Stepanova (cs184-bs)

Adarsh Krishnamurthy (cs184-bb) Bela Stepanova (cs184-bs) OBJECTIVE FLUID SIMULATIONS Adarsh Krishnamurthy (cs184-bb) Bela Stepanova (cs184-bs) The basic objective of the project is the implementation of the paper Stable Fluids (Jos Stam, SIGGRAPH 99). The final

More information

1.1 Count, read, and write whole numbers to

1.1 Count, read, and write whole numbers to Correlation of Moving with Math Foundations-by-Topic Grade 3 To California Standards NUMBER SENSE 1.0 Students understand the place value of whole numbers: 1.1 Count, read, and write whole numbers to 10,000.

More information

Temperature Analysis of Intel Server by using CFD and Experimentation

Temperature Analysis of Intel Server by using CFD and Experimentation Temperature Analysis of Intel Server by using CFD and Experimentation Chetan A Gawande 1, Prof. S.M. Nakate 2, Prasad Chavan 3 ¹Dept. of Mechanical engineering, MIT Pune, Pune University, pune India ²Dept.

More information

Module D: Laminar Flow over a Flat Plate

Module D: Laminar Flow over a Flat Plate Module D: Laminar Flow over a Flat Plate Summary... Problem Statement Geometry and Mesh Creation Problem Setup Solution. Results Validation......... Mesh Refinement.. Summary This ANSYS FLUENT tutorial

More information

Isotropic Porous Media Tutorial

Isotropic Porous Media Tutorial STAR-CCM+ User Guide 3927 Isotropic Porous Media Tutorial This tutorial models flow through the catalyst geometry described in the introductory section. In the porous region, the theoretical pressure drop

More information

Introduction to Computational Fluid Dynamics Mech 122 D. Fabris, K. Lynch, D. Rich

Introduction to Computational Fluid Dynamics Mech 122 D. Fabris, K. Lynch, D. Rich Introduction to Computational Fluid Dynamics Mech 122 D. Fabris, K. Lynch, D. Rich 1 Computational Fluid dynamics Computational fluid dynamics (CFD) is the analysis of systems involving fluid flow, heat

More information

Computational Flow Analysis of Para-rec Bluff Body at Various Reynold s Number

Computational Flow Analysis of Para-rec Bluff Body at Various Reynold s Number International Journal of Engineering Research and Technology. ISSN 0974-3154 Volume 6, Number 5 (2013), pp. 667-674 International Research Publication House http://www.irphouse.com Computational Flow Analysis

More information

and to the following students who assisted in the creation of the Fluid Dynamics tutorials:

and to the following students who assisted in the creation of the Fluid Dynamics tutorials: Fluid Dynamics CAx Tutorial: Pressure Along a Streamline Basic Tutorial #3 Deryl O. Snyder C. Greg Jensen Brigham Young University Provo, UT 84602 Special thanks to: PACE, Fluent, UGS Solutions, Altair

More information

CAD/CAM COURSE TOPIC OF DISCUSSION GEOMETRIC MODELING DAWOOD COLLEGE OF ENGINEERING & TECHNOLOGY- KARACHI- ENGR. ASSAD ANIS 4/16/2011 1

CAD/CAM COURSE TOPIC OF DISCUSSION GEOMETRIC MODELING DAWOOD COLLEGE OF ENGINEERING & TECHNOLOGY- KARACHI- ENGR. ASSAD ANIS 4/16/2011 1 CAD/CAM COURSE TOPIC OF DISCUSSION GEOMETRIC MODELING 1 CAD attempts to eliminate the need of developing a prototype for testing and optimizing the design CAD evaluates a design using a model with geometric

More information

computational Fluid Dynamics - Prof. V. Esfahanian

computational Fluid Dynamics - Prof. V. Esfahanian Three boards categories: Experimental Theoretical Computational Crucial to know all three: Each has their advantages and disadvantages. Require validation and verification. School of Mechanical Engineering

More information

NX Advanced FEM. fact sheet

NX Advanced FEM. fact sheet Advanced FEM fact sheet www.ugs.com Summary Advanced FEM is a comprehensive multi-cad finite element modeling and results visualization product that is designed to meet the needs of experienced CAE analysts.

More information

Speed and Accuracy of CFD: Achieving Both Successfully ANSYS UK S.A.Silvester

Speed and Accuracy of CFD: Achieving Both Successfully ANSYS UK S.A.Silvester Speed and Accuracy of CFD: Achieving Both Successfully ANSYS UK S.A.Silvester 2010 ANSYS, Inc. All rights reserved. 1 ANSYS, Inc. Proprietary Content ANSYS CFD Introduction ANSYS, the company Simulation

More information

TUTORIAL#4. Marek Jaszczur. Turbulent Thermal Boundary Layer on a Flat Plate W1-1 AGH 2018/2019

TUTORIAL#4. Marek Jaszczur. Turbulent Thermal Boundary Layer on a Flat Plate W1-1 AGH 2018/2019 TUTORIAL#4 Turbulent Thermal Boundary Layer on a Flat Plate Marek Jaszczur AGH 2018/2019 W1-1 Problem specification TUTORIAL#4 Turbulent Thermal Boundary Layer - on a flat plate Goal: Solution for Non-isothermal

More information

Investigation of mixing chamber for experimental FGD reactor

Investigation of mixing chamber for experimental FGD reactor Investigation of mixing chamber for experimental FGD reactor Jan Novosád 1,a, Petra Danová 1 and Tomáš Vít 1 1 Department of Power Engineering Equipment, Faculty of Mechanical Engineering, Technical University

More information

Modelling of Levitation Melting using a Fixed Mesh Method

Modelling of Levitation Melting using a Fixed Mesh Method International Scientific Colloquium Modelling for Electromagnetic Processing Hannover, October 27-29, 2008 Modelling of Levitation Melting using a Fixed Mesh Method D. Hectors, E. Toorman, K. Van Reusel

More information

LAB 4: Introduction to MATLAB PDE Toolbox and SolidWorks Simulation

LAB 4: Introduction to MATLAB PDE Toolbox and SolidWorks Simulation LAB 4: Introduction to MATLAB PDE Toolbox and SolidWorks Simulation Objective: The objective of this laboratory is to introduce how to use MATLAB PDE toolbox and SolidWorks Simulation to solve two-dimensional

More information

Analysis of an airfoil

Analysis of an airfoil UNDERGRADUATE RESEARCH FALL 2010 Analysis of an airfoil using Computational Fluid Dynamics Tanveer Chandok 12/17/2010 Independent research thesis at the Georgia Institute of Technology under the supervision

More information

NX Advanced FEM. Benefits

NX Advanced FEM. Benefits Advanced FEM fact sheet Siemens PLM Software www.siemens.com/plm Summary Advanced FEM software is a comprehensive multi-cad finite element modeling and results visualization product that is designed to

More information

Assignment in The Finite Element Method, 2017

Assignment in The Finite Element Method, 2017 Assignment in The Finite Element Method, 2017 Division of Solid Mechanics The task is to write a finite element program and then use the program to analyse aspects of a surface mounted resistor. The problem

More information

Simulation of In-Cylinder Flow Phenomena with ANSYS Piston Grid An Improved Meshing and Simulation Approach

Simulation of In-Cylinder Flow Phenomena with ANSYS Piston Grid An Improved Meshing and Simulation Approach Simulation of In-Cylinder Flow Phenomena with ANSYS Piston Grid An Improved Meshing and Simulation Approach Dipl.-Ing. (FH) Günther Lang, CFDnetwork Engineering Dipl.-Ing. Burkhard Lewerich, CFDnetwork

More information

Verification of Laminar and Validation of Turbulent Pipe Flows

Verification of Laminar and Validation of Turbulent Pipe Flows 1 Verification of Laminar and Validation of Turbulent Pipe Flows 1. Purpose ME:5160 Intermediate Mechanics of Fluids CFD LAB 1 (ANSYS 18.1; Last Updated: Aug. 1, 2017) By Timur Dogan, Michael Conger, Dong-Hwan

More information

Modeling Skills Thermal Analysis J.E. Akin, Rice University

Modeling Skills Thermal Analysis J.E. Akin, Rice University Introduction Modeling Skills Thermal Analysis J.E. Akin, Rice University Most finite element analysis tasks involve utilizing commercial software, for which you do not have the source code. Thus, you need

More information

equivalent stress to the yield stess.

equivalent stress to the yield stess. Example 10.2-1 [Ansys Workbench/Thermal Stress and User Defined Result] A 50m long deck sitting on superstructures that sit on top of substructures is modeled by a box shape of size 20 x 5 x 50 m 3. It

More information

EXPERIMENTAL ANALYSIS & SIMULATION OF DOUBLE PIPE HEAT EXCHANGER

EXPERIMENTAL ANALYSIS & SIMULATION OF DOUBLE PIPE HEAT EXCHANGER EXPERIMENTAL ANALYSIS & SIMULATION OF DOUBLE PIPE HEAT EXCHANGER Kale Shivam B 1, Kadam Prashant P 2, Pardeshi Rohansingh G 3, Karwande Swapnil C 4 1 Student, Mechanical Engineering, GHRCOEM, Ahmednagar,

More information

Numerical studies for Flow Around a Sphere regarding different flow regimes caused by various Reynolds numbers

Numerical studies for Flow Around a Sphere regarding different flow regimes caused by various Reynolds numbers Numerical studies for Flow Around a Sphere regarding different flow regimes caused by various Reynolds numbers R. Jendrny, H. Damanik, O. Mierka, S. Turek Institute of Applied Mathematics (LS III), TU

More information

Lesson 1 Parametric Modeling Fundamentals

Lesson 1 Parametric Modeling Fundamentals 1-1 Lesson 1 Parametric Modeling Fundamentals Create Simple Parametric Models. Understand the Basic Parametric Modeling Process. Create and Profile Rough Sketches. Understand the "Shape before size" approach.

More information

Introduction to FEM calculations

Introduction to FEM calculations Introduction to FEM calculations How to start informations Michał Rad (rad@agh.edu.pl) 20.04.2018 Outline Field calculations what is it? Model Program How to: Make a model Set up the parameters Perform

More information

Supporting Simulations to Guide Engineering Design

Supporting Simulations to Guide Engineering Design Supporting Simulations to Guide Engineering Design Mark S. Shephard Scientific Computation Research Center, Rensselaer Polytechnic Institute, Troy, NY 12810 Mark W. Beall, Bruce E. Webster Simmetrix, Inc.,

More information

MRI Induced Heating of a Pacemaker. Peter Krenz, Application Engineer

MRI Induced Heating of a Pacemaker. Peter Krenz, Application Engineer MRI Induced Heating of a Pacemaker Peter Krenz, Application Engineer 1 Problem Statement Electric fields generated during MRI exposure are dissipated in tissue of the human body resulting in a temperature

More information

Introduction to CFX. Workshop 2. Transonic Flow Over a NACA 0012 Airfoil. WS2-1. ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

Introduction to CFX. Workshop 2. Transonic Flow Over a NACA 0012 Airfoil. WS2-1. ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved. Workshop 2 Transonic Flow Over a NACA 0012 Airfoil. Introduction to CFX WS2-1 Goals The purpose of this tutorial is to introduce the user to modelling flow in high speed external aerodynamic applications.

More information

Fluid Mechanics Simulation Essentials R2014X

Fluid Mechanics Simulation Essentials R2014X Fluid Mechanics Simulation Essentials R2014X About this Course Course objectives Upon completion of this course you will be able to: Set up and create CFD, CHT and FSI models in the 3DEXPERIENCE Platform

More information

NUMERICAL VISCOSITY. Convergent Science White Paper. COPYRIGHT 2017 CONVERGENT SCIENCE. All rights reserved.

NUMERICAL VISCOSITY. Convergent Science White Paper. COPYRIGHT 2017 CONVERGENT SCIENCE. All rights reserved. Convergent Science White Paper COPYRIGHT 2017 CONVERGENT SCIENCE. All rights reserved. This document contains information that is proprietary to Convergent Science. Public dissemination of this document

More information

First Grade Mathematical I Can Statements

First Grade Mathematical I Can Statements NUMBERS AND OPERATIONS 1.1.1 I can count forward to 100 with and without manipulatives. I can count backward from 20 with and without manipulatives. 1.1.2 I can read numbers to 100 using multiple strategies,

More information

CFD-1. Introduction: What is CFD? T. J. Craft. Msc CFD-1. CFD: Computational Fluid Dynamics

CFD-1. Introduction: What is CFD? T. J. Craft. Msc CFD-1. CFD: Computational Fluid Dynamics School of Mechanical Aerospace and Civil Engineering CFD-1 T. J. Craft George Begg Building, C41 Msc CFD-1 Reading: J. Ferziger, M. Peric, Computational Methods for Fluid Dynamics H.K. Versteeg, W. Malalasekara,

More information

Non-Newtonian Transitional Flow in an Eccentric Annulus

Non-Newtonian Transitional Flow in an Eccentric Annulus Tutorial 8. Non-Newtonian Transitional Flow in an Eccentric Annulus Introduction The purpose of this tutorial is to illustrate the setup and solution of a 3D, turbulent flow of a non-newtonian fluid. Turbulent

More information

Geometric Modeling. Introduction

Geometric Modeling. Introduction Geometric Modeling Introduction Geometric modeling is as important to CAD as governing equilibrium equations to classical engineering fields as mechanics and thermal fluids. intelligent decision on the

More information

FLOWING FLUIDS AND PRESSURE VARIATION

FLOWING FLUIDS AND PRESSURE VARIATION Chapter 4 Pressure differences are (often) the forces that move fluids FLOWING FLUIDS AND PRESSURE VARIATION Fluid Mechanics, Spring Term 2011 e.g., pressure is low at the center of a hurricane. For your

More information