Cfd module usersguide

2,955 views
2,798 views

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,955
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
201
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Cfd module usersguide

  1. 1. VERSION 4.2 User´s Guide CFD Module
  2. 2. Benelux COMSOL BV Röntgenlaan 37 2719 DX Zoetermeer The Netherlands  +31 (0) 79 363 4230   +31 (0) 79 361 4212  info@comsol.nl  www.comsol.nl Denmark COMSOL A/S Diplomvej 381  2800 Kgs. Lyngby  +45 88 70 82 00  +45 88 70 80 90  info@comsol.dk  www.comsol.dk Finland COMSOL OY Arabiankatu 12  FIN-00560 Helsinki  +358 9 2510 400  +358 9 2510 4010  info@comsol.fi  www.comsol.fi France COMSOL France WTC, 5 pl. Robert Schuman F-38000 Grenoble  +33 (0)4 76 46 49 01  +33 (0)4 76 46 07 42  info@comsol.fr  www.comsol.fr Germany COMSOL Multiphysics GmbH Berliner Str. 4 D-37073 Göttingen  +49-551-99721-0  +49-551-99721-29  info@comsol.de  www.comsol.de India COMSOL Multiphysics Pvt. Ltd. Esquire Centre,  C-Block, 3rd Floor No. 9, M. G. Road Bangalore 560001 Karnataka  +91-80-4092-3859  +91-80-4092-3856  info@comsol.co.in  www.comsol.co.in Italy COMSOL S.r.l. Via Vittorio Emanuele II, 22 25122 Brescia  +39-030-3793800  +39-030-3793899  info.it@comsol.com  www.it.comsol.com Norway COMSOL AS Postboks 5673 Sluppen Søndre gate 7 NO-7485 Trondheim  +47 73 84 24 00  +47 73 84 24 01  info@comsol.no  www.comsol.no Sweden COMSOL AB Tegnérgatan 23 SE-111 40 Stockholm  +46 8 412 95 00  +46 8 412 95 10  info@comsol.se  www.comsol.se Switzerland COMSOL Multiphysics GmbH Technoparkstrasse 1 CH-8005 Zürich  +41 (0)44 445 2140  +41 (0)44 445 2141  info@ch.comsol.com  www.ch.comsol.com United Kingdom COMSOL Ltd. UH Innovation Centre College Lane Hatfield Hertfordshire AL10 9AB  +44-(0)-1707 636020  +44-(0)-1707 284746  info.uk@comsol.com  www.uk.comsol.com United States COMSOL, Inc. 1 New England Executive Park Suite 350 Burlington, MA 01803  +1-781-273-3322  +1-781-273-6603 COMSOL, Inc. 10850 Wilshire Boulevard Suite 800 Los Angeles, CA 90024  +1-310-441-4800  +1-310-441-0868 COMSOL, Inc. 744 Cowper Street Palo Alto, CA 94301  +1-650-324-9935  +1-650-324-9936  info@comsol.com  www.comsol.com For a complete list of  international representatives, visit  www.comsol.com/contact Home Page  www.comsol.com COMSOL User Forums  www.comsol.com/ community/forums CFD Module User’s Guide  1998–2011 COMSOL Protected by U.S. Patents 7,519,518; 7,596,474; and 7,623,991. Patents pending. This Documentation and the Programs described herein are furnished under the COMSOL Software License Agreement (www.comsol.com/sla) and may be used or copied only under the terms of the license agreement. COMSOL, COMSOL Desktop, COMSOL Multiphysics, and LiveLink are registered trademarks or trade- marks of COMSOL AB. Other product or brand names are trademarks or registered trademarks of their respective holders. Version: May 2011 COMSOL 4.2 Part No. CM021301
  3. 3. C O N T E N T S | 3 C o n t e n t s C h a p t e r 1 : I n t r o d u c t i o n About the CFD Module 18 Why CFD is Important for Modeling . . . . . . . . . . . . . . . 18 How the CFD Module Helps Improve Your Modeling . . . . . . . . . 19 Where Do I Access the Documentation and Model Library? . . . . . . 20 Typographical Conventions . . . . . . . . . . . . . . . . . . . 22 Overview of the User’s Guide 24 C h a p t e r 2 : Q u i c k S t a r t G u i d e Modeling and Simulations of Fluid Flow 28 Modeling Strategy . . . . . . . . . . . . . . . . . . . . . . 28 Geometrical Complexities . . . . . . . . . . . . . . . . . . . 29 Material Properties . . . . . . . . . . . . . . . . . . . . . . 30 Defining the Physics . . . . . . . . . . . . . . . . . . . . . . 30 Meshing . . . . . . . . . . . . . . . . . . . . . . . . . . 31 The Choice of Solver and Solver Settings. . . . . . . . . . . . . . 33 The CFD Module Physics Interfaces 34 C h a p t e r 3 : C h e m i c a l S p e c i e s Tr a n s p o r t B r a n c h The Mechanisms for Chemical Species Transport 40 Coupling to Other Physics Interfaces . . . . . . . . . . . . . . . 41 Adding a Chemical Species Transport Interface . . . . . . . . . . . 41 The Transport of Concentrated Species Interface 43 Transport Feature . . . . . . . . . . . . . . . . . . . . . . 47 Reactions. . . . . . . . . . . . . . . . . . . . . . . . . . 50
  4. 4. 4 | C O N T E N T S Initial Values. . . . . . . . . . . . . . . . . . . . . . . . . 51 Boundary Conditions for the Transport of Concentrated Species Interface . 52 Mass Fraction . . . . . . . . . . . . . . . . . . . . . . . . 53 Flux . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 Inflow . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 No Flux . . . . . . . . . . . . . . . . . . . . . . . . . . 56 Outflow . . . . . . . . . . . . . . . . . . . . . . . . . . 57 Symmetry . . . . . . . . . . . . . . . . . . . . . . . . . 58 Flux Discontinuity . . . . . . . . . . . . . . . . . . . . . . 58 Open Boundary . . . . . . . . . . . . . . . . . . . . . . . 59 The Reacting Flow, Concentrated Species Interface 61 Transport Properties . . . . . . . . . . . . . . . . . . . . . 63 Diffusion . . . . . . . . . . . . . . . . . . . . . . . . . . 64 Porous Matrix Properties. . . . . . . . . . . . . . . . . . . . 64 Initial Values. . . . . . . . . . . . . . . . . . . . . . . . . 65 Domain Conditions for the Reacting Flow, Concentrated Species Interface . 65 Boundary Conditions for the Reacting Flow, Concentrated Species Interface 65 Reacting Boundary . . . . . . . . . . . . . . . . . . . . . . 66 The Reacting Flow, Diluted Species Interface 68 Transport Properties . . . . . . . . . . . . . . . . . . . . . 70 Porous Matrix Properties. . . . . . . . . . . . . . . . . . . . 71 Initial Values. . . . . . . . . . . . . . . . . . . . . . . . . 71 Domain Conditions for the Reacting Flow, Diluted Species Interface . . . 72 Boundary Conditions for the Reacting Flow, Diluted Species Interface. . . 72 Pair and Point Conditions for the Reacting Flow, Diluted Species Interface . 73 Theory for the Transport of Concentrated Species Interface 74 Multicomponent Mass Transport . . . . . . . . . . . . . . . . . 74 Multicomponent Diffusion: Mixture-Average Approximation . . . . . . 75 Multispecies Diffusion: Fick’s Law Approximation. . . . . . . . . . . 77 Multicomponent Thermal Diffusion . . . . . . . . . . . . . . . . 78 References for the Transport of Concentrated Species Interface . . . . . 78 Theory for the Reacting Flow, Concentrated Species Interface 79 Domain Equations . . . . . . . . . . . . . . . . . . . . . . 79 Combined Boundary Conditions . . . . . . . . . . . . . . . . . 79
  5. 5. C O N T E N T S | 5 Theory for the Reacting Flow, Diluted Species Interface 81 Effective Mass Transport Parameters in Porous Media . . . . . . . . . 81 C h a p t e r 4 : S i n g l e - P h a s e F l ow B r a n c h The Mechanisms for Modeling Single-Phase Flow Interfaces 84 Selecting the Right Interface. . . . . . . . . . . . . . . . . . . 84 The Single-Phase Flow Interface Options . . . . . . . . . . . . . . 85 Coupling to Other Physics Interfaces . . . . . . . . . . . . . . . 88 The Single-Phase Flow, Laminar Flow and Creeping Flow Interfaces 90 The Laminar Flow Interface . . . . . . . . . . . . . . . . . . . 90 The Creeping Flow Interface . . . . . . . . . . . . . . . . . . 94 Fluid Properties . . . . . . . . . . . . . . . . . . . . . . . 96 Volume Force . . . . . . . . . . . . . . . . . . . . . . . . 98 Initial Values. . . . . . . . . . . . . . . . . . . . . . . . . 99 The Single-Phase Flow, Turbulent Flow Interfaces 100 The Turbulent Flow, k- Interface . . . . . . . . . . . . . . . 100 The Turbulent Flow, Low Re k- Interface . . . . . . . . . . . . 101 The Turbulent Flow, Spalart-Allmaras Interface . . . . . . . . . . 101 The Single-Phase Flow, Rotating Machinery Interfaces 102 The Rotating Machinery, Laminar Flow Interface . . . . . . . . . . 103 The Rotating Machinery, Turbulent Flow, k- Interface . . . . . . . 104 Rotating Domain . . . . . . . . . . . . . . . . . . . . . . 104 Initial Values. . . . . . . . . . . . . . . . . . . . . . . . 106 Rotating Wall . . . . . . . . . . . . . . . . . . . . . . . 106 Boundary Conditions for the Single-Phase Flow Interfaces . . . . . . 107 Symmetry . . . . . . . . . . . . . . . . . . . . . . . . 108 Open Boundary . . . . . . . . . . . . . . . . . . . . . . 109 Boundary Stress . . . . . . . . . . . . . . . . . . . . . . 111 Periodic Flow Condition . . . . . . . . . . . . . . . . . . . 114 Flow Continuity . . . . . . . . . . . . . . . . . . . . . . 115 Pressure Point Constraint . . . . . . . . . . . . . . . . . . 116
  6. 6. 6 | C O N T E N T S The Wall Boundary Conditions . . . . . . . . . . . . . . . . 117 Wall. . . . . . . . . . . . . . . . . . . . . . . . . . . 117 The Inlet and Outlet Boundary Conditions . . . . . . . . . . . . 122 Inlet. . . . . . . . . . . . . . . . . . . . . . . . . . . 122 Outlet . . . . . . . . . . . . . . . . . . . . . . . . . . 129 Theory for the Single-Phase Flow Interfaces 134 General Single-Phase Flow Theory . . . . . . . . . . . . . . . 134 Compressible Flow . . . . . . . . . . . . . . . . . . . . . 136 The Mach Number Limit . . . . . . . . . . . . . . . . . . . 136 Incompressible Flow . . . . . . . . . . . . . . . . . . . . 137 Non-Newtonian Flow—The Power Law and the Carreau Model . . . . 138 The Reynolds Number. . . . . . . . . . . . . . . . . . . . 139 Numerical Stability—Stabilization Techniques for the Fluid Flow Interfaces 139 Pseudo Time Stepping for Laminar Flow Models . . . . . . . . . . 141 The Projection Method for the Navier-Stokes Equations . . . . . . . 142 The Boussinesq Approximation . . . . . . . . . . . . . . . . 144 About the Wall Boundary Conditions for Laminar Flow Interfaces . . . 145 Theory for the Inlet and Outlet Boundary Conditions . . . . . . . . 148 References for the Single-Phase Flow, Laminar Flow Interfaces. . . . . 153 Theory for the Turbulent Flow Interfaces 155 About Turbulent Flow . . . . . . . . . . . . . . . . . . . . 155 Reynolds-Averaged Navier-Stokes (RANS) Equations . . . . . . . . 156 Eddy Viscosity . . . . . . . . . . . . . . . . . . . . . . . 157 Turbulent Compressible Flow . . . . . . . . . . . . . . . . . 158 About the k- Turbulence Model . . . . . . . . . . . . . . . . 159 Realizability Constraint . . . . . . . . . . . . . . . . . . . 160 Pseudo Time Stepping for Turbulent Flow Models . . . . . . . . . 161 Wall Functions for Turbulent Flows . . . . . . . . . . . . . . . 162 Inlet Values for the Turbulence Length Scale and Intensity . . . . . . 163 Initial Guess. . . . . . . . . . . . . . . . . . . . . . . . 164 About the Low Reynolds Number k- Turbulence Model . . . . . . 164 About Wall Boundary Conditions for Turbulent Flow Interfaces . . . . 165 The Wall Distance Variable . . . . . . . . . . . . . . . . . . 166 About the Spalart-Allmaras Turbulence Model. . . . . . . . . . . 166 About the Wall Boundary Conditions for the Spalart-Allmaras Model . . 167 References for the Single-Phase Flow, Turbulent Flow Interfaces . . . . 168
  7. 7. C O N T E N T S | 7 Theory for the Rotating Machinery Interfaces 169 C h a p t e r 5 : T h i n - Fi l m F l ow B r a n c h The Mechanisms for Modeling Thin-Film Flow Interfaces 172 Selecting the Right Interface. . . . . . . . . . . . . . . . . . 172 Coupling to Other Physics Interfaces . . . . . . . . . . . . . . 173 The Lubrication Shell Interface 174 Fluid-Film Properties . . . . . . . . . . . . . . . . . . . . 176 Initial Values. . . . . . . . . . . . . . . . . . . . . . . . 178 Inlet. . . . . . . . . . . . . . . . . . . . . . . . . . . 179 Outlet . . . . . . . . . . . . . . . . . . . . . . . . . . 180 Wall. . . . . . . . . . . . . . . . . . . . . . . . . . . 181 Symmetry . . . . . . . . . . . . . . . . . . . . . . . . 182 The Thin-Film Flow Interface 184 Initial Values. . . . . . . . . . . . . . . . . . . . . . . . 185 Fluid-Film Properties . . . . . . . . . . . . . . . . . . . . 186 Border. . . . . . . . . . . . . . . . . . . . . . . . . . 188 Inlet. . . . . . . . . . . . . . . . . . . . . . . . . . . 189 Outlet . . . . . . . . . . . . . . . . . . . . . . . . . . 190 Theory for the Thin-Film Flow Interfaces 192 Conditions for Film Damping . . . . . . . . . . . . . . . . . 192 The Reynolds Equation . . . . . . . . . . . . . . . . . . . 193 Structural Loads . . . . . . . . . . . . . . . . . . . . . . 195 Gas Outflow Conditions . . . . . . . . . . . . . . . . . . . 195 Rarefaction and Slip Effects . . . . . . . . . . . . . . . . . . 196 Geometry Orientations . . . . . . . . . . . . . . . . . . . 198 References for the Thin-Film Flow Interfaces . . . . . . . . . . . 199
  8. 8. 8 | C O N T E N T S C h a p t e r 6 : M u l t i p h a s e F l ow , Two - P h a s e F l ow B r a n c h The Mechanisms for Modeling Multiphase Flow 202 Selecting the Right Interface. . . . . . . . . . . . . . . . . . 202 The Multiphase Flow Interface Options . . . . . . . . . . . . . 203 The Relationship Between the Interfaces . . . . . . . . . . . . . 203 Coupling to Other Physics Interfaces . . . . . . . . . . . . . . 207 The Laminar Flow, Two-Phase, Level Set and Phase Field Interfaces 208 The Laminar Two-Phase Flow, Level Set Interface . . . . . . . . . 208 The Laminar Two-Phase Flow, Phase Field Interface . . . . . . . . . 212 Domain Level Settings for the Level Set and Phase Field Interfaces . . . 213 Fluid Properties . . . . . . . . . . . . . . . . . . . . . . 214 Volume Force . . . . . . . . . . . . . . . . . . . . . . . 216 Gravity . . . . . . . . . . . . . . . . . . . . . . . . . 217 Initial Values. . . . . . . . . . . . . . . . . . . . . . . . 218 Boundary Conditions for the Level Set and Phase Field Interfaces . . . 219 Wall. . . . . . . . . . . . . . . . . . . . . . . . . . . 220 Initial Interface. . . . . . . . . . . . . . . . . . . . . . . 223 The Turbulent Flow, Two-Phase, Level Set and Phase Field Interfaces 225 The Turbulent Flow, Two-Phase Flow, Level Set Interface. . . . . . . 225 The Turbulent Two-Phase Flow, Phase Field Interface . . . . . . . . 227 Wall Distance Interface and the Distance Equation . . . . . . . . . 228 Theory for the Two-Phase Flow Interfaces 230 Level Set and Phase Field Equations . . . . . . . . . . . . . . . 230 Conservative and Non-Conservative Formulations . . . . . . . . . 233 Phase Initialization . . . . . . . . . . . . . . . . . . . . . 233 Numerical Stabilization . . . . . . . . . . . . . . . . . . . 234 References for the Level Set and Phase Field Interfaces . . . . . . . 235
  9. 9. C O N T E N T S | 9 C h a p t e r 7 : M a t h e m a t i c s , M ov i n g I n t e r f a c e B r a n c h The Level Set Interface 238 Level Set Model . . . . . . . . . . . . . . . . . . . . . . 240 Initial Values. . . . . . . . . . . . . . . . . . . . . . . . 241 Boundary Conditions for the Level Set Function . . . . . . . . . . 242 Inlet. . . . . . . . . . . . . . . . . . . . . . . . . . . 242 Initial Interface. . . . . . . . . . . . . . . . . . . . . . . 243 No Flow . . . . . . . . . . . . . . . . . . . . . . . . . 244 Outlet . . . . . . . . . . . . . . . . . . . . . . . . . . 244 Symmetry . . . . . . . . . . . . . . . . . . . . . . . . 245 The Phase Field Interface 246 Phase Field Model . . . . . . . . . . . . . . . . . . . . . 248 Initial Values. . . . . . . . . . . . . . . . . . . . . . . . 249 Boundary Conditions for the Phase Field Function . . . . . . . . . 250 Initial Interface. . . . . . . . . . . . . . . . . . . . . . . 250 Inlet. . . . . . . . . . . . . . . . . . . . . . . . . . . 251 Wetted Wall . . . . . . . . . . . . . . . . . . . . . . . 252 Outlet . . . . . . . . . . . . . . . . . . . . . . . . . . 252 Theory for the Level Set Interface 254 The Level Set Method . . . . . . . . . . . . . . . . . . . . 254 Conservative and Non-Conservative Form . . . . . . . . . . . . 256 Initializing the Level Set Function . . . . . . . . . . . . . . . . 257 Variables For Geometric Properties of the Interface . . . . . . . . 257 Reference for the Level Set Interface . . . . . . . . . . . . . . 258 Theory for the Phase Field Interface 259 About the Phase Field Method. . . . . . . . . . . . . . . . . 259 The Equations for the Phase Field Method . . . . . . . . . . . . 260 Conservative and Non-Conservative Forms . . . . . . . . . . . 261 Additional Sources of Free Energy . . . . . . . . . . . . . . . 262 Initializing the Phase Field Function . . . . . . . . . . . . . . . 262 Variables and Expressions . . . . . . . . . . . . . . . . . . 263 Reference For the Phase Field Interface . . . . . . . . . . . . . 264
  10. 10. 10 | C O N T E N T S C h a p t e r 8 : B u b b l y F l ow and Mi xture Mo del Branches The Bubbly Flow Interfaces 266 The Laminar Bubbly Flow Interface . . . . . . . . . . . . . . . 266 The Turbulent Bubbly Flow Interface . . . . . . . . . . . . . . 269 Fluid Properties . . . . . . . . . . . . . . . . . . . . . . 272 Volume Force . . . . . . . . . . . . . . . . . . . . . . . 275 Gravity . . . . . . . . . . . . . . . . . . . . . . . . . 276 Mass Transfer . . . . . . . . . . . . . . . . . . . . . . . 277 Initial Values. . . . . . . . . . . . . . . . . . . . . . . . 278 Boundary Conditions for the Bubbly Flow Interfaces . . . . . . . . 279 Wall. . . . . . . . . . . . . . . . . . . . . . . . . . . 280 Inlet. . . . . . . . . . . . . . . . . . . . . . . . . . . 282 Outlet . . . . . . . . . . . . . . . . . . . . . . . . . . 283 Symmetry . . . . . . . . . . . . . . . . . . . . . . . . 285 Gas Boundary Conditions . . . . . . . . . . . . . . . . . . 286 Pressure Point Constraint . . . . . . . . . . . . . . . . . . 287 The Mixture Model Interfaces 288 The Mixture Model, Laminar Flow Interface. . . . . . . . . . . . 288 The Mixture Model, Turbulent Flow Interface . . . . . . . . . . . 292 Mixture Properties . . . . . . . . . . . . . . . . . . . . . 293 Mass Transfer . . . . . . . . . . . . . . . . . . . . . . . 296 Volume Force . . . . . . . . . . . . . . . . . . . . . . . 297 Gravity . . . . . . . . . . . . . . . . . . . . . . . . . 298 Initial Values. . . . . . . . . . . . . . . . . . . . . . . . 299 Boundary Conditions for the Mixture Model Interfaces . . . . . . . 300 Wall. . . . . . . . . . . . . . . . . . . . . . . . . . . 301 Inlet. . . . . . . . . . . . . . . . . . . . . . . . . . . 302 Outlet . . . . . . . . . . . . . . . . . . . . . . . . . . 304 Symmetry . . . . . . . . . . . . . . . . . . . . . . . . 305 Theory for the Bubbly Flow Interface 307 The Bubbly Flow Equations . . . . . . . . . . . . . . . . . . 307 Turbulence Modeling in Bubbly Flow Applications . . . . . . . . . 309 References for the Laminar Bubbly Flow Interface . . . . . . . . . 311
  11. 11. C O N T E N T S | 11 Theory for the Mixture Model Interface 312 The Mixture Model Equations . . . . . . . . . . . . . . . . . 312 Dispersed Phase Boundary Conditions . . . . . . . . . . . . . 314 Turbulence Modeling in Mixture Models . . . . . . . . . . . . . 315 Slip Velocity Models . . . . . . . . . . . . . . . . . . . . . 317 References for the Mixture Model Interface. . . . . . . . . . . . 318 C h a p t e r 9 : Por o u s M e d i a a n d S u b s u r f a c e F l ow Br an ch The Mechanisms for Modeling Porous Media and Subsurface Flow 320 Selecting the Right Interface. . . . . . . . . . . . . . . . . . 320 The Porous Media Flow Interface Options . . . . . . . . . . . . 321 Coupling to Other Physics Interfaces . . . . . . . . . . . . . . 323 The Porous Media and Subsurface Flow Interfaces . . . . . . . . . 324 The Darcy’s Law Interface 325 Fluid and Matrix Properties . . . . . . . . . . . . . . . . . . 327 Mass Source . . . . . . . . . . . . . . . . . . . . . . . 329 Initial Values. . . . . . . . . . . . . . . . . . . . . . . . 329 Boundary Conditions for the Darcy’s Law Interface . . . . . . . . . 330 Pressure . . . . . . . . . . . . . . . . . . . . . . . . . 331 Mass Flux. . . . . . . . . . . . . . . . . . . . . . . . . 331 Inflow Boundary . . . . . . . . . . . . . . . . . . . . . . 332 Symmetry . . . . . . . . . . . . . . . . . . . . . . . . 333 No Flow . . . . . . . . . . . . . . . . . . . . . . . . . 334 The Brinkman Equations Interface 335 Fluid and Matrix Properties . . . . . . . . . . . . . . . . . . 337 Forchheimer Drag . . . . . . . . . . . . . . . . . . . . . 339 Mass Source . . . . . . . . . . . . . . . . . . . . . . . 340 Volume Force . . . . . . . . . . . . . . . . . . . . . . . 340 Initial Values. . . . . . . . . . . . . . . . . . . . . . . . 341 Boundary Conditions for the Brinkman Equations Interface. . . . . . 342
  12. 12. 12 | C O N T E N T S The Free and Porous Media Flow Interface 343 Fluid Properties . . . . . . . . . . . . . . . . . . . . . . 346 Porous Matrix Properties. . . . . . . . . . . . . . . . . . . 347 Forchheimer Drag . . . . . . . . . . . . . . . . . . . . . 348 Volume Force . . . . . . . . . . . . . . . . . . . . . . . 349 Initial Values. . . . . . . . . . . . . . . . . . . . . . . . 349 Symmetry . . . . . . . . . . . . . . . . . . . . . . . . 350 Boundary Conditions for the Free and Porous Media Flow Interface . . 351 Microfluidic Wall Conditions . . . . . . . . . . . . . . . . . 351 Theory for the Darcy’s Law Interface 353 Darcy’s Law—Equation Formulation . . . . . . . . . . . . . . 353 Theory for the Brinkman Equations Interface 355 About the Brinkman Equations . . . . . . . . . . . . . . . . 355 Brinkman Equations Theory. . . . . . . . . . . . . . . . . . 356 References for the Brinkman Equations Interface. . . . . . . . . . 357 Theory for the Free and Porous Media Flow Interface 358 Reference for the Free and Porous Media Flow Interface Theory. . . . 358 Chapt e r 10: Non-Iso ther m al Flow Br anch The Mechanisms for Modeling Non-Isothermal Flow 360 Selecting the Right Interface. . . . . . . . . . . . . . . . . . 360 The Non-Isothermal Flow Interface Options . . . . . . . . . . . 361 Coupling to Other Physics Interfaces . . . . . . . . . . . . . . 363 The Non-Isothermal Flow Interfaces 365 The Non-Isothermal Flow and Conjugate Heat Transfer, Laminar Flow Interfaces 367 The Non-Isothermal Flow, Laminar Flow Interface . . . . . . . . . 367 The Conjugate Heat Transfer, Laminar Flow Interface . . . . . . . . 370 The Non-Isothermal Flow and Conjugate Heat Transfer, Turbulent
  13. 13. C O N T E N T S | 13 Flow Interfaces 371 The Turbulent Flow, k- and Low Re k- Interfaces. . . . . . . . . 371 The Turbulent Flow, Spalart-Allmaras Model . . . . . . . . . . . 373 Shared Interface Features 375 Fluid . . . . . . . . . . . . . . . . . . . . . . . . . . 375 Wall. . . . . . . . . . . . . . . . . . . . . . . . . . . 378 Initial Values. . . . . . . . . . . . . . . . . . . . . . . . 381 Pressure Work . . . . . . . . . . . . . . . . . . . . . . 382 Viscous Heating . . . . . . . . . . . . . . . . . . . . . . 383 Theory for the Non-Isothermal Flow Interface 385 Reference for the Non-Isothermal Flow Interface . . . . . . . . . 385 C h a p t e r 1 1 : H i g h M a c h N u m b e r F l ow B r a n c h The High Mach Number Flow Interfaces 388 The High Mach Number Flow, Laminar Flow Interface. . . . . . . . 388 The High Mach Number Flow, Turbulent Flow, k- Interface . . . . . 391 The High Mach Number Flow, Turbulent Flow, Spalart-Allmaras Interface 393 Initial Values. . . . . . . . . . . . . . . . . . . . . . . . 394 Shared Interface Features. . . . . . . . . . . . . . . . . . . 395 Fluid . . . . . . . . . . . . . . . . . . . . . . . . . . 396 Inlet. . . . . . . . . . . . . . . . . . . . . . . . . . . 398 Outlet . . . . . . . . . . . . . . . . . . . . . . . . . . 400 Theory for the High Mach Number Interfaces 402 Consistent Inlet and Outlet Conditions . . . . . . . . . . . . . 402 References for the High Mach Number Flow Interfaces . . . . . . . 406 C h a p t e r 1 2 : H e a t Tr a n s f e r B r a n c h The Mechanisms for Modeling Heat Transfer in the CFD Module 408 Selecting the Right Interface. . . . . . . . . . . . . . . . . . 408 The Heat Transfer Interface Options . . . . . . . . . . . . . . 410
  14. 14. 14 | C O N T E N T S Coupling to Other Physics Interfaces . . . . . . . . . . . . . . 412 The Heat Transfer Interfaces 413 Accessing the Heat Transfer Interfaces via the Model Wizard . . . . . 413 The Heat Transfer Interface 415 Heat Transfer in Solids. . . . . . . . . . . . . . . . . . . . 417 Translational Motion . . . . . . . . . . . . . . . . . . . . 419 Pressure Work . . . . . . . . . . . . . . . . . . . . . . 420 Heat Transfer in Fluids. . . . . . . . . . . . . . . . . . . . 421 Viscous Heating . . . . . . . . . . . . . . . . . . . . . . 425 Heat Source. . . . . . . . . . . . . . . . . . . . . . . . 426 Manual Scaling . . . . . . . . . . . . . . . . . . . . . . . 428 Initial Values. . . . . . . . . . . . . . . . . . . . . . . . 429 Boundary Conditions for the Heat Transfer Interfaces. . . . . . . . 430 Temperature . . . . . . . . . . . . . . . . . . . . . . . 430 Thermal Insulation . . . . . . . . . . . . . . . . . . . . . 431 Outflow . . . . . . . . . . . . . . . . . . . . . . . . . 432 Symmetry . . . . . . . . . . . . . . . . . . . . . . . . 433 Heat Flux. . . . . . . . . . . . . . . . . . . . . . . . . 433 Inflow Heat Flux . . . . . . . . . . . . . . . . . . . . . . 434 Open Boundary . . . . . . . . . . . . . . . . . . . . . . 435 Surface-to-Ambient Radiation . . . . . . . . . . . . . . . . . 436 Periodic Heat Condition . . . . . . . . . . . . . . . . . . . 437 Boundary Heat Source. . . . . . . . . . . . . . . . . . . . 437 Heat Continuity . . . . . . . . . . . . . . . . . . . . . . 438 Pair Thin Thermally Resistive Layer . . . . . . . . . . . . . . . 439 Thin Thermally Resistive Layer. . . . . . . . . . . . . . . . . 440 Line Heat Source . . . . . . . . . . . . . . . . . . . . . . 441 Point Heat Source . . . . . . . . . . . . . . . . . . . . . 442 Convective Cooling . . . . . . . . . . . . . . . . . . . . . 443 Out-of-Plane Heat Transfer Features 445 Out-of-Plane Convective Cooling . . . . . . . . . . . . . . . 445 Out-of-Plane Radiation . . . . . . . . . . . . . . . . . . . 446 Out-of-Plane Heat Flux . . . . . . . . . . . . . . . . . . . 447 Change Thickness . . . . . . . . . . . . . . . . . . . . . 448
  15. 15. C O N T E N T S | 15 The Heat Transfer in Porous Media Interface 450 Porous Matrix . . . . . . . . . . . . . . . . . . . . . . . 451 Heat Transfer in Fluids. . . . . . . . . . . . . . . . . . . . 453 Thermal Dispersion . . . . . . . . . . . . . . . . . . . . . 455 Heat Source. . . . . . . . . . . . . . . . . . . . . . . . 456 Out-of-Plane Heat Transfer Theory 458 Equation Formulation . . . . . . . . . . . . . . . . . . . . 458 Activating Out-of-Plane Heat Transfer and Thickness . . . . . . . . 459 Theory for the Heat Transfer in Porous Media Interface 460 C h a p t e r 1 3 : G l o s s a r y Glossary of Terms 462
  16. 16. 16 | C O N T E N T S
  17. 17. 17 1 Introduction This guide describes the CFD Module, an optional add-on package for COMSOL Multiphysics designed to assist you to solve and model computational fluid dynamics, CFD, which is an increasingly important tool for modeling and simulation of fluid-flow. This chapter introduces you to the capabilities of the CFD Module. A summary of the physics interfaces and where you can find documentation and model examples is also included. The last section is a brief overview with links to each chapter in this guide. • About the CFD Module • Overview of the User’s Guide
  18. 18. 18 | C H A P T E R 1 : I N T R O D U C T I O N About the CFD Module In this section: • Why CFD is Important for Modeling • How the CFD Module Helps Improve Your Modeling • Where Do I Access the Documentation and Model Library? • Typographical Conventions Why CFD is Important for Modeling Computational fluid dynamics, CFD, is an increasingly important tool for modeling and simulating fluid-flow. It is a well established field within many different engineering disciplines; mechanical, chemical, civil, aeronautical, for example, and even more specialized areas such as biomedical engineering. Flow is such an integral part to so many different processes and applications that it must be understood and optimized to improve these applications. Often the flow itself is not the main focus in a simulation. Instead it is how the flow affects other process and application parameters that is important. The transport of species through the different parts of a chemical reactor, the effective cooling of a computer’s hard drive and electronics, the dispersion of energy within the damping film of an accelerometer, the extent of nuclear waste spreading from a subterranean repository—these are applications where the flow must be fully understood and are an integral part of the process’s description and simulation. In many situations, while the flow may add necessary operational parameters to a process or application, it is also affected by them. For example, a chemical reactor creates a pressure that disturbs the flow, the electronic heat affects the flows density and flow properties, the accelerometer elasticity imposes an oscillation on the flow, while the subterranean environments poroelasticity changes the course of the flow. A description combining several laws of physics is often required to produce accurate simulations of real world applications involving flow. Being able to effectively simulate such increases understanding of the studied process and application, which in turn leads to optimization of the flow and other parameters. Historically, a sophisticated modeling tool was a privilege that only large companies could afford, where the savings made in bulk production justified the computer
  19. 19. A B O U T T H E C F D M O D U L E | 19 software costs and need for specialized engineers. Today’s engineers are educated in the use of software modeling tools, and are often expected to create realistic models of advanced systems on their personal computers. This is where COMSOL Multiphysics® can improve your modeling capabilities. See also How the CFD Module Helps Improve Your Modeling. How the CFD Module Helps Improve Your Modeling The CFD Module is an optional package that extends the COMSOL Multiphysics® modeling environment with customized user interfaces and functionality optimized for the analysis of all types of fluid-flow. It is developed for a wide audience including researchers, developers, teachers, and students. It is not just a tool for CFD experts; it can be used by all engineers and scientists who work with systems and applications where momentum transport or fluid-flow are an important part of a process or application. The module uses the latest research possible to simulate flow and it provides the easiest possible simulation environment for CFD applications. The solvers and meshing is optimized for flow applications with robust stabilization parameters automatically available. The ready coupling of heat and mass transport to fluid-flow enables modeling of a wide range of industrial applications such as heat exchangers, turbines, separations units, and ventilation systems. Ready-to-use interfaces enable you to model laminar and turbulent flows in single- or multi-phase flow. Functionality to treat coupled free and porous media flow, stirred vessels, and fluid structure interaction is also included. Together with COMSOL Multiphysics and its other optional packages, the CFD Module takes flow simulations to a new level, allowing for arbitrary coupling to physics interfaces describing other physical phenomena, such as structural mechanics, electromagnetics, or even user-defined transport equations. This allows for effortless modeling of any Multiphysics application involving fluid-flow. Like all COMSOL modules, the interfaces described in this guide include all the steps available for the modeling process, which are described in detail in the COMSOL
  20. 20. 20 | C H A P T E R 1 : I N T R O D U C T I O N Multiphysics User’s Guide and the COMSOL Multiphysics Reference Guide (see Where Do I Access the Documentation and Model Library?): - Definitions of parameters and model variables - Creating, importing and manipulating your geometry - Specifying the fluid-flow, and material and heat transport material properties - Defining the reaction formulas and physics in the system and on boundaries, and coupling them to other physics - Meshing your modeling domain with appropriate consideration given to the reaction system’s behavior - Solving the equations that describe your system for stationary or dynamic behavior, or as a parametric or optimization study - Collecting and analyzing your results to present for further use in other analyses. Once you have defined a model, you can go back and make changes in all of the branches listed, while maintaining consistency in the other definitions throughout. You can restart the solver, for example, using the existing solution as an initial guess or even alter the geometry, while the equations and boundary conditions are kept consistent through the associative geometry feature. S E E A L S O • Overview of the User’s Guide • Why CFD is Important for Modeling Where Do I Access the Documentation and Model Library? A number of Internet resources provide more information about COMSOL Multiphysics, including licensing and technical information. The electronic documentation, Dynamic Help, and the Model Library are all accessed through the COMSOL Desktop. Note: If you are working directly from a PDF on your computer, the blue links do not work to open a model or documentation referenced in a different user guide. However, if you are using the online help desk in COMSOL Multiphysics, these links work to other modules, model examples, and documentation sets.
  21. 21. A B O U T T H E C F D M O D U L E | 21 T H E D O C U M E N T A T I O N The COMSOL Multiphysics User’s Guide and COMSOL Multiphysics Reference Guide describe all the interfaces included with the basic COMSOL license. These guides also have instructions about how to use COMSOL Multiphysics, and how to access the documentation electronically through the COMSOL Multiphysics help desk. To locate and search all the documentation, in COMSOL Multiphysics: • Click the buttons on the toolbar or • Select Help>Documentation ( ) or Help>Dynamic Help ( ) from the main menu and then either enter a search term or look under a specific module in the documentation tree. T H E M O D E L L I B R A R Y Each model comes with a theoretical background and step-by-step instructions to create the model. The models are available in COMSOL as MPH-files that you can open for further investigation. Use both the step-by-step instructions and the actual models as a template for your own modeling and applications. SI units are used to describe the relevant properties, parameters, and dimensions in most examples, but other unit systems are available. To open the Model Library, select View>Model Library ( ) from the main menu, and then search by model name or browse under a Module folder name. If you also want to review the documentation explaining how to build a model, select the model and click Model PDF or the Dynamic Help button ( ) to reach the PDF or HTML version, respectively. Alternatively, select Help>Documentation in COMSOL and search by name or browse by Module. If you have feedback or suggestions for additional models for the library (including those developed by you), feel free to contact us at info@comsol.com. C O M S O L W E B S I T E S Main corporate web site: http://www.comsol.com/ Worldwide contact information: http://www.comsol.com/contact/ Online technical support main page: http://www.comsol.com/support/ COMSOL Support Knowledge Base, your first stop for troubleshooting assistance, where you can search for answers to any COMSOL questions: http://www.comsol.com/support/knowledgebase/
  22. 22. 22 | C H A P T E R 1 : I N T R O D U C T I O N Product updates: http://www.comsol.com/support/updates/ C O N T A C T I N G C O M S O L B Y E M A I L For general product information, contact COMSOL at info@comsol.com. To receive technical support from COMSOL for the COMSOL products, please contact your local COMSOL representative or send your questions to support@comsol.com. An automatic notification and case number is sent to you by email. C O M S O L C O M M U N I T Y On the COMSOL web site, you find a user community at http://www.comsol.com/ community/. The user community includes a discussion forum, a model exchange, news postings, and a searchable database of papers and presentations. Typographical Conventions All COMSOL user guides use a set of consistent typographical conventions that should make it easy for you to follow the discussion, realize what you can expect to see on the screen, and know which data you must enter into various data-entry fields. In particular, you should be aware of these conventions: • Click text highlighted in blue to go to other information in the PDF. When you are using the online help desk in COMSOL Multiphysics, these links also work to other Modules, model examples, and documentation sets. • A boldface font of the shown size and style indicates that the given word(s) appear exactly that way on the COMSOL Desktop (or, for toolbar buttons, in the corresponding tooltip). For example, the Model Builder window ( ) is often referred to and this is the window that contains the model tree. As another example, the instructions might say to click the Zoom Extents button ( ), and this boldface font means that you can expect to see a button with that label (when you hover over the button with your mouse) on the COMSOL Desktop. • The names of other items on the COMSOL Desktop that do not have direct labels contain a leading uppercase letter. For instance, we often refer to the Main toolbar— the horizontal bar containing several icons that are displayed on top of the user interface. However, nowhere on the COMSOL Desktop, nor the toolbar itself, includes the word “Main”.
  23. 23. A B O U T T H E C F D M O D U L E | 23 • The forward arrow symbol > indicates selecting a series of menu items in a specific order. For example, Options>Results is equivalent to: From the Options menu, select Results. • A Code (monospace) font indicates you are to make a keyboard entry in the user interface. You might see an instruction such as “Enter (or type) 1.25 in the Current density edit field.” The monospace font also is an indication of programming code. or a variable name. An italic Code (monospace) font indicates user inputs and parts of names that can vary or be defined by the user. • An italic font indicates the introduction of important terminology. Expect to find an explanation in the same paragraph or in the Glossary. The names of other user guides in the COMSOL documentation set also have an italic font. The Difference Between Nodes, Buttons, and Icons • Node: A node is located in the Model Builder and has an icon image to the left of it. Right-click a node to open a Context Menu and to perform actions. • Button: Click a button to perform an action. Usually located on a toolbar (the Main toolbar or the Graphics window toolbar, for example), or in the upper right corner of a Settings window. • Icon: An icon is an image that displays on a window (for example, the Model Wizard or Model Library) or displays in a Context Menu when a node is right-clicked. Sometimes selecting an icon from a node’s Context Menu adds a node with the same image and name, sometimes it simply performs the action indicated (for example, Delete, Enable, or Disable).
  24. 24. 24 | C H A P T E R 1 : I N T R O D U C T I O N Overview of the User’s Guide The CFD Module User’s Guide gets you started with modeling CFD systems using COMSOL Multiphysics. The information in this guide is specific to the CFD Module. Instructions how to use COMSOL in general are included with the COMSOL Multiphysics User’s Guide. As detailed in the section Where Do I Access the Documentation and Model Library? this information is also searchable from the COMSOL Multiphysics software Help menu. T A B L E O F C O N T E N T S , G L O S S A R Y, A N D I N D E X To help you navigate through this guide, see the Contents, Glossary, and Index. Q U I C K S T A R T G U I D E The Quick Start Guide includes some basic modeling strategies to help you begin modeling fluid flow for your particular application area. For example, it gives some tips about how to control your material properties and set the optimal mesh to make solving the model easier and quicker. It also includes a summary of all the physics interfaces included with the CFD Module. T H E C H E M I C A L S P E C I E S TR A N S P O R T B R A N C H I N T E R F A C E S The transport and conversion of material is denoted as chemical species transport. Chemical Species Transport Branch include the Transport of Diluted Species and Transport of Concentrated Species interfaces, which are used for the simulation of chemical reactions, and mass or material transport through diffusion, convection and electromigration. The Mechanisms for Chemical Species Transport helps you select the best interface to use. The rest of the section describes the interfaces in detail as well as the underlying theory. T H E F L U I D F L O W B R A N C H I N T E R F A C E S There are several fluid-flow physics interfaces available. The various types of momentum transport that you can simulate includes laminar and turbulent flow, Newtonian and non-Newtonian flow, isothermal and non-isothermal flow, multiphase flow, and flow in porous media. Such flow can occur in thin-films or in bounded regions, and in stationary and rotating environments. Every section describes the applicable interfaces in detail and concludes with the underlying theory for the interfaces.
  25. 25. O V E R V I E W O F T H E U S E R ’ S G U I D E | 25 Single-Phase Flow Single-Phase Flow Branch chapter describes the many interfaces available for laminar and turbulent flow. The Mechanisms for Modeling Single-Phase Flow Interfaces helps you choose between the different interfaces that have subtle differences between them. Thin-Film Flow Thin-Film Flow Branch chapter describes the Lubrication Shell and Thin-Film Flow interfaces. If you also have the MEMS Module, the Film-Damping Shell and Thin-Film Gas Flow interfaces are also available. The Mechanisms for Modeling Thin-Film Flow Interfaces helps you select the correct interface to use. Multiphase Flow Multiphase Flow, Two-Phase Flow Branch chapter describes the Laminar Two-Phase Flow, Level Set and Phase Field interfaces, the Turbulent Two-Phase Flow, Level Set and Phase Field interfaces, the Laminar Bubbly and Laminar Turbulent Flow interfaces, and the Laminar and Turbulent Flow Mixture Model interfaces. Some multiphase flow is described using the Phase Field and Level Set interfaces found under the Mathematics>Moving Interface branch. In the CFD Module these features are integrated into the relevant physics interfaces. To help you select which interface to use see The Mechanisms for Modeling Multiphase Flow. Porous Media and Subsurface Flow Porous Media and Subsurface Flow Branch chapter describes the Darcy’s Law, Brinkman Equations, and Free and Porous Media Flow interfaces. To help you select which interface to use see The Mechanisms for Modeling Porous Media and Subsurface Flow. Non-Isothermal Flow Non-Isothermal Flow Branch chapter describes both the Non-Isothermal Flow and Conjugate Heat Transfer Laminar and Turbulent Flow interfaces. To help you select which interface to use see The Mechanisms for Modeling Non-Isothermal Flow. High Mach Flow High Mach Number Flow Branch chapter describes three variations of the same predefined multiphysics interface that combine the heat equation with either a laminar or a turbulent flow. The advantage of using the multiphysics interfaces—compared to adding the individual interfaces separately—is that you find predefined couplings in both directions.
  26. 26. 26 | C H A P T E R 1 : I N T R O D U C T I O N H E A T TR A N S F E R B R A N C H I N T E R F A C E S The module includes interfaces for the simulation of heat transfer. As with all other physical descriptions simulated by COMSOL Multiphysics, any description of heat transfer can be directly coupled to any other physical process. This is particularly relevant for systems based on fluid-flow, as well as mass transfer. The interfaces also allows you to account for heat sources and sinks, such as energy evolving from chemical reactions. Heat Transfer Branch chapter describes the enhanced Heat Transfer interfaces, including the Out-of-Plane Heat Transfer features. It also describes the Heat Transfer in Porous Media interface. To help you select which interface to use see The Mechanisms for Modeling Heat Transfer in the CFD Module. The rest of the chapter describes these interfaces in detail as well as the underlying theory.
  27. 27. 27 2 Quick Start Guide This chapter has some basic modeling strategies to help you get started modeling fluid flow in your application area. This chapter includes these topics: • Modeling and Simulations of Fluid Flow • The CFD Module Physics Interfaces
  28. 28. 28 | C H A P T E R 2 : Q U I C K S T A R T G U I D E Modeling and Simulations of Fluid Flow In this section: • Modeling Strategy • Geometrical Complexities • Material Properties • Defining the Physics • Meshing • The Choice of Solver and Solver Settings See also Overview of the Physics Interfaces in the COMSOL Multiphysics User’s Guide for general guidelines for effective modeling. Modeling Strategy Modeling and simulating fluid-flow is a cost-effective way for engineers and scientists to understand, develop, optimize, and control designs and processes. One of the most important considerations that have to be done before setting up a model is the accuracy that will be required in the simulation results. This consideration will determine the level of complexity of your model. Since fluid flow simulations are often computationally demanding, a multi-stage modeling strategy is usually required. This implies using simplified models as a starting point in a modeling project. Complexities can then be introduced gradually so that the influence of each refinement of the model description is well understood before introducing new complexities. Complexities in the modeling process can be introduced at different stages in order to achieve the desired accuracy. They may be introduced in the description of the geometry, the physical properties, and in the description of the governing equations. The Model Builder, which shows the model set-up as a sequence of operations in the Model Tree, is designed with this modeling strategy in mind. In addition to fluid flow, COMSOL Multiphysics and the CFD Module provide predefined couplings of fluid flow and other phenomena. Example of these couplings
  29. 29. M O D E L I N G A N D S I M U L A T I O N S O F F L U I D F L O W | 29 are heat transfer for free convection and structural mechanics for fluid-structure interaction simulations. You can also set up your own couplings by defining mathematical expressions of the dependent variables (velocity, pressure, temperature, etc) in the physics interfaces for arbitrary multiphysics combinations. S E E A L S O • Geometrical Complexities • Material Properties • Defining the Physics • Meshing • The Choice of Solver and Solver Settings Geometrical Complexities A complicated 3D CAD drawing is usually not the best place to start the modeling process. A 2D representation of a cross-section of the geometry may give valuable initial estimates of the flow field that can be used in setting up the full 3D model. For example, yo may be able to determine the pressure variations and the nature of the flow, if you need to use a turbulence model or not. This provides information on where in your final geometry the most amount of ‘change’ occurs, and require more concentration or resolution, or what parts of the modeling process is more sensitive than others. Simplifying the geometry itself can also help immensely. Making use of planes of symmetry and reducing the size of your geometry by half or even more is a great first step. Rounding-off corners is another. Small geometric parts require large amounts of mesh to fully resolve them, but the parts themselves probably have negligible effects on the fluid-flow of your system. They can be removed or modified in either the CAD tool or using the CAD Import Module. See the CAD Import Module User’s Guide for more information. S E E A L S O • Modeling Strategy • Material Properties • Defining the Physics • Meshing • The Choice of Solver and Solver Settings
  30. 30. 30 | C H A P T E R 2 : Q U I C K S T A R T G U I D E Material Properties Depending of the accuracy required in a simulation, the effort in obtaining data for fluid properties may also vary. In many cases, the dependency of the fluid properties on pressure and temperature has to be taken into account. For pressure-driven flow, it is usually a good approach to set up a first model using constant density and viscosity, to get a first estimate of the flow and pressure fields. Once the model works with constant properties, you can extend it by adding the accurate expressions for density and viscosity. For free convections, the density variations drive the flow and the fluid properties’ dependency of the modeled variables, for example temperature, has to be accounted for from the beginning. In difficult cases, with large temperature variations, it may be a good approach to run a time-dependent simulation even if the purpose of the simulation is to get the results at steady-state. S E E A L S O • Modeling Strategy • Geometrical Complexities • Defining the Physics • Meshing • The Choice of Solver and Solver Settings Defining the Physics The CFD Module contains a number of physics interfaces for single-phase flow, multiphase flow, laminar flow, nonisothermal flow, turbulent flow, and porous media flow. Also the definition of the physics depends on the accuracy required in a simulation. A fluid may be weakly compressible but could be approximated as incompressible if the required accuracy allows for that. A complex turbulence model may be replaced by a much simpler one, again if the required accuracy is comparably low. A first step in setting up the physics is to consider the simplest possible set-up as the initial step. The results from such a simulation may reveal difficulties that could be useful to be aware of when adding complexities to the physics. In addition to fluid flow, the fluid flow interfaces may also be coupled to any other physics interface in a multiphysics model.
  31. 31. M O D E L I N G A N D S I M U L A T I O N S O F F L U I D F L O W | 31 When setting up a complex multiphysics model involving fluid flow and other coupled physics, it is a good strategy to define and solve one physics at the time first. This allows for verification of the model set-up, for example to check if the intended domain and boundary settings are reflected in the solution of each decoupled physics. The alternative of debugging the model set-up with several coupled physics interfaces could be very time-consuming. In steady-state multiphysics simulations, it may also be a good strategy to solve the model for each physics in a decoupled set-up as a first step. The solution of the decoupled model can then be used as the initial guess for the fully coupled model. This is specially recommended for highly nonlinear models. The Study node in the Model Tree is designed for this modeling strategy. S E E A L S O • Modeling Strategy • Geometrical Complexities • Material Properties • Meshing • The Choice of Solver and Solver Settings Meshing The mesh used in a fluid flow simulation depends on the fluid flow model and on the accuracy required in the simulation. A fluid flow model may inherently required a dense resolution in order to yield convergence, even though the results may not require a high accuracy. In such case, it may be a good idea to change the fluid model. In other cases, the requirements of the accuracy in the results may set a limit of the maximum element size. There are a number of different elements for fluid flow modeling in COMSOL and these are shortly described below: • Free-meshing techniques generate unstructured meshes that can be used for most types of geometries. The mesh generating algorithms are highly automated, often creating a good quality mesh from minimal user input. This mesh type is therefore a good choice when the geometry of the domain is evident but the behavior of the mathematical model in a it is unknown. Yet, unstructured meshes tend to be isotropic or homogenous in nature, so that they fail to consider the geometry’s size and direction on the behavior of the mathematical model.
  32. 32. 32 | C H A P T E R 2 : Q U I C K S T A R T G U I D E • In many ways, the properties of structured meshes complement those of the unstructured type. Structured meshes provide high quality meshes with few elements for sufficiently simple geometries. The properties of a structured mesh can furthermore be used to create very efficient numerical methods. Finally, it is often easier to control the mesh when high anisotropy or large variations in mesh size and distribution is required, as the size of a structured mesh can be easily increased linearly or geometrically with geometric dimensions. • Swept meshes are generated in 3D by creating a mesh at a source face and then sweeping it along the domain to a destination face, such as from a cut in the cylindrical part of the polymerization reactor to the outlet face. A swept mesh is structured in the sweep direction, while the mesh at the source and destination faces can be either structured or unstructured. As is the case for structured meshes, the model geometry determines if a swept mesh is applicable. Swept meshes are typically ideal when the cross section in the sweep direction is constant, which is the case for channels and pipes, for instance. Revolving a mesh around symmetry axes is another useful sweep operation. • A boundary layer mesh is a mesh with an element distribution that is stacked or dense in the normal direction of a boundary. It is created by inserting structured layers of elements along specific boundaries that integrate into a surrounding structured or unstructured mesh. This type of mesh is very useful for many applications in fluid-flow applications coupled to mass and energy transfer, where thin boundary layers need to be resolved. This is also the default physics-induced mesh for fluid flow. Ideally, a mesh convergence analysis should be run in order to estimate the accuracy of a simulation. This means that the mesh should be made twice as fine in each spatial direction and the simulation carried out once again on the refined mesh. If the change in a critical solution parameter for the original mesh and the finer mesh are within the required accuracy, then the solution can be regarded as being mesh-converged. For practical reasons, it is seldom possible to make the mesh twice as fine in each direction. Instead, some critical regions can be selected and the mesh refined there. S E E A L S O • Modeling Strategy • Geometrical Complexities • Material Properties • Defining the Physics • The Choice of Solver and Solver Settings
  33. 33. M O D E L I N G A N D S I M U L A T I O N S O F F L U I D F L O W | 33 The Choice of Solver and Solver Settings The solvers and settings for the fluid flow interfaces are automatically selected for this purpose. They have been optimized for a large variety of fluid-flow conditions and applications. Yet, adjustments may sometimes be required. Like the previously discussed parameters, you should start simple an increase complexity. Testing your solver and its settings is done primarily by simplifying a lot of the previous parameters, such as the number of physics to solve for, or the size of the material property values. Once you are confident with a solver and its settings for a simplified description of your model, increase complexity and adjust the solver settings accordingly. Always, if you can, compare with known results from similar systems. S E E A L S O • Modeling Strategy • Geometrical Complexities • Material Properties • Defining the Physics • Meshing
  34. 34. 34 | C H A P T E R 2 : Q U I C K S T A R T G U I D E The CFD Module Physics Interfaces The table below shows the fluid-flow physics interfaces available with the CFD Module. The various types of momentum transport include laminar and turbulent flow, Newtonian and non-Newtonian flow, isothermal and non-isothermal flow, multiphase flow, and flow in porous media. Note: The Conjugate Heat Transfer Laminar Flow (nitf) and Turbulent Flow (nitf) interfaces found under the Heat Transfer branch are identical to the Non-Isothermal Flow interfaces. The only difference is that Heat transfer in solids is selected as the Default model. If Fluid is selected as the default model, the interface changes to a Non-Isothermal Flow interface. PHYSICS INTERFACE ICON TAG 1D 1D AXI 2D 2D AXI 3D Chemical Species Transport Transport of Concentrated Species chcs      Reacting Flow, Concentrated Species rfcs    Reacting Flow, Diluted Species rfds    Fluid Flow Single-Phase Flow Single-Phase Flow, Laminar Flow* spf    Turbulent Flow, Low Re k- spf   
  35. 35. T H E C F D M O D U L E P H Y S I C S I N T E R F A C E S | 35 Turbulent Flow, k- spf    Turbulent Flow, Spalart-Allmaras spf   Creeping Flow spf    Rotating Machinery, Laminar Flow rmspf   Rotating Machinery, Turbulent Flow, k- rmspf   Thin-Film Flow Lubrication Shell tffs    Thin-Film Flow tff  Multiphase Flow Bubbly Flow Laminar Bubbly Flow bf    Turbulent Bubbly Flow bf    Mixture Model Mixture Model, Laminar Flow mm    Mixture Model, Turbulent Flow mm    PHYSICS INTERFACE ICON TAG 1D 1D AXI 2D 2D AXI 3D
  36. 36. 36 | C H A P T E R 2 : Q U I C K S T A R T G U I D E Two-Phase Flow, Level Set Laminar Two-Phase Flow, Level Set tpf    Turbulent Two-Phase Flow, Level Set tpf    Two-Phase Flow, Phase Field Laminar Two-Phase Flow, Phase Field tpf    Turbulent Two-Phase Flow, Phase Field tpf    Porous Media and Subsurface Flow Brinkman Equations br    Darcy’s Law dl      Free and Porous Media Flow fp    Non-Isothermal Flow Laminar Flow nitf    Turbulent Flow, k- nitf    Turbulent Flow, Low Re k- nitf    Turbulent Flow, Spalart-Allmaras nitf    PHYSICS INTERFACE ICON TAG 1D 1D AXI 2D 2D AXI 3D
  37. 37. T H E C F D M O D U L E P H Y S I C S I N T E R F A C E S | 37 High Mach Number Flow Laminar Flow hmnf    Turbulent Flow, k- hmnf    Turbulent Flow, Spalart-Allmaras hmnf    Heat Transfer Heat Transfer in Fluids* ht      Heat Transfer in Porous Media ht      Conjugate Heat Transfer Laminar Flow nitf    Turbulent Flow, k- nitf    Turbulent Flow, Low Re k- nitf    Turbulent Flow, Spalart-Allmaras nitf    Mathematics Moving Interface Level Set ls      PHYSICS INTERFACE ICON TAG 1D 1D AXI 2D 2D AXI 3D
  38. 38. 38 | C H A P T E R 2 : Q U I C K S T A R T G U I D E Phase Field pf      * An enhanced interface is one that is included with the base COMSOL package but has added functionality for this Module. PHYSICS INTERFACE ICON TAG 1D 1D AXI 2D 2D AXI 3D
  39. 39. 39 3 Chemi ca l Species Transport Branch The physics interfaces in the Chemical Species Transport branch ( ) in the Model Wizard accommodate all types of material transport that can occur through diffusion, convection and migration due to an electric field—either alone or in combination with one another. The Mechanisms for Chemical Species Transport helps you choose the best one to start with. • The Transport of Concentrated Species Interface • The Reacting Flow, Concentrated Species Interface • The Reacting Flow, Diluted Species Interface • Theory for the Transport of Concentrated Species Interface • Theory for the Reacting Flow, Concentrated Species Interface • Theory for the Reacting Flow, Diluted Species Interface Note: See also The Transport of Diluted Species Interface and the Theory for the Transport of Diluted Species Interface in the COMSOL Multiphysics User’s Guide.
  40. 40. 40 | C H A P T E R 3 : C H E M I C A L S P E C I E S TR A N S P O R T B R A N C H The Mechanisms for Chemical Species Transport The behavior of chemical reactions in real environments is often not adequately described by the assumptions of perfectly mixed or controlled environments. This means that the transport of material through both time and space need to be considered. Physics interfaces in the Chemical Species Transport branch accommodate all types of material transport that can occur through diffusion, convection and migration due to an electric field—either alone or in combination with one another. There are formulations for these equations in diluted and concentrated mixtures, as well as open or free and porous media. The Transport of Diluted Species Interface ( ) (described in the COMSOL Multiphysics User’s Guide) is applicable for solutions (either fluid or solid) where the transported species have concentrations at least one order of magnitude less than their solvent. The settings for this physics interface can be chosen so as to simulate chemical species transport through diffusion (Fick’s law), convection (when coupled to fluid flow), and migration (when coupled to an electric field—electrokinetic flow). The Transport of Concentrated Species Interface ( ) is used for modeling transport within mixtures where a no one component is clearly dominant. Often the concentrations of the participating species are of the same order of magnitude, and the molecular effects of respective species on each other needs to be considered. This interface supports transport through Fickian diffusion, a mixture average diffusion model, and as described by the Maxwell-Stefan equations. The Reacting Flow, Concentrated Species Interface multiphysics interface ( ) combines the Transport of Concentrated Species and the Free and Porous Media Flow interfaces. This means that mass and momentum transport can be modeled from a single physics interface, with the couplings between velocity field and mixture density set up automatically. Also, the effective transport coefficients in a porous matrix domain are derived based on the corresponding values in for a non-porous domain. This interface is applicable for fluid flow in the laminar regime. The Reacting Flow, Diluted Species Interface e ( ) merges the functionality of the Transport of Diluted Species and the Free and Porous Media Flow physics interfaces into a multiphysics interface. In this way coupled mass and momentum transport in free and porous media can be modeled from a single physics interface, with the model
  41. 41. T H E M E C H A N I S M S F O R C H E M I C A L S P E C I E S TR A N S P O R T | 41 coupling for the velocity field set up automatically. In addition, the effective transport coefficients in a porous matrix domain can be derived based on the corresponding values in for a non-porous domain. These topics are briefly discussed in this section: • Coupling to Other Physics Interfaces • Adding a Chemical Species Transport Interface See also Overview of the Physics Interfaces in the COMSOL Multiphysics User’s Guide. Coupling to Other Physics Interfaces When you are simulating applications that can be described by the material transport physics interfaces in the Chemical Species Transport branch, there is often a need to couple the material transport to other physics. Convection is often the cause of the material transport, so couplings to fluid-flow interfaces are required. The CFD Module includes physics interfaces for laminar flow and porous media flow as well as more advanced descriptions of fluid flow, such as turbulent and multiphase flow. Moreover, most chemical reactions or other type of material processing, such as casting, either require or produce heat, which in turn affects both the reaction and other physical processes connected to the system. The CFD Module includes physics interface for heat transfer through conduction and convection as well as through porous media. More extensive description of heat transfer, such as surface-to-surface radiation, can be found in the Heat Transfer Module. Finally, COMSOL Multiphysics supports simulations of electrostatics or DC-based physical phenomena, even if conductivity is nonlinear. If the electric field is AC/DC in nature, or if your system is affected by electromagnetic waves, then the AC/DC Module and RF Module include appropriate physics interfaces for such phenomena. Furthermore, some applications of electrochemical reactions, particularly in electrochemical power source applications, are better handled by the Batteries & Fuel Cells Module. Adding a Chemical Species Transport Interface You can add a chemical species transport interface when first creating a new model, or at any time during the modeling process.
  42. 42. 42 | C H A P T E R 3 : C H E M I C A L S P E C I E S TR A N S P O R T B R A N C H 1 For a new model, select physics interfaces as the second step in the New Model window (after specifying the space dimension). In an active model, right-click the Physics node in the Model Tree and select Add Physics ( ). 2 Expand the Chemical Species Transport node in the list of physics interfaces and select one of the available chemical species transport interfaces. 3 Click the Add Selected button ( ). The physics interface displays under Added to model. 4 Under Dependent variables, specify the number of species (concentrations or mass fractions) and their names. 5 Continue by adding more interfaces and specifying the number of species (concentrations or mass fractions) that are to be simulated in a mass transport physics interface when adding that interface. Under Dependent variables, enter the Number of species. To add a single species, click the Add Concentration button ( ) underneath the table or enter a value into the Number of species edit field. Click the Remove Concentration button ( ) underneath the table if required. The Transport of Concentrated Species interface needs to contain at least two species (the default). You can also edit the strings or names directly in the table. The names must be unique for all species (and all other dependent variables) in the model. 6 Click the Next button ( ) and chose a Study type. 7 In the upper-right corner of the Select Study Type page, click the Finish button ( ).
  43. 43. T H E TR A N S P O R T O F C O N C E N T R A T E D S P E C I E S I N T E R F A C E | 43 The Transport of Concentrated Species Interface The Transport of Concentrated Species interface ( ), found under the Chemical Species Transport branch ( ) in the Model Wizard, has the equations, boundary conditions, and reaction terms for modeling chemical species transport in mixtures by solving for the mass fractions. It supports the simulation of transport by convection, diffusion, and migration in 1D, 2D, and 3D as well as for axisymmetric models in 1D and 2D. The interface defines the equations for the species mass fractions, including a diffusion model (Mixture-averaged or Fick’s law). For a more extensive introduction to the interface see the Theory for the Transport of Concentrated Species Interface. Some examples what you can study with this interface include: • The evolution of chemical species transported by convection and diffusion. • The migration in an electric field in the case of ionic species, in mixtures and solutions that cannot be deemed as being diluted. • Concentrated solutions or gas mixtures, where the concentration of all participating species are of the same order of magnitude, and therefore their molecular and ionic interaction with each other must be considered. This implies that the diffusive transport of a single species is dependent on the mixture composition, and possibly on the temperature, an electric potential, and pressure as well. The default transport mechanism is the Convection and Diffusion node, which is dynamic and is derived from which transport mechanism is activated. When you add this interface, these default nodes are also added to the Model Builder— Convection and Diffusion (which applies a Mixture-average diffusion model), No Flux, and Initial Values. Right-click the main node to add other features that implement, for example, boundary conditions and reactions. To display additional features for the physics interfaces and feature nodes, click the Show button ( ) in the Model Builder and select the applicable section. S H O W M O R E O P T I O N S F O R P H Y S I C S I N T E R F A C E S A N D F E A T U R E N O D E S After clicking the Show button ( ), some sections display on the Settings window when a node is clicked and other features are available from the context menu when a
  44. 44. 44 | C H A P T E R 3 : C H E M I C A L S P E C I E S TR A N S P O R T B R A N C H node is right-clicked. For each physics interface, the additional sections that can be displayed included Equation, Advanced Settings, Discretization, Consistent Stabilization, and Inconsistent Stabilization. You can also click the Expand Sections button ( ) in the Model Builder to always show some sections or click the Show button ( ) and select Reset to Default to reset to display only the Equation and Override and Contribution sections. For most physics feature nodes, both the Equation and Override and Contribution sections are always available. Click the Show button ( ) and then select Equation View to display the Equation View node under all physics interface nodes in the Model Builder. Availability of each feature, and whether it is described for a particular interface or node, is based on the individual physics interface and feature node. For example, the Discretization, Advanced Settings, Consistent Stabilization, and Inconsistent Stabilization sections are often described individually throughout the documentation as there are unique settings. See Showing and Expanding Advanced Feature Nodes and Sections in the COMSOL Multiphysics User’s Guide for additional links to the relevant documentation. I N T E R F A C E I D E N T I F I E R The interface identifier is a text string that can be used to reference the respective physics interface if appropriate. Such situations could occur when coupling this interface to another physics interface, or when trying to identify and use variables defined by this physics interface, which you use to reach the fields and variables in expressions, for example. You can change it to any unique string in the Identifier edit field. The default identifier (for the first interface in the model) is chcs. D O M A I N S E L E C T I O N Select the domains where you want to define the species equations. The default setting is to include all domains in the model. E Q U A T I O N The base equation for an individual species i is given in the Equations section and is: (3-1) The displayed formulation changes depending on the active transport mechanisms and the selected diffusion model. t  i   iu +  ji R+ i –=
  45. 45. T H E TR A N S P O R T O F C O N C E N T R A T E D S P E C I E S I N T E R F A C E | 45 TR A N S P O R T M E C H A N I S M S This section lets you select a diffusion model and additional active transport mechanisms.The interface includes the following transport mechanisms: • Diffusion is always active. You can select from different diffusion models available from the Diffusion model list. • Convection is active by default. To activate or deactivate convection, select or clear the Convection check box. The second term on the left-hand side of Equation 3-3 represent mass transport by convection. • Migration of ionic species is not active by default. To activate or deactivate migration, select or clear the Migration in electric field check box. The migration term is part of the relative mass flux vector. Select a Diffusion model—Mixture-averaged (the default) or Fick’s law. The Mixture-averaged model is less computational expensive but also requires the Maxwell-Stefan diffusivities. The Fick’s law model is a general model to be used when the diffusion is known to be Fickian, or when molecular diffusion is not the dominating transport mechanism and a robust but low order model is wanted. Mixture-Averaged Diffusion Model When using the Mixture-averaged diffusion model the relative mass flux vector is where the last term on the right-hand side is the migratory flux, which you add by selecting the Migration in electric field check box. The mixture-averaged diffusion coefficient is computed as where Dik (SI unit: m2 /s) are the multicomponent Maxwell-Stefan diffusivities, which you have to supply as an input to the model. Fick’s Law Diffusion Model When using the Fick’s law diffusion model the relative mass flux vector is ji Di m i iDi m M M --------- Di T T T -------- izium i F V+ + +    –= Di m Di m 1 i– xk Dik --------- k i N  --------------------------= ji Di F i iDi F M M --------- Di T T T -------- izium i F V+ + +    –=
  46. 46. 46 | C H A P T E R 3 : C H E M I C A L S P E C I E S TR A N S P O R T B R A N C H where (SI unit: m2 /s) is a user defined diffusion coefficient (isotropic, diagonal, or symmetric). The last term on the right hand side is the migratory flux, which you add by selecting the Migration in electric field check box. S P E C I E S Select the species that this interface solves using the mass constraint in Equation 3-6 (that is, its value comes from the fact that the sum of all mass fractions must equal 1). Select the preferred species in the From mass constraint list. To minimize the impact of any numerical errors, use the species with the highest concentration. By default, the software uses the first species. D E P E N D E N T V A R I A B L E S Add or remove species in the model and also change the names of the dependent variables that represent the species concentrations. Specify the Number of species. There must be at least two species. To add a single species, click the Add Concentration button ( ) under the table. To remove a species, select it in the list and click the Remove Concentration button ( ) under the table. Edit the names of the species directly in the table. Note: The species are dependent variables, and their names must be unique with respect to all other dependent variables in the model. A D V A N C E D S E T T I N G S To display this section, click the Show button ( ) and select Advanced Physics Interface Options. Normally these settings do not need to be changed. From the Regularization list, select On (default) or Off. When turned On, regularized mass fractions are calculated such that . Regularized mass fractions are used to for the calculation of composition-dependent material properties, such as the density. D I S C R E T I Z A T I O N To display this section, click the Show button ( ) and select Discretization. Select a Frame type—Spatial (the default) or Material. Select Linear (the default), Quadratic, Cubic, or Quartic for the element order of the elements for the Mass fraction. Di F 0 wi reg 1 
  47. 47. T H E TR A N S P O R T O F C O N C E N T R A T E D S P E C I E S I N T E R F A C E | 47 C O N S I S T E N T A N D I N C O N S I S T E N T S T A B I L I Z A T I O N To display this section, click the Show button ( ) and select Stabilization. See Show Stabilization in the COMSOL Multiphysics User’s Guide. See also Stabilization Techniques and Numerical Stabilization in the COMSOL Multiphysics Reference Guide. Settings unique to this interface are listed below. • There are two consistent stabilization methods that are available when using the Mixture-Averaged or Fick’s Law diffusion model—Streamline diffusion and Crosswind diffusion. Both are active by default. • There is one inconsistent stabilization method, Isotropic diffusion, which is available when using the Mixture-Averaged or Fick’s Law diffusion model. S E E A L S O • Transport Feature • Reactions • Initial Values • Boundary Conditions for the Transport of Concentrated Species Interface Transport Feature The Transport node adds the equations for transport of concentrated species and provides inputs for the material properties. The feature is dynamic and includes the input fields required by the active transport mechanisms and diffusion model. The name of the transport feature is composed of the included transport mechanisms, and can be one of the following—Diffusion, Diffusion and Migration, Convection and Diffusion, or Convection, Diffusion, and Migration. To display additional features for the physics interface feature nodes (and the physics interfaces), click the Show button ( ) on the Model Builder and then select the applicable option. S H O W O R H I D E O P T I O N S F O R P H Y S I C S F E A T U R E N O D E S For most physics interface feature nodes, the Equation and Override and Contribution sections are displayed on a feature node Settings window by default. You can also click the Expand Sections button on the Model Builder to always show some sections in an expanded view, or go to these menus to hide options as required. Click the Show button ( ) on the Model Builder and then select Equation View to display the Equation View node under all physics interface nodes in the Model Builder.
  48. 48. 48 | C H A P T E R 3 : C H E M I C A L S P E C I E S TR A N S P O R T B R A N C H See the description for each physics interface for more links or go to Showing and Expanding Advanced Feature Nodes and Sections for more information. D O M A I N S E L E C T I O N Select the domains where you want to apply the transport feature. M O D E L I N P U T S Specify the velocity field, the pressure, and the temperature to be used in the interface. The velocity becomes the model input for the convective part of the transport. The temperature model input is used when calculating the density from the ideal gas law, but also when thermal diffusion is accounted for by supplying thermal diffusion coefficients. If the model includes migration, the model input section also includes the electric potential as the model input for transport due to migration. Select the source of the Velocity field u: • Select User defined to enter values or expressions for the velocity components (SI unit: m/s) in the edit field that appears. This input is always available. • In addition, you can select velocity fields defined by a fluid-flow interface present in the model (if any). For example, you can then select Velocity field (spf/fp1) to use the velocity field defined by the Fluid Properties feature fp1 in a single-phase flow interface spf. Select the source of the absolute Pressure pa: • Select User defined to enter a value or an expression for the absolute pressure (SI unit: Pa) in the edit field that appears. This input is always available. • In addition, select a pressure defined by a fluid-flow interface present in the model (if any). For example, you can then select Pressure (spf/fp1) to use the pressure defined by the Fluid Properties feature fp1 in a Single-Phase Flow interface spf. Selecting a pressure variable also activates a check box for defining the reference pressure, where 1 [atm] has been automatically included. This allows you to use a system-based (gauge) pressure, while automatically including the reference pressure in the absolute pressure. Select the source of the Temperature field T: • Select User defined to enter a value or an expression for the temperature (SI unit: K). This input is always available. • If required, select a temperature defined by a heat transfer interface present in the model (if any). For example, you can then select Temperature (ht/fht1) to use the
  49. 49. T H E TR A N S P O R T O F C O N C E N T R A T E D S P E C I E S I N T E R F A C E | 49 temperature defined by the Fluid Heat Transfer feature fht1 in a Heat Transfer interface ht. When the transport feature includes migration you select the source of the Electric potential V: • Select User defined to enter a value or expression for the electric potential (SI unit: V). This input is always available. • If required, select an electric potential defined by an electromagnetics interface that is present in the model (if any). For example, you can then select Electric potential (ec/cucn1) to use the electric field defined by the Current Conservation node cucn1 in an Electric Currents interface ec. D E N S I T Y Define the density of the mixture and the molar masses of the participating species. Mixture Density Select a way to define the density from the Mixture density list: • Select Ideal gas (the default) to use the ideal gas law law to compute the mixture density using the absolute pressure and temperature defined in the Model inputs section. • Select User defined to enter a value or expression for the mixture density  in the density edit field that appears. Molar Mass Enter a value or expression for the Molar mass M (SI unit: kg/mol) of each species. The default value for each species is 0.032 kg/mol, which is the molar mass of O2 gas. D I F F U S I O N Specify the molecular and thermal diffusivities of the present species. Using a Mixture-averaged diffusion model, you specify the Maxwell-Stefan diffusivity matrix Dik, and when using a Fick’s law diffusion model, you specify the Diffusion coefficient for each of the species. Maxwell-Stefan Diffusivity Matrix Using a Mixture-averaged diffusion model, the Maxwell-Stefan diffusivity matrix Dik (SI unit: m2/s) can be specified. For a simulation involving Q species the Maxwell-Stefan  pM RgT -----------= Di F
  50. 50. 50 | C H A P T E R 3 : C H E M I C A L S P E C I E S TR A N S P O R T B R A N C H diffusivity matrix is an Q-by-Q symmetric matrix, where the diagonal components are 1. Enter values for the upper triangular components, Dij, which respectively describes the interdiffusion between species number i and number j. The numbering of the species corresponds to the order, from top to bottom, used for all the input fields for species properties (see for example the molar mass edit fields in the Density section). Diffusion Coefficient Using a Fick’s law diffusion model, the diffusion is by default assumed to be isotropic and governed by a Diffusion coefficient (SI unit: m2 /s) for each of the species. To allow for a general representation, it is also possible to use diffusion matrices (diagonal, symmetric or anisotropic). Multicomponent Thermal Diffusion To model thermal diffusion you can prescribe the thermal diffusion coefficients (SI unit: m2 /s), entering one thermal diffusion coefficient for each species in the corresponding edit field. In a multicomponent mixture, the sum of the thermal diffusion coefficients is zero. The default value for all thermal diffusion coefficients is 0. M I G R A T I O N I N E L E C T R I C F I E L D This section is available when the Migration in electric field check box is selected on the Transport of Concentrated Species Settings window. Enter values or expressions for the Mobility variables um,w1 and um,w2 (SI unit: s·mol /kg) and Charge number variables zw1 and zw2 (unitless). Reactions In order to account for consumption or production of species due to reactions, the Reactions node adds rate expressions to the right hand side of the species transport equations. To display additional features for the physics interface feature nodes (and the physics interfaces), click the Show button ( ) on the Model Builder and then select the applicable option. S H O W O R H I D E O P T I O N S F O R P H Y S I C S F E A T U R E N O D E S For most physics interface feature nodes, the Equation and Override and Contribution sections are displayed on a feature node Settings window by default. You can also click the Expand Sections button on the Model Builder to always show some sections in an expanded view, or go to these menus to hide options as required. Click the Show Di F Di T
  51. 51. T H E TR A N S P O R T O F C O N C E N T R A T E D S P E C I E S I N T E R F A C E | 51 button ( ) on the Model Builder and then select Equation View to display the Equation View node under all physics interface nodes in the Model Builder. See the description for each physics interface for more links or go to Showing and Expanding Advanced Feature Nodes and Sections for more information. D O M A I N S E L E C T I O N Select the domains where you want to use the rate expressions defined in the Reactions feature node. R E A C T I O N S Add a rate expression, Ri (SI unit: kg/(m3 ·s)), for all individual species present except the one computed from the mass constrain (see Species). Enter a value or expression in the edit field of the corresponding species. Enable the Mass transport to other phases check box if there is a net mass change in the domain due to the reactions. This will allow setting a reaction rate also for the species calculated from the mass constraint. To display additional features for the physics interface feature nodes (and the physics interfaces), click the Show button ( ) on the Model Builder and then select the applicable option. S H O W O R H I D E O P T I O N S F O R P H Y S I C S F E A T U R E N O D E S For most physics interface feature nodes, the Equation and Override and Contribution sections are displayed on a feature node Settings window by default. You can also click the Expand Sections button on the Model Builder to always show some sections in an expanded view, or go to these menus to hide options as required. Click the Show button ( ) on the Model Builder and then select Equation View to display the Equation View node under all physics interface nodes in the Model Builder. See the description for each physics interface for more links or go to Showing and Expanding Advanced Feature Nodes and Sections for more information. Initial Values The Initial Values node adds initial values for the mass fractions that can serve as a an initial condition for a transient simulation, or as an initial guess for a nonlinear solver. If you need to specify more than one set of initial values, you can add additional Initial Values nodes from the Other menu appearing when you right-click the physics interface node.
  52. 52. 52 | C H A P T E R 3 : C H E M I C A L S P E C I E S TR A N S P O R T B R A N C H D O M A I N S E L E C T I O N Select the domains where you want to define the initial values. I N I T I A L V A L U E S Enter a value or an expression for the initial value of each mass fraction i (except the one determined by the mass constraint) in the Mass fraction edit fields. The default value is 1/Q, where Q is the number of species. Boundary Conditions for the Transport of Concentrated Species Interface The following boundary conditions are available on exterior boundaries: • Mass Fraction • Inflow • Flux • No Flux (the default boundary condition) • Symmetry • Outflow • Open Boundary For interior boundaries, continuity of the mass fraction of all species is the default boundary condition. In addition, the following boundary conditions are available on interior boundaries: • Mass Fraction • Flux Discontinuity Note: Periodic Condition is also available as described in the COMSOL Multiphysics User’s Guide. For axisymmetric models, COMSOL Multiphysics takes the axial symmetry boundaries (at r = 0) into account and automatically adds an Axial Symmetry feature to the model that is valid on the axial symmetry boundaries only.
  53. 53. T H E TR A N S P O R T O F C O N C E N T R A T E D S P E C I E S I N T E R F A C E | 53 Mass Fraction The Mass Fraction node adds boundary conditions for the species mass fractions; for example, the following condition specifies the mass fraction of species i: i = i,0. You can set the mass fractions of all species except the one computed from the mass constraint, which ensures that the sum of the mass fractions is equal to one (see Species). To display additional features for the physics interface feature nodes (and the physics interfaces), click the Show button ( ) on the Model Builder and then select the applicable option. S H O W O R H I D E O P T I O N S F O R P H Y S I C S F E A T U R E N O D E S For most physics interface feature nodes, the Equation and Override and Contribution sections are displayed on a feature node Settings window by default. You can also click the Expand Sections button on the Model Builder to always show some sections in an expanded view, or go to these menus to hide options as required. Click the Show button ( ) on the Model Builder and then select Equation View to display the Equation View node under all physics interface nodes in the Model Builder. See the description for each physics interface for more links or go to Showing and Expanding Advanced Feature Nodes and Sections for more information. B O U N D A R Y S E L E C T I O N Select the boundaries where you want to apply a mass fraction boundary condition. P A I R S E L E C T I O N If Mass Fraction is selected from the Pairs submenu, select the boundary pair where you want to define a mass fraction boundary condition. First an identity pair may have to be created. Ctrl-click to deselect. M A S S F R A C T I O N Specify the mass fraction for each species individually. Select the check box for the species for which you want to specify the mass fraction, and enter a value or expression in the corresponding edit field. Conversely, if you want to use another boundary condition for a specific species, clear the check box for that species’ mass fraction.
  54. 54. 54 | C H A P T E R 3 : C H E M I C A L S P E C I E S TR A N S P O R T B R A N C H Flux The Flux node can be used to specify the total mass flux across a boundary. The total inward flux is defined in the manner of: (3-2) In Equation 3-2, N0,i (SI unit: Pa·s/m) is an arbitrary flux expression for species i and can be a function of i, temperature, pressure, or even electric potential. You can set the mass flux of all species except the one computed from the mass constraint, which ensures that the sum of the mass fractions is equal to one (see Species). The Flux feature can for example be used to describe a heterogeneous reaction or a separation process occurring at the boundary. To display additional features for the physics interface feature nodes (and the physics interfaces), click the Show button ( ) on the Model Builder and then select the applicable option. S H O W O R H I D E O P T I O N S F O R P H Y S I C S F E A T U R E N O D E S For most physics interface feature nodes, the Equation and Override and Contribution sections are displayed on a feature node Settings window by default. You can also click the Expand Sections button on the Model Builder to always show some sections in an expanded view, or go to these menus to hide options as required. Click the Show button ( ) on the Model Builder and then select Equation View to display the Equation View node under all physics interface nodes in the Model Builder. See the description for each physics interface for more links or go to Showing and Expanding Advanced Feature Nodes and Sections for more information. B O U N D A R Y S E L E C T I O N Select the boundaries where you want to apply a flux boundary condition. I N W A R D F L U X Specify the Inward mass flux for each species individually. Select the check box for the species for which you want to prescribed a flux and enter a value or expression for the flux in the corresponding edit field. Conversely, if you want to use another boundary condition for a specific species, clear the check box for that species’ flux. Use a positive value for an inward flux. n– iu ji+  N0 i=
  55. 55. T H E TR A N S P O R T O F C O N C E N T R A T E D S P E C I E S I N T E R F A C E | 55 Inflow The Inflow node adds a boundary condition for an inflow boundary, where you specify a condition for all species. The condition can be specified using these quantities: • The mass fraction: 0 • The mole fraction: xx0 • The molar concentration (SI unit: mol/m3 ) cc0 • The number density, which describes the number of particles per volume (SI unit: 1/m3 ): nn0 A concentration quantity other than the mass fractions can only be used when all species are defined, as in the Inflow condition. The other quantities are composition dependent and therefore unambiguous only when all species are defined. For this reason the Mass Fraction feature, which allows some species to use a different boundary condition, only includes an input for the mass fractions. To display additional features for the physics interface feature nodes (and the physics interfaces), click the Show button ( ) on the Model Builder and then select the applicable option. S H O W O R H I D E O P T I O N S F O R P H Y S I C S F E A T U R E N O D E S For most physics interface feature nodes, the Equation and Override and Contribution sections are displayed on a feature node Settings window by default. You can also click the Expand Sections button on the Model Builder to always show some sections in an expanded view, or go to these menus to hide options as required. Click the Show button ( ) on the Model Builder and then select Equation View to display the Equation View node under all physics interface nodes in the Model Builder. See the description for each physics interface for more links or go to Showing and Expanding Advanced Feature Nodes and Sections for more information. B O U N D A R Y S E L E C T I O N Select the boundaries where you want to apply an inflow boundary condition. P A I R S E L E C T I O N If Inflow is selected from the Pairs submenu, select the boundary pair where you want to define an inflow. First an identity pair may have to be created. Ctrl-click to deselect.
  56. 56. 56 | C H A P T E R 3 : C H E M I C A L S P E C I E S TR A N S P O R T B R A N C H I N F L O W Select the type of input from the Mixture specification list. Select: • Mass fraction (the default) to enter mass fractions (0,1, for example) • Mole fraction to enter mole fractions (x0,1, for example) • Molar concentration to enter molar concentrations (c0,1, for example) • Number density to enter number densities (n0,1, for example) Type the value or expression in the edit fields for each species except the one computed from the mass constraint. No Flux The No Flux node, which is the default boundary condition, represents boundaries where no mass flows in or out; that is, the total flux is zero: To display additional features for the physics interface feature nodes (and the physics interfaces), click the Show button ( ) on the Model Builder and then select the applicable option. S H O W O R H I D E O P T I O N S F O R P H Y S I C S F E A T U R E N O D E S For most physics interface feature nodes, the Equation and Override and Contribution sections are displayed on a feature node Settings window by default. You can also click the Expand Sections button on the Model Builder to always show some sections in an expanded view, or go to these menus to hide options as required. Click the Show button ( ) on the Model Builder and then select Equation View to display the Equation View node under all physics interface nodes in the Model Builder. See the description for each physics interface for more links or go to Showing and Expanding Advanced Feature Nodes and Sections for more information. B O U N D A R Y S E L E C T I O N Select the boundaries where you want to apply a no-flux boundary condition. N O F L U X Select Apply for all species to specify no flux for all species. Select Apply for to specify no flux for each species individually. Conversely, if you want to use another boundary condition for a specific species, clear the check box for that species. n iu ji+  0=
  57. 57. T H E TR A N S P O R T O F C O N C E N T R A T E D S P E C I E S I N T E R F A C E | 57 Outflow The Outflow feature is the preferred boundary condition at outlets where the species are to be transported out of the model domain. It is useful for example in mass transport models where you can assume that convection is the dominating effect which causes the mass flow through the outflow boundary. The boundary condition is applied to all species and corresponds to the following equations depending on the selected diffusion model: • For the Mixture-averaged diffusion model: • For the Fick’s law diffusion model: To display additional features for the physics interface feature nodes (and the physics interfaces), click the Show button ( ) on the Model Builder and then select the applicable option. S H O W O R H I D E O P T I O N S F O R P H Y S I C S F E A T U R E N O D E S For most physics interface feature nodes, the Equation and Override and Contribution sections are displayed on a feature node Settings window by default. You can also click the Expand Sections button on the Model Builder to always show some sections in an expanded view, or go to these menus to hide options as required. Click the Show button ( ) on the Model Builder and then select Equation View to display the Equation View node under all physics interface nodes in the Model Builder. See the description for each physics interface for more links or go to Showing and Expanding Advanced Feature Nodes and Sections for more information. B O U N D A R Y S E L E C T I O N Select the boundaries where you want to apply an outflow boundary condition. P A I R S E L E C T I O N If Outflow is selected from the Pairs submenu, select the boundary pair where you want to define an outflow. First an identity pair may have to be created. Ctrl-click to deselect. n– ji n iDi m M M --------- Di T T T -------- izium i V+ +    = n– ji n iDi f M M --------- Di T T T -------- izium i V+ +    =
  58. 58. 58 | C H A P T E R 3 : C H E M I C A L S P E C I E S TR A N S P O R T B R A N C H Symmetry The Symmetry feature can be used to represent boundaries where the species concentration is symmetric; that is, there is no mass flux in the normal direction across the boundary: This boundary condition is identical to that of the No Flux feature, but applies to all species and cannot be applied to individual species. To display additional features for the physics interface feature nodes (and the physics interfaces), click the Show button ( ) on the Model Builder and then select the applicable option. S H O W O R H I D E O P T I O N S F O R P H Y S I C S F E A T U R E N O D E S For most physics interface feature nodes, the Equation and Override and Contribution sections are displayed on a feature node Settings window by default. You can also click the Expand Sections button on the Model Builder to always show some sections in an expanded view, or go to these menus to hide options as required. Click the Show button ( ) on the Model Builder and then select Equation View to display the Equation View node under all physics interface nodes in the Model Builder. See the description for each physics interface for more links or go to Showing and Expanding Advanced Feature Nodes and Sections for more information. B O U N D A R Y S E L E C T I O N Select the boundaries where you want to apply a symmetry condition. Flux Discontinuity The Flux Discontinuity node represents a discontinuity in the mass flux across an interior boundary: where the value of N0 (SI unit: kg/(m2·s)) specifies the size of the flux jump evaluated from the down to the up side of the boundary. This boundary condition is only available on interior boundaries. n iu ji+ 

×