Cfd-Ace v2008.2 User Manual

July 18, 2016 | Author: hityou | Category: N/A
Share Embed Donate


Short Description

Cfd-Ace v2008.2 User Manual...

Description

CFD-ACE+ V2008.2 User Manual

ESI CFD Inc. 6767 Old Madison Pike, Ste. 600 Huntsville, AL 35806 Phone: (256) 713-4700 Fax: (256) 713-4799 Software Support: [email protected] Software Sales: [email protected]

Table Of Contents 1.

Introduction _________________________________________________________________________________ 1 About CFD-ACE+ About ESI GROUP Copyright Information Getting Started How to Report Problems Using Help

2.

1 3 4 5 6 7

CFD-ACE-GUI Overview _______________________________________________________________________ 9 User Manual Starting CFD-ACE+ User Manual Window Layout User Manual Title Bar User Manual Status Line Graphics Area Graphics Area Introduction Graphics Area Working With the Viewer Window Graphics Area Mouse Operations Graphics Area Viewing Operations Graphics Area Picking Operations Menu Bar Menu Bar Introduction Menu Bar-File Menu Menu Bar-Edit Menu Menu Bar View Menu Menu Bar Models Menu Menu Bar-Tools Menu Menu Bar Window Menu Menu Bar Help Menu Tool Bar Tool Bar Introduction Tool Bar File Open, Save, Save As Tool Bar Undo Tool Bar Projection Tool Bar Viewpoint Tool Bar Colors Tool Bar Solver Control Tool Bar Launch CFD Software Tool Bar About CFD-ACE+ Control Panel Control Panel Overview Control Panel-Problem Type (PT) Control Panel-Model Options (MO) Control Panel-Volume Conditions (VC) Control Panel-Boundary Conditions (BC) Control Panel-Initial Conditions (IC) Control Panel-Solver Controls (SC) Control Panel-Output (OUT) Control Panel-Run Controls (RUN) Entity Bar Entity Bar Introduction Entity Bar Set Grid Scale Tab Entity Bar Set XYZ Visual Scale Tab Entity Bar Set XYZ Rotation Tab

9 9 10 10 10 10 10 11 11 12 14 14 15 19 27 28 29 35 35 35 35 36 36 36 36 37 37 37 38 38 38 38 40 44 50 57 61 67 72 77 77 77 78 78

iii

CFD-ACE_V2008.2_User_Manual

Entity Bar BC or VC Blanking Tab Model Explorer Model Explorer Introduction Model Explorer Operation Model Explorer-Volume Condition (VC) Explorer Model Explorer-Boundary Condition (BC) Explorer Model Explorer-Initial Condition (IC) Explorer User Manual Frequently Asked Questions

3.

Database Manager __________________________________________________________________________ 89 Database Manager Introduction Database Manager-Window Database Manager Window Introduction Database Manager Mode Selector Database Manager Data Organizer Database Manager Data Panel Database Manager-Material Properties Database Manager Material Properties Introduction Database Manager Material Properties-Gases Database Manager Material Properties-Liquids Database Manager Material Properties-Solids Database Manager-Chemistry Database Manager Chemistry Introduction Database Manager Chemistry-Elements Database Manager Chemistry-Species Database Manager Chemistry-Mixtures Database Manager Chemistry-Gas Mixing Rules Database Manager Chemistry-Liquid Mixing Rules Database Manager-Chemistry-Volume Reactions Database Manager-Chemistry-Surface Reactions Database Manager-Biochemistry Database Manager Biochemistry Introduction Database Manager Biochemistry-Analytes Database Manager Biochemistry-Buffers Database Manager Biochemistry-Receptors Database Manager Biochemistry-Receptor Groups Database Manager Biochemistry-Mixing Rules Database Manager Biochemistry-Volume Reactions Database Manager Biochemistry-Surface Reactions Database Manager Examples Database Manager Frequently Asked Questions

4.

89 89 89 91 92 94 94 94 94 95 95 95 95 96 96 96 96 97 97 104 105 105 106 106 106 106 106 107 107 107 107

Arbitrary Interface Boundary Conditions _______________________________________________________ 109 Arbitrary Interface BC Introduction Applications Arbitrary Interface BC Applications Introduction Arbitrary Interface BC Applications-Hybrid Grid Systems Arbitrary Interface BC Applications-Component Libraries Arbitrary Interface BC Applications-Parametric Part Studies Arbitrary Interface BC Applications-Sliding Grids Arbitrary Interface BC Features No Need for Point-To-Point Matching Automatic Face Projection Other Features Arbitrary Interface BC Theory Arbitrary Interface BC Limitations

iv

79 80 80 80 82 84 86 87

109 109 109 109 110 111 112 112 112 112 113 113 114

Table Of Contents

Not Supported for 2D Grid Systems Multiple Structured Directions Not Supported For Various Modules Conjugate Interfaces Monte-Carlo Radiation Avoid T-Junctions Implementation Arbitrary Interface BC Implementation Introduction Grid Generation Model Setup and Solution Arbitrary Interface BC Implementation-Post Processing Arbitrary Interface BC Frequently Asked Questions

5.

Thin Wall Boundary Conditions ______________________________________________________________ 121 Thin Wall BC Introduction Thin Wall BC Applications Thin Wall BC-Theory Thin Wall BC Theory Introduction Thin Wall BC Theory-Thermal Gap Model Thin Wall BC Theory-Gaseous Heat Transfer Coefficient Thin Wall BC Theory-Direct-Contact Heat Transfer Coefficient Thin Wall BC Theory-Radiative Heat Transfer Coefficient Thin Wall BC Limitations Thin Wall BC-Implementation Thin Wall BC Implementation Introduction Thin Wall BC Implementation-Grid Generation Thin Wall BC-Implementation-Model Setup and Solution Thin Wall BC Implementation-Post Processing Thin Wall BC References

6.

121 121 121 121 123 124 124 125 126 126 126 126 126 127 128

Cyclic Boundary Conditions _________________________________________________________________ 129 Cyclic BC Introduction Cyclic BC Theory Cyclic BC Features Cyclic BC Limitations Cyclic BC-Implementation Cyclic BC Implementation Introduction Cyclic BC Implementation-Grid Generation Cyclic BC-Implementation-Model Setup and Solution Cyclic BC Implementation-Post Processing

7.

114 114 114 115 115 115 115 115 116 117 118 118

129 129 130 130 130 130 130 131 131

Periodic Boundary Conditions _______________________________________________________________ 133 Periodic BC Introduction Flow Module Periodic BC Electric Module Periodic BC Periodic BC Theory Flow Module Periodic BC Electric Module Periodic BC Periodic BC Features and Limitations Features Limitations Periodic BC Implementation and Grid Generation Periodic BC Model Setup Flow Module Periodic BC Electric Module Periodic BC

133 133 133 133 133 134 134 134 134 135 135 135 136

v

CFD-ACE_V2008.2_User_Manual

8.

Fan Model ________________________________________________________________________________ 137 Fan Model Introduction Fan Model Features Fan Model Theory Fan Model Limitations Fan Model-Implementation Fan Model Implementation Introduction Fan Model Implementation-Grid Generation Fan Model-Implementation-Model Setup and Solution Fan Model Implementation-Post Processing Fan Model References

9.

137 137 137 139 139 139 139 139 142 142

Momentum Resistance or Source _____________________________________________________________ 143 Momentum Resistance Introduction Momentum Resistance Features Momentum Resistance Theory Momentum Resistance Limitations Momentum Resistance-Implementation Momentum Resistance Implementation Introduction Momentum Resistance Implementation-Grid Generation Momentum Resistance-Implementation-Model Setup and Solution Momentum Resistance Implementation-Post Processing

10. Porous Media

143 143 143 145 145 145 145 145 146

_____________________________________________________________________________ 147

Porous Media Introduction Porous Media Features Theory Porous Media Theory-Introduction Mass Conservation Momentum Conservation Energy Conservation Species Conservation Limitations Implementation Implementation Introduction Grid Generation Model Setup and Solution Post Processing References

147 147 148 148 148 148 148 149 154 154 154 154 154 160 160

11. Rotating Systems __________________________________________________________________________ 161 Rotating Systems Introduction Multiple Reference Frames Rotating Systems Features Multiple Reference Frame Rotating Systems Theory Multiple Reference Frames Rotating Systems Limitations Multiple Reference Frame Rotating Systems-Implementation Rotating Systems Implementation Introduction Rotating Systems Implementation-Grid Generation Rotating Systems-Implementation-Model Setup and Solution Rotating Systems Implementation-Post Processing

vi

161 161 161 161 161 162 163 163 163 163 163 163 168

Table Of Contents

12. Parallel Processing_________________________________________________________________________ 169 Parallel Processing Introduction Parallel Processing Applications Parallel Processing Features and Limitations Features Limitations Parallel Processing Theory Parallel Processing Setup Parallel Processing Implementation and Grid Generation Parallel Processing Decomposition Options Parallel Processing Executing a Parallel Run Parallel Processing User ID Requirements for Parallel Processing Parallel Processing Post Processing Parallel Processing Frequently Asked Questions Parallel Processing Examples-Demo Instructions

169 169 169 169 170 171 171 171 171 173 175 175 175 178

13. Chimera Grid Methodology __________________________________________________________________ 181 Chimera Introduction Chimera Features and Limitations Features Limitations Chimera Applications Chimera Theory Chimera Model Setup Chimera Implementation and Grid Generation Chimera Volume Conditions Chimera Boundary Conditions Chimera Example Activating the Chimera Feature Hole Cutting Priority Chimera Boundaries

181 181 181 181 182 182 187 187 187 188 188 189 190 191

14. User Subroutines __________________________________________________________________________ 193 User Subroutines Introduction to User Subroutines Activating User Subroutines User Subroutines User Subroutine Applications User Subroutines Introduction to User Subroutine Features Accessible Variables User Subroutines Introduction to Accessible Variables User Subroutines Features-Access Variables User Subroutines Features-Utility Variables User Access Routines User Subroutines Introduction to User Access Routines User Subroutines General Purpose Routines User Subroutines DTF Read/Write Routines User Subroutines Boundary Condition Routines User Subroutines Volume Condition Routines User Subroutines Porous Media Volume Condition Routines User Subroutines Unsteady Problem Routines User Subroutines Grid Deformation Routines User Subroutines Moving Grid Routines User Subroutines Radiation Routines User Subroutines Spray Routines User Subroutines Grid Connectivity Routines Implementation of User Subroutines User Subroutines Implementation-Introduction

193 193 194 194 194 194 194 212 214 214 214 227 230 240 247 248 251 253 257 260 271 284 284

vii

CFD-ACE_V2008.2_User_Manual

User Subroutines User Defined Output Routines (UOUT, UREAD_DTF, UWRITE_DTF) User Subroutines User Defined Boundary Condition Values (UBOUND) User Subroutines User Defined Boundary Condition Values (UBOUND_PATCH) User Subroutines User Defined Boundary Condition Values (UMODAL_SHAPES) User Subroutines User Defined Grid Deformation Boundary Condition Values (UDEFORM_BC) User Subroutines User Defined Emissivity Boundary Condition Values (UEMISSIVITY_BC) User Subroutines User Defined Parameter (UPARAMETER) User Subroutines User Defined Source Terms User Subroutines User Defined Reaction Rate Factor User Subroutines User Defined Properties User Subroutines User Defined Time Step (UDT) User Subroutines User Defined Gravity (UGRAVITY) User Subroutines User Defined Initial Conditions (UINIT) User Subroutines User Defined Grid Deformation (UGRID) User Subroutines User Defined Moving Solid Motion User Subroutines URADIATION User Subroutines Spray Subroutines User Shared Library/DLL User Subroutines Building a User Shared Library/DLL User Shared Library-UNIX User Shared Library-Windows User Subroutines FAQ

284 287 288 289 291 293 294 294 295 296 299 300 300 301 302 302 303 314 314 315 319 320

15. Numerical Methods_________________________________________________________________________ 321 Numerical Methods Introduction Numerical Methods-Discretization Numerical Methods Discretization Introduction Numerical Methods Discretization-Finite Volume Method Numerical Methods Discretization-Transient Term Numerical Methods-Discretization-Convection Term Numerical Methods Discretization-Diffusion Terms Numerical Methods-Discretization-Source Term Linearization Numerical Methods Discretization-Finite Difference Equations Numerical Methods-Velocity-Pressure Coupling Numerical Methods Velocity-Pressure Coupling Introduction Numerical MEthods Velocity-Pressure Coupling-Continuity and Mass Evaluation Numerical Methods Velocity-Pressure Coupling-Pressure Correction and SIMPLEC Algorithm Numerical Methods Boundary Conditions Fixed Value Boundary Condition Zero-Flux Boundary Conditions Numerical Methods-Solution Methods Numerical Methods Solution Methods Introduction Numerical Methods Solution Methods-Solution Procedure Numerical Methods Solution Methods-Under Relaxation Numerical Methods-Solution Methods-Linear Equation Solvers Numerical Methods References

321 321 321 321 322 323 326 327 329 329 329 330 330 335 336 336 337 337 337 338 339 341

16. Mixing Plane ______________________________________________________________________________ 343 Mixing Plane Introduction Mixing Plane Applications Mixing Plane Theory Mixing Plane Limitations Mixing Plane Implementation Model Setup and Solution Frame rotation specification Boundary Condition Specification

viii

343 343 343 343 343 344 344 344

Table Of Contents

Additional Input Description of the Parameters in Each Line Special Instructions Mixing Plane References

344 344 345 345

17. Filament Model ____________________________________________________________________________ 347 Filament Model Introduction Filament Model Applications Filament Model Limitations Filament Model Implementation Model Setup and Solution Filament Model Input File Format Filament Model Frequently Asked Questions

18. Applications: Electrokinetics

347 347 350 351 351 351 352

________________________________________________________________ 355

Electrokinetics Introduction Electroosmotic Flow Electrophoresis Electrokinetics Features Electrokinetics Limitations Electrokinetics Theory Electrokinetics Implementation Electroosmosis Electrophoresis Electrokinetics Future Work Electrokinetics Frequently Asked Questions Electrokinetics References

355 355 355 355 356 356 358 358 360 360 361 362

19. Applications: Ionization _____________________________________________________________________ 363 Ionization Introduction Ionization Features Ionization Limitations Ionization Theory Ionization Implementation Ionization Example Ionization Comments Ionization Frequently Asked Questions Ionization References

363 363 363 364 366 367 369 370 372

20. Applications: Dielectrophoresis (DEP) _________________________________________________________ 375 Dielectrophoresis Introduction Dielectrophoresis Features Dielectrophoresis Limitations Dielectrophoresis Theory Dielectrophoresis Implementation Grid Generation Model Setup and Solution Dielectrophoresis DC Electric with Sinusoidal Wave Dielectrophoresis Additional Output Dielectrophoresis Frequently Asked Questions Dielectrophoresis-Examples Dielectrophoresis Examples-Case 1 Dielectrophoresis Examples-Case 2 Dielectrophoresis Examples-Case 3 Dielectrophoresis References

375 375 375 376 377 377 377 381 381 381 381 381 383 385 387

ix

CFD-ACE_V2008.2_User_Manual

21. Applications: Solidification __________________________________________________________________ 389 Solidification Introduction Solidification Applications Solidification-Theory Solidification Theory Introduction Solidification Definition of Source Terms Solidification Theory-Implementation in CFD-ACE-Solver Solidification Theory-Initialization Solidification Theory-Non-Source Term Methods Solidification Limitations Solidification Model Setup and Solution Problem Type Available Modules Model Options Shared Heat Volume Conditions Graphic Output Solidification Frequently Asked Questions Soldification-Examples Solidification Examples Solidification Case 1: Pure heat conduction, multi-zone, and isothermal case Soldification Case 2:Natural convection + heat conduction, single-zone, and isothermal/mush-zone cases Solidification Case 3: Heat conduction, single-zone, piece-wise linear Cp, and isothermal/mush-zone cases Solidification Case 4: Heat conduction, single-zone, constant Cp, and isothermal case Solidification References

22. Applications: Fuel Cell Modeling

389 389 389 389 390 391 391 392 393 393 393 394 394 394 394 394 394 394 395 395 395 397 399 402 405

_____________________________________________________________ 407

Fuel Cell Modeling Introduction Fuel Cell Modeling Where Can CFD Help? Fuel Cell Modeling Examples Fuel Cell Modeling Reformer Modeling Examples Fuel Cell Modeling Fuel Cell Simulation Features Fuel Cell Modeling Fuel Reformer Simulation Features Fuel Cell Modeling-Theory Fuel Cell Modeling Theory Introduction Fuel Cell Modeling Theory-Electrochemical Reactions in Porous Media Fuel Cell Modeling Theory-Membrane Electrical Conductivity Fuel Cell Modeling Theory-Springer Model Fuel Cell Modeling Limitations Fuel Cell Modeling Implementation Problem Type Model Options Volume Conditions Boundary Conditions Initial Conditions Solver Controls Fuel Cell Modeling References Fuel Cell Modeling FAQ

407 409 409 410 410 411 411 411 411 413 413 415 415 415 415 415 416 416 416 416 417

23. Applications: Biochemistry __________________________________________________________________ 419 Biochemistry Introduction Biochemistry Applications Biochemistry Features Chemistry Coupling of Spray and Biochemistry

x

419 419 419 419 420

Table Of Contents

Coupling of VOF and Biochemistry Echem Applications Biochemistry Limitations Biochemistry-Theory Biochemistry Theory Introduction Biochemistry Theory-Convective/Diffusive Transport Equations Biochemistry Theory-Surface and Volume Chemistry Rates Biochemistry Theory-Capabilities Biochemistry Theory-Surface Reaction Data Output Biochemistry Theory-Graphical Output for Post Processing Biochemistry-Implementation Biochemistry Implementation Introduction Biochemistry Implementation-Grid Generation Implementation-Model Setup and Solution Biochemistry Implementation-Post Processing Biochemistry Frequently Asked Questions Biochemistry References

420 420 420 420 420 420 421 422 426 426 426 426 427 427 437 437 448

24. Applications: Electroplating _________________________________________________________________ 449 Electroplating Introduction Electroplating Applications Where Can Modeling Help? Electroplating Features Electroplating Theory Surface Reactions Electroplating Limitations Electroplating-Implementation Electroplating Implementation-Introduction Electroplating Implementation-Grid Generation Implementation-Model Setup and Solution Electroplating Implementation-Post Processing Electroplating Examples Electroplating References

449 449 450 450 451 452 454 454 454 454 454 456 456 457

25. Appendix A CFD-ACE+ Files _________________________________________________________________ 459 Appendix A CFD-ACE+ Files Introduction Appendix A DTF File Appendix A Output File Appendix A MOD File MOD File Explanation: MOD File Usage Appendix A Profile BC File Appendix A Boundary Condition Integral File BC Integral File Usage General Format Explanation List of Variables Appendix A Monitor Point File Appendix A CVD File

459 460 460 461 461 461 467 468 468 469 469 470 471 477

26. Appendix B DTF Utility ______________________________________________________________________ 479 Appendix B DTF-Utility-Introduction Appendix B Applications Appendix B Features Appendix B Limitations Appendix B Implementation

479 479 479 480 480

xi

CFD-ACE_V2008.2_User_Manual

Getting the basics from a DTF file: -i Viewing DTF Data Printing a data array: -ph Viewing and Updating General Simulation Data Testing File Testing Structured Grid Patch Data for Overlaps: -tp Testing Connectivity: -tc Tagging Bad Boundary Faces: -tag_bad_bc Deleting a Simulation from the File: -[f]del_sim Deleting a Zone from the File: -[f]del_zone Deleting Particular Simulation Data Arrays: -[f]del_sd Deleting Particular Zonal Data Arrays: -[f]del_zd Deleting ALL Simulation Data Arrays: -[f]del_all_sd Deleting ALL Zonal Data Arrays: -[f]del_all_zd Updating Data Compression: -rle Unlocking a Locked DTF File: -unlock Setting the Scaling Factor: -set_scaling Appendix B Frequently Asked Questions

480 481 481 481 481 482 482 482 482 482 482 482 483 483 483 483 483 483

27. Appendix C CFD-ACE Python Scripting ________________________________________________________ 485 Appendix C Python Scripting Introduction Appendix C Usage Appendix C GuiFILE Appendix C GuiML (GUI Models) Radiation Model Operations DOM Model STS Model Examples Fan Model Examples Momentum Resistance Model Active Mixtures and Species Appendix C GuiPT (Problem Type) Appendix C GuiMO (Module Options) Appendix C GuiVC (Volume Conditions) Appendix C GuiBC (Boundary Conditions) Appendix C GuiIC (Initial Conditions) Appendix C GuiPC (Point Conditions) Appendix C GuiOut (Output Controls) Appendix C GuiSC (Solver Controls) Appendix C GuiRun (Run Controls)

28. Index

xii

485 485 488 490 490 491 492 493 494 495 495 496 497 498 498 501 504 505 506 506 507

____________________________________________________________________________________ 509

Introduction About CFD-ACE+ CFD-ACE+ is a set of computer applications for multi-physics computational analysis. The programs provide an integrated geometry and grid generation software, a graphical user interface for preparing the model, a computational solver for performing the simulation, and an interactive visualization software for examining and analyzing the simulation results. The standard CFD-ACE+ package includes the following applications: •

CFD-GEOM - geometry and grid generation



CFD-VisCART -



CFD-ACE-GUI - graphical user interface to the CFD-ACE-SOLVER



CFD-ACE-SOLVER - advanced, multiphysics solver



CFD-VIEW - interactive post processor

The information contained within specifically addresses the CFD-ACE-SOLVER and its interaction with CFD-ACE-GUI. A schematic representation of the applications is shown below.

1

CFD-ACE_V2008.2_User_Manual

Schematic Representation of CFD-ACE+

CFD-ACE+ provides an interactive tool kit for building the input required for the CFD-ACE-Solver. You can use it in conjunction with other ESI CFD products to form a complete solution analysis package. Other ESI CFD products include: •

2

CFD-VisCART - provides Cartesian and viscous Cartesian grid generation capabilities.

Introduction



CADalyzer - works with native CAD geometries and provides automatic grid generation for CFD calculations



CFD-TOPO - predicts the transport, chemistry, etch and deposition of semiconductor materials on the microscopic scales



SimManager - uses the CFD-ACE+ package to perform parametric and optimization studies using various parameters (e.g. geometrical parameters, boundary values, etc.)

About ESI GROUP ESI CFD is a technology leader in the field of advanced computational fluid dynamics simulation software backed by more than 20 years of research based knowledge throughout a wide range of industries. ESI CFD’s broad range of products and services provide all of the necessary tools for advanced multiphysics analysis in a virtual prototype environment, significantly reducing time and expense through comprehensive up-front modeling and simulation. Key focus areas include microfluidics, biomedical, plasma, MEMS, fuel cells, semiconductor, automotive and aerospace. ESI CFD’s product portfolio represents a unique collaborative, virtual engineering solution, known as the Virtual Try-Out Space (VTOS), enabling a continuous improvement on the virtual prototype. By drastically reducing costs and development lead times, VTOS solutions offer major competitive advantages by progressively eliminating the need for physical prototypes.

3

CFD-ACE_V2008.2_User_Manual

Copyright Information ™©1997-2008 by ESI-Group All rights reserved. Published 2008. This information is the confidential and proprietary product of ESI-Group. Any unauthorized use, reproduction, or transfer of this manual is strictly prohibited. Subject to limited distribution and restricted disclosure only. CFD-ACE™, CFD-ACE+™, CFD-CADalyzer™, CFD-VIEW™, CFD-GEOM™, SimManager™, CFD-VisCART™, CFD-TOPOTM and CFD-FASTRAN™ are registered trademarks of ESI-Group. Portions of this software are owned by Spatial Corp. Copyright© 1989-2008 All rights reserved.

4

Introduction

Getting Started How to execute the software: To execute the graphical software (once the environment and path has been set according to the installation instructions that can be found on the CFD Portal) from the command line, enter one of the following commands in a DOS window on Windows Systems or in a shell on Linux/UNIX systems: •

CFD-GEOM



CFD-CADA



CFD-VisCART



CFD-ACE-GUI



CFD-FASTRAN-GUI



CFD-TOPO-GUI



CFD-VIEW



SimManager

The appropriate solver can be executed from CFD-ACE-GUI, CFD-FASTRAN-GUI, CFD-TOPOGUI, or SimManger. They can also be submitted from the command line using: •

CFD-ACE-SOLVER –dtf model.DTF



CFD-FASTRAN-SOLVER –dtf model.DTF



CFD-TOPO-SOLVER –dtf model.DTF

If multiple versions of the software have been correctly installed, then the old version can be executed using: CFD-GEOM –runver 2006 (which will run version 2006 of GEOM). Note your license file will dictate which applications you can execute. How to add shortcuts to the Start Menu: Windows users that installed via CD will have short cuts under Start -> Programs -> ESISoftware. If your software was received via ftp or the CFD portal, then you can create your own short cuts. To do so: 1. Create an ESI_Software folder typically under C:\Documents and Settings\All Users\Start Menu\Programs 2. Copy the desired icons from the latest UTILS_20xx.x\icons directory in the ESI_Software folder 3. In Windows Explorer, right click on the icon and select: Create Shortcut 4. Right click on the just created shortcut and select: Properties 5. Change the target to the desired application in the UTILS_20xx.x\bin directory (for instance: CFD-VIEW.exe) 6. Change the Start in directory to your desired starting location 7. Select the Change Icon button and browse back to the originally icon in the UTILS_20xx.x\icons directory and select the appropriate icon. 8. Delete the icon that is setting Start Menu\Programs directory 9. Repeat as needed

5

CFD-ACE_V2008.2_User_Manual

Note the target string can contain at the end the –runver option (ie. –runver 2006) so that a specific version of the software can be executed. If this option is not specified, by default the latest version found will be executed. Where to request a license file: The following table gives the email address where to request a license key: Country/Region

Contact

North America

[email protected]

South America

[email protected]

France Rest of Europe

[email protected]

Japan

[email protected]

Korea

[email protected]

China

[email protected]

India

[email protected]

Rest of Asia

[email protected]

Australia/New Zealand

[email protected]

Africa

[email protected]

Or contact your local ESI Sales Representative.

How to Report Problems If you experience problems while using CFD-ACE-GUI/SOLVER, you can report your problem by: •

E-mail: [email protected]



Telephone: 256-713-4750 (United States country code is 01)

When reporting a problem it is important to have the following information: •

CFD-ACE-GUI version number



CFD-ACE-Solver version number



Modules you were using



Type of problem you were trying to solve



Any error messages you may have received in the modelname.out file or screen

To find the CFD-ACE-GUI version number or the DTF version number: 1.

Open the CFD-ACE+ application.

2.

Click on the Help menu.

3.

Select the About CFD-ACE-GUI option.

4.

Make a note of the version number. -OR-

1.

6

Open a command prompt.

Introduction

2.

On the command line, enter CFD-ACE-GUI -v and press Enter. (Note that the command is CFD-ACEGUI(space)-v and the command is case sensitive in most environments) A file is created (CFD-ACEGUI.version) which contains the build date and version information. The file will be created in the current working directory.

To find the CFD-ACE-Solver version number: 1.

Note the version number at the top of the CFD-ACE-GUI modelname.out file.

1.

Open a command prompt.

2.

On the command line, enter CFD-ACE-SOLVER -v and press Enter. (Note that the command is CFD-ACESOLVER(space)-v and the command is case sensitive in most environments) A file is created (CFD-ACESOLVER.version) which contains the build date and version information. The file will be created in the current working directory.

-OR-

Using Help This help system is arranged in two volumes: Volume I - User Manual describes the CFD-ACE+ operations and features of the CFD-ACE-Solver which are module independent:

Volume II - Modules contains a section for each of the CFD-ACE+ modules that appear in the Problem Type (PT) Panel:



User Manual Overview



Flow



Database Manager



Heat Transfer



Arbitrary Interface Boundary Conditions



Turbulence





Chemistry

Thin Wall Boundary Conditions





User Scalar

Cyclic Boundary Conditions





Radiation

Periodic Boundary Conditions





Cavitation

Fan Model





Grid Deformation

Momentum Resistance





Stress

Porous Media





Electric

Rotating Systems





Magnetic

Parallel Processing





Spray

User Subroutines





Macro Particle

Numerical Methods





Free Surface (VOF)

Mixing Plane





Plasma

Filament Model





Two-Fluid

Electrokinetics





Kinetic

Ionization





Semi Device

Electroplating



Dielectrophoresis (DEP)



Solidification



Fuel Cell Modeling



Biochemistry



Appendix A - CFD-ACE+ Files

7

CFD-ACE_V2008.2_User_Manual



Appendix B - DTF Utility



Appendix C - GUI Scripting

We recommend that you first read the User Manual Overview to learn the basics of how the CFDACE+ application works. Then review the remaining information in the User Manual and Modules that apply to your application of interest for details on using each module or feature. It is also worthwhile to review the Introduction, Applications, and Features sections of each module to determine if they can help you to model your systems.

8

CFD-ACE-GUI Overview User Manual Starting CFD-ACE+ You can start CFD-ACE+ from three different operating systems: •

Windows - Select Start--> Programs--> ESI CFD--> CFD-ACE-GUI. This starts CFDACE+ in the proper mode for the CFD-ACE-Solver.



MS-DOS - Enter CFD-ACE-GUI on the command line.



UNIX - Enter CFD-ACE-GUI at the UNIX prompt.

User Manual Window Layout The CFD-ACE+ interface consists of: •

Title Bar



Status Line



Graphics Area



Menu Bar



Tool Bar



Control Panel



Model Explorer



Entity Bar

These elements are described in the corresponding online help sections. The window layout is shown below.

9

CFD-ACE_V2008.2_User_Manual

CFD-ACE+ Layout

User Manual Title Bar The Title Bar shows the application name and the full file path for the currently active model. Note that a "*" symbol can be placed after the filename as an indication that the current model has been changed since it was last saved.

User Manual Status Line The Status Line is located at the bottom of the main window. The Status Line displays informative messages and prompts you through multi-step operations. The Status Line will also show a progress bar when reading or saving files. Additionally, when you place the cursor over a button, menu, or other control on the user interface, the Status Line displays a brief description of the purpose of that item.

Graphics Area Graphics Area Introduction The Graphics Area fills the largest portion of CFD-ACE+ and displays the current model in a viewer window. The display consists of a wire-frame representation of the model outline, the boundary condition locations, and the volume condition locations. For structured grids, boundary conditions are displayed as lines or curves in 2D and cross-hairs centered on the boundary patch in 3D. Structured volume conditions are displayed as cross-hairs in 2D and three-dimensional cross-hairs in 3D. For unstructured grids, boundary conditions are displayed as lines and curves in 2D and as the bounding elements of each surface in 3D. For both structured and unstructured grids, the boundary and volume conditions are colored to correspond to the boundary or volume condition type. Note that volume conditions are displayed by fringe cells. The Graphics Area section includes: •

Working with the Viewer Window



Mouse Operations



Viewing Operations



Picking Operations

Graphics Area Working With the Viewer Window The viewer window is a Multiple Document Interface (MDI) Window, which means that the application can open more than one model at a time. Opening Multiple Viewer Windows You can have more than one viewer window open at a time by opening several different models. You can also view an open file in several windows by selecting New Viewer from the Windows menu. Arranging Multiple Open Viewer Windows The Windows menu contains three selections that arrange multiple open image windows: cascade, tile horizontally and tile vertically. These commands only affect the non-minimized windows.

10

CFD-ACE-GUI Overview

Selecting a Viewer Window Only one viewer window can be active at a time. The active viewer window receives all picking commands. You can select any viewer window by clicking on it. When a viewer window is selected it appears on top of any other viewer windows, the title bar is highlighted, and the filename appears in the main window’s title bar. If the file has been modified then the filename will appear with an “*” beside it. See Also Mouse Operations Viewing Operations Picking Operations

Graphics Area Mouse Operations The mouse has two functions in the viewer window, manipulating the on-screen image (viewing operations) and selecting on-screen objects (picking operations). The general procedure for manipulating the on-screen image is to simultaneously hold down one of the three mouse buttons as you move the mouse. Manipulation of an image includes rotation, zooming, or translation. To select or pick an object on the screen, move the cursor to the applicable object, hold the mouse steady and click with the left mouse button. To facilitate your understanding of the mouse operations, the following definitions are provided: •

Click: press a mouse button and quickly release it



Clicking: the action of pressing a mouse button and quickly releasing it



Point and click: use the mouse to position the cursor (point) and then click a mouse button



Double-click: press a mouse button twice in rapid succession



Control-click: hold down the control key on the keyboard as you click a mouse button



Shift-click: hold down the shift key on the keyboard as you click a mouse button



Drag: hold down a mouse key as you move the mouse (click but do not release the button until you have finished moving)



Dragging: interactive technique for repositioning an image on the screen

See Also Working with the Viewer Window Viewing Operations Picking Operations

Graphics Area Viewing Operations Use viewing operations to manipulate the position and orientation of your model in the viewing window. Rotation: Left Button Use the left mouse button to rotate the image about the desired axis. To rotate your image, drag the mouse while holding down the left mouse button. The cursor changes shape to reflect the mode of operation.

11

CFD-ACE_V2008.2_User_Manual

To rotate the model approximately about the screen X-axis: •

Place the cursor in the center of the screen.



While holding down the left mouse button, drag the mouse up or down.

To rotate the model approximately about the screen Y-axis: •

Place the cursor in the center of the screen.



While holding down the left mouse button, drag the mouse left or right.

To rotate the model approximately about the screen Z-axis (perpendicular to the screen): •

Place the cursor near the edge of the screen.



While holding down the left mouse button, drag the mouse about the edge of the screen.

Zoom: Middle Button To zoom (enlarge or reduce) a model, drag the mouse using the middle button. To enlarge the model, drag the mouse toward yourself. To reduce, drag the mouse away. Unlike rotation, however, the cursor location where you first press the mouse button on the screen is not important for zooming.

Translate: Right Button To translate a model, using the right mouse button, drag the mouse. The model movement is proportional to the movement of the cursor. As in the zooming operation, the initial location of the cursor on the screen is unimportant.

See Also Working with the Viewer Window Mouse Operations Picking Operations

Graphics Area Picking Operations Picking Operations While performing certain tasks, namely, assignment of volume condition and boundary condition settings, you can use the mouse to select one or more entities in the viewer window. The active entity is defined as the entity which is under the mouse cursor at the moment the mouse button is pressed. Picking operations are described below.

12

CFD-ACE-GUI Overview

Left Mouse Button Use the left mouse button to select the active entity. To de-select all entities, press the left mouse button while the cursor is not hovering over any entity. You may perform a window pick operation by holding down the Shift-key and dragging a window with the left mouse button.

Ctrl or Shift-Left Mouse Button Use the Ctrl or Shift-Left mouse button combination to add the active entity to the current set of entities. To select multiple entities simultaneously, hold down the Shift - Left mouse buttons and then drag the mouse over the area that contains the entities you want to select.

Right Mouse Button Clicking the right mouse button while hovering over an entity blanks the active entity or to view the entity’s properties. Clicking the right mouse button while the cursor is not over any entity (on empty space in the background) accesses the general viewer window menu.

New Viewer The New Viewer option creates a new viewer window for the current model. It is the same as the operation described in the section Window Menu. The viewpoint orientation, Fit to Window, and Reset View options are the same as described in the section View Menu. The Show All Domains and Hide All Domains options unblank or blank all of the entities from the viewer window. The Simulation Properties... option opens a dialog box that gives details about the current simulation and the ability to scale the geometry of the model. See the FAQ section for more details on how to scale your geometry in CFD-ACE-GUI.

13

CFD-ACE_V2008.2_User_Manual

See Also Working with the Viewer Window Mouse Operations Viewing Operations

Menu Bar Menu Bar Introduction The Menu Bar contains menus. Each menu lists a grouping of selections, and each selection performs a specific action.

You open a menu by clicking on it, or by pressing plus the letter that is underlined in the menu’s title. For example, to open the File Menu, you press Alt+F. You choose a menu selection by clicking on it, by pressing its underlined letter, or by using the cursor arrow keys to highlight it and then pressing . Menu selections that appear in grey are not currently available. Many of the menu options contain shortcuts. These shortcuts will be shown on the menus (for example, Ctrl+o for File -> Open). This means that if you hold down the Control key and press the letter o (always lowercase), you will be able to perform the same function as selecting File from the Menu Bar and selecting the Open option. See Also File Menu Edit Menu View Menu Models Menu Tools Menu Window Menu Help Menu

14

CFD-ACE-GUI Overview

Menu Bar-File Menu Menu Bar File Menu Introduction The File menu enables you to open, import, close, and save existing models. It also displays a list of recently used files for opening a previously saved simulation. You can clear the most recently used files list from the File Preferences area located in the Edit Menu (see Recently Used Files). The File Menu includes: •

Open



Import



Close



Close All



Save



Save As



Save Journal File As



Quit

File Menu

Menu Bar File Menu-Open The Open option loads ESI CFD Data Transfer Facility (DTF) files that have been previously created by a grid generator such as CFD-GEOM, or DTF files that have already been setup by the CFD-ACE-GUI. The File Open dialog box is shown below.

15

CFD-ACE_V2008.2_User_Manual

File Open Dialog Box

You can navigate through the file directory structure by using the Directory pull-down menu and directory Up buttons. The default file filter is *.DTF so that only DTF files will be shown. This can be changed to show all files if desired. The file list can be set to display the files as a list, icons, or with details. To Open a file, double-click on the filename in the file list; or, select the file from the file list, and click the Accept button. The Open option is also available from the Tool Bar (see File I/O). Menu Bar File Menu-Import The Import option opens geometries that have been created in one of the formats listed under the Source section. When selected, the Open Data File window appears:

16

CFD-ACE-GUI Overview

Open Data File Window

You can navigate through the file directory structure by using the Directory menu and directory up buttons. There are twelve options available from the file filter menu including an All Files Filter. If you select one of the radio buttons or check boxes at the top of the dialog, the file filter will update automatically. Similarly, if a selection is made from the file filter menu that option under Source corresponding to the selection is also selected. CFD-ACE-GUI reads the following file types: •

Plot3D



FAST



MeSH



NASTRAN

17

CFD-ACE_V2008.2_User_Manual



PATRAN



ANSYS



MFG



AGRD



CGNS

To read in a particular file type, activate the corresponding radio button in the Source section for the Open Data File dialog. The following file types require that additional information is provided: •

Plot3D



FAST



NASTRAN



PATRAN

Menu Bar File Menu-Close The Close option closes the active simulation. If modifications have been made to this simulation during the current CFD-ACE-GUI session, then a dialog box will appear to ask if you want to save the current simulation before closing. Menu Bar File Menu-Close All The Close All option closes all simulations loaded in the CFD-ACE-GUI. Menu Bar File Menu-Save The Save option saves the simulation into the original DTF file. Any changes that have been made during the current CFD-ACE-GUI session will be written to the DTF file. The Save option updates the original DTF file with the new information. If you want to preserve the original DTF file then you should use the Save As option. The Save option is also available in the Tool Bar. Menu Bar File Menu-Save As The Save As option works the same as the Save file option, except that it allows you to specify a directory and filename. The options for specifying the directory and filename are the same as for the Open File menu option. The Save As option is also available from the Tool Bar. Menu Bar File Menu-Save Journal File The Save Journal File option writes the current contents of the journal file to disk. In order for this option to work you must have enabled Journaling under the Tools menu. Menu Bar File Menu-Quit The Quit option closes all simulations and terminates the application. If there are any simulations with unsaved data then a dialog box appears asking if you want the simulation saved before closing.

18

CFD-ACE-GUI Overview

Unsaved Changes Dialog Box

Menu Bar-Edit Menu Menu Bar Edit Menu Introduction The Edit menu enables you to undo operations for blanking, picking, and de-selecting entities, and provides Preferences. The Edit Menu contains the following options: •

Undo



Select All



Deselect All



Blanking



Preferences

Edit Menu

Menu Bar Edit Menu-Undo The Undo option enables you to undo blanking and unblanking operations. The Undo option is also available from the Tool Bar (see Undo). Menu Bar Edit Menu-Select All The Select All option picks every available entity in the model. Its behavior is different depending on whether you are in volume condition mode or boundary condition mode. If you are in volume condition mode then Select All will pick all of the volume conditions in the model, and likewise, when in boundary condition mode Select All will pick all of the boundary conditions in the model. Menu Bar Edit Menu-Deselect All The Deselect All option clears the pick buffer so that no entity is picked.

19

CFD-ACE_V2008.2_User_Manual

Edit Menu-Blanking Functions Menu Bar Edit Menu-Blanking Introduction

The Blanking option opens a sub-menu that provides four options: •

Edit Menu-Blank



Edit Menu-Unblank



Edit Menu-Blank Remaining



Edit Menu-Toggle Blanking

Menu Bar Edit Menu-Blank

The Blank option blanks or hides an entity from display. Boundary conditions or volume conditions can be blanked so that they are not visible in the viewer window. Blanked entities are still part of the model and can be picked from the Model Explorer. The blank column in the Model Explorer will show an indication for blanked entities. To blank an entity, click the right mouse button on the entity in the Viewer Window or right click the entity name in the Model Explorer. Menu Bar Edit Menu-Unblank

The Unblank option displays an entity that has been hidden or blanked. Since the entity cannot be seen or picked from the viewer window, you must pick the entity from the Model Explorer and then select Unblank to make the entity visible. Menu Bar Edit Menu-Blank Remaining

The Blank Remaining option blanks everything that is not currently picked. This enables you to pick the entities that you want to work with and then use Blank Remaining to remove everything else from view. Menu Bar Edit Menu-Toggle Blanking

The Toggle option reverses the state of the blank flag for each entity. When selected, all unblanked entities are blanked and all blanked entities are made visible. Edit Menu-Preferences Menu Bar Edit Menu-Preferences Introduction

The Preferences options enables you to set global settings for CFD-ACE+. These preferences will be remembered the next time you start the CFD-ACE+ software. You can set the following preferences:

20



Preferences-Files



Preferences-Display



Preferences-Colors



Preferences-Tools



Preferences-Script

CFD-ACE-GUI Overview

Edit Menu-Preferences-Files Menu Bar Edit Menu-Preferences-Files Click the Files tab to gain access to the File Preferences settings. There are three sections in the File Preferences area:



Recently Used Files



Backups



User Files

File Preferences

Menu Bar Edit Menu-Preferences-Recently Used Files

Under Recently Used Files, click the Clear button to clear the most recently used files that appear in the File menu. Menu Bar Edit Menu-Preferences-Backups

In Backups you can choose three levels of backup file protection:

21

CFD-ACE_V2008.2_User_Manual



Backup Copy Before Save copies the original DTF file to model.backup.DTF before the CFD-ACE-GUI saves the current file. This enables you to keep a fresh version of the DTF file for later use. The Backup File will not contain any CFD-ACE-GUI settings.



Archive File copies the current file to model.archive.DTF when the solver is launched. The Archive File will have all of the CFD-ACE-GUI settings stored as it is essentially a copy of the model.DTF. This file can be retained as an archive since it has all of the settings needed to run the simulation yet does not contain the results of the simulation. The Archive File recovers the CFD-ACE-GUI settings in the rare event that the solver corrupts the original DTF file.

Menu Bar Edit Menu-Preferences-User Files

User Files enables you to specify the location of the user defined Property, Reaction, Surface Reaction, and Material database files. These files are used by their respective database managers and enable you to maintain a database of often used properties or reactions. If the full path to the files are not given then the CFD-ACE-GUI will look in the current working directory to find these files. The Browse button, located next to the file field, launches a file browser that browses the file system to find a file. Edit Menu-Preferences-Display Menu Bar Edit Menu-Preferences-Display Introduction

Press the Display tab to gain access to the Display preference settings. There are four sections in the Display Preferences area:

22



Display-Boundary Conditions (3D Models Only)



Display-Volume Conditions (2D Models Only)



Display-Lines



Display-Miscellaneous

CFD-ACE-GUI Overview

Display Preferences

Menu Bar Edit Menu-Preferences-Display-Boundary Conditions

Boundary Conditions enables you to choose to display the boundary conditions as a wireframe or solid-shaded surface. Wireframe drawing is much faster and allows you to see through the model while solid-shaded surfaces shade the model. This option only affects 3D models as boundary conditions for 2D models are always drawn in wireframe. See Also Preferences-Display-Volume Conditions (2D Models Only) Preferences-Display-Lines Preferences-Display-Miscellaneous Menu Bar Edit Menu-Preferences-Display-Volume Conditions

You may choose how you want to display unstructured volume conditions. If you check Draw fringe cells in 2D unstructured cell groups, the unstructured grid will be drawn and will be pickable. If the option is off, the unstructured volume conditions are represented by normal vectors along the boundaries of the volume condition.

23

CFD-ACE_V2008.2_User_Manual

The Draw Arrow Pointers on 3D Unstructured Cell Groups option shows normal vector arrows at the boundaries of the 3D unstructured volume conditions. This display mimics the type of display that you see in CFD-GEOM. See Also Preferences-Display-Boundary Conditions (3D Models Only) Preferences-Display-Lines Preferences-Display-Miscellaneous Menu Bar Edit Menu-Preferences-Display-Lines

The Draw Model Outlines options enables you to see the wireframe outline of the current model. You may also select the line thickness to be used when the CFD-ACE-GUI draws thick lines (as when picking a boundary or volume condition). The default value is 2 pixels. See Also Preferences-Display-Boundary Conditions (3D Models Only) Preferences-Display-Volume Conditions (2D Models Only) Preferences-Display-Miscellaneous Menu Bar Edit Menu-Preferences-Display-Miscellaneous

You can choose whether or not to use your graphics card's hardware acceleration for OpenGL drawing. In most instances you want to use this acceleration as it will speedup the graphics manipulation in the viewer window. If you experience unsatisfactory performance with the viewer window, you may want to disable this feature. This change will not take affect until the CFD-ACEGUI is restarted. You can select the Picking Tolerance in pixels. This lets you set the sensitivity of picking by allowing the application to recognize that an entity has been picked when you get within the specified tolerance. Smaller numbers will be more sensitive than larger numbers. The default value is three pixels. See Also Preferences-Display-Boundary Conditions (3D Models Only) Preferences-Display-Volume Conditions (2D Models Only) Preferences-Display-Lines Menu Bar Edit Menu-Preferences-Colors

The Preferences Colors tab enables you to change the colors for drawing boundary conditions, volume conditions, and other miscellaneous entities.

24

CFD-ACE-GUI Overview

Color Preferences

To change any color, double-click on the color well located next to the item’s label. The Color Dialog window appears.

25

CFD-ACE_V2008.2_User_Manual

Color Dialog Panel

You can change the color by adjusting the slider bars or typing in the appropriate value for the color attribute. There are four different ways to specify colors and the method is switchable by using the tabs located near the top of the panel. The four methods are: 1) Red-Green-Blue, 2) Hue-Saturation-Value, 3) Cyan-Magenta-Yellow, and 4) by Name. You can also quick-pick a color from any of the color wells that line the bottom of the panel, or drag and drop colors from any color well to any other color well. Menu Bar Edit Menu-Preferences-Tools

The Tools enables you to specify which applications to launch for certain operations. It allows you to pick a customized solver when using the user subroutine. If no path is given, then the system’s path will be searched to find the application. To browse the file structure, click the Browse button.

Tool Preferences

Menu Bar Edit Menu-Preferences-Script

The Script tab enables you to turn on the journaling feature and specifies the python script directory. When the Journaling feature is activated, CFD-ACE-GUI records all user interactions to a python script file. This file can later be read back into the CFD-ACE-GUI program to reproduce the steps. The Journaling feature may be turned on and off during the recording session to allow only certain parts of the interaction to be recorded. Because the results are written into an ASCII python file, you may edit the commands in the file to achieve different affects when processing the file. To produce the final journal file, select File -> Save Journal File to save the resulting python script file (model.py).

26

CFD-ACE-GUI Overview

In the Python Script Directory area, you can specify the location of the Python Script files. If the full path to the files is not provided, then CFD-ACE-GUI looks in the current working directory to find these files. The Browse button launches a file browser to enable you to browse the file system to find a file.

Script Preferences

Menu Bar View Menu The View menu controls the appearance of the CFD-ACE+ layout and the model orientation and size within the viewer window. The View menu has three sections. The top section enables you to pick one of six viewpoints. •

Front - Looks at the X-Y plane from the positive Z direction



Back - Looks at the X-Y plane from the negative Z direction



Left - Looks at the Y-Z plane from the negative X direction



Right - Looks at the Y-Z plane from the positive X direction



Top - Looks at the X-Z plane from the positive Y direction



Bottom - Looks at the X-Z plane from the negative Y direction

27

CFD-ACE_V2008.2_User_Manual

View Menu

It controls which parts of CFD-ACE+ are visible in the applications window. The Graphics Area and Menu Bar are always visible. You have control over the visibility of the Toolbar, Control Panel, Status Bar, and Model Explorer. These settings are saved to the registry and will be remembered the next time that the program is started. The next section enables you to Fit the current model to the Viewer Window size by automatically zooming to fit. The Reset option will reset the viewpoint back to Front view with the model fit to the Viewer Window size. These options are also accessible from the Tool Bar (see Viewpoint). Projection controls the projection option for the viewing window. The default projection method is Orthogonal (or parallel). You may choose a Perspective projection to give more depth information. When Perspective projection is selected, you may change the field-of-view angle by holding down the Ctrl key and dragging up or down with the middle mouse button. These options are also accessible from the Tool Bar (see Projection). The last section contains one option, Turbo. Turbo blanks the model during in the viewer window during its motion. This proves to be very useful when working with large models. The model outline is not blanked. Only the boundary conditions and volume conditions are blanked.

Menu Bar Models Menu Active Mixtures & Species When you select the Active Mixtures & Species option from the Models Menu, the Active Mixtures & Species window appears with a Mixtures tab and a Species tab.

Active Mixtures & Species Window - Mixtures Tab

28

CFD-ACE-GUI Overview

Active Mixtures & Species Window - Species Tab

These options enable you to view, add, or delete mixtures and species to those that you created in the Database Manager that reside in the Modelname.DTF folder. The Data Transfer Facility (DTF) will not save any mixtures or species data that are not used or are not activated in the Active Mixtures & Species window. As the name implies, DTF only saves the active mixtures and species. For example, if you run a solution with ALCL3 species selected, DTF saves the species with the solution. HOWEVER, if you restart from a previous solution and ALCL3 has not been activated, DTF will not save the species with the solution.

Menu Bar-Tools Menu Menu Bar Tools Menu Introduction The Tools menu enables you to set database options, enter parametric information, and edit python scripts. The options include: •

Tools Menu-Database



Tools Menu-Parametric Input



Tools Menu-View DTF Content



Tools Menu-Edit Python Script



Tools Menu-Run Script

29

CFD-ACE_V2008.2_User_Manual

Tools Menu

Menu Bar Tools Menu-Database The Database option opens the database manager for Properties and Chemical Reactions. The tools menu also allows you access to the parametric input functionality. The Database managers (Property Manager, Reaction Manager, Surface Reaction Manager, Material Manager, and the Chemkin Interface) are described in the Database Manager. Menu Bar Tools Menu-Parameter/Expression Input Parameter Input

In V2007, CFD-ACE+ supports parametric runs through CFD-ACE-GUI. Parameters can be used for almost all value input through CFD-ACE-GUI. This eliminates the need to use SimManager to run some parametric analyses. However, SimManager should be used for parametric runs which use both geometric and solver parameters or optimization studies. Creating a Parameter

To create a Parameter, open the Parametric/Expression dialogue in Tools −> Parametric Input and shown in Figure 1. Click the Insert or Append button to create a new Parameter

30

CFD-ACE-GUI Overview

Figure 1. Parameter/Expression input window

Once the Parameter has been created, input the values or expressions to be used. You can now use this parameter for BC, VC, or other values. You will need to click the drop down box available for GUI inputs and select the parameter. To add the parameter to the parametric study, click the check box located in the Add to Parametric Study column. This will make the parameter active when you provide the parametric values on the Run tab. Submitting a Parametric Study

To create and submit the parametric study, go to the Run tab. Select the Parametric Study option. You will then need to click insert or append button to insert a case. Click insert or append to add a new case to be run, as shown in Figure 2.

31

CFD-ACE_V2008.2_User_Manual

Figure 2. Parametric study window.

Once you have entered all the case studies, click the submit button to submit all of the cases to the solver. Note that, you must click the submit button on the Parametric Study Dialogue to submit the parametric study (the cases will be submitted sequentially to the solver). If you submit the run by clicking the submit button on the Run panel, only one case will be run (Case 1 in the parametric study list). Note: The Insert button will create a new Parameter in the current location in the list, while the Append button will create a new Parameter at the end of the list.

Expression Input

When you select Parametric Input, the Parameter/Expression panel appears. You can also access the panel in CFD-ACE-GUI where parameter's input is needed. The Parameter/Expression Input Panel allows you to enter values for parameters which are later used in several inputs for specification of variables. Expression values can be used to set a time step size, boundary condition values for flow, heat, turbulence, etc. The expression value is evaluated at the beginning of each time step. You can specify the expression value to be user_defined and use a user subroutine to calculate the value of the expression. See User Subroutines for details.

32

Parameter

Description

SIN(a)

Returns the sine of the argument (the argument should be given in radians)

CFD-ACE-GUI Overview

COS(a)

Returns the cosine of the argument (the argument should be given in radians)

TAN(a)

Returns the tangent of the argument (the argument should be given in radians)

ASIN(a)

Returns the arcsine of the argument (in radians)

ACOS(a)

Returns the arccosine of the argument (in radians)

ATAN(a)

Returns the arctangent of the argument (in radians)

SQRT(a)

Returns the square root of the argument

ABS(a)

Returns the absolute value of the argument

EXP(a)

Returns exponential of the argument

PI

Returns the value 3.1415927

STEP(a)

Returns 0 if a= 0

DELT(a)

Returns 0 if a 0

TIME or T

Returns the current time (in seconds)

TSTP

Returns the current timestep number

ITER

Returns the current iteration

INT(a)

Returns the integer remainder of the argument

X

Returns the boundary face X coordinate (in meters)

Y

Returns the boundary face Y coordinate (in meters)

Z

Returns the boundary face Z coordinate (in meters)

XO

Returns the boundary nodal X coordinate for the previous timestep (in meters)

33

CFD-ACE_V2008.2_User_Manual

YO

Returns the boundary nodal Y coordinate for the previous timestep (in meters)

ZO

Returns the boundary nodal Z coordinate for the previous timestep (in meters)

XOO

Returns the original (beginning of simulation) boundary nodal X coordinate (in meters)

YOO

Returns the original (beginning of simulation) boundary nodal X coordinate (in meters)

ZOO

Returns the original (beginning of simulation) boundary nodal X coordinate (in meters)

user_defined

Returns value as coded in user subroutine.

To use expressions, click the Add button, give the expression a name, and specify how it should be evaluated. Expressions can be used later during the evaluation of other expression. You can use these expressoin later in CFD-ACE-GUI setup for any boundary or volume condition that has an evaluation mode of Parametric. Some examples of expression input include: V_1 = 4.23*SIN(32.6*PI*T) V_2 = user_defined V_3 = V_1*100.0 Menu Bar Tools Menu-Special DTF Update The Special DTF Update option is available to activate certain features which may not be available in CFD-ACE-GUI. These features may be new features that have not been implemented in CFD-ACE-GUI. This tool offers a shortcut to the DTF -ud command. All variables which can be updated with the DTF -ud command can be updated using this Special DTF Update tool (i.e. all simulation data [max iterations, convergence criterion, etc.]). Menu Bar Tools Menu-View DTF Content The View DTF Content options opens the DTF viewer where the current DTF file is displayed in the tree list. Menu Bar Tools Menu-Edit Python Script The Edit Python Script options opens the script editor window for CFD-ACE-GUI scripting. Menu Bar Tools Menu-Run Script The Run Script option runs a script that you have created.

34

CFD-ACE-GUI Overview

Menu Bar Window Menu The Window menu controls what is seen in the Graphics Area. New Viewer makes a copy of the current viewer window and contains the current model. This is a second viewer of the same model and you can pick in either viewer. It allows you to view the model from two or more orientations to facilitate picking operations. The Tile Horizontally, Tile Vertically, and Cascade options control the placement of the viewer windows in the Graphics Area. The final options of the Window menu lists the viewer windows that are currently under management. The filename of the model contained in each viewer window is given followed by a colon and the viewer sequence number. If the same model is shown in multiple viewer windows, then the sequence number will be incremented. A check mark appears next to the active window and the active window can be changed by picking from this list.

Window Menu

Menu Bar Help Menu The Help menu opens the CFD-ACE+ help system and provides access to ESI Group’s corporate website. It also provides information about the version of CFD-ACE+ that you are using. The ESI CFD on the Web option launches a web browser that specified in the Preferences -> Tools area, or associated with web pages for Windows platforms, and automatically load ESI CFD’s homepage. The About CFD-ACE+ option shows a dialog box that contains version information about the CFD-ACE+ application, libraries, platform, and the date the application was compiled. Information about how to contact ESI CFD is also available.

Help Menu

Tool Bar Tool Bar Introduction The Tool Bar contains buttons that are used as shortcuts to several of the same items accessible from the Menu Bar. It includes:

35

CFD-ACE_V2008.2_User_Manual



Tool Bar-Files Open, Save, Save As



Tool Bar-Undo



Tool Bar-Viewpoint



Tool Bar-Projection



Tool Bar-Colors



Tool Bar-Solver Control



Launch CFD Software



About CFD-ACE-GUI

Tool Bar Layout

Tool Bar File Open, Save, Save As The File buttons provide quick access to the same functions listed in the File Menu. The buttons represent the Open, Save, and Save As commands.

Tool Bar Undo The Undo button blanks and unblanks operations. It is also available in the Edit Menu-Undo.

Undo Button

Tool Bar Projection The Projection buttons control whether the viewer window is drawing the image with a parallel or perspective projection. These options are also available in the View Menu.

Projection Buttons

Tool Bar Viewpoint The Viewpoint buttons orient the viewpoint to one of the six views. These options are also available in the View Menu.

36

CFD-ACE-GUI Overview

Viewpoint Buttons

Tool Bar Colors The Colors button launches the Color window and changes the viewer window’s background color. Select any color in the Color window with the left mouse button and drag that color into the background of the viewer window. Release the left mouse button to drop the color onto the background. See Edit Menu-Preferences-Color for more information on the Color window.

Colors Button

Tool Bar Solver Control The Solver Control button access the same functions listed on the Run Controls page of the Control Panel.

Tool Bar Launch CFD Software The Launch CFD software buttons launch CFD-GEOM and CFD-VIEW. The location of these executables is set to $CFDRCDIR/bin. You can change the executables in the Preference panel. If a DTF file is selected in the CFD-ACE-GUI, CFD-VIEW will be launched with the DTF file opened. The DTF Tree View, Launch Python Script Editor and Run Script buttons are also available in the Tools Menu.

37

CFD-ACE_V2008.2_User_Manual

Launch CFD Software Buttons

Tool Bar About CFD-ACE+ The About CFD-ACE+ button provides access to the CFD-ACE+ functions found in the Help Menu.

Control Panel Control Panel Overview The Control Panel is the center of CFD-ACE+. All of a model's physical and numerical settings are made through this panel. There are eight distinct panels within the Control Panel. •

Problem Types (PT)



Model Options (MO)



Volume Conditions (VC)



Boundary Conditions (BC)



Initial Conditions (IC)



Solver Controls (SC)



Output Options (OUT)



Run Controls

The Control Panel tabs determine which of these pages is active and provide access to different areas of each page. In most cases the tabs signify module-specific information. The Control Panel is designed to provide an environment for problem setup and will only show information that is pertinent to the current simulation. For this reason, the figures in the rest of this help section may or may not match exactly what you see in your CFD-ACE+ session. The Module-specific settings are discussed in the Module section of online help.

Control Panel-Problem Type (PT) Control Panel Problem Type The Problem Type panel displays a list of solver Modules. The Modules are described in detail in the Modules section of this online help. The standard CFD-ACE+ package includes the following:

38



Flow



Heat Transfer



Turbulence



Chemistry



User Scalar



Radiation



Spray



Free Surfaces (VOF)



Two-Fluid



Cavitation



Grid Deformation

CFD-ACE-GUI Overview



Kinetics



Semi Device

The following modules are available as add-ons. Visit the ESI Group web site for additional information or to contact a sales representative: •

Stress



Plasma



Electric



Magnetic



Macro Particle

The Problem Type setting mode allows you to pick the Modules to be used for the simulation. The window below shows the Problem Types.

39

CFD-ACE_V2008.2_User_Manual

Problem Type Page in Module Selection Mode

Control Panel-Model Options (MO) Control Panel Model Options Introduction The Model Options panel enables you to set Shared and Module-specific options. Depending on the modules you have selected in the PT panel, other tabs may be displayed. If so, they are described in the Modules section. The following sections appear on the Model Options Shared tab:

40



Simulation Description



Polar/Axisymmetric



Transient Conditions



Body Forces



Rotation

CFD-ACE-GUI Overview

Model Options Panel

Since the settings in the Model Options page are Module-specific, except the Shared tab, information pertaining to them is in the Modules section. Shared Tab The Shared tab of the Model Options panel controls parameters that affect all Modules and all grid regions in the simulation. They include the polar nature of a 2D problem, time dependence, body forces and rotation reference are controlled through this panel. The Model Options figure shows the Model Options page in the Shared settings mode.

Control Panel Model Options-Simulation Description The Simulation Description section enables you to enter a name for your simulation. Control Panel Model Options-Polar/Axisymmetric The Polar/Axisymmetric option is valid for any 2D grid systems. Selecting the axisymmetric option indicates that the complete geometry is defined by an angular rotation of the model one radian about the x-axis. The x-y coordinate system is recast as a x-r coordinate system.

41

CFD-ACE_V2008.2_User_Manual

Control Panel Model Options-Transient Conditions The Transient Conditions (or time dependence) section of the Model Options panel contains time dependence, transient time step, and time accuracy. Time Dependence

You can set the Time Dependence of the problem by selecting one of the following options from the pull-down menu: •

Steady - for steady-state simulations



Transient - for time-accurate or unsteady simulations

Transient Time Step

When you select the Transient option in the Time Dependence section, the Transient Time Step panel appears and enables you to pick an evaluation method for calculating the time step. There are four evaluation methods to choose from: •

Standard - allows you to pick the number of time steps and each time step size (the time step size will remain constant throughout the simulation).



Parametric Input - allows you to set the time step size based on a parameter defined in the Tools->Parametric Input section. See Tools Menu for more information regarding input of parameters.



User Sub (udt) - allows you to program your own user subroutine (udt) to control the timestep size based on your coding in the subroutine.



Auto Time Step - is available for any problem except those in which the Stress Module has been activated. This evaluation method enables you to specify the start and end time of the simulation an Error Criterion (values in the range of 1e-4 to 1e-3 are usually suitable) and an initial time step size. When the VOF Module is selected you must a target CFL number instead of an Error Criterion. When this time step evaluation method is employed, the solver will automatically adjust the timestep size in order to try to match either the Error Criterion or the Target CFL number (in the VOF context, the target CFL number represents the percent of a cell over which the VOF front can traverse). You will also be able to set minimum and maximum timestep sizes to constrain the automatic timestep calculation.

where: ε represents error criteria d represents weighted RMS Norm for all the variables solved and calculated as

42

CFD-ACE-GUI Overview

where: u and v are two components of velocity N is the total number of cells (vector length) umax = max|(u)| and similarly for other variables o represents values for old time step Time Accuracy

The Time Accuracy (temporal differencing) section provides a pull-down menu with the following options: •

Euler(1st Order) The default is backward Euler. The differencing is performed in the following manner

where n is the timestep and i is the current cell in which the computation is being performed for variable f. k corresponds to the diffusion coefficient.



Crank-Nicolson (2nd Order) - Enables you to enter a blending factor. A blending factor of 0.5 produces pure Crank-Nicolson differencing and a blending factor (β) of 1.0 produces pure backward Euler. The default value is 0.6. The differencing is performed in the following manner

where n is the timestep and i is the current cell in which the computation is being performed for variable f. k corresponds to the diffusion coefficient.

Control Panel Model Options-Body Forces Activating Body Forces (or gravity) can be done in one of two ways: •

Non-Boussinesq Approximation - relies on a change in fluid density to provide gravitational source terms,



Boussinesq Approximation - can be used with constant density fluids.

For either case, you must enter the gravity vector to determine the direction and strength of the gravity field. The Non-Boussinesq Approximation produces a source term to the momentum equations of the form: Si = gi(ρ -ρref)Vol

(1-1)

The ρref value can be input by the user or calculated automatically by the code in some situations. ρref should be chosen so as to remove the need to specify a hydrostatic pressure variation at the exit boundaries (i.e., if ρref = density at the exits then the source term at the exits goes to zero and you can apply a constant pressure at the exit boundaries rather than a hydrostatic variation.) In effect you are acknowledging that the hydrostatic variation is a constant in the solution and subtracting this variation from the solution.

43

CFD-ACE_V2008.2_User_Manual

For the Non-Boussinesq approximation to work, density must vary (otherwise the source term is a constant). So you must ensure that density is a function of temperature or use ideal gas law. The Boussinesq approximation also adds a source term to the momentum equations, but the source term is independent of the density variation. The source term is a function of the temperature variation as follows: Si = giρVol( T-Tref)Beta

(1-2)

where Beta is the thermal expansion and is normally set to 1/Tref. As you can see, the source term is dependent on the density, but density does not have to vary to cause an effect. This approach can be used for (almost) incompressible liquids. Control Panel Model Options-Rotation Reference Rotation is a body force term and its use and implementation is defined in Rotating Systems.

Control Panel-Volume Conditions (VC) Control Panel Volume Conditions Introduction The Volume Condition (VC) panel enables you to set material properties and source terms on a volume-by-volume basis. For 3D grid systems (in CFD-GEOM terms), every structured or unstructured domain is a separate volume condition. In 2D grid systems, every structured face or unstructured loop is a separate volume condition. Before you can set volume conditions, you must activate Volume Conditions by one of the following methods: •

Viewer Window - To pick from the viewer window, place the mouse cursor over a Volume Condition handle (usually cross-hairs or normal vectors) and click the left mouse button. To select more than one volume condition at the same time, hold down the Ctrl key while picking with the left mouse button.



Model Explorer -To pick from the Model Explorer, use the left mouse button to select a Volume Condition. To select more than one volume condition at the same time, hold down the Ctrl key while picking with the left mouse button. A continuous multiple pick can be made by picking one item from the Model Explorer and then holding down the Shift-key and picking another item. In this case every item between the first and second items will be picked. See Graphics Area-Picking Operations for more details on picking from the viewer window or Model Explorer.

When you have selected one or more volume conditions, you must select the Volume Condition Setting mode to set parameters for the currently selected volume conditions. Change the Setting Mode by selecting from the Setting Mode pull-down menu. There are several options available:

44



Properties - set solid and fluid material properties



Biochem - set bio-chemistry sources (see Bio-Chemistry Module)



E-Plate - set electroplating sources (see Electroplating Module)



Momentum Resistance - Set an isotropic momentum resistance to be applied over the volume condition (see Momentum Resistance and Enhancement chapter)



Porous Media - Set the properties for porous media calculation (see Porous Media)



Flow - set flow equation source terms (see Flow Module)



Heat - set energy equation source terms and moving solid parameters (see Heat Transfer Module)

CFD-ACE-GUI Overview



Scalar - set user scalar equation source terms (see User Scalar Module)



Species - activate user defined source term for all species equations (see Chemistry Module)



Stress - activate stress solution, set some stress options (see Stress Module)



Magnet - simulate electromagnetic coils (see Electromagnetics Module)

In most cases only the Properties mode will be used. The other modes are only accessible if their parent modules are activated. These modes are only for special circumstances and are discussed in each Module’s chapter. After you pick a volume condition and the select Volume Condition Properties mode, the Volume Condition setting panel appears (shown below). The Volume Condition section includes: •

Volume Condition-VC Setting Mode Menu



Volume Condition-Properties Menu



Volume Condition-Fluid Subtype Menu



Volume Condition-Property Sources Menu



Volume Condition-Material Name



Volume Condition-Phys-Density



Volume Condition Reset, Apply, and OK Buttons

45

CFD-ACE_V2008.2_User_Manual

Volume Conditions Panel

Control Panel Volume Conditions-VC Setting Mode Menu The VC Setting Mode menu enables you to set the volume condition mode to Properties, Flow, Porous Media, Momentum Resistance, Heat, or Species. Based on your selection, the remaining portion of the Volume Condition panel will display differently and enable you to specify specific parameters.

46

CFD-ACE-GUI Overview

VC Setting Mode Menu

Heat Option

When the VC Setting Mode is set to Heat you can specify energy sources in one or more volumes of your model. There are several different ways in which the sources can be set. They are: •

Fixed Source (Volumetric) - This option should be used when you know the heat generation rate per unit volume. This quantity is the only input required. This heat source will be added uniformly over each volume selected. The total source will be equal to the heat generation rate multiplied by the total volume of the volumes selected.



Fixed Source (Total) - This option should be used when you know the total heat generation rate that occurs within a particular volume. This heat source will be applied uniformly over each volume selected. If you specify a 5 watt heat source and select two volumes then each volume will have a 5 watt source applied for a total source of 10 watts.



Fixed Temperature - Use this option to fix the temperature over an entire volume to the specified value. The only input required is the desired temperature. You should use caution in applying this option to a chemically reacting flow as this type of specification applied to a gas volume will most likely be inconsistent with the chemistry solution.



General Source (Volumetric) and General Source (Total) - These options can be used when you want to provide a source term that is dependent upon the enthalpy level within each cell of the volume. For details, see Numerical MethodsDiscretization-Direct Specification of Source Terms. The only difference between the two options is that the first is multiplied by the cell volume and the second is not.



User Defined (usource) - If you select this option you can use the user subroutine facility to provide your own programming to specify the source term.

Control Panel Volume Conditions-Properties Menu The Properties menu enables you to set volume conditions to: •

Fluid - Use the Fluid option for flow and heat transfer problems.



Solid - Use the Solid option for problems that have no flow.

47

CFD-ACE_V2008.2_User_Manual



Block - Use the Block option for no flow and no heat transfer and for regions of the model that contain mesh but are not intended to be solved. These types of regions may result from the grid generation process, for example, extrusion, or from desired visualization. When the simulation is started, block cells are not included into the active list of cells to be solved and therefore do not add memory overhead to the model.

If you have activated the Free Surfaces (VOF) or Two-Fluid modules, you can also activate a second fluid for the volume condition.

Properties Menu

Control Panel Volume Conditions-Fluid Subtype Menu The Fluid Subtype menu appears if you have selected the Fluid option from the Properties menu above it. It enables you to specify the fluid subtype as gas or liquid.

Fluid Subtype Menu

Control Panel Volume Conditions-Property Sources Menu The Property Sources Menu enables you to choose one of the following options:

48



User Input - enables you to add your own property source name to the material



Import From Database - provides a navigation button and enables you to select a predefined property source.

CFD-ACE-GUI Overview

Property Sources Menu

Control Panel Volume Condition-Material Name Based on what you have selected from the Properties menu (Fluid, Solid, or Block), the Material Name field will appear differently. For example, if you have chosen Fluid from the Properties menu, the Material Name field will appear as:

Gas Material Name

If you have chosen Solid from the Properties menu, the Material Name field will appear as:

Solid Material Name

Enter a material name in the field. Control Panel Volume Conditions-Phys-Density The Phys tab, Density section enables you to assign a volume condition name and the methods for calculating various material properties. The Properties section will appear differently based on whether you have selected fluid or solid volume conditions and which modules are active. To learn more about properties, see the Properties section for that specific module. For example, under the Heat tab you will see the property Specific Heat. To learn more, go to the Heat Transfer Module, Properties section. Each property has a region on the Volume Conditions page that contains several elements. Shown below is a typical volume condition property region (this one is for density).

49

CFD-ACE_V2008.2_User_Manual

Phys Tab - Density

All of the property regions have a title that describes the property being represented in this region. The Evaluation Method pull-down menu enables you to select the method for calculating the property. Further information on the types of evaluation methods available for each property are discussed in the Module sections. If the evaluation method selected requires additional information, it will appear within the region. A variable name is the same name used for graphical output. An additional field enables you to enter values for the variable name. Control Panel Volume Conditions-Reset, Apply, OK The Reset and Apply buttons control the settings for the volume conditions. •

Reset - restores the settings back to the values that the Volume Condition had when it was first selected (effectively undoing any setting operations).



Apply - saves all of the initial value settings that have been made during the current setting operation. It is important to click Apply, otherwise the settings will not be saved. If you leave this section of the CFD-ACE-GUI with unsaved changes you will receive a warning to remind you to apply the settings.



OK - saves all of the initial value settings and de-selects the active Volume Conditions.

Control Panel-Boundary Conditions (BC) Control Panel Boundary Conditions Introduction The Boundary Condition (BC) panel enables you to set the computational boundary conditions for each boundary condition patch. For 3D grid systems (in CFD-GEOM terms), every structured face or unstructured loop is a separate boundary condition. In 2D grid systems, every structured edge or loop creation entity (lines, curves, or edges used to create the loop) is a separate boundary condition. Before you can set boundary conditions, you must activate Boundary Conditions by one of two methods: •

50

Viewer Window - To pick from the viewer window, place the mouse cursor over a Volume Condition handle (usually cross-hairs or normal vectors) and click the left mouse button. To select more than one volume condition at the same time, hold down the Ctrl-key while picking with the left mouse button.

CFD-ACE-GUI Overview



Model Explorer -To pick from the Model Explorer, use the left mouse button to select a Volume Condition. To select more than one volume condition at the same time, hold down the Ctrl-key while picking with the left mouse button. A continuous multiple pick can be made by picking one item from the Model Explorer and then holding down the Shift-key and picking another item. In this case every item between the first and second items will be picked. See Graphics Area-Picking Operations for more details on picking from the viewer window or model explorer.

When you have selected a Boundary Condition and BC setting mode, the Boundary Condition panel appears. It contains: •

BC Setting Mode



BC Type



BC Settings



Reset, Apply, and OK Buttons

51

CFD-ACE_V2008.2_User_Manual

Boundary Conditions Panel

Control Panel Boundary Conditions-BC Setting Mode When you have selected one or more boundary conditions, you must select a BC Setting mode from the Setting Mode pull-down menu. The menu options are:

52



General - set computational boundary conditions



Thin Wall - convert domain/domain interfaces to thin walls



Cyclic - set up cyclic boundary condition pairs



Arbitrary Interface - set up arbitrary interface pairs

CFD-ACE-GUI Overview

In most cases, you will use the General mode. The other modes are only for special circumstances and are discussed in the Module's section. Since the available boundary conditions are a function of the Modules that have been selected, see the Boundary Condition section of each Module’s section for detailed information about how the boundary condition settings are used by the Module. Control Panel Boundary Conditions-BC Type The BC Type section determines the type of boundary condition to be applied. The following choices are available: •

Inlet



Outlet



Wall



Rotating Wall



Symmetry



Interface



Thin Wall



Cyclic

Boundary Conditions-Settings Control Panel Boundary Conditions-Settings Introduction

The boundary condition setting area has a tab for each of the active Modules which require boundary values. Because the boundary condition information is different for each Module, see the Boundary Conditions section of each Module for details on implementation. Each boundary value region has several elements, as shown below (this one is for velocity).

53

CFD-ACE_V2008.2_User_Manual

Boundary Value Region

All of the boundary value regions contain a title that describes the boundary value. An Evaluation Method pull-down menu enables you to select the method for specifying this value. The standard evaluation methods, which may not be available for all boundary values, are: •

Constant



Profile in X



Profile in Y



Profile in Z



Profile in Time



Profile from File



Parametric



User Sub(ubound)

Control Panel Boundary Conditions-Settings-Constant

The Constant option ensures that every boundary face on the boundary condition patch will have the same constant value specified. Control Panel Boundary Conditions Settings-Profile X

The Profile X evaluation method enables you to specify how the boundary value changes as a function of the x-location of each boundary condition face. The profile evaluation method requires input of the number of data points to be used to construct the profile, and the data pairs (xlocation, boundary value) for each profile point. The boundary value specification region will appear as:

54

CFD-ACE-GUI Overview

Boundary Value Specification for Profile X To specify the number of points (data pairs) that make up your profile data: 1.

Click the Specify Profile button. The Profile X dialog appears.

Profile X Window 2.

In the Total Points field, enter the number of points (data pairs) that make up your profile data.

3.

Click OK to accept this value.

4. For each point you must enter the profile data pair. The data pair consists of an x-location and the boundary value desired at that x-location. The CFD-ACE-SOLVER will perform a piecewise linear fit to determine what the boundary values should be for each boundary face on the boundary condition patch.

Control Panel Boundary Conditions-Settings-Profile Y

Profile Y functions the same as described in Profile X, except that the profile will determine how the boundary condition values vary with the y-location. Control Panel Boundary Conditions-Settings-Profile Z

Profile Z functions the same as described in Profile X, except that the profile will determine how the boundary condition values vary with the z-location. This method is available only for 3D models. Control Panel Boundary Conditions-Settings-Profile in Time

This functions the same as described in Profile X, except that the profile will determine how the boundary condition values vary with time. This method is available only for unsteady (transient) simulations.

55

CFD-ACE_V2008.2_User_Manual

Control Panel Boundary Conditions-Settings-Profile from File

Profile from File functions the same as described in Profile X, except that the profile data pairs are read from a user-specified file. You will be prompted for a filename, from which the profile data will be read. The format of the profile data file is a two-column (space delimited) text file with each data pair listed on a separate line. The first line must have a “#” symbol as the first character, followed by the number of pairs to be specified (n), the profile type (PROFILE_X, PROFILE_Y, PROFILE_Z, or PROFILE_T), the variable being specified (U, V, W, T, etc.), and the fit option (SPLINE or LINEAR). Lines 2 through n+1 must have the independent value (location or time) followed by the dependent value (boundary value). An example of the file format is shown. # 5 PROFILE_T U SPLINE 0.000 0.000 0.001 0.100 0.002 0.200 0.003 0.400 0.004 0.800

Sample Input File for Profile from File

Control Panel Boundary Conditions-Settings-Parametric The Parametric method enables you to define or use previously defined parametric input to compute the boundary condition values. For more information about defining parametric input, see Tools Menu-Parametric Input.

Control Panel Boundary Conditions-Settings-User Sub(ubound)

The User Sub(ubound) option enables you to change the evaluation method to instruct CFDACE-SOLVER to look to the ubound user subroutine for instructions on setting the boundary values for the selected variable and boundary condition patch. This gives you total control over the boundary condition values. See User Subroutines UBOUND for more details. Control Panel Boundary Conditions-Reset, Apply, OK The BC Reset, Apply, and OK buttons control the settings for the boundary conditions.

56



Reset - restores the settings back to the values that the Boundary Condition had when it was first selected (effectively undoing any setting operations).



Apply - saves all of the initial value settings that have been made during the current setting operation. It is important to click Apply, otherwise the settings will not be saved. If you leave this section of the CFD-ACE-GUI with unsaved changes you will receive a warning to remind you to apply the settings.



OK - saves all of the initial value settings and de-selects the active Boundary Conditions.

CFD-ACE-GUI Overview

Control Panel-Initial Conditions (IC) Control Panel Initial Conditions Introduction The Initial Condition panel enables you to set the initial values required for the computation. The following methods available: For All Volumes, Mixed, and Volume by Volume. Select the method from the pull-down menu labeled Initial Condition. •





IC Option Menu o

Initial Conditions-Constant

o

Initial Conditions-Previous Solution

o

Initial Conditions-Previous Solution + Constant

IC Applied Menu o

Initial Conditions-For All Volumes

o

Initial Conditions-Volume by Volume Mode

Reset, Apply, and OK Buttons

Although the Initial Conditions selected should not affect the final solution, they can affect the path to convergence. Therefore, we recommend that you use realistic values. For more information on initial conditions, see the Module section. Control Panel Initial Conditions-Constant The Constant option enables you to set a constant value as an initial condition for every cell in the computational domain or to indicate that values will be provided by a user subroutine (uinit). The Initial Conditions panel is shown in the For All Volumes mode ready to accept Constant Values.

57

CFD-ACE_V2008.2_User_Manual

Initial Conditions Panel - Constant Option

A tabbed list is shown for each Module that has been activated. Under each tab is a list of variables that require initialization. These will be listed in a separate section and each section has several elements. Shown in the figure below is a typical Initial Condition value section (this one is for X-Direction Velocity). All of the value sections contain a title that describes the value represented in the section. An Evaluation Method pull-down menu displays the Constant and User Sub(uinit) options. The Variable Name is the same name used for graphical output. A field enables you to add usersupplied values.

58

CFD-ACE-GUI Overview

Initial Condition Values Section

Control Panel Initial Conditions-Previous Solution The Previous Solution option enables you to use the results from a previously run simulation as the initial condition for the current simulation.

Initial Conditions Panel - Previous Solution Option

A field requests the filename of a previously run solution. The solver reads the initial fields from the specified file. When you are performing a steady-state simulation, and you click the Continuation Run button, the solver begins the run with the iteration count set to one more than the last iteration from the previous solution. The solver appends the new residual values to the old residual data sets so that you can see a continuous residual history, uninterrupted by the restart. When you are performing a transient calculation, and you click the Continuation Run button, the solver sets the start time of the transient run equal to the time in the restart file. Additionally, the solver appends residuals and monitor point data to existing files rather than writing to new files. When starting from a previous solution, also called a restart run, CFD-ACE-GUI imposes the following restrictions: •

The grid size must be the same in the current model and in the previous solution data set. This does not mean that the physical domains must be identical, but that the number of grid blocks must be the same and the number of cells in each block must be the same.

59

CFD-ACE_V2008.2_User_Manual



The variables solved, as dictated by the Modules selected in the Problem Type settings and Model Options, should be the same. Otherwise, a smooth restart may not be possible.

Control Panel Initial Conditions-Previous Solution + Constant The Previous Solution + Constant option enables you to use constant values, a user subroutine, or specify that results of a previous solution be used for initial values. You can specify this for each variable.

Initial Conditions Panel - Previous Solution + Constant Option

In this mode the option of taking initial values as constants is pushed down to the level of the individual variables. This option is useful for models in which you have added one or more dependent variables to a previous simulation and wish to take all dependent variables, except the new ones, from the previous solution. The Continuation Run option is still allowed in this mode but should not be selected for cases in which the number of dependent variables changes. For these cases, the residual and monitor value plotters will not behave properly. Control Panel Initial Conditions-For All Volumes The For All Volumes option has two additional ways to define the initial conditions (listed under the IC Source pull-down menu). Control Panel Initial Conditions-Volume By Volume The Volume by Volume option enables you to set different initial conditions on each individual volume condition region. When you switch the IC setting mode to Volume By Volume, you can set different initial conditions on each of the available volume conditions. The Model Explorer switches to an IC Explorer view and lists all of the available volume conditions. Recall that (in CFD-GEOM terms) for 3D grid systems, every structured or unstructured domain is a separate volume condition. In 2D grid systems every structured face or unstructured loop is a separate volume condition. Before any initial condition settings can be made, you need to pick a volume conditions to make it active. This can be done through several methods. The most common are picking from the viewer window and picking from the Model Explorer. Picking from the viewer window is done by placing the mouse cursor over a Volume Condition handle (usually cross-hairs or normal vectors) and pressing the left mouse button. To select more than one volume condition at the same time, hold down the Ctrl key while picking with the left mouse button.

60

CFD-ACE-GUI Overview

Picking from the Model Explorer can be done by selecting a Volume Condition entry from the Model Explorer list with the left mouse button. Discrete multiple picking can be done by holding down the Ctrl key while picking multiple entries with the left mouse button. A continuous multiple pick can be made by picking one item from the Model Explorer and then holding down the Shiftkey and picking another item. In this case every item between the first and second items will be picked. See Graphics Area-Picking Operations for more details on picking. If several volume conditions have been selected, you may make them part of a permanent group by pressing the Group button located on the lower toolbar. After one or more volume conditions have been selected, you may set the initial conditions using the methods as described above in the section Constant Values. Control Panel Initial Conditions-Reset, Apply, OK The IC Reset, Apply, and OK buttons control the settings for the initial conditions. •

Reset - restores the settings back to the values that the Initial Condition had when it was first selected (effectively undoing any setting operations).



Apply - saves all of the initial value settings that have been made during the current setting operation. It is important to click Apply, otherwise the settings will not be saved. If you leave this section of the CFD-ACE-GUI with unsaved changes you will receive a warning to remind you to apply the settings.



OK - saves all of the initial value settings and de-selects the active Initial Conditions.

It is important to click Apply or OK, otherwise the settings will not be saved.

Control Panel-Solver Controls (SC) Control Panel Solver Controls Introduction The Solver Control panel enables you to specify the numerical aspects of the solution and to select the solver output options. Depending on the modules you have selected in the PT panel, other tabs may be displayed. If so, they are described in the Modules section. The following are the common tabs for Solver Controls:



Iterations



Spatial



Solvers



Relax



Limits



Adv

61

CFD-ACE_V2008.2_User_Manual

Solver Control Panel

Control Panel Solver Controls-Iterations The Iterations tab enables you set criteria to control the iterative solution process. •

Maximum Iterations - Total number of iterations to be performed by the solver.



Convergence Criteria - The minimum reduction in residuals for each variable. Default value is 0.0001 (four orders of magnitude).Min. Residual: Value of the residual below which the second criteria is not applied.

The solver quits the iterative procedure if any of the two criteria is satisfied. If you need to run a specific number of iterations, set the Convergence Criteria to a very small number (1.0E-10) but larger than the Minimum Residual value.

Solver Controls - Iterations Tab

Control Panel Solver Controls-Spatial The Spatial tab represents the spatial differencing scheme and controls the spatial accuracy of the simulation. The options provide several differencing schemes to calculate the convective term in the transport equations.

62

CFD-ACE-GUI Overview

Solver Controls - Spatial Tab

The panel contains three columns; the first defines the variable, the second defines the type of spatial differencing to be used for that variable, and the third determines the amount of upwind blending to be used (if any). The variable list will include any variables that are solved for (as determined by the active Modules) as well as any auxiliary variables which may also be used in the transport equations. Several differencing schemes are available and they are discussed further in the Numerics chapter. The default scheme is the first-order Upwind Differencing scheme. If selecting higherorder schemes, you can also enter a blending factor to blend the higher-order scheme with the Upwind Differencing scheme for added stability. For some of the higher-order schemes, especially the Central Differencing scheme, obtaining a converged solution may be impossible due to numerical instabilities. In these cases, the blending factor can be used in conjunction with the higher-order scheme to provide a solution which is of greater accuracy than a first-order Upwind Differencing scheme. The blending factor default value of 0.1 results in a differencing scheme that is 10% upwind and 90% higher order. Control Panel Solver Controls-Solvers The Solvers tab enables you to select the linear equation solver used to solve the algebraic equations for each dependent variable and the controlling parameters for that solver.

63

CFD-ACE_V2008.2_User_Manual

Solver Controls - Solvers Tab

The panel contains four columns: the first defines the variable, the second defines the linear equation solver to be used for that variable, the third determines the maximum number of solver sweeps (iterations) allowed, and the fourth determines the convergence criteria to be used. The variable list includes any variables that are solved for (as determined by the active Modules). For most variables, the default solver selection is the CGS+Pre (conjugate-gradient-squared plus preconditioning) solver. An Algebraic Multigrid Solver (AMG) is also available. Some variables may shown additional solver selections. Recommended solver selections are discussed in the individual Module section of the CFD-ACE+ Modules manual. For either the CGS + Pre or the AMG solver, you can set the maximum number of sweeps, or iterations, and the convergence criteria. Because these solvers detect their own convergence, you can control the amount of residual drop that you require for the linear equation solver to terminate. The residual drop for the CGS solver is equal to the square of the Criterion given CFDACE+. If the solver reaches the maximum number of sweeps before the convergence criteria is met, then the solver will terminate and a warning message will be printed to the output file. In most cases, you can use the default selections of the CGS+Pre solver with a maximum of 50 or 500 sweeps (depending on variable). Control Panel Solver Controls-Relax The Relax tab sets the under relaxation factors for each of the solved variables and for the auxiliary variables. Under relaxation is a constraint on the change of a dependent or auxiliary variable from one solution iteration to the next. It is required to maintain the stability of the coupled, non-linear system of equations.

64

CFD-ACE-GUI Overview

Solver Controls - Relax Tab

The panel contains four columns: the first defines the variable, the second contains a slider bar which can be used to adjust the value, the third contains up/down buttons to adjust the order of magnitude of the value, and the fourth is a field for the under relaxation value itself. The variable list includes any variables that are solved for (as determined by the active Modules) and any auxiliary variables that are used in active equations. The solved variables are listed in the group at the upper side of the panel and the auxiliary variables are grouped at the lower side of the panel. To increase the under-relaxation, or constraint, on any of the dependent (solved) variables, increase the value. (The default value for most dependent variables is 0.2.) Values greater than one are allowed but not recommended in most cases. To increase the under-relaxation on an auxiliary variable, decrease the value. (The default value for most auxiliary variables is 1.0.) The auxiliary variable under relaxation values are bound between 0 and 1. See the Numerics section for more details on how under relaxation is applied to the equations. See each Module’s section for guidelines on setting under relaxation values.

65

CFD-ACE_V2008.2_User_Manual

Control Panel Solver Controls-Limits The Limits tab enables you set minimum and maximum values for certain dependent and auxiliary variables.

Solver Controls - Limits Tab

The panel contains three areas: the first defines the variable, the second is an entry field for the minimum allowed value, and the third is an entry field for the maximum allowed value. The variable list includes any variables that are solved for (as determined by the active Modules) and any auxiliary variables that are used in active equations. The default Variable Limits are generous and should only be changed in special situations. Be aware that any time the solver enforces these limits, (with the exception of Mixture or Species Fractions), it is artificially constraining the solution. This can cause convergence problems or produce a non-physical solution. The results should always be checked to make sure that no variable is hitting a limit. See each Module’s section for advice on setting limits. Control Panel Solver Controls-Advanced Settings The Adv tab (Advanced Settings) provides options for advanced users. Buffered Output

This option changes program output so that it is written only when internal buffers are full. Default mode is to flush RSL and out file every iteration once at the end of iteration. This is normally the way users want the program to operate as it ensures that, for example, residual records appear in the model.RSL file at the completion of each iteration. For small problems that run for a long time (due to either a large number of iterations or time steps) the default output mode can cause a significant portion of the elapsed time to be devoted just to output with resulting poor CPU utilization. For these cases, selecting the Buffered Output option can result in a noticeable savings in turnaround time for the simulation. Higher Accuracy

This option activates an alternative numerical discretization scheme in the program that results in a higher accuracy result for a given grid. This capability is added in an experimental form at release of Version 2004. As implemented in that release it is relatively inefficient and can cause significantly longer run times than the default discretization scheme. It has also shown some robustness problems which have not yet been resolved. It may be best to use a solution with the default discretization scheme as initial conditions for a simulation with this option.

66

CFD-ACE-GUI Overview

The other options displayed depend upon the modules being used in the simulation. For more information on Advanced Settings, see the Modules section.

Control Panel-Output (OUT) Control Panel Output Introduction The Output panel enables you to control output generated by the CFD-ACE-Solver. These settings control the frequency of output and the contents: •

Output Options



Printed Output



Graphical Output



Monitor Points

Output-Output Options Control Panel Output-Output Introduction

The Output panel enables you to select the frequency with which the solver output is written. Solver output includes graphical output data for visualization purposes, and model restart data to allow the simulation to be restarted at a later time. The Output panel contains: •

Steady State Simulation



Unsteady Simulations



User Defined Output - These activate the corresponding user subroutines: User Sub(uout), User Sub(uread_dtf), and User Sub(uwrite_dtf). See the User ManualUser Subroutines for more details.

67

CFD-ACE_V2008.2_User_Manual

Output Panel

The output options behave slightly differently depending on whether the simulation is steady or unsteady (transient). Control Panel Output-Output Options-Steady State Simulations

The pull-down menu next to Output Results enables you to output the results at the end of the run or at specified intervals. If you select specified intervals, you can enter the iteration frequency (results will be output after every iteration frequency interval). The unique file option, if activated, will cause the solution output to be written to separate DTF files named modelname.####.DTF where #### is the iteration number. The last solution output dataset will be written to the original DTF file. Control Panel Output-Output Options-Unsteady Simulations

The Output Location pull-down menu outputs the results in one of three modes: Unique Filename, Unique Simulation, or Replace Simulation. If you are using the instant time-step option, then specify the frequency (in timesteps) to save the solution output. If you are using the automatic timestep option, then specify the time frequency to save the solution output. Unique Filename

The Unique Filename option writes the solution output to separate DTF files. The files will be named as modelname.#####.DTF, where ##### is a timestep sequence number. Unique Simulation

68

CFD-ACE-GUI Overview

The Unique Simulation option writes the solution output to separate simulations in the same DTF file. You will only have one solution output file (modelname.DTF) but contained therein will be separate simulations for each timestep saved. Upon opening the DTF file in CFD-VIEW you can specify which simulation to load. Replace Simulation

The Replace Simulation option writes the solution output to the DTF file by simply overwriting the last saved simulation. Use this method if you are running a transient problem to steady-state, or you do not care to retain the time history of your transient simulation. Output-Printed Output Control Panel Output-Printed Output Introduction

The Printed Output panel enables you to activate boundary condition integral output, diagnostic output, and select one or more summary reports. It contains the following: •

BC Integral Output



Diagnostics



Residual Frequency



Summary Reports

Output Panel - Print Tab

Control Panel Output-Printed Output-BC Integral Output

The BC Integral Output option allows the solver to integrate engineering quantities over selected boundary condition patches. For transient simulations, the time history of these integrated quantities will be written to the output file. Upon selecting the BC Integral Output option, the solver will look for a modelname.fmt file for instructions on which variables to integrate and on which boundary conditions they should be integrated over. See Appendix A for more information on the format of this file.

69

CFD-ACE_V2008.2_User_Manual

Control Panel Output-Printed Output-Diagnostics

Diagnostics provides information about the performance of the solver. When you activate Diagnostics, you will be prompted to select the basic or advanced level of output. The basic level instructs the solver to write information to the output file on the performance of the linear equation solvers. By default, this information will be written every iteration but you can enter an Iteration Frequency greater than 1 to reduce the amount of output generated. The advanced level contains everything in the basic level and adds trace information to the output file so that the solver subroutine entry and exit points can be monitored. The basic level of diagnostics allows you to monitor the performance of the linear equation solvers. The advanced level is not very useful on its own and should only be activated at the request of the ESI CFD Technical Support Staff.

Diagnostic Output

Control Panel Output-Printed Output-Residual Frequency

For transient problems, you can reduce the amount of residual output by entering a residual frequency greater than 1. A value of 2 will cause the residuals to be printed every other time step resulting in one-half of the default amount of output.

Residual Frequency

Control Panel Output-Printed Output-Summary Reports

Some of the modules have the capability to produce a summary report for certain data. These summaries are usually integrations of some parameter over each valid boundary condition, as well as a summation of all of the data for the whole model. The table below contains the available printed summary reports and the modules that control them. See the referenced Module for more details. Printed Summary Reports

Summary Report

70

Controlling Module

Mass Flow Summary

Flow

Pressure and Viscous Force Summary

Flow

CFD-ACE-GUI Overview

Heat Transfer Summary

Heat Transfer

Species Summary

Chemistry

Scalar Flux Summary

User Scalar

Reaction Force Summary

Stress

Control Panel Output-Graphical Output The Graphic tab enables you to choose the variables you want to save to the results file (modelname.DTF). All of these variables will be interpolated to the computational nodes and be available for post-processing with CFD-VIEW. The number of variables is too large to list here. See each module’s section for details on what variables are available when that module has been activated. Control Panel Output-Monitor Points The Monitor Point panel enables you to monitor one or more variables at one or more locations in the computational model. The Monitor Point feature will report the value of any variable at the center of the cell which contains the monitor point’s specified xyz location. The last column input is for moving mesh computations. In these cases, the monitor point can be fixed to it's nearest cell center and the monitor will move as the mesh moves. To fix a monitor point to a cell, the value should be set to 1 in the Fixed Cell column. The coordinates are in the units of the model (as of version 2008.0). The Monitor Point output can be graphically plotted using the CFD-ACE+ built-in Monitor Point plotter (see Control Panel-Run-Plot Monitor Points). For steady-state simulations the variable value will be plotted versus iteration and for transient simulations the variables will be plotted versus time. There are two ways to define the Monitor Point locations and variables: user input (through the CFD-ACE+) and file input (see Appendix A-Monitor Point File). There is no limit to the number of points that you can have. If the variable that you want is not in the list, then use the user input option to manually define the monitor point locations and variables.

71

CFD-ACE_V2008.2_User_Manual

Monitor Points Window

Control Panel-Run Controls (RUN) Control Panel Run Introduction The Run panel enables you to control the CFD-ACE-Solver and monitor the simulation while it is running. The Run panel is shown below.

72

CFD-ACE-GUI Overview

Run Panel

See Also Run-Parallel Run Run-Submit to Solver Run-Parametric Run with SimManager Run-Optimization Run with SimManager Run-View Residuals Run-View Output Run-Plot Monitor Points Run-Save and Stop Run-Stop Control Panel Run-Parallel Run The Parallel Run option activates parallel processing of the simulation from CFD-ACE-GUI. For more information, see Parallel Processing.

73

CFD-ACE_V2008.2_User_Manual

Control Panel Run-Submit to Solver The Submit to Solver function launches the CFD-ACE-Solver for the current simulation. If no changes have been made to the simulation settings, then the solver will start immediately. If changes have been made to the settings, the Submit window appears.

Submit Window

Because the simulation data has been modified, the DTF file must be updated before it is passed to the CFD-ACE-Solver. Press the Submit Job Under Current Name button to save the data to the current DTF file and launch the solver. Press Submit Job Under a Different Name to save all of the simulation data to a new DTF file and then launch the solver. The Cancel button cancels the operation and the job will not be submitted. Control Panel Run-Parametric Run with SimManager The Parametric Run with SimManager button saves the DTF file and launches the SimManager program in the Parametric Wizard mode. The appropriate file settings will be made so that setup of a parametric SimManager run can be quickly made for the simulation. Control Panel Run-Optimization Run with SimManager The Optimization Run with SimManager button saves the DTF file and launches the SimManager program in the Optimization Wizard mode. The appropriate file settings will be made so that setup of an optimization SimManager run can be quickly made for this simulation. Run-View Residuals Control Panel Run-View Residuals Introduction

Once the CFD-ACE-SOLVER job has been submitted and the solver starts to write the residual history file (modelname.RSL), the View Residuals function becomes active. The function will also be active if a modelname.RSL file exists in the current working directory. The View Residuals function creates a line plot of the residual history for the current simulation. The Residual Plotter appears in a separate window.

74

CFD-ACE-GUI Overview

There are several ways to customize the Residual Plotter. When you click the right mouse button on the Residual Plotter, a menu appears with the following items: •

Modify Axes



Update Frequency



Hide All Lines



Normalize Residuals



Export to Text File

Control Panel Run-View Residuals-Modify Axes

The Modify Axes option lets you change the axes of the plots. To reset the original axes, click the restore button on the panel. Control Panel Run-View Residuals-Update Frequency

The Update Frequency option enables you to modify the frequency in which the residual plotter is updated. The default update frequency is set to 100 ms. Control Panel Run-View Residuals-Hide All Lines

The Hide All Lines option urns off all lines from being plotted. Control Panel Run-View Residuals-Normalize Residuals

Normalizes the residuals so that the maximum residual plotted is one and all others are scaled appropriately so that they show the magnitude drop from the maximum residual. Control Panel Run-View Residuals-Export to Text File

The Export To Text File option enables you export the residual file to a format that can be used by Excel. If, upon pressing View Residuals you get a message that says no residual file available or you get a blank Residual Plotter window, it may be that the solver has not yet written any information to the residual history file. Close the Residual Plotter and reopen it after the residual history file has been created.

75

CFD-ACE_V2008.2_User_Manual

Residual Plotter Window

The buttons in the upper left-hand corner activate or deactivate the plotting for that particular variable. The Color Palette buttons open the Color Dialog panel to enable you to change the line color of the residual plot for that particular selected variable. The Minor Grid lines checkbox draw more grid lines for the y-axis (logscale) of the plot. If the simulation is unsteady (transient) then there are residual histories for each time step in the residual file. You can cycle through the time steps by using the slider at the bottom of the residual plotter window. Control Panel Run-View Output Once the CFD-ACE-SOLVER job has been submitted and the solver starts to write the output file (modelname.out), the View Output function becomes active. The function will also be active if a modelname.out file exists in the current working directory. View Output creates a text viewer of the output for the current simulation. The Output Viewer will periodically update to show you the output file information in near real time.

76

CFD-ACE-GUI Overview

If you press View Output and get a message that says no output file available or you get a blank Output Viewer window, it may be that the solver has not yet written any information to the output file. Close the Output Viewer and reopen it after the output file has been created. Control Panel Run-Plot Monitor Points The Monitor Point plotter can be invoked if the simulation has started running and you have requested that monitor point data be written as output (see Graphical Output ). The behavior of the Monitor Point plotter is very similar to that of the residual plotter. Control Panel Run-Save and Stop The Save and Stop option sends a signal to the CFD-ACE-Solver to immediately save the simulation data (restart and graphical data) and terminate the solver job. This allows you to safely terminate a CFD-ACE-Solver run if you determine that you do not want to run any further iterations.

Control Panel Run-Stop The Stop option terminates the CFD-ACE-Solver immediately and does not save any data. This function should be used carefully since it does not save the results of the simulation. The DTF file will contain the results as of the last restart save operation, determined by the Output settings. See Output Options.

Entity Bar Entity Bar Introduction The Entity Bar is located above the Model Explorer and has four tabs: •

Set Grid Scale Tab



Set XYZ Visual Scale Tab



Set XYZ Rotation Tab



VC or BC Blanking Tab

Entity Bar Set Grid Scale Tab The Scale tab enables you to scale the geometry of the model by a constant factor. You can also scale the geometry by clicking the right mouse button on the background of the viewer window (see Frequently Asked Questions. The current scale factor and current minimum and maximum dimensions of the model are displayed.

77

CFD-ACE_V2008.2_User_Manual

Entity Bar - Set Grid Scale Tab

See Also Set XYZ Visual Scale Tab Set XYZ Rotation Tab VC or BC Blanking Tab

Entity Bar Set XYZ Visual Scale Tab The Set XYZ Visual Scale tab enables you to visually change the scale of a geometry. To scale the model unequally, adjust the scale using the dials or type in a number corresponding text field. To reset the geometry to its original scale, click the reset button. Scaling geometry in this way is for visual purposes only and does not reflect the grid coordinates.

Entity Bar - Set XYZ Visual Scale Tab

See Also Set Grid Scale Tab Set XYZ Rotation Tab VC or BC Blanking Tab

Entity Bar Set XYZ Rotation Tab The Set XYZ Rotation tab enables you to rotate a model on its X, Y, or Z axis. To rotate an image about the desired axis:

78

CFD-ACE-GUI Overview

1.

2.

Choose one of the following methods to rotate the image:



Place the cursor on the X, Y, or Z dial. Click and hold the left mouse button and move the dial left or right.



Enter the rotation degrees in the X, Y, or Z field. This rotates the model about the standard euler angles (roll, pitch, yaw).

Click Reset to return the model to its original orientation.

Entity Bar- Set XYZ Rotation Tab

See Also Set Grid Scale Tab Set XYZ Visual Scale Tab VC or BC Blanking Tab

Entity Bar BC or VC Blanking Tab The BC or VC Blanking tab enables you to blank (hide) boundary or volume conditions. It consists of two sections that enable you to toggle boundary and volume conditions blanking in the current simulation.

Entity Bar - VC or BC Blanking Tab

See Also Set Grid Scale Tab Set XYZ Visual Scale Tab Set XYZ Rotation Tab

79

CFD-ACE_V2008.2_User_Manual

Model Explorer Model Explorer Introduction The Model Explorer is located at the bottom of the CFD-ACE+ window and provides information about the current simulation. You can use it as a picking mechanism for volume or boundary conditions. All of the explorers behave in a similar manner, but the information displayed may be different. The Model Explorer appears in one of three modes, VC, BC, or IC, depending on the state of the Control Panel. The Model Explorer section describes: •

Model Explorer Operation



Volume Condition (VC) Explorer



Boundary Condition (BC) Explorer



Initial Condition (IC) Explorer

Model Explorer Operation Model Explorer Operation Introduction The Model Explorer information appears in a row-column format so that every volume condition (VC) or boundary condition (BC) entity in the simulation is listed on a separate row. Information about each entity is displayed in the columns. The common elements of the explorers are:

Common Elements of the Model Explorers

See Also Model Explorer-Operation-Display Model Explorer-Operation-Picking Model Explorer-Operation-Grouping

80

CFD-ACE-GUI Overview

Model Explorer Operation-Display You can change the order in which the rows are displayed (sort order) by clicking on a column heading. The first click sorts the rows based on that column’s contents in descending order and a second click sorts in ascending order. A triangle in the sort column indicates which column is being used to sort the data, and the direction of the sort. You can change the width of a column by clicking the border between two column headings with the left mouse button, and dragging it to the desired width. See Also Model Explorer-Operation-Picking Model Explorer-Operation-Grouping Model Explorer Operation-Picking For any operation that requires you to select (pick) a volume condition, you may do so by picking from the viewer window or the Explorer. This added flexibility makes it easy to select the desired entities. Picking from the viewer window is described in Picking Operations. You can pick objects in the Explorer by clicking on any row in the Explorer list with the left mouse button. The selected entity will be displayed in reverse video. You can pick multiple entries two different ways: •

After picking a single entity (from either the Explorer list or viewer window), hold down the Ctrl key and pick another entity. Both entities will be selected. This is called discrete multiple picking.



After picking a single entity (from either the Explorer list or viewer window), hold down the Shift-key and pick another row in the Explorer list. All of the entities listed in the Explorer between the first and second picked will be selected. This is called continuous multiple picking.

When multiple items are picked, the Control Panel displays the settings for the active item. The active item is delineated by drawing a small marker ball at the far left of the row. You can specify the active item by holding down the Ctrl key and selecting the desired entity. The Select All and De-select All buttons (located in the lower right side of the Explorer) select all of the entities or clear the selection list respectively. See Also Model Explorer-Operation-Display Model Explorer-Operation-Grouping Model Explorer Operation-Grouping You may, at times, want to group properties or boundary values for multiple volume conditions or boundary conditions. Using the Grouping features, you can create a temporary group any time multiple entities have been selected. Any changes saved from the Control Panel will apply to all of the selected entities. The temporary group is destroyed when the entities become deselected. To make a temporary group permanent, click the Group button located on the lower left side of the Explorer. This causes a permanent group to be created for the currently active category. The active category is the same as the Setting Mode in the Control Panel and is also indicated by the red diamond in the column heading. Once a group has been made permanent it will be assigned a unique group name.

81

CFD-ACE_V2008.2_User_Manual

To destroy a permanent group, select any entity in the group and click the Ungroup button. You may remove a single entity from a group by right-mouse clicking on the item (from the Viewer Window or Explorer list) and selecting Remove From Group. The difference between a permanent group and a temporary group is that whenever any entity in the permanent group is selected, all of the entities in that group will be selected. This enables you to ensure that the settings for these entities are always consistent. Entities can belong to multiple groups as long as each group is a for a different category. See Also Model Explorer-Operation-Display Model Explorer-Operation-Picking

Model Explorer-Volume Condition (VC) Explorer Model Explorer VC Explorer Introduction The VC Explorer is activated anytime the Control Panel is in the Volume Condition setting mode or when you pick a VC from the graphics window (see Volume Conditions). The main elements of the VC Explorer are shown and discussed below.

Volume Condition Explorer Elements

See Also Model Explorer-VC Explorer-Volume ID, Name, Type Model Explorer-VC Explorer-Blanking, Grouping, Entity Tags Model Explorer VC Explorer-Volume ID, Name, Type Volume ID

The first three columns of the VC Explorer give identity information about the volume condition. All of these settings can be made in CFD-GEOM and can be changed from within CFD-ACE-GUI.

82

CFD-ACE-GUI Overview

Volume Name

The Volume Name enables you to give a unique name to each volume condition. This often helps when trying to locate a certain volume condition. To change the name, right-click on the entity and select Properties from the menu. The original name is what was given to the volume condition during the grid generation process. The Volume Name is not used directly by the solver so the value will not affect the solution results. However, it is referenced in the summary report outputs. Volume Type

The Volume Condition Type (VC Type) tells the solver whether the volume condition is of Fluid, Solid, or Blocked (excluded from solution) type. The VC Type can be changed from the Control Panel (see Control Panel-VC Type). The original type is that which was given to the volume condition during the grid generation process. Model Explorer VC Explorer-Blanking, Grouping, Entity Tags Blanking

The Blanking column displays the blank state of the entity. If the entity is unblanked or visible, the column will be empty. If the entity has been blanked (or hidden so that it does not appear in the viewer window), an asterisk (*) appears in the column. The blank state of an entity can be changed two ways: pick a group of entities and select Blank from the Edit menu (see Blank), or right-click on the entity and select Blank or Unblank. Grouping

Though grouping may not all be available depending on which Modules are active, there are several Grouping modes available for volume conditions: •

Properties



Flow



Heat



Scalar



Stress



Coil



Eplate



Bio-Chem



Momentum Resistance



Species

Entity Tags

The Entity Tag columns provide identification information about the volume conditions such as the Zone (domain) that the volume condition is contained in and the Key (which is a unique identifier assigned to the entity during the grid generation process). There is no way to change this information and it is provided for sorting and debugging purposes.

83

CFD-ACE_V2008.2_User_Manual

Model Explorer-Boundary Condition (BC) Explorer Model Explorer BC Explorer Introduction The BC Explorer is activated anytime the Control Panel is in the Boundary Condition setting mode or when you pick a BC from the graphics window (see Boundary Conditions). The main elements of the BC Explorer are:

Boundary Condition Explorer Elements

See Also Model Explorer-BC Explorer-Boundary ID, Name, Type Model Explorer-BC Explorer-Blanking, Grouping, Entity Tags, Subtype Model Explorer BC Explorer-Boundary ID, Name, Type Boundary ID

The first column of the BC Explorer gives identity information about the boundary condition. All of these settings can be made in CFD-GEOM or can be changed from within CFD-ACE-GUI. Boundary Name

The Boundary Name enables you to give unique names to each boundary condition. This often helps when trying to locate a certain boundary condition. The name can be changed by rightclicking on the entity and selecting Properties from the menu. The original name is that which was given to the boundary condition during the grid generation process. The Boundary Name is not used directly by the solver so the value will not affect the solution results. However, the name is used in the summary report outputs. Boundary Condition Type

The Boundary Condition Type (BC Type) tells the solver the type of boundary condition to apply. There are eight available choices:

84



Inlet



Outlet



Wall



Rotating Wall

CFD-ACE-GUI Overview



Symmetry



Interface



Thin Wall



Cyclic

The BC Type can be changed from the Control Panel. The original type is that which was given to the boundary condition during the grid generation process. Model Explorer BC Explorer-Blanking, Grouping, Entity Tags, Subtype Blanking

The Blanking column displays the blank state of the entity. If the entity is unblanked or visible, the column will be empty. If the entity has been blanked (or hidden so that it does not appear in the viewer window), an asterisk (*) appears in the column. The blank state of an entity can be changed two ways: pick a group of entities and select Blank from the Edit menu (see Blank), or right-click on the entity and select Blank or Unblank. Grouping

There are several Grouping modes available for boundary conditions: •

General



Cyclic



Thin Wall



Arbitrary Interface

Entity Tags

The Entity Tag columns provide information about the boundary conditions such as the Zone (domain) that the boundary condition is contained in and the Key (a unique identifier assigned to the entity during the grid generation process). There is no way to change this information and it is provided for sorting and debugging purposes. Subtype

You can sort on the sub-type of boundary condition specified. These are available for several modules including flow, heat, chemistry, electric, magnetic, stress etc. Split Interfaces

The Split Interfaces option allows zonal interfaces to be split into two different/independent boundary types. For example, a zonal interface could be split into an inlet and wall, an outlet and wall, etc. Steps to Split Interfaces

1. Go to the BC tab --> BC Setting Mode 2. Select one or more zonal interfaces and select the "Split Selected Interfaces" button 3. Two distinct boundaries with the same key number will be created in the BC Explorer window. The default boundary condition for each of these boundaries is "Wall". 4. If these split interfaces need to be reset, select the interfaces and select the "Reset Selected to Interfaces" button. Limitations



Only zonal interfaces are allowed to be split.

85

CFD-ACE_V2008.2_User_Manual



Composite cell groups are not allowed to be split. The "Split Selected Interfaces" button does not appear in the model panel for interfaces that are not allowed to be split.



Currently, this feature is not supported for parallel simulations. This limitation could be removed in future versions.



Once split, these boundaries cannot be used in forming "Thin Walls" or "Arbitrary Interfaces".



The split interfaces option cannot be used with the Grid Deformation option. This limitation may be removed in future versions.

Model Explorer-Initial Condition (IC) Explorer UM-Model Explorer-IC Explorer Introduction The IC Explorer is activated anytime the Control Panel is in the Initial Condition setting mode (see Initial Conditions). If the IC setting mode is set to For All Volumes then the explorer will show that everything is selected. If the setting mode is set to Volume By Volume then the IC Explorer will allow you to pick individual volume conditions to independently set their initial conditions. The main elements of the IC Explorer are:

Initial Condition Explorer Elements

See Also Model Explorer-IC Explorer-Volume ID, Name, Type Model Explorer-IC Explorer, Blanking, Grouping, Entity Type Model Explorer IC Explorer-Volume ID, Name, Type Volume ID

The first column of the IC Explorer gives identity information about the initial condition. All of these settings can be made in CFD-GEOM or can be changed from within CFD-ACE-GUI.

86

CFD-ACE-GUI Overview

Volume Name

The Volume Name enables you to give unique names to each initial condition. This often helps when trying to locate a certain volume condition. To change the name, right-click on the entity and select Properties from the menu. The original name is what was given to the volume condition during the grid generation process. The Volume Name is not used directly by the solver so its value will not affect the solution results. Volume Type

The Volume Condition Type (VC Type) tells the solver whether the volume condition is of Fluid, Solid, or Blocked (excluded from solution) type. The VC Type can be changed from the Control Panel (see Control Panel-VC Type). The original type is what was given to the volume condition during the grid generation process.

Model Explorer IC Explorer-Blanking, Grouping, Entity Tags Blanking

The Blanking column displays the blank state of the entity. If the entity is unblanked or visible, the column will be empty. If the entity has been blanked (or hidden so that it does not appear in the viewer window), an asterisk (*) appears in the column. The blank state of an entity can be changed two ways: pick a group of entities and select Blank from the Edit menu (see Edit MenuBlank), or right-click on the entity and select Blank or Unblank. Grouping

There is one Grouping mode available for initial conditions: •

ICGroup

Entity Tags

The Entity Tag columns provide identification information about the volume conditions such as the Zone (domain) that the volume condition is contained in, and the Key (a unique identifier assigned to the entity during the grid generation process). There is no way to change this information and it is provided for sorting and debugging purposes.

User Manual Frequently Asked Questions How do I apply scaling to the geometry?

To scale the geometry of a model by a constant factor, right-click on the background of the viewer window and select the Simulation Properties option from the menu. The GuiSimulation Properties window appears. Click the Scaling tab to see the scaling information. The current minimum and maximum dimensions of the model and the current scale factor will appear. If you enter a new scale factor, all of the geometry information for the model will be multiplied by that scaling factor.

87

CFD-ACE_V2008.2_User_Manual

GuiSimulation Properties Window - Scaling Tab

88

Database Manager Database Manager Introduction The Database Manager makes the tedious task of setting up chemical reactions or volume condition properties as simple as drag-and-drop. The database manger comes with ESI CFD supplied data, but you can build and maintain your own local database and setup and store commonly used data (property values, chemical reactions, species, etc.) for rapid re-use in any simulation. The database manager is the only way to enter (bio)chemical mixing and reacting information and an optional way to enter material property information. The Database Manager includes the following sections: •

Database Manager-Window



Database Manager-Material Properties



Database Manager-Chemistry



Database Manager-Biochemistry



Database Manager-Examples



Database Manager-Frequently Asked Questions

Database Manager-Window Database Manager Window Introduction To launch the Database Manager window, select Database from the Tools menu. The Database Manager window appears:

89

CFD-ACE_V2008.2_User_Manual

Database Manager Window

From top to bottom, the Database Manager Window is comprised of: •

Title Bar - Displays the mode you are working in (e.g. Solid Materials, Mixtures, etc.). The window control buttons allow you to minimize, maximize, or close the window.



Menu Bar - Two menu options are available from the menu bar. o

90

File Menu - The File menu allows you to make new entries in the database, import external data files, and close the window. ƒ

The New option creates a new database entry. You must have a folder or subfolder selected in the database tree before you can add a new folder or database entry.

ƒ

The Import/Export options can be used to import and export various database items using .sdb format. You must have an item selected in order to export it.

ƒ

The Import option also imports pre-V2007 database files. Mixture and species data can be imported from older .DMD files. General chemistry volume and surface reactions can be imported from older .RMD files.

Database Manager

o



ƒ

The Import Chemkin option imports CHEMKIN-III (Sandia Format) general chemical reaction files. Once these files have been imported, all data will appear in the Local section of each database (Species, Volume Reactions, Surface Reactions). Importing Chemkin files is an optional feature and requires a CHEMKIN-TRANS license. Contact your sales engineer to request a quote for this feature.

ƒ

The Close option closes the window.

Edit Menu - The Edit menu has functions to copy, paste, and delete database entries. ƒ

The Copy option can be selected whenever you have picked a data entry from the database tree.

ƒ

The Paste option pastes a copied entry into any database folder.

ƒ

The Delete option deletes the entry from the database.

ƒ

Mode Selector - Enables you to choose Material Properties, Chemistry, and Biochemistry modes. In the example above, we selected Solid.

ƒ

Units - Enables you to choose desired units for the properties

Tool Bar - The toolbar gives quick access to some of the same functions as described in the menu bar. You can create new folders or entries, and copy, paste, and delete entries.

From left to right, the Database Manager window is comprised of two separate work areas: •

Data Organizer - Displays and enables you to select pre-defined ESI CFD properties and/or any Local properties that you have previously created based on the mode you have chosen from the Mode Selector. In the example above, we opened the ESI CFD properties folder and selected Aluminum_Alloy for our Solid.



Data Panel - Displays information tabs representing the physics discipline you have chosen from the Data Organizer. In the example above, the data panel displays all relevant physics data for a Solid with Aluminum_Alloy properties.

Database Manager Mode Selector The menu and the toolbar of the Database Manager window contain the Mode Selector. It determines the type of data being used and displayed in the database manager. It is segmented into three distinct areas: •

Material Properties - Although it is not required, you can define property data for gas, liquid, and solid materials.



Chemistry - Information for chemical mixing (elements, species, mixtures, gas mixing rules, liquid mixing rules) and reacting simulations (volumes and surfaces) must be entered using the database manager.



Biochemistry - Information for biochemistry simulations (buffers, analytes, mixing rules, receptors, receptor groups, volume reactions, and surface reactions) must be entered using the database manager.

When you select one of these modes, its corresponding properties appear in the next section of the window known as the Data Organizer.

91

CFD-ACE_V2008.2_User_Manual

Mode Selector Section of the Database Manager Window

Database Manager Data Organizer The left side of the Database Manager window contains the Data Organizer. It is a tool to help you logically organize your data. When you select one of the modes in the Mode Selector, its corresponding properties appear in the Database Tree. For every mode you select, there is a Database subfolder and Model subfolders (modelname.DTF). Items in the Database subfolder marked with '@' sign are user defined. They are stored in a local database. Other items in the Database subfolder are stored in the ESI-CFD database. They are automatically copied in the Local database if modified. Any place within CFD-ACE+ where the data can be used (e.g., selecting a surface reaction at a wall), you will be able to see and pick from entries in the folders for that particular type of data. In the example below, we have selected Solid from the Mode Selector. The Solid data appears in the Data Organizer with its related properties folders. The Data Organizer is hierarchical in nature, with the properties from the mode level being applied first. If we had predefined properties for our model stored in the Model .DTF folder and we selected these properties, they would be applied to our model before any of the properties we may select from the Database folder (local or ESI).

92

Database Manager

ESI-CFD Database The ESI CFD database file contains entries that are shipped with your software installation and you cannot change them. It includes entries such as materials, reactions, etc. This file (esiace.sdb or esi-fastran.sdb) is stored in your installation directory in the database folder ($ESIDB/database) (%ESIDB%\database). This data has been provided as a convenience, but its use and contents should be verified to ensure that the data is accurate and usable for your simulation. Local Database When you start CFD-ACE+ GUI, it automatically creates a directory on your system named ESIDB. In UNIX, this directory is created in your home directory (under your user account). In Windows NT, this directory is created on your C: drive. In Windows 2000 and newer, this directory is created in your home directory, usually under My Documents. The ESIDB directory contains your Local database files (user-ace.sdb or user-fastran.sdb). ESIDB is the default name for your Local database manager directory but you can change the name and path of the directory by selecting Edit->Preferences->Files Tab , and changing the Database Manager Directory path. Application must be restarted after this change. Note: Version 2007 automatically converts all existing .DMD and .RMD files in your Local folder into .sdb format.

93

CFD-ACE_V2008.2_User_Manual

Model (modelname.DTF) Folder The Model folder has the name of the currently loaded DTF file. The data shown in this folder is required to run the simulation and will be written to the DTF file. If you want to permanently store this data (for re-use in other simulations) then you sho uld copy the data from the Model folder to the Database folder. You can also add or delete mixtures and species to the modelname.DTF file by selecting Models Menu-Active Mixtures & Species. See Also Database Manager-Mode Selector Database Manager-Data Panel

Database Manager Data Panel The right side of the Database Manager Window contains the Data Panel that is divided into a tabbed layout. Each tab represents a physics discipline. The Data Panel is where all of the property-related data is stored. Information that you do not know about should be left as Undefined. The Notes field located next to the name panel located near the top of the Database Manager is available for any additional information about the material or specie (e.g. reference). When you import a model into CFD-ACE+, only the data elements required by the model will be imported. For example, if you are running only flow and heat transfer, then no structural information is required and will not be transferred from the database manager. On the other hand, if you have a material with structural properties set as Undefined and you import that material into CFD-ACE+, you will receive a warning that the structural properties are not yet defined and you must set valid properties. See Also Database Manager-Mode Selector Database Manager-Data Organizer

Database Manager-Material Properties Database Manager Material Properties Introduction The Material Properties section of the database manager enables you to: •

Define property data for gases, liquids, and solids



Setup and save all of the single-component properties as utilized by the solver

This data is used by the Flow, Heat Transfer, Spray, Cavitation, Stress, Electric, Magnetic, and Semi Device modules. You can use the material properties stored in the database to define the primary fluid for the Free Surface (VOF), and Two-Fluid modules. The material properties are not used for Chemistry module cases (see the Chemistry or Biochemistry sections for information on Mixing Rules). The Material Properties section includes: •

Database Manager-Material Properties-Gases



Database Manager-Material Properties-Liquids



Database Manager-Material Properties-Solids

Database Manager Material Properties-Gases You can use gases to simulate flow, heat transfer, free surface, two fluid, and electromagnetic solutions. For chemistry simulations, use a gas mixing rule rather than a single component gas definition.

94

Database Manager

Below are the tabs and material properties that you can use for gases. You can find details on these properties in the Volume Condition section of each Module. •

Physical - Density



Fluid - Viscosity



Thermal - Specific heat, thermal conductivity



Electric/Magnetic - Electrical conductivity, relative permittivity, relative permeability

Database Manager Material Properties-Liquids You can use liquids to simulate flow, heat transfer, free surface, two fluid, cavitation, and electromagnetic solutions. For chemistry simulations, use a liquid mixing rule rather than a single component liquid definition. You can also use liquids with spray injectors to track the motion and interaction of fluid particles with the flow field. Below are the tabs and material properties that you can use with liquids. You can find details on these properties in the Volume Condition section of each Module. •

Physical - Density, surface tension



Fluid - Viscosity



Thermal - Specific heat, thermal conductivity, solidification



Electric/Magnetic - Electrical conductivity, relative permittivity, relative permeability



Spray - Heat of vaporization, saturation pressure, evaporating species

Database Manager Material Properties-Solids You can use solids in any volume condition region of a model. A solid volume condition will not allow any flow, but will allow heat transfer, stress, and electromagnetic solutions to be solved within the solid region. You can use solids with spray injectors to track the motion and interaction of solid particles with the flow field. Below are the tabs and material properties that you can use with solids. You can find details on these properties in the Volume Condition section of each Module. •

Physical - Density



Thermal - Specific heat, thermal conductivity, melting, ice melting



Structural - Material type, anisotropy directions, Young’s Modulus, Shear Modulus, Poisson's Ratio, thermal expansion coefficient, initial yield stress, hardening parameter



Electric/Magnetic - Electrical conductivity, relative permittivity, relative permeability, Seebeck coefficient



Piezoelectric - Constitutive form, dielectric matrix, piezoelectric coupling matrix



Semiconductor - Semi device, lifetime property, Si property

Database Manager-Chemistry Database Manager Chemistry Introduction The Chemistry section of the database manager enables you to: •

Setup data for chemical mixing and reacting simulations including elements, species, mixtures, gas mixing rules, liquid mixing rules, volume reactions, and surface reactions

95

CFD-ACE_V2008.2_User_Manual



Setup and save information needed when running the chemistry module of CFDACE+.

Chemistry data is used when the gas phase chemistry media option has been chosen (both for species mass fraction and mixture mass fraction approach) or when the liquid phase option has been chosen with the general liquid chemistry approach. See the Biochemistry Data section for cases where the liquid phase option is selected with biochemistry approach. Chemistry Data selections include: •

Database Manager-Chemistry-Elements



Database Manager-Chemistry-Species



Database Manager-Chemistry-Mixtures



Database Manager-Chemistry-Gas Mixing Rules



Database Manager-Chemistry-Liquid Mixing Rules



Database Manager-Chemistry-Volume Reactions



Database Manager-Chemistry-Surface Reactions

Database Manager Chemistry-Elements You can store element data and use it to define the molecular weight of chemical species. •

Physical-Chemical - Atomic Weight

Database Manager Chemistry-Species The species data defines the properties of each individual species and gives several choices for how the properties could be calculated. When simulating chemistry cases, this species data will define the effective fluid properties through the use of mixing rules (these define the property options that will be used). •

Molecular - Elemental composition, molecular weight, characteristic energy (LennardJones Parameter), collision data (Lennard-Jones Parameter), polarizability, charge exchange cross section



Physical - Density



Fluid - Accommodate coefficient, dynamic viscosity



Thermal - Thermal accommodation coefficient, specific heat, thermal conductivity



Chemical - Mass diffusivity, mobility



Editing Species Attributes

Database Manager Chemistry-Mixtures Mixtures define the composition of the fluid at boundary conditions or for initial conditions. A mixture is simply a collection of species defined by some fractional approach. •

Mixture Definition - Mixture name, mixture definition



Editing Mixture Attributes

Database Manager Chemistry-Gas Mixing Rules Gas mixing rules define how the local (cell) properties will be calculated. The mixing rules will state the method, and then CFD-ACE-Solver will evaluate the species properties using that method and in conjunction with the local species composition determine the computational cell properties. •

96

Physical - Density

Database Manager



Fluid - Viscosity



Thermal - Specific heat, thermal conductivity



Electric/Magnetic - Electrical conductivity, relative permittivity, relative permeability



Plasma - Electron collision frequency, electron diffusion coefficient, ion diffusion



Kinetic - Diffusion coefficient, convective velocities

Database Manager Chemistry-Liquid Mixing Rules Liquid mixing rules define how the local (cell) properties will be calculated. The mixing rules will simply state the method, and then the solver will evaluate the species properties in conjunction with the local species composition to determine the computational cell properties. •

Physical - Density



Fluid - Viscosity



Thermal - Specific heat, thermal conductivity



Electric/Magnetic - Electrical conductivity, relative permittivity, relative permeability



Chemical - Mass diffusivity, mobility

Database Manager-Chemistry-Volume Reactions Database Manager Volume Reactions Introduction You can define volume reactions to model chemical species production/consumption in either gas phase or liquid phase. As the name indicates, volume reactions occur within the fluid volumes of your model. Mechanism Definition

Once you add a reaction mechanism, or if a reaction mechanism exists in the currently loaded information, you may edit the entry by selecting it from the list on the left side of the Reaction Manager. Each mechanism has a section for a name and notes. These have no inherent use inside the code other than to refer to the reaction. Constants for each mechanism can either be input in SI units or cgs units. The units for E/R are in Kelvin for both the sets of units. You will be reminded of the units wherever appropriate. Each type of reaction mechanism requires different inputs as de scribed below. The symbol --> represents an irreversible reaction while represents a reversible reaction. Reaction mechanisms and reaction mechanism steps can be deleted by selecting the appropriate button. Mechanism definition includes the following: •

Volume Reactions-Equilibrium (Mixture Fraction Approach)



Volume Reactions-Instantaneous (Mixture Fraction Approach)



Volume Reactions-Finite-Rate (Mixture Fraction Approach in Gas or Liquid Phase)



Volume Reactions-Finite-Rate (Species Fraction Approach)

97

CFD-ACE_V2008.2_User_Manual

Database Manager Chemistry-Volume Reaction-Equilibrium (Mixture Fraction Approach) The Equilibrium Reaction Model requires that you specify all of the chemical species that might exist in a reacted mixture. This mechanism can only be used if the Mixture Fraction Approach has been selected under the Chemistry Model Options page. When you select the Equilibrium Model, the only information the Reaction Manager requires is what species might be present in the reaction. Type your reaction in the Equation field, for example: 2H2+O2->2H2O The reaction does not have to be balanced for the Equilibrium Model. The CFD-ACE-Solver uses the species listed in this reaction mechanism to determine the mixture concentrations based on a Gibbs free energy approach. The a7 coefficient in the JANAF tab calculates the Gibbs Energy for equilibrium rates. For more details on this reaction type, see the Chemistry Module-TheoryMixture Fractions. See Also Volume Reactions-Instantaneous (Mixture Fraction Approach) Volume Reactions-Finite-Rate (Mixture Fraction Approach in Gas or Liquid Phase) Volume Reactions-Finite-Rate (Species Fraction Approach) Database Manager Instantaneous (Mixture Fraction Approach) The Instantaneous Reaction Model assumes that a single chemical reaction occurs and that it proceeds instantaneously to completion. This mechanism can only be used if the Mixture Fraction Approach has been selected under the Chemistry Model Options panel. The form of the reaction is: Fuel + Oxidant -> Products When the instantaneous Reaction Model is selected the Reaction Manager window appears:

98

Database Manager

Instantaneous Reaction Mechanism Specification

Enter your reaction in the Reaction field, for example: C3H8+5O2->3CO2+4H2O The chemical reaction specified for an instantaneous reaction mechanism must be balanced. A reaction is considered balanced if the sum of the molecular weights, as determined from the species database, are equal on the left- and right-hand sides of the reaction. For more details on this reaction type, see the Chemistry Module-Theory-Mixture Fractions. See Also Volume Reactions-Equilibrium (Mixture Fraction Approach) Volume Reactions-Finite-Rate (Mixture Fraction Approach in Gas or Liquid Phase) Volume Reactions-Finite-Rate (Species Fraction Approach) Database Manager Chemistry-Volume Reactions-Finite-Rate (Mixture Fraction Approach) The Finite-Rate (Mixture Fraction Approach) Model allows you to define a single step irreversible chemical reaction which proceeds at a finite-rate to completion. This mechanism can only be used if the Mixture Fraction Approach has been selected under the Chemistry Model Options page. The form of the reaction is: Fuel + Oxidant -> Products

99

CFD-ACE_V2008.2_User_Manual

When the Finite-Rate (Mixture Fraction Approach) Reaction Model is selected the Reaction Manager dialog box appears:

Finite-Rate (Mixture Fraction Approach) Reaction Mechanism Specification

Input for the Finite-Rate (Mixture Fraction Approach) Reaction Mechanism requires the reaction specification as well as the rate information. Enter your reaction in the Equation field, for example: C3H8+5O2->3CO2+4H2O The chemical reaction specified for a finite rate reaction mechanism must be balanced. A reaction is considered balanced if the sum of the molecular weights, as determined from the species database, are equal on the left- and right-hand sides of the reaction. Also fill in the information for the following rate expression: (2-1) by filling in the boxes for the A, n, m, and E/R terms. The overall reaction rate is then given as:

(2-2)

100

Database Manager

You must also specify the concentration exponents a’ and b’ in the above expression by entering them in the concentration exponents fields. Default values for the concentration exponents should be the stoichiometric coefficients of the chemical reaction. For more details on this reaction type, see the Chemistry Module-Theory-Mixture Fractions. See Also Volume Reactions-Equilibrium (Mixture Fraction Approach) Volume Reactions-Instantaneous (Mixture Fraction Approach) Volume Reactions-Finite-Rate (Species Fraction Approach) Database Manager Chemistry-Volume Reactions-Finite-Rate (Species Fraction Approach) The Finite-Rate (Species Fraction Approach) Model allows you to specify a single- or multi-step irreversible or reversible chemical reaction which proceeds at a finite-rate to completion. This mechanism can only be used if the Species Fraction Approach has been selected under the Chemistry Model Options page. The form of the reaction is: Reactants Products When the Finite-Rate (Species Fraction Approach) Reaction Model is selected the Reaction Manager window appears:

101

CFD-ACE_V2008.2_User_Manual

Finite-Rate (Species Fraction Approach) Reaction Mechanism Specification

Input for the Finite-Rate (Species Fraction Approach) Reaction Mechanism requires the reaction specification as well as the rate information for each reaction step (chosen by incrementing or decrementing the No. Steps value.) Type your reaction in the Equation field, for example: SIH4SIH2+H2 There are two options available for the Finite-Rate (Species Fraction Approach) reaction mechanisms, general rate or mass action. For the general rate option αij need not be equal to νij. For the mass action option αij = νij. The chemical reaction specified for a finite-rate reaction mechanism must be balanced. A reaction is considered balanced if the sum of the molecular weights, as determined from the species database, are equal on the left- and right-hand sides of the reaction. A general representation of the multi-step reaction mechanism is:

(2-3)

where: th

= number of moles of species reaction step

on the left-hand side of the j

= number of moles of species th j reaction step

on the right-hand side of the

NSPCS

= total number of species considered

NSTEP

= total number of reaction steps.

Each step is reversible and the reaction rate for the jth step can be expressed in its most general form as:

(2-4)

with the forward and reverse reaction rate coefficients

102

and

given by:

Database Manager

(2-5)

All terms in the rate coefficients are defined by filling in the type-in boxes for each variable. If a reaction step obeys the law of mass action (check the box Backward Rate by Equilibrium), then:

(2-6)

where:

(2-7)

and po

= one atmosphere

gi

= Gibbs energy.

If the law of mass action does not apply to the reaction step then you should specify the backward rate explicitly just as the forward rate is specified. The multi-step reaction model also supports the presence of third-body terms. When third-body terms are present, the reaction rate

is multiplied by the following term:

(2-8)

103

CFD-ACE_V2008.2_User_Manual

Third-body terms are automatically activated when you add a species by the name M. On adding a species named M, the reaction manager will activate the field associated with Third body Efficiencies input. Although the constants cij and βij can be arbitrary, they are assumed to be one. For more details on this reaction type, see the Chemistry Module-Theory-Mixture Fractions. Each reaction step is provided with a name and a notes section. The name of the reaction step is used to identify the reaction step uniquely for inputting user specified reaction rate. This input is useful where you do not have a Arrhenius type reaction rate. To specify a user defined reaction rate, check the User Defined Factor check box for the reaction step and provide the reaction step with a unique name. The solver will expect a user subroutine which provides the user defined factor and multiplies the existing factor (from the Arrhenius rate input). See User Subroutines for more details. The Input for Energy loss is activated when you input a species called e on the left hand side of the reaction. The e species is assumed to be an electron. The assumption being that reaction is an electron induced reaction if there is an electron on the left hand side of the reaction. See Also Volume Reactions-Equilibrium (Mixture Fraction Approach) Volume Reactions-Instantaneous (Mixture Fraction Approach) Volume Reactions-Finite-Rate (Mixture Fraction Approach in Gas or Liquid Phase)

Database Manager-Chemistry-Surface Reactions Database Manager Chemistry-Surface Reactions Introduction You can define surface reactions to model chemical species production/consumption on a wall boundary or a fluid/solid interface. As the name indicates, surface reactions occur on the boundaries of fluid volumes in your model. Mechanism Definition

The symbol --> represents an irreversible reaction while represents a reversible reaction. Reaction mechanisms and reaction mechanism steps can be deleted by selecting the appropriate button on the toolbar. Mechanism definition includes the following: •

Finite-Rate (Species Approach in Gas Phase)



Finite-Rate (Species Approach in Liquid Phase)

Database Manager Chemistry-Surface Reactions-Edit Surface Reaction Mechanism Once a surface reaction mechanism has been added, or if a surface reaction mechanism exists in the currently loaded information, then you may edit the entry by selecting it from the list on the left side of the Surface Reaction Manager. The Surface Reaction Manager dialog box will appear as shown. Each mechanism has fields for a name, and notes. You can use these type-in fields to provide information about the reaction mechanism. Constants for each mechanism can either be input in SI units or cgs units using the radio button at the top right hand corner. SI units are in kmol, m, s, kg, and CGS units are inn mol, cm, s, and gram. The units for E/R are in Kelvin for both the sets of units. You will be reminded of the units wherever appropriate. For information on the surface coverage modification option, please go to the Surface Reactions theory page in the Chemistry Module.

104

Database Manager

Surface Reaction Mechanism Specification

Database Manager-Biochemistry Database Manager Biochemistry Introduction The Biochemistry section of the database manager enables you to: •

Setup data for analytes, buffers, receptors, receptor groups, mixing rules, volume reactions, and surface reactions



Setup and save information needed when running biochemistry in chemistry module

You have to select liquid phase option to set up biochemistry problems. Biochemistry selections include: •

Biochemistry-Analytes



Biochemistry-Buffers



Biochemistry-Receptors



Biochemistry-Receptor Groups



Biochemistry-Mixing Rules



Biochemistry-Volume Reactions



Biochemistry-Surface Reactions

105

CFD-ACE_V2008.2_User_Manual

Database Manager Biochemistry-Analytes Analytes are defined as species that exist in the fluid volume and are quantified by a concentration expressed in moles/liter. Analytes are analogous to species in the regular chemistry module with more types available for simulation cases of biochemical interest. The analyte types that are available are protein, ampholyte, DNA/RNA, ion, acid-conjugate, and baseconjugate. Properties entered into the database for an analyte should be representative properties for that analyte (diffusion coefficient, mobility, etc). Below are the tabs and material properties that you can use biochemistry: •

Type - Proteins, ampholytes, DNA/RNA, ions, acid-conjugate (Ionization), baseconjugate (Ionization), other



Molecular - Molecular weight, size (Radius of Gyration), valence



Chemical - pl, pKa, pKb

Database Manager Biochemistry-Buffers You can use buffers in any fluid volume condition region in the model. A buffer volume condition can be used to simulate flow, heat transfer, free surface, and electromagnetic solutions. When simulating biochemistry cases, buffer data is used to define the effective fluid properties through the use of mixing rules (that define the property options that will be used). You can use buffers with spray injectors to track the motion and interaction of fluid particles with the flow field. Below are the tabs and material properties that you can use biochemistry: •

Physical - Density, surface tension, pH



Fluid - Viscosity



Thermal - Specific heat, thermal conductivity



Electric/Magnetic - Electrical conductivity, relative permittivity, relative permeability

Database Manager Biochemistry-Receptors Receptors are species that exist exclusively on the surface and are quantified by a concentration expressed in moles/m2. You can select the receptor type (e.g., passive binding site, reversible complex, irreversible complex etc) from the available list. Below are the tabs and material properties that you can use biochemistry: •

Type - Reversible complex, receptor, passive binding site, irreversible complex, irreversible species

Database Manager Biochemistry-Receptor Groups Receptor groups define surface density and composition of receptors on a surface. A receptor group is simply a collection of receptors defined by some fractional approach. Below are the tabs and material properties that you can use biochemistry: •

Group Definition - Group name, surface density, group definition

Database Manager Biochemistry-Mixing Rules You can use mixing rules to define the binary properties of systems such as analyte diffusivity and mobility in a given buffer. The mixing rules will state the method, and the solver will evaluate the analyte properties in conjunction with the local species composition to determine the computational cell properties. Below are the tabs and material properties that you can use biochemistry:

106



Mixing Rule Definition - Rule name, buffer name



Analyte Composition - Diffusivity, mobility

Database Manager

Database Manager Biochemistry-Volume Reactions You can define volume reactions for model biochemical species production/consumption in a liquid phase. Volume reactions occur within the fluid volumes of your model. Below are the tabs and material properties that you can use biochemistry: •

Mechanism Definition - Stoichiometric, stoichiometric (Arrhenius), Michaelis Menten

Database Manager Biochemistry-Surface Reactions You can define surface reactions for model biochemical species production/consumption on a wall boundary or a fluid/solid interface. Surface reactions occur on the boundaries of fluid volumes in your model. Biochemical surface reaction also includes multi-step reaction mechanisms containing mixed stoichiometric and MM (Michaelis Menten), enzyme-catalyzed reaction kinetics along with Arrhenius terms. Below are the tabs and material properties that you can use biochemistry: •

Mechanism Definition - Stoichiometric, stoichiometric (Arrhenius), Michaelis Menten

Database Manager Examples See the CFD-ACE+ Tutorials for instructions on how to setup and run each case. The following tutorials use the Property Manager: •

Turbulent Mixing of Propane and Air (with and without reactions)



Multi-step Reaction in a Gas Turbine Combustor



Surface Reaction in a 2D Axisymmetric Reactor



Sematech Benchmark Case #5



Sematech Benchmark Case #9



Sample Stacking by Electrophoresis



Evaporative Spray

The following tutorials use the Reaction Manager: •

Turbulent Mixing of Propane and Air (with and without reactions)



Multi-step Reaction in a Gas Turbine Combustor

The following tutorials use the Surface Reaction Manager: •

Surface Reaction in a 2D Reactor



Sematech Benchmark Case #5



Sematech Benchmark Case #9

Database Manager Frequently Asked Questions Can I read species information into the Property Manager from a JANNAF database file (THERM.DAT)?

The Property Manager can import old THERM.DAT files to create species entries in the database. Open the Property Manager and select File -> Import Properties from PMD File. Change the file type filter to *.DAT files and read a THERM.DAT file.

107

Arbitrary Interface Boundary Conditions Arbitrary Interface BC Introduction The Arbitrary Interface Boundary Condition enables separate grid blocks to communicate flow, heat, and any other transported information. Although similar to point-to-point matched (contiguous) interfaces, arbitrary interfaces do not require point-to-point matching grids at the interface. Arbitrary interfaces allow you to create grid blocks independently of one another. This powerful capability allows you to build the most appropriate grid system for a given geometry/problem. Arbitrary Interface BC includes the following sections: •

Arbitrary Interface BC-Applications



Arbitrary Interface BC-Features



Arbitrary Interface BC-Theory



Arbitrary Interface BC-Limitations



Arbitrary Interface BC-Implementation



Arbitrary Interface BC-Frequently Asked Questions

Applications Arbitrary Interface BC Applications Introduction Arbitrary Interface BC applications include: •

Arbitrary Interface BC-Applications-Hybrid Grid Systems



Arbitrary Interface BC-Applications-Component Libraries



Arbitrary Interface BC-Applications-Parametric Part Studies



Arbitrary Interface BC-Applications-Sliding Grids

Arbitrary Interface BC Applications-Hybrid Grid Systems Besides using arbitrary interfaces for homogeneous grid systems (e.g., hexahedral / hexahedral), you can also use arbitrary interfaces to mix and match any type of grid system combination (hexahedral / tetrahedral / prism / polyhedral / etc.) Arbitrary interfaces are required any time a cell face does not exactly match to another cell face. This can happen in several situations. For example, you could create a hexahedral domain and have a tetrahedral domain that interfaces with a totally arbitrary interface set (as shown on the left). You can also have the situation where the hexahedral domain and tetrahedral domain share a common boundary face. In this case the hexahedral side will be constructed of quad faces and the tetrahedral side will use the same quad faces but each will be split into two triangles so that two tetrahedrals can be generated. This in effect is a two-to-one cell match (one hexahedral cell matching to two tetrahedral cells) and also requires that an arbitrary interface be used. An example of the second situation is shown below.

109

CFD-ACE_V2008.2_User_Manual

Example of a Hex-Tet Grid System

Example of a Hex-Hex and Hex-Prism Grid System

See Also Arbitrary Interface BC-Applications-Component Libraries Arbitrary Interface BC-Applications-Parametric Part Studies Arbitrary Interface BC-Applications-Sliding Grids

Arbitrary Interface BC Applications-Component Libraries Arbitrary interfaces enable you to grid components separately with minimal concern over how the components will be joined. This helps you to build component libraries (i.e., component.GGD files in CFD-GEOM terms). You can then copy all of the necessary components into a single CFDGEOM model. Once you have positioned the parts at the correct locations, you can save the DTF file, setup the arbitrary interface pairs in CFD-ACE+, and run the simulation.

110

Arbitrary Interface Boundary Conditions

Example of the Use of Component Libraries

See Also Arbitrary Interface BC-Applications-Hybrid Grid Systems Arbitrary Interface BC-Applications-Parametric Part Studies Arbitrary Interface BC-Applications-Sliding Grids

Arbitrary Interface BC Applications-Parametric Part Studies Because you can grid components separately, it is easy to perform parametric geometry studies. You can easily change the position of a component or even its shape. There is no need to re-grid the entire system. All that is required is the modification of the component’s grid shape or position.

Example of a Parametric Part Study

See Also Arbitrary Interface BC-Applications-Hybrid Grid Systems Arbitrary Interface BC-Applications-Component Libraries Arbitrary Interface BC-Applications-Sliding Grids

111

CFD-ACE_V2008.2_User_Manual

Arbitrary Interface BC Applications-Sliding Grids Because point-to-point matching is not required with arbitrary interfaces, it makes sliding grid simulations possible. A sliding grid case will often translate or rotate a whole grid block with or without deformation. The sliding grid will communicate with a stationary grid through an arbitrary interface set.

Example of Sliding Grids

Sliding grid simulations are discussed in the Grid Deformation Module. See Also Arbitrary Interface BC-Applications-Hybrid Grid Systems Arbitrary Interface BC-Applications-Component Libraries Arbitrary Interface BC-Applications-Parametric Part Studies

Arbitrary Interface BC Features The two most useful features of arbitrary interfaces are the fact that you no longer have to build point-to-point matching grid systems and the ability for arbitrary interfaces to perform automatic face projection.

No Need for Point-To-Point Matching When you pick two groups of boundaries as an arbitrary interface set, the CFD-ACE-Solver will compute the intersections of every face on each boundary group. The intersection will then be an interface through which flow/heat/etc. will be allowed to communicate. The faces which do not intersect will revert back to the residual boundary condition of the patch.

Automatic Face Projection The intersecting faces of an arbitrary interface pair will be projected to ensure that they lie on a common surface. This means that the two grid blocks do not have to touch. The second boundary group picked will be projected to the first boundary group. Care should be taken to make the gap small because only the last cell is stretched. Therefore, it is recommended that the gap spacing be on the order of 10% of the last cell’s length. Currently the projected grid is not written back to the DTF file so you will see the original un-projected grid when post-processing the solution.

112

Arbitrary Interface Boundary Conditions

Automatic Face Projection Example

Other Features •

VOF simulations can be run with arbitrary interfaces (V2007). It is best if the free surface does not cross the arbitrary interface, but if it does, the code with drop to the SLIC method for those cells adjacent to the arbitrary interface boundaries.



Cases involving arbitrary interfaces can now be run in parallel. The dtf_decompose utility will ensure that each arbitrary pair is used in a single parallel zone.

Arbitrary Interface BC Theory The arbitrary interface capability is possible because the CFD-ACE-Solver is a polyhedral cell solver. This means that the solver can handle n-sided cells. When you create an arbitrary interface set you are telling the solver which boundaries should be subdivided to create a lowest common denominator set of cell faces. Let’s look at the simple example of one tetrahedral (4 sided) cell arbitrary interfacing to four hexahedral (6 sided) cells.

113

CFD-ACE_V2008.2_User_Manual

Arbitrary Interface Process

All of the cells that are involved in the arbitrary interface process are transformed into polyhedral cells. In the above example each of the original hexahedral cells are no longer six sided hexes, but rather seven sided polyhedra (each of the interfacing faces have been split into two faces). The single tetrahedral cell has been converted to a polyhedra as well and now has seven sides (the interfacing face of the cell has been split into four faces). The process of subdivision of the cell faces allows for an exact match of the total face areas and is therefore a strictly conservative scheme. In addition to the cell subdivision, one of the face sets is always projected to the other to account for any gaps between the two grid systems. Solver information (flow/heat/etc.) is allowed to communicate only through the newly created common cell faces. All other cell faces revert to the underlying or residual boundary condition that was specified for that boundary face. The use of arbitrary interfaces automatically converts structured grids to unstructured ones.

Arbitrary Interface BC Limitations There are a few limitations in the current implementation of arbitrary interfaces.

Not Supported for 2D Grid Systems Arbitrary Interfaces are only supported for 3D grid systems. 2D grid systems must have point-topoint matching interfaces. One way to work around this limitation is to extrude or revolve your 2D grid system to make it one to five cells thick (and therefore 3D). You can then use arbitrary interfaces.

Multiple Structured Directions An unstructured arbitrary interface set cannot be matched up to a structured set that has multiple directions. The structured set has to be entirely in the i, j, or k direction.

Not Supported For Various Modules Arbitrary Interfaces are not yet supported for the following modules/options:

114



Stress Module (not supported in stress solved volume conditions)



Electroplating Module



Thin-Wall Feature - you cannot have an arbitrary interface at a thin-wall boundary condition



Degenerate Grids - the procedure is to convert the sim to all polyzones with either the dtf_make_sim_poly utility or dtf_make_sim_poly ( ) API in the DTFOL_ ACE+ library

Arbitrary Interface Boundary Conditions



Cyclic Boundary Conditions - if a cyclic boundary condition touches an arbitrary interface, results may be incorrect.

Conjugate Interfaces The use of an arbitrary interface at a conjugate interface (any solid-fluid, solid-solid) may lead to inaccurate results

Monte-Carlo Radiation You may use arbitrary interfaces in Monte-Carlo radiation simulations if the arbitrary interface set does not produce any residual boundary condition faces. (i.e., the arbitrary interface groups should represent the same surface with no parts left over).

Avoid T-Junctions There have been some problems encountered when two or more arbitrary interface sets have been used in a T-Junction. A T-Junction is an area where two or more arbitrary interface sets come together. Because the arbitrary interface groups are always projected, we have found some problems at T-Junctions because some of the cell nodes could be trying to project in two directions.

Arbitrary Interface T-junction Example

Implementation Arbitrary Interface BC Implementation Introduction The Implementation section describes how to set up a model for simulation using the CFD-ACE+ Arbitrary Interface Boundary Condition feature. It contains the following sections: •

Grid Generation - Describes the types of grids that are allowed and general gridding guidelines



Model Setup and Solution - Describes the Arbitrary Interface related inputs to the CFD-ACE-Solver



Post Processing - Provides tips on what to look for in the solution output

115

CFD-ACE_V2008.2_User_Manual

Grid Generation Arbitrary Interface BC Implementation-Grid Generation Introduction The arbitrary interface boundary condition feature can be applied only to 3D geometric systems. All 3D grid cell types are supported (hexahedral, tetrahedral, prism, and polyhedral). One way to work around the 3D limitation is to extrude or revolve your 2D grid system to make it one to five cells thick (and therefore 3D). This section includes: •

Grid Resolution at Arbitrary Interface



Automatic Arbitrary Interface Sets



Grid Systems for Parametric Studies

Arbitrary Interface BC Implementation-Grid Generation-Grid Resolution at Arbitrary Interface While building grid systems for arbitrary interface cases, ensure that there is similar grid resolution on both sides of the arbitrary interface. You do not want a face with 100 cells interfacing with one large cell. It would be best if the cell volumes were the same although a 2:1 match is acceptable. Anything greater than a 10:1 match of cell face areas or volumes will probably degrade the solution accuracy.

Arbitrary Interface Grid Resolution

Arbitrary Interface BC Implementation-Grid Generation-Automatic Arbitrary Interface Sets CFD-GEOM automatically sets up the arbitrary interface sets for hybrid grid systems if the following two conditions are true: •

There is a single structured grid face interfacing to a single unstructured grid face.



The trimming loop used for the unstructured grid face is constructed from the same entities (lines, curves, or edges) that are used in the construction of the structured grid face.

CFD-GEOM has the ability to use pyramid cells to connect hexahedral grid systems to tetrahedral grid systems. The quadrilateral cell face of the hexahedral cell system forms the base of a five sided pyramid cell. The four triangular sides of the pyramid cell are used as boundaries for the tetrahedral grid system. If this feature is used then the interface between the hexahedral and tetrahedral grid system is a true interface and the arbitrary interface feature is not needed.

116

Arbitrary Interface Boundary Conditions

Arbitrary Interface BC Implementation-Grid Generation-Grid Systems for Parametric Studies To facilitate parametric studies, it is often desirable to leave a small gap between the two domains that will be communicating through an arbitrary interface. This is because CFD-GEOM performs point filtering that could cause the two domains to share a geometric point. Once this happens, if you try to translate one of the domains, it will deform the second because they are topologically connected.

Model Setup and Solution Arbitrary Interface BC Implementation-Model Setup and Solution-Introduction CFD-ACE+ provides the inputs required for the arbitrary interface boundary condition. Model setup and solution requires data for the following panels:



Arbitrary Interface Groups



Arbitrary Interface Sets

If CFD-GEOM could not automatically setup the arbitrary interface pair (see Automatic Arbitrary Interface Sets), then you will have to set it up in CFD-ACE+. All of the arbitrary interface setting operations can be accessed under the Boundary Conditions [BC] page of the Control Panel. To activate the boundary conditions: 1.

Import a DTF file.

2.

Click the [BC] tab. Change the boundary condition setting mode to Arbitrary Interface. The Arbitrary Interface column in the BC explorer will have a highlight marker to let you know that you are in arbitrary interface grouping mode.

Arbitrary Interface BC Implementation-Model Setup and Solution-Arbitrary Interface Groups Create Arbitrary Interface groups by selecting one or more boundary condition patches from either the viewer window or the BC explorer and pressing the Group button. An arbitrary interface group name will be given to the selected boundary patches. At least two groups are required to create an arbitrary interface set. Each group contains all of the boundary condition patches that will be used as a single side of an arbitrary interface set.

117

CFD-ACE_V2008.2_User_Manual

Arbitrary Interface Groups

Arbitrary Interface BC Implementation-Model Setup and Solution-Arbitrary Interface Sets Once you have two arbitrary interface groups defined, you can create an arbitrary interface set. This is done by picking any boundary condition patch from the first desired group (all patches in that group will be highlighted) and then picking any boundary condition patch from a second group. After the two groups have been selected, press the Set button to create an arbitrary interface set. The boundary condition patches will always be projected to the first group that was selected. The group names change to show the direction of projection. For example, if you pick group A2 first, and then pick group A5 and create an arbitrary interface set, the group names will change as follows: •

Group A5 now becomes A5->A2 (indicating that this boundary condition patch is part of group A5 and group A5 will be projected to group A2)



Group A2 now becomes A2 Flow Tab and check the Fan Model option.

2.

Go to the Fan tab shown in Figure 1.

139

CFD-ACE_V2008.2_User_Manual

Figure 1. Fan Model Tab

3.

Select Add to add a Fan, as shown in Figure 2.

Figure 2. Adding a Fan to the model

Fan Model Implementation-Model Solution and Setup-Fan Model Input Parameters There are several inputs required for the Fan Model. These are each described below. Fan Blade Model Location

This parameter refers to the center of the fan, and requires three inputs corresponding to the X, Y, and Z coordinates of the center point of the fan. (2D-axisymmetric fans will require two inputs for X and Y coordinates. The Y coordinate should always be zero for a 2D-axisymmetric problem.) Normal Vector

This refers to the unit vector direction of the axis of rotation (normal vector of the fan plane). This input determines the axis and direction of rotation of the fan. For example, a direction of (1, 0, 0) indicates that the fan rotation axis points in the positive X direction. The tip-velocity of the blades . is calculated consistent with the right-hand rule, for example as

140

Fan Model

Fan Specification

This refers to the type of model. There are two models available, the Blade model and the Fan Curve model. Radius

This parameter refers to the outer radius of the fan. Speed

This refers to the rotational speed of the fan in revolutions per minute (rpm). This input is only required when running the Blade model. Hub Radius

Hub radius is the radius of the hub. This input is required to determine the effective radial length of the blade which will be the difference between the hub radius and the outer radius. Thickness

This input refers to the parameter and refers to the lateral (orthogonal) width of the blade. The fan-blades are considered to be massless, and therefore without any real thickness, but the parameter called Thickness actually refers to the orthogonal blade-width W, and is essential to correctly calculating the inertial source term to be added to the momentum conservation equations. The thickness will be divided evenly on both sides of the center point specified earlier. Blade-Angle

This refers to the angle q that the blade-normal makes with the fan’s axis of rotation, counted counterclockwise from the axis. Blade angle q=0 implies that the blade is perpendicular to the axis, q=90 implies that it is parallel to the axis. This input is only required when running the Blade Model. Fan-Factor

The fan-factor is a correction factor for the Fan Model. A fan-factor of 1.0 will apply no corrections. This input is given to allow the user to tune the Fan Model to reproduce experimentally observed results. This input is only required when running the Blade model. Swirl

Select this option if swirl needs to be solved. When solving for swirl, an additional input is required, the torque on the fan.. Fan Curve Model Location

This parameter refers to the center of the fan, and requires three inputs corresponding to the X, Y, and Z coordinates of the center point of the fan. (2D-axisymmetric fans will require two inputs for X and Y coordinates. The Y coordinate should always be zero for a 2D-axisymmetric problem.) Normal Vector

This refers to the unit vector direction of the axis of rotation (normal vector of the fan plane). This input determines the axis and direction of rotation of the fan. For example, a direction of (1, 0, 0) indicates that the fan rotation axis points in the positive X direction. The tip-velocity of the blades . is calculated consistent with the right-hand rule, for example as Radius

This parameter refers to the outer radius of the fan. Hub Radius

141

CFD-ACE_V2008.2_User_Manual

Hub radius is the radius of the hub. This input is required to determine the effective radial length of the blade which will be the difference between the hub radius and the outer radius. Curve Input

When using the Fan Curve, there are two methods for specifying a curve; (1) via input file or (2) specifying a profile in CFD-ACE-GUI. Pressure Head vs. Flow Rate data are required. When solving for Swirl, the torque generated by the fan must also be provided. The file format for the fan curve input file is: First Line = # of Points Second through n number of lines = FlowRate PressureHead Torque Note that the third column (Torque) only needs to be provided when the swirl option is activated. An example file would be: 3 10 10 10 20 20 20 30 30 30

Fan Model Implementation-Post Processing No special post-processing needs to be applied while viewing results of the fan model. Viewing vector plots and velocity profiles should reveal the effect (and therefore existence) of the fan.

Fan Model References Modeling fan induced flow distortion in a push-type telecom shelf, 2004 Inter Society Conference on Thermal Phenomena.

142

Momentum Resistance or Source Momentum Resistance Introduction Momentum Resistance is used to model the effects of physical obstructions within the calculation domain that have dimensions smaller than the grid resolution. Examples of such elements that can be simulated with momentum resistances are porous media, tube banks, perforated plates, and screens. Discussion of the Momentum Resistance feature consists of: •

Momentum Resistance-Introduction



Momentum Resistance-Features



Momentum Resistance-Theory



Momentum Resistance-Limitations



Momentum Resistance-Implementation

Momentum Resistance Features With the Momentum Resistance model, you can specify flow resistances that are either linearly or quadratically proportional to the fluid velocity. These sources can be specified over grid volumes (Volume Condition based) or specified to act over user-defined volumes (geometrically based). Geometrically based resistances allow different resistance coefficients in different directions and thus model anisotropic effects. The model can be applied to both two and three-dimensional geometries.

Momentum Resistance Theory Momentum resistances are applied in user-specified regions of the flow domain and are characterized by relating the pressure gradient with velocity through the following formulation: (7-1)

where [Kl] amd [Kq] are the coefficient matrices for the linear and quadratic terms. β is the porosity factor equal to the free volume divided by the total volume. For geometrically based resistances, the region in which the above equation is applied can be specified by a bounding volume, as shown below.

143

CFD-ACE_V2008.2_User_Manual

Bounding Volumes Example

In the figure above,

denotes the primary direction of the bounding volume, while

and

are the two directions which are on the plane normal to and are also normal to each other. To allow for some degree of anisotropy, the two coefficient matrices are constructed as follows:

(7-2)

(7-3)

144

Momentum Resistance or Source

In many cases these K terms must be empirically determined. Some guidance may be available from handbooks for certain types of resistive devices. Note that in most cases an isotropic treatment in which the three coefficients are equal will be adequate. One instance in which an anisotropic resistance would be appropriate would be flow across a tube bundle in a shell and tube heat exchanger. Flow parallel to the tube axes would be subject to one resistance while flow normal to the tubes would be subject to a second resistance.

Momentum Resistance Limitations Neither the velocity nor the volume are scaled. The primary impact of this practice is that the residence time of the fluid within the volume over which the resistance acts will be underpredicted. If it is important that the residence time be predicted properly you can use the Porous Media feature which does scale the volume. (see Porous Media). The volume condition based momentum resistance supports isotropic resistances only. The geometrically based momentum resistance is applied to all cells whose center lies within the specified volume. If the grid has not been constructed so that grid lines conform exactly to the boundary of the specified volume the volume over which the resistance acts can change when the grid is changed. When the polyhedral bounding volume option is used the bounding polygon must be convex.

Momentum Resistance-Implementation Momentum Resistance Implementation Introduction The Implementation section describes how to setup a model for simulation using the CFD-ACE+ Momentum Resistance feature. The Momentum Resistance Implementation section includes: •

Grid Generation - Describes the types of grids that are allowed and general gridding guidelines



Model Setup and Solution - Describes the Momentum Resistance related inputs to the CFD-ACE-Solver



Post Processing -Provides tips on what to look for in the solution output

Momentum Resistance Implementation-Grid Generation The Momentum Resistance feature can be applied to any geometric system (3D, 2D planar, or 2D axisymmetric). All grid cell types are supported (quad, tri, hex, tet, prism, poly).

Momentum Resistance-Implementation-Model Setup and Solution Momentum Resistance Implementation-Model Setup and Solution Introduction CFD-ACE+ provides the inputs required for the Momentum Resistance feature. Model setup and solution for the Volume Condition based model requires data input for the following Control Panel tab: • Volume Conditions (VC)

Model setup and solution for the geometrically based model requires data input for the following Control Panel tabs: • Model Options (MO) • Momentum Resistance (MR)

145

CFD-ACE_V2008.2_User_Manual

Momentum Resistance Implementation-Post Processing The most significant aspect of the results for a model with momentum resistances or sources will be in pressure drop and velocity profiles. These aspects should be considered when postprocessing results. Velocities will not be affected.

146

Porous Media Porous Media Introduction The Porous Media feature enables you to model fluid flow in a volume representing a material consisting of a rigid solid matrix with interconnected void. The interconnectedness of the void (the pores) allows the flow of one or more fluids through the material. In the simplest situation (singlephase flow) the void is saturated by a single fluid. In two-phase flow, a liquid and a gas can share the void space. In most porous media, the distribution of pores with respect to shape and size is irregular. On the pore scale (the microscopic scale) the flow quantities (velocity, pressure, etc.) will clearly be irregular. But for most applications, the quantities of interest are space-averaged (macroscopic) in nature (measured over areas that cross many pores). Experiments have shown that such macroscopic quantities change in a regular manner with respect to space and time and are therefore amenable to numerical modeling. Flow through porous media plays an increasingly important role in a multitude of engineering applications and the porous media model in CFD-ACE+ can be applied to many such problems. Some typical example applications where you can apply the porous media model include: •

Filtration products (using media, membrane and high efficiency barriers)



Packed beds, Fluidized beds



Micro-perforated plates for sound absorption



Diffusion based processes in bio-physics and bio-medical applications (eg., drug delivery)

Modeling Porous Media using CFD-ACE+ is described in the following sections: •

Assumptions



Features



Theory



Limitations



Implementation



References



Definitions

Porous Media Features The porous media model in CFD-ACE+ takes into account a wide range of physics related to porous media and can therefore be used in calculations with several CFD-ACE+ modules. In addition to the obvious effect of porous media on the flow equations, you can use porous media to model surface reactions inside a porous bed. You can also use electrochemical reactions inside a porous media. These two features are often used to solve for reactions inside catalytic combustors and electrochemical reactions inside fuel-cell devices.

147

CFD-ACE_V2008.2_User_Manual

Theory Porous Media Theory-Introduction Transport through porous media is governed by the conservation equations of mass, momentum, energy and species. The pore dimensions may often be in the sub-micron range, and their overall effect is represented through volume-averaged quantities. The volume averaged conservation equations for mass and momentum are as follows (Wang and Cheng, 1997; Wang et. al., 1999).

The following sections describe the conservation equations and their treatment in the Porous Media model: •

Mass Conservation



Momentum Conservation



Energy Conservation



Species Conservation

Mass Conservation Mass conservation is given by the equation:

(8-1)

Momentum Conservation The conservation equation for momentum within the porous regions may be written as:

(8-2)

where ρ is the fluid density, p is the pressure, μ is the viscosity of the fluid, CF is a quadratic drag factor, τ is the shear stress tensor, B is the body force vector, and U is the fluid velocity. ε is the porosity of the medium, and represents the volume occupied by the pores to the total volume of the porous solid, while the permeability κ is a quantity representing the surface area to volume ratio of the porous matrix. The last two terms in the equation represent an additional drag force imposed by the pore walls on the fluid within the pores, and usually results in a significant and , and the standard pressure drop across the porous solid. In a purely fluid region, Navier-Stokes equation is recovered. In terms of boundary conditions, no special treatment to the momentum and pressure correction equations is required at fluid-porous solid interfaces.

Energy Conservation The conservation equation for energy within the porous regions may be written as:

148

Porous Media

(8-3)

where h is the total enthalpy of the fluid. The heat flux, q, is comprised of contributions due to thermal conduction, thermal radiation and species diffusion, and is written as: (8-4)

where Ng is the total number of gas phase species in the system, hi are their enthalpies, and Ji are their diffusion fluxes. T is the bulk temperature and qR is the radiative heat flux. The thermal conductivity, λ, of the porous medium is an effective thermal conductivity of the pores and solid regions in combination and may be written as (Gurau et al., 1998): (8-5)

where λS and λF are the thermal conductivities of the solid (matrix) and fluid regions (pores), respectively.

Species Conservation Porous Media Theory-Species Conservation Introduction The mass conservation equations for the individual gas phase species (i.e., for i = 1,…,Ng) may be written as:

(8-6)

where Yi are the mass-fractions of the i-th species, and are the production rates of the i-th species in the gas phase. When heterogeneous surface reactions are treated within the porous solid, this production rate term will be modified so that species are produced in a volumetric sense, but the basic physics governing their production is interfacial (interface between fluid and solid parts within the porous regions) surface phenomenon. This is discussed in further detail in the next section. The species diffusion flux may be written as (Bird et al., 1960):

149

CFD-ACE_V2008.2_User_Manual

(8-7)

where M is the mixture molecular weight. The first term represents Fickian diffusion due to concentration gradients, and the second term represents Soret (or thermo) diffusion. The last four terms are correction terms necessary to satisfy the Stefan-Maxwell equations for multicomponent species systems. In this case, Di,eff and DTi,eff are the effective mass diffusion and Soret diffusion coefficients of species i within the porous medium, respectively, and depend on the porosity of the medium. Gurau (1998) has provided the following expression for the effective diffusion coefficient through porous media:

(8-8)

which is identified by the original source as the Daggan model. An alternate correction is the Bruggeman type: (8-9)

where τ is the tortuosity of the porous media. Tortuosity is the degree of interconnection resulting in paths through the solid which are some percentage longer than a direct path. The recommended value (based on measurements)for tortuosity is 1.5. See Also Heterogeneous Reactions In Porous Media Electrochemical Reactions Heterogeneous Reactions The cell sizes used in performing CFD analysis are typically much larger than the characteristic pore dimensions in a porous media. This makes it impossible to grid individual surfaces adjoining the pores. Therefore, modeling the heterogeneous chemical reactions occurring within catalystlined pores requires a volume-averaged implementation of the net effect of heterogeneous reactions occurring on the catalyst surfaces. Surface reaction within porous media is treated by performing a reaction-diffusion balance at the surfaces of the catalysts. The balance equation is given by: (8-10)

is the production-destruction rate per unit area of the i-th specie due to chemical where reactions. In discrete form, this equation may be re-written as:

150

Porous Media

(8-11)

where YP,i denotes the species mass-fraction in the pore fluid, while Yi denotes the mass-fraction at the pore-fluid/catalyst interface. The diffusion length scale is denoted by δ. When considering surface reactions on a well-defined flat substrate, such as in chemical vapor deposition applications, this length scale is extracted from the computational grid. For the case of porous media, this length scale cannot be obtained from the grid since the region under consideration is already much smaller than the size of a typical control volume. This length scale can be computed using various correlations available in the literature. The simplest approach is to assume that this length scale is equal to the volume to surface ratio of the porous media in question. The volumetric production/destruction rate, (in kmol.m-3.s-1) of a specie, i, due to heterogeneous surface reaction, can be obtained from the surface flux in equation: (8-12)

where [A/V]eff is the effective surface to volume ratio of the catalyst.

151

CFD-ACE_V2008.2_User_Manual

Schematic of a Catalytic Converter: (a) Side view illustrates porous solid matrix, (b) cross-sectional view across A-B, and (c) magnified view of the porous medium showing details of catalyst clusters embedded in the solid support matrix. The diffusion length scale, d, and the surface normal, n, are also shown.

Electrochemical Reactions In the case of electrochemical reactions, the volumetric production rate of a given species is expressed by the ratio of the transfer current,

, and the Faraday constant, F: (8-13)

where

and

are the stoichiometric coefficients of the products and reactants, respectively.

The transfer current, , is obtained from the Butler-Volmer condition, and may be written in its most general form as: (8-14)

152

Porous Media

where is the reference current at a known open circuit voltage. and are kinetic constants determined from experimental generated Tafel plots. [Λ] represents the near-wall molar are the concentration of the reacting species, N is the total number of reacting species, and concentration exponents. Substitution of equation 8-13 and 8-14 into 8-12 yields a set of nonlinear equations for the mass-fractions at the pore-catalyst interface. This equation set is solved numerically to obtain Yi for all species. Once this is known the species sources in each cell can be computed. The electrode overpotential, η, is the potential difference between the solid (ΦS) and pore (or fluid) phase (ΦF) of the electrode, and may be explained as follows.

Schematic of Electrochemical Reactions and the Transfer of Current Within a Porous Catalyst Containing Electrode

The continuity of current in a conducting material leads to: (8-15)

When the material is a porous electrode, the current may be split into two parts: one flowing through the pores and the other flowing through the solid parts of the porous matrix. If these components are denoted by

and

, respectively, the equation 8-15 can be rewritten as: (8-16)

During electrochemical reactions within a porous solid, electrons are either transferred (expressed by the transfer current) from the pores to the solid matrix or vice versa. This results in a source in one of the phases and a sink in the other phase. Thus, equation 8-16 may be written as: (8-17)

where the transfer current, yields:

, has units of A/m3. Application of Ohm’s law to equation 8-17,

153

CFD-ACE_V2008.2_User_Manual

(8-18)

where and are the electric potentials of the fluid (or pore) and solid phases, respectively. Equation 8-18 is solved in a strongly coupled implicit solver. Such a formulation is more advanced than ones used in previous research where the solid parts of the electrodes are assumed as perfect electrical conductors. The above formulation clearly establishes the strong coupling between fluid flow, species transport and the electric field in both the pore and solid phase, and the numerical solution of this problem is quite challenging.

Limitations •

The porous media must be applied on a volume condition region (it cannot be defined geometrically).



Porous media material parameters are considered to be isotropic.



Effect of surface tension on transport is neglected. (The effect of surface tension transport can be studied using microscopic simulations with the volume-of-fluid (VOF) model of CFD-ACE+.)



Porous media is not supported with turbulence.



Porous media does not work with the Plasma module.

Implementation Implementation Introduction The Implementation section describes how to setup a model for simulation using the CFD-ACE+ Porous Media feature. The Porous Media Implementation section includes: •

Grid Generation - Describes the types of grids that are allowed and general gridding guidelines



Model Setup and Solution - Describes the Porous Media related inputs to the CFDACE-Solver



Post Processing - Provides tips on what to look for in the solution output

Grid Generation The Porous Media feature can be applied to any geometric system (3D, 2D planar, or 2D axisymmetric). All grid cell types are supported (quad, tri, hex, tet, prism, poly). Because the porous media is defined on volume condition regions, it is important that this is considered during the grid generation phase so that the appropriate volume condition regions can be meshed to physically match the region of the porous media.

Model Setup and Solution Model Setup and Solution Introduction CFD-ACE+ provides the inputs required for the Porous Media feature. Model setup and solution requires data for the following panels:

154



Add Porous Media Region



Flow Module Settings

Porous Media



Heat Transfer Module Settings



Chemistry Module Settings



Electric Module Settings

Add Porous Media Region You can add a porous media region by activating the porous media feature on any fluid volume condition. This can be done by changing the volume condition setting mode to Porous Media and then selecting one or more fluid volume conditions from either the viewer window or the VC Explorer list. Once this is done, you must activate the Porous Media checkbox.

Porous Media Specification

Flow Module Settings The Flow Module requires knowledge of the porosity and permeability of the porous media region. These specifications can be made under the Flow tab when the volume condition setting mode is Porous Media. Porous media inputs can be specified for either an isotropic or anisotropic resistance. The settings for an isotropic resistance are shown.

155

CFD-ACE_V2008.2_User_Manual

Flow Settings for Isotropic Resistance

You may select either a Linear Resistance model or Quadratic Resistance model for an isotropic resistance. In both cases you must specify the porosity (the fraction of total volume of the region that is occupied by void space), and permeability. Porosity and permeability are the terms e and k as shown in equation 8-1 and equation 8-2. Note that porosity also affects the heat transfer and species equations as well. If the quadratic resistance model was chosen then a drag factor can be input as well. This is the term CF as shown in equation 8-2. The porous media inputs for an anisotropic resistance are shown in figure 8-5. This option allows the user to specify a normal direction, a tangential direction (in 3D), linear and quadratic resistance coefficients in the normal and tangential directions, and the porosity. The linear resistance coefficients correspond to the inverse of the permeability for the normal and tangential direction, and the quadratic resistance coefficients are the drag factors for the normal and tangential directions.

156

Porous Media

157

CFD-ACE_V2008.2_User_Manual

Flow Settings for Anisotropic Resistance

Heat Transfer Module Settings The Heat Transfer Module requires knowledge of the porosity (as given under the Flow settings, solid conductivity, and for transient cases solid specific heat and density.

Heat Transfer Settings for Porous Media Region

These quantities are for the solid material in the porous region and are used with the fluid properties and in the porous region to calculate effective properties. Chemistry Module Settings The Chemistry Module requires knowledge of the porosity (as given under the Flow settings), surface reaction mechanism to be applied (if any), surface to volume ratio, and diffusivity model.

158

Porous Media

Chemistry Settings for Porous Media Region

You must specify whether the surface reaction is of neutral chemistry or electrochemistry. If you set the surface reaction to None, then no surface reaction will be applied in the porous media. The surface to volume ratio determines the effective surface area for which the surface chemistry sources will be calculated. This is the [A/V]eff term used in equation 8-12. The Daggan model makes diffusivity close to zero if the porosity is less than 0.33. If porosity < 0.33 and diffusion is important use the Bruggeman model. The recommended value (based on measurements)for tortuosity is 1.5. Electric Module Settings The Electric Module requires knowledge of the porosity (as given under the Flow settings), and solid electrical conductivity.

159

CFD-ACE_V2008.2_User_Manual

Electric Settings for Porous Media Region

These quantities are for the solid material in the porous region. Sigma (solid) is the term σs as used in equation 8-18.

Post Processing CFD-VIEW can post-process the results of porous media calculations. All variables that are the results of various module’s output will be shown as normal. You will want to check pressure drops and heat transfer through the porous media. If surface chemistry is included in the porous media then you should also see species sources/sinks as a result of that reaction. If electro-chemistry is included in the porous media then you will get new variables written to the DTF file for post processing in CFD-VIEW, namely: •

epot_S - electric potential in the solids of a porous media



overP - electric overpotential at the solid/fluid interfaces of a porous media



Jsolid_x - electric current in the x-direction for the solids in a porous media.



Jsolid_y - electric current in the y-direction for the solids in a porous media.



Jsolid_z - electric current in the z-direction for the solids in a porous media.

Because all of the above only apply in a porous media, the results that you see in CFD-VIEW will only be useful in the porous media regions. Results shown for these variables in non porous media regions will usually be zero.

References Bird, R.B., Stewart, W. and Lightfoot, E.N.; Transport Phenomena. Wiley, New York; 1960. Gurau, V., Liu, H. and Kakac, S.; “Two-Dimensional Model for Proton Exchange Membrane Fuel Cells.” AiChE Journal; Vol. 44, No. 11, pp. 2410-2422, 1998. Wang, C.Y., Cheng, P.; “Multiphase Flow and Heat Transfer in Porous Media Advances in Heat Transfer." Vol. 30, pp. 93-196, 1997. Wang, C.Y., Gu, W.B., and Liaw, B.Y.; “Micro-Macroscopic Coupled Modeling of Batteries and Fuel Cells Part 1. Model Development.” Journal of The Electrochemical Society, in press, 1999.

160

Rotating Systems Rotating Systems Introduction The conservation equations for mass, momentum, and heat presented in the module chapters are for the stationary frames of reference. In many applications, such as turbo-machinery problems or flows around propellers, fans, etc., it is more convenient to deal with a rotating system. One advantage of doing so is that a very complex transient problem may be reduced to a simpler steady-state problem.

Multiple Reference Frames The Multiple Reference Frame (MRF) feature allows the analysis of situations involving domains that are rotating relative to one another. This feature focuses on the investigation of rotor/stator interaction for rotating machinery. It uses a steady-state approximation in which individual cell zones move at different rotational speeds. This approach is appropriate when the flow at the boundary between these zones is nearly uniform. The Multiple Reference Frame feature is similar to the Mixing Plane feature. The difference is that MRF uses a continuous flow boundary condition at the boundary between rotor/stator zones whereas the Mixing Plane feature introduces circumferential averaging of flow properties at the boundary. Rotating Systems includes the following sections: •

Rotating Systems-Features



Rotating Systems-Theory



Rotating Systems-Limitations



Rotating Systems-Implementation

Rotating Systems Features The Rotating Systems feature can be applied to 3D and 2D geometries.

Multiple Reference Frame Multiple Reference Frame is used in modeling/analysis of various turbo machinery devices. This feature reduces an inherently transient system to a series of steady state units by separating the entire computational domain into several zones. It reduces modeling/analysis time dramatically. Various uses of multiple reference frame include: •

Modeling flow mixing in tanks driven by impellers



Study of rotor/stator interaction in multiple row turbine/compressor sections

Rotating Systems Theory Conservation equations for a rotating frame of reference will be presented in this section. Assuming that the system rotates at a constant angular speed, and defining ui as the i-th component of the velocity vector relative to the rotating frame, and wi as the i-th component of the frame velocity vector (

), we have for the absolute velocity component, vi: (9-1)

161

CFD-ACE_V2008.2_User_Manual

Since the frame velocity does not contribute to the mass balance, the continuity equation for mass remains unchanged. Regarding the momentum equation, it is well known that observers in two systems of reference will not see the same changes when passing from one system to the other. Under a steadily rotating system, the momentum equation for the i-th component of the relative velocity is: (9-2)

where ε ipj is the alternating tensor. The additional terms are known as the Coriolis force and the centrifugal force, respectively. Under a constantly rotating frame of reference, the transport equation for total enthalpy, H, as presented in the Heat Module, is no longer valid. A new equation has been derived: (9-3)

where the quantity I is defined as: (9-4)

Clearly, the RHS of equation 9-3 is identical to that of the original H-equation, as presented in the Heat Module. Because of this, the quantity, I, is called rothalpy and it measures the total energy content in a rotating frame of reference. In CFD-ACE+, the rothalpy equation is solved if you specify a rotating frame.

Multiple Reference Frames The equations of motion can be solved in both stationary frame and rotating frame. In the stationary frame, the Navier-Stokes equation can be written as follows: (9-5)

This equation can be transformed for a pure rotating frame by using the relation (9-6)

162

Rotating Systems

where a constant rotating velocity is assumed. For multiple reference frames, either the first equation is solved for absolute velocity or the second equation for velocity in the rotating reference frame.

Rotating Systems Limitations Multiple Reference Frame •

The multiple reference frame has been tested for only flow and heat modules



Two non-zero rotating domains should have at least four cells separated the domains

Rotating Systems-Implementation Rotating Systems Implementation Introduction The Implementation section describes how to setup a model for simulation using the CFD-ACE+ Rotating System feature. The Rotating Systems Implementation section includes: •

Grid Generation - Describes the types of grids that are allowed and general gridding guidelines



Model Setup and Solution - Describes the Rotating Systems related inputs to the CFD-ACE-Solver



Post Processing -Provides tips on what to look for in the solution output

Rotating Systems Implementation-Grid Generation The grid generation feature can be applied to 3D or 2D-planar geometry systems. All grid cell types are supported (quad, tri, hex, tet, prism, poly).

Rotating Systems-Implementation-Model Setup and Solution Rotating Systems Implementation-Model Setup and Solution Introduction CFD-ACE+ provides the inputs required for the Rotating Systems feature. Model setup and solution requires data for the following panels: •

Model Options



Boundary Conditions

Rotating Systems Implementation-Model Setup and Solution-Model Options Press the Model Options [MO] button to see the Model Options Panel. Shared

Under the Shared tab, select the Rotation feature. A pull down menu appears. Select a mode: Frame (Global), Multiple Frame (VC Based), or Multiple Frame (Geometry Based). Frame (Global)

Choose the Frame (Global) mode if you want your system to be calculated in a rotating frame of reference. This option results in relative velocity solutions. All velocity simulation data will be presented relative to the rotating body. Therefore if you have rotating blades, the flow field between the blades will appear not to be moving fast, since the fluid will move at approximately the same velocity as the blades. Imaging yourself sitting on the rotating blades - everything happens relative to you.

163

CFD-ACE_V2008.2_User_Manual

To rotate a frame globally:

1. In the first field, enter the x, y, and z coordinates of any point through which the rotation vector of frame passes. 2. Enter values of Wx, Wy, and Wz for the three components of the rotational speed vector for frame. This mode also enables you to specify rotating wall boundary condition types. Multiple Frame (VC Based)

Choose this option if you have more than one rotating frame of reference. The Frame (VC Based) option is used for mixing planes and multiple reference frames (impellers and fans). Multiple Frame (Geometry Based)

The geometry based option is for cases where the rotating domains are not defined as separate volume conditions. With this option, a virtual cylinder is created to define the rotating region. Two levels of cells adjacent to this region are used as the rotating frame boundaries. To rotate a frame: 1.

Select the rotation option located in the VC panel.

2.

Select the volume condition from the VC Explorer

3.

From the VC Setting Mode section of the VC tab, select the Rotation from the menu and select the Rotating Frame option

4.

From the Shared tab of the VC panel, enter the coordinates for the point on axis of rotation and the coordinates for the angular rotation vector for the volume condition (domain).

Rotating Systems Model Setup and Solution-Volume Conditions For multiple rotating frames, the different rotating regions need to be specified. The two different options for specifying the rotating regions are VC Based and Geometry Based. Multiple Fames (VC Based)

For the VC based method, the different rotating frames are specified on the VC tab under VC Setting Mode −−> Rotation.

Rotation VC Setting Mode under the VC tab.

Once the Rotation setting mode is selected, select the VC which should be specified in a rotating frame of reference. For each rotating frame, the coordinates of a point on the axis of rotation and the angular rotation vector in rad/s (angle is positive for counter-clockwise rotation and negative for clockwise rotation) need to specified.

164

Rotating Systems

Axis and rotation vector specification for VC based rotating frames.

Multiple Frames (Geometry Based)

For the Geometry based method, a new MRF tab will appear in the control panel to the left of the BC tab.

165

CFD-ACE_V2008.2_User_Manual

MRF tab for Geometry based rotating frames.

For this option, a virtual cylinder will be created for the region that will be solved in the rotating frame of reference. Two layers of cells around this virtual cylinder will be used as the rotating frame boundaries. On the MRF tab, click the Add button located below the Explorer window to add a new virtual cylinder, as shown in the figure below.

166

Rotating Systems

Add virtual cylinder to define the rotating frame.

Once the new rotating frame has been created, specify the parameters to define the rotating frame region. Again, rotation speed positive for counter-clockwise rotation and negative for clockwise rotation. After the parameters for the rotating frame have been specified, click Apply to see the graphic of the rotating frame (virtual cylinder).

This option should be used when the different rotating frames are not separated by different domains (i.e. volumes).

167

CFD-ACE_V2008.2_User_Manual

Rotating Systems Implementation-Model Setup and Solution-Boundary Conditions Press the Boundary Conditions [BC] button to see the Boundary Condition Panel. See Control Panel-Boundary Conditions for details. Before any boundary values can be assigned, one or more boundary condition entities must be made active by picking valid entities from either the viewer window or the BC Explorer. Although the computations in a rotating frame are performed using the relative velocities, all of the boundary condition values must be specified in the absolute frame of reference. This applies to all boundary condition types but care needs to be taken for all conditions requiring external velocity inputs: Walls, Inlet, and Outlet conditions. For setting up wall boundaries, any wall that is stationary in the absolute frame should be specified as a stationary wall (with zero velocity), and any wall that appears rotating in the absolute frame (for example, blade surfaces) must be specified as a rotating wall. The inputs needed for a rotating wall have been outlined Rotating Walls. The flow solver automatically converts all velocity specifications (inlet/outlets and walls) from the absolute frame to the rotating frame using the frame information provided in the problem type setting. The solver also will convert any other related quantities (enthalpy to rothalpy) as appropriate.

Rotating Systems Implementation-Post Processing If the computation is performed in the rotational frame, the graphical output will show velocities in the relative coordinates.

168

Parallel Processing Parallel Processing Introduction The Parallel Processing feature enables greater computing power through the aggregation of CPUs and memory. The basic concept is simple: if one machine takes T hours, N machines should take T/N hours. Similarly, if one machine requires X MB of RAM, each of the N machines should need only X/N MB of RAM. (Naturally, this is an idealization making these the asymptotic limits.) Since each individual machine has such modest requirements compared to super computers, they cost less. This means calculating simulations with millions of cells to convergence overnight is possible on relatively inexpensive hardware. Parallel Processing includes the following sections: •

Applications



Features



Theory



Limitations



Implementation



Frequently Asked Questions



Examples

Parallel Processing Applications Large problems benefit most from parallel processing. Large can refer to just the number of cells (hundreds of thousands to millions to tens of millions) and/or the computational complexity (detailed finite rate chemical kinetics and LES). Either way, spreading the computational load across multiple processors improves the turn-around time. This also decreases the pre-processor memory requirements thereby making more machines eligible since you are more likely to have many small memory machines than large memory ones. Parallel processing of small problems usually creates too much communication relative to the computational loads. The communication path between processes in a parallel job is also important. A multiple processor machine with shared memory will have the fastest communications. Distributed processors need a fast network (100 Megabit/sec or faster) to achieve practical speedup in turnaround time.

Parallel Processing Features and Limitations Features Many, but not all, of the physical models and code features are supported by the parallel processing in CFD-ACE+. Only the following have been proven to run in parallel: Modules •

Flow Module



Heat Transfer Module



Turbulence Module



Chemistry Module



User Scalar Module



Radiation Module (DOM and Surface to Surface)

169

CFD-ACE_V2008.2_User_Manual





Spray Module



Free Surfaces (VOF)



Cavitation Module



Electric Module



Magnetic Module



Plasma Module (see Limitations below)

Features •

CGS+Pre and AMG solvers



Fan Model Feature



Momentum Resistance Feature



Stationary grids



Steady state & transient flows



FSI (see Limitations below.)



Cyclic Boundaries (see Limitations below)

Limitations The following physical models and code features are not yet supported in parallel processing: •

Two Fluid Module



Kinetic Module



Semi Device Module



Arbitrary Interface Boundary Conditions



Cyclic Boundaries Separated by a Zonal Interface



Thin Wall Boundary Conditions



Total Heat Source (unless the heat source is in one zone)



Fixed Mass Flow Inlet (unless the inlet is in one zone)



Monte Carlo Radiation



Electroplating

The following limitations apply to running a job with parallel processing:

170



A common file system must be used so that each process can read the DTF file. A multiple CPU workstation normally has a common file system for all of the processors. A set of distributed processors such as in a cluster of workstations will require NFS, SMB, or other network file system to fulfill this requirement.



You can change the number of zones you are solving while restarting from a different number of zones, but that can change the convergence of the solution and can cause a blip in the solution. This feature is available only for steady-state runs. In the new version of DTF decompose 3.0, which will be released in version 2004, this limitation will be overcome.



Small cases will process slower than large cases. Small cases are those that are comprised of 1,000-45,000 cells. For example, if you are running a 1,500 cell VOF case on eight machines and your case is eight times slower than serial, it is because of added ghost cells and data transfer overhead. We recommend that cases contain 50,000-100,000 cells to run efficiently in parallel processing.

Parallel Processing



For FSI cases, dtf_decompose will combine the volume conditions solving for stress into one zone and the other volume conditions will be decomposed into n-1 zones.



Plasma Module: •

ICP Plasma: Absorbed Power option is not supported in parallel



CCP Plasma: Ion Momentum option is not supported in parallel

Parallel Processing Theory The CFD-ACE+ code was paralleled using domain decomposition whereby you divide up the data among multiple processors1. To simplify the coding, we chose to equate the number of zones and processes. In other words, each processor would solve for a single zone of the overall mesh. The choice to parallel along zonal boundaries required that multi-zone features be added to the code. Specifically, ghost cells had to be added along the zonal interfaces to provide boundary information representing the neighboring zone. For parallel processing, these ghost cells are filled with data values from cells in the neighboring zones. Processor 1 sends data from its cells along the zonal interface boundary to processor 2 and vice versa. Each processor receives the data and stores it in its own ghost cell locations. This data exchange happens on every iteration and includes only those variables deemed necessary for the simulation, e.g., turbulence quantities are not transferred for laminar calculations. Thus, the numeric solver has all of the information it needs to solve each equation of the simulation. Unfortunately, the scope of the solver has been reduced to the smaller zone. The Conjugate Gradient Solver (CGS) and Algebraic Mult-Grid (AMG) used by CFD-ACE+ are thereby limited to an implicit solution of the zone. In order to maintain implicitness across the entire problem, the CGS, CGS+Preconditioning, and AMG numeric solvers were modified to transfer extra data between neighboring zones on each sweep. Thus, the final accuracy of a parallel run matches that of a serial one.

Parallel Processing Setup Parallel Processing Implementation and Grid Generation CFD-ACE+ provides the inputs required for the Parallel Run. Model setup and solution requires data for the following: •

Execution



User ID



Output

A parallel run in CFD-ACE+ is setup in the normal fashion with just a few caveats. You can execute a parallel run from CFD-ACE+ or you can save the DTF file from CFD-ACE+ and then execute from the command line. To execute a parallel processing run, you must run the cfdaceu_mpi command line utility. Under Unix, this is a python script. If you do not have Python installed, you can use the obsolete cfdaceu_mpi.sh script. Avoid using moving grids and arbitrary interfaces. These are currently not supported by parallel processing. All other geometric features are fully supported.

Parallel Processing Decomposition Options The CFD-ACE+ solver can be run in parallel mode by using domain decomposition, whereby you divide up the data among multiple processors. The number of zones is equated to the number of processes or in other words, each processor would solve for a single zone of the overall mesh.

171

CFD-ACE_V2008.2_User_Manual

The parallel feature of CFD-ACE+ provides several methods and options for decomposition of the domain. In this tip we will talk about these methods and options and their usage. In many cases, the manner of decomposition influences the parallel efficiency and speed-up. For better speedups it is important that the workload is balanced between processors, in other words, all the processors gets nearly equal number of cells. The user has to use his own intuition as to which decomposition would be most appropriate for his/her simulation before attempting to do the domain decomposition. Syntax:

The domain decomposition in CFD-ACE+ is done by executing the dtf_decompose script. When you type dtf_decompose at the command prompt, you can get its full usage. The syntax for the command is: dtf_decompose [-version] [-metis | -cell_groups | -orig_topo | -x | -y | -z | -material | -wavefront] [even] [-combine] [-keepFF] [-file_out outFile.DTF] [-restart] inFile.DTF sim# num_procs Method 1 #

-metis

This is the default method for dtf_decompose. So if the user does not provide any other method, -metis option is used. METIS is multi-level graph partitioning scheme used for partitioning unstructured meshes. It provides high quality partitions with less CPU time. This decomposition method does workload balancing. Depending on the number of partitions, METIS uses two different ways of partitions. -- K-way Partitioning for N > 8 -- Recursive Bisection for N < 8 For more details on these partitioning schemes, the user can refer to the following web site. http://www-users.cs.umn.edu/~karypis/metis/ The syntax is: $ dtf_decompose -metis model.DTF sim# num_procs where, sim# is the simulation number and, num_procs refer to the number of processors, which is equal to number of decomposed zones. For example, $ dtf_decompose -metis test_metis.DTF 1 4 This indicates that simulation # 1 would be decomposed into 4 zones. The decomposed domain is stored in simulation # 2, which is stored in the same DTF file. When you open the file in CFDACE-GUI or CFD-VIEW, it prompts the user select the appropriate simulation number in the DTF file. Method 2 # -cell_groups

This method can be used to decompose the domain along cell groups. So if a simulation has 4 cell groups, it will decompose the simulation into 4 zones. Decomposing by cell groups may be useful for special cases such as materials grouping. Note that since this is done by cell groups, there is no attempt to load balance the zones. Method 3 # -orig_topo

This method allows the user to partition the domains along the original topology as it was created in CFD-GEOM. If the user has taken care of load balancing in GEOM, this method can be used. Note that since the decomposition is done along the original zones, there is no attempt to load balance the zones. Method 4 # -x, -y, -z decomposition

172

Parallel Processing

This method allows the user to decompose the domain along the X, Y or Z-axis. In this case, the decomposition is workload balanced. In other words, the decomposition will be done in such a way that the number of cells for each processor is nearly equal. Method 5 # -material

In this method, the decomposition will take place along the material interfaces. So if your simulation domain contains fluid and solid zones, then this method would allow you to group all the fluid zones into one decomposed zone and all the solid zones into another decomposed zones. Note that since the decomposition is done along the material zones, there is no attempt to load balance the zones. Method 6 # -wavefront

This method is based on the Wavefront Element Reordering scheme, which can be used to improve the efficiency of the global matrix decomposition process performed during an analysis. It minimizes the number of operations needed to decompose the assembled global matrices during an analysis. This method is used rarely. This decomposition method provides workload balancing. There are some other options, which are described below, that can be used with the above methods. Option 1 # -even

This option allows the user to do an even x, y or z decomposition, which means it will be spatially balanced (not workload balanced). In other words, the decomposition will be done in such a way that the number of cells for each processor is nearly equal. Note that this option is only used with x, y or z decomposition. Option 2 # -combined

This option will allow the user to combine the Volume and Boundary Conditions with identical properties to be decomposed into one zone. This option reduces the number of volume and boundary conditions after decomposition and can be used with any method described above. Option 3 # -keepFF

This option allows the user to keep the original Fluid-Fluid interfaces inside of a zone. This becomes useful if the user would like to retain the Fluid-Fluid interface to output Mass Flow Summary or the Heat Flow Summary at the interface. This option can be used with any method described above. Option 4 # -restart

This option can be used with other methods, when the user would like to do a restart from the serial solution. It provides mapping of face data from a simulation to the decomposed simulation, which is needed for restarts.

Parallel Processing Executing a Parallel Run A parallel processing run requires a DTF file, a set of hosts to run on, a file system common to all of the hosts, and the cfd-ace-mpi utility. The syntax is: cfd-ace-mpi -model -num -wd [-local] [-hosts ] [-sim ] [-decomp ] [-nodecomp] [-cleave] [-out ] [job][-T][-solver ] [-mpich|-nativempi] [-array ] [-h|help|-usage] -model

The basename of the DTF file. -num

173

CFD-ACE_V2008.2_User_Manual

The number of processors to use. -wd

The working directory containing the DTF file, etc. -local

Run in the current directory on the local host only. Optional;-wd is not needed if this option is used. -hosts

The name of the hostfile to use. Optional; modelName.hst is the default. -sim

The sim number to be used. Optional; 1 by default. -decomp

Pass to dtf_decompose to specify the partitioning method, e.g., -x partitions along the X axis -y partitions along the Y axis -z partitions along the Z axis -cell_groups partitions along cell groups -orig_topo partitions with the existing topology Partitioning along an axis minimizes the number of neighbor zones which is beneficial with large numbers of processors. Decomposing by cell groups may be useful for special cases such as materials grouping. In rare instances, you may need to run with exactly the zonal topology you created. The user is responsible for load balancing with the cell group and original topology partitioning methods. Optional; a multilevel graph partitioning method is used by default. -nodecomp

Do not decompose the simulation. This assumes that the given simulation is the result of a previous decomposition. Useful for restarting a run. Optional; assumes that the given sim needs to be decomposed. -cleave

Cleave the simulation into temporary DTF files for concurrent file access. This speeds up the problem setup and solution dump phases for large numbers (>12) of processors. The resulting individual solutions are automatically merged back into the original DTF file. Optional; the default is for all processes to access a single DTF file. -out

The file for catching output produced by the utility. Optional; output goes to stdout by default. -job Equivalent to -out modelName.job -mpich|-nativempi

Use MPICH or a native version of MPI for message passing. Optional; the default is to use the native version of MPI if it is available and to fail safely to the MPICH version if it is not. -solver

Use the given solver. Optional; the default is to use $ESI_Home/UTILS_2004/bin/CFD-ACESOLVER

174

Parallel Processing

-array For SGI only, the name of the Array Services array to use for the run. Optional; the default array is used by default. -h|-help|-usage

Prints out the usage syntax. So what does the cfd-ace-mpi utility do? First, it checks that the minimum arguments (what to run, where to run it, and how many processes to run it on) are given. Then it verifies that the hostfile (specified or assumed) exists and that remote access to the listed hosts is allowed. The next step checks that the DTF file can be accessed from all hosts. (Under MS-Windows, the utility does not currently verify remote execution capability nor remote access to the DTF file.) Domain decomposition occurs (unless specified otherwise) creating a new simulation in the DTF file. Finally, it runs the simulation. The syntax for the hostfile is simple: one hostname per line. The number of hosts can be different than the number of zones in the decomposed simulation. MPI will assign processes to the machines listed in a round-robin fashion. If the list is ‘too long’, the first machines will be used. If the list is too short, some machines will be given more than one process to execute. Note that multiple CPU machines can support multiple CFD-ACE+ processes, but the operating system is responsible for assigning the processes to different CPUs for execution. If you are using a multiple CPU machine with other hosts, you should list the multi-processor machine multiple times (once for each CPU). Parallel runs can also be executed from CFD-ACE-GUI. The inputs are located on the Run tab in CFD-ACE-GUI. Each of the command line inputs discussed above are applicable to the required GUI input. You must provide the decomposition method, MPI version (MPICH or Native MPI), and the host information. To launch the parallel job, click the "Run the Solver" button. This will launch the cfd-ace-mpi script that is specified under the Edit/Preferences/Tools tab in CFD-ACEGUI.

Parallel Processing User ID Requirements for Parallel Processing Under Unix, Parallel CFD-ACE+ assumes that all processes (local and remote) will be run under a common user with identical user ID numbers on all machines. If errors are reported, see the man pages for rhosts and hosts.equiv regarding setting up remote access. The working directory for the simulation must be common to all of the machines listed in the machines file. For just one multi-processor host, any directory will suffice. Distributed machines, however, must use an NFS mounted directory (Unix) or UNC path (MS-Windows) so that processes running remotely from the host used to start the parallel processing can change directory to where the DTF file is.

Parallel Processing Post Processing If you did not override the automatic decomposition of the mesh, your solution will be in the last simulation of the DTF file. For example, if you created a new test case which is simulation 1 in the DTF file, you must read in simulation 2 which contains the decomposed mesh and solution variables. Alternatively, decomposing the third sim of a five sim DTF file would deposit the decomposed sim in the sixth sim. This new sim will be used for parallel processing and will contain your results; therefore, you would access the sixth sim (not the third sim) in CFD-VIEW for displaying the data. If you restarted a simulation or had already decomposed the sim for another reason, the solution will be in the sim specified when you ran the job.

Parallel Processing Frequently Asked Questions Under Unix, I get errors about permission denied. What causes them, and how do I get rid of them?

175

CFD-ACE_V2008.2_User_Manual

The execution of a command on a remote machine is failing because the local machine has not been given permission to do so. This is most commonly due to the local machine not being listed in the $HOME/.rhosts file on the remote machine. Also, make sure that the $HOME/.rhosts file on the remote machine is readable only by the user. I get errors about failed common directory/file test. What causes this and how do I get rid of them?

The run tested each remote machine for access to the DTF file. A common problem is not using a common file system (for example, -wd /home/cierrah/tmp instead of -wd /net/cranberries/home/cierrah/tmp). Why does the parallel processing create a new simulation instead of solving the one I made?

The decomposition creates an entirely new (unstructured) mesh with the cells distributed among the new number of zones. Since you may want to keep the original mesh, a new simulation is created instead of overwriting the original one. Something killed my parallel processing job, but not all of the processes died. How do I make sure they all get killed?

Unix: In case something goes horribly wrong during the execution of a parallel run and there are some processes left hanging, you can kill these with a special installed script. The syntax is: kill-ace-mpi [-d]

This script executes a remote ‘kill’ on the processes listed in the file. The ‘-d’ option deletes the RUN file after sending the kill signal to each process listed in the file. Use this as a last resort ONLY. Try the standard methods of shutting down a job first since this kill script may leave your DTF file corrupted. MS-Windows: Go to each machine in the cluster and use the Task Manager to kill each CFDACE+ process via the End Process function. Again, use this only as a last resort. Is there any way to run a problem with cyclic boundaries in parallel?

Yes, but you have to be careful. The cyclic boundaries must match up within the partitioned zones. This means you cannot use the default partitioning method. You must supply an appropriate partitioning method option to dtf_decompose via the -decomp argument to cfdaceu_mpi. For example, if you have a wedge section of a cylinder with the sides of the wedge set as cyclic boundaries, you could partition the domain along the axis of the cylinder for a parallel run. Can I run in parallel under MS-Windows?

Yes, with a few caveats: CFD-ACE+ can run in parallel only under MS-Windows NT, 2000, or XP Professional. MSWindows 95, 98, and ME are not suitable for parallel processing. The CFD-ACE+ package must be installed on all machines in identical locations. Also, MPICH.NT.1.2.5 must be installed on all machines in your cluster. MPICHDIR should be defined as the full path to the MPICH.NT installation. For a default installation of MPICH.NT, MPICHDIR would be C:\Program Files\Argonne National Lab\MPICH.NT.1.2.5. The cfd-aceu-mpi.exe utility must be run from a command window. The DTF file must reside in a directory shared with full read-write permission to all machines in the cluster. When specifying the working directory, use the complete UNC path (e.g., \\krypton\testdir) for cluster computing; a path with a drive letter (e.g., e:\testdir) will work for a multi-processor machine. The cfd-ace-mpi.exe utility does not verify that the given working directory is valid for all hosts before launching the remote processes. The user launching the parallel run must be in the Administrative group under MS-Windows NT or a Power User under MS-Windows 2000, but the user processing the job on the remaining machines does not. Run the User Manager tool after logging in as Administrator to modify the user account that will be launching the parallel runs or run all parallel jobs from the Administrator account.

176

Parallel Processing

You must register a user and password that is common to all machines in the cluster. This does not have to be the same account that is launching the parallel run. You can run the mpiregister.exe utility from a command line to store the username and (encrypted) password in the Windows Registry. The cfd-ace-mpi.exe utility does not verify that the given account can execute the remote processes on the given machines before launching them. Can I run user subroutines while running in parallel?

Yes: Each process loads the dll into its memory space. Inside the user–subroutine, access routines like get_num_processes and get_process_id can be used to obtain parallel info like number of processes and the current process rank/id. Care must be taken while writing to a text file. Each process might attempt to open/write to the same unit at the same time resulting in access violations. To avoid this, either each processor should open up its own output file where the name of the file which can be appended with the process id to distinguish between the files or only the first processor opens the file in the replace mode while rest of them just append to it as shown below. !

get the number of processors used in this run call get_num_processes(num_procs, error)

!

get the current processor number call get_process_id(proc_id, error)

! open the current summary file (as replace for first processor, append for others if (proc_id.eq.1) then open(99,file=’write.dat',status='replace') else open(99,file='write.dat',status='unknown',position='append') endif Do you support SSH?

We only support SSH on Red Hat Enterprise edition. For other platforms, parallel processing uses RSH. How do I use PBS for parallel? The purpose of a PBS (Portable Batch System) system is to provide controls over initiating or scheduling execution of batch jobs. The batch system allows the system administrator to define policies for use of resources by different jobs and users of the system. The cfd-ace-mpi script supports the PBS option and can be used by typing cfd-ace-mpi -model modelname.DTF -pbs There is no need to specify a hostfile or working directory, since PBS will do this for you. (Disclaimer: PBS software is a third party software and is not supported by ESI-CFD, Inc. ESI-CFD recommends the professional version of PBS, which will come with support from the software provider. For more information on PBSPro, please visit http://www.pbspro.com/. There is an open source PBS option available, but will not come with support. For more information on OpenPBS, please visit http://www.openpbs.org/.) What are RSH and SSH? Secure Shell (SSH) is a program to log into another computer over a network, to execute commands in a remote machine, and to move files from one machine to another. It provides strong authentication and secure communications over insecure channels. RSH stands for remote shell and allows you to execute non-interactive programs on another system. On some systems, this command is sometimes called remsh or rcmd. It executes the command on the other system and returns the program's standard output and standard error output. Which platforms support MPICH and which ones support NATIVE MPI?

The following table show which platforms support MPICH and which ones support NATIVE MPI.

177

CFD-ACE_V2008.2_User_Manual

Platform

MPICH

Windows 2000/XP

X

Linux Red Hat 8+

X

Linux Red Hat Enterprise

X

SuSE Linux 8.0+

X

NATIVE MPI

HP-UX 11.0+ on PA-RISC

X

HP-UX 11.22+ on Itanium2

X

SGI IRIX 6.5+ on MIPS

X

X

SUN Solaris 8+

X

SGI Altix on Itanium2

X

X

HP Linux on Itanium2

X

X

How to use sources with the -combined option in dtf_decompose?

If you use the dtf_decompose -combined option, you must take care that your added sources (flow, heat, etc.) are added appropriately. For instance, if you have two volumes and you add a total heat source of 15W to two volume conditions named heat_source, then run the dtf_decompose -combined option, your total source will be 15W and not 30W. This is due to the grouping of the -combined option. The two volumes will be collapsed into one volume condition since they have the same name, volume condition settings and values. To avoid this problem, you can give the two volumes different names, e.g. heat_source1 and heat_source2, and they will not be merged.

Parallel Processing Examples-Demo Instructions 1.

Given a DTF file WarrenZevon.DTF with 1 sim on a multi-processor machine with at least 5 CPUs, you would run: cfd-ace-mpi -model WarrenZevon -local -num 5 If you believe the above DTF file is best partitioned along the X axis, you would change the command line as follows: cfd-ace-mpi -model WarrenZevon -local -num 5 -decomp -x

2. If you decided that the above run did not converge enough, you would change sim 2 (the result of decomposing sim 1 above) to be a restart or continuation run and execute: cfd-ace-mpi -model WarrenZevon -local -num 5 -sim 2 -nodecomp

3. Given the DTF file PinkFloyd.DTF and three uni-processor machines (thewall, darkside, & thunder) in a network cluster with NFS mounting the working directory under /net/thewall/home/gilmour, you would create the hostfile PinkFloyd.hst: thewall darkside thunder and then solve the fifth sim by running: cfd-ace-mpi -model PinkFloyd -wd /net/thewall/home/gilmour -num 3 -sim 5 4.

Given a multi-processor SGI with at least 4 processors in the Array Services array godzilla, you would run: cfdaceu_mpi -model BOC -local -num 4 -array godzilla

178

Parallel Processing

5. Given a cluster of MS-Windows NT machines, (for example, billy, stevey and jimmy), and the DTF file offices.DTF under the shared directory \\billy\monopoly, you would create the hostfile offices.hst with Notepad: billy stevey jimmy and then solve the first sim by running: cfd-ace-mpi.exe -model offices -num 3 -wd \\billy\monopoly

179

Chimera Grid Methodology Chimera Introduction The Chimera-overset-grid method offers the most flexibility and computational efficiency in representing flows bounded by complexly shaped bodies. A Chimera grid is a set of overlapped unstructured or structured grids that are generated independently and fitted to the body or bodies of interest. The ability to create separate, body-fitted grids for each component in a system makes the grid generation process much easier for complex geometric systems. The Chimera grid methodology has been implemented in CFD-ACE+ for the purpose of reducing the requirements/efforts of the user in placing a grid around a complex configuration. The Chimera scheme of grid generation uses a system of relatively simple grids. The grids each define a particular component of the overall geometry, making the initial grid generation much simpler. The individual grids overlap and, once combined, cover the entire computational domain. Changes in geometry or configuration force modifications to one or a small number of individual grids, leaving the other individual grids untouched. The Chimera section includes: •

Features and Limitations



Grid Generation



Applications



Theory



Implementation and Grid Generation



Hole Cutting



Chimera Boundaries



Chimera Example

Chimera Features and Limitations Features Chimera grids can be used to model complex geometric systems, where creating a multi-zonal grid is next to impossible. In these cases, chimera grids can be used to individually grid certain components of the system and overlap with the major grid.

Limitations The current Chimera Grid methodology employed in CFD-ACE+ has the following limitations: •

Can only used for stationary grids. In other words, there cannot be any relative movement between the overlapping grids.



The Chimera method implemented in CFD-ACE+ is not fully conservative, i.e. the fluxes across in cells are not fully conserved. This can cause a small discrepancy between a Chimera case and a fully connected grid case, but the results should be very similar.



Cannot be run in parallel. This limitation may be removed in a future release.

Currently, this methodology can only be used with the following modules •

Flow

181

CFD-ACE_V2008.2_User_Manual



Heat Transfer



Turbulence



Chemistry



User Scalar

Chimera Applications Chimera grids can be used to model complex geometric systems, where creating a multi-zonal grid in next to impossible. Examples where chimera grids can be used are •

Flow over an Airfoil, Cylinder etc.



Helicopter Rotor Blades



Compressor & Turbine Blades

Chimera Theory In the Chimera grid system, intergrid communication is accomplished through data interpolation. Therefore a hole needs to be cut in each grid in the regions that overlap with solid bodies or any other non-flow regions which belong to the other grids of the overset grid system. Then interpolation stencils have to be established for cells that lie along the hole boundaries as well as other interpolation boundaries identified in each grid. In the present method, in order to allow flexible grid interactions, the overset grids are permitted to overlap each other in an arbitrary manner (Zhang, 2005a). Before discussing the Chimera grid method further, some terms need to defined: •

Chimera Grid: A grid system containing several overlapped component grids, also called an overset grid.



Bounding Box: The smallest rectangular or cubic box that encloses the boundary of an object.



Wall Boundary (WB): The solid boundary of an object in a flow field. A WB of an object may consist of several connected surfaces, the surfaces are called WB faces.



Intergrid Communication: When we consider a grid system containing several overlapped component grids, it is often needed to interpolate solutions at the cells in one component grid to obtain the solutions at the cells in other component grids at the overlapped regions. The interpolation between component grids is referred as intergrid communication in the overlapped grid system.

Hole-cutting and identification of the intergrid boundary is completely automatic. This procedure is quite complicated and several steps are required and outlined as follows with the help of an illustrative case shown in Figure 1.

182

Chimera Grid Methodology

(a)

(b) Figure 1. (a) Example Chimera Grid system (b) Closeup view of the two overlapping grids

Hole cutting is done through the following steps: 1. Determine the bounding boxes of all component grids and WB faces 2. If the bounding box of a component grid, say A, overlaps with that of a WB face in another component grid, say B, build an Alternating Digital Tree (ADT) to accommodate the coordinates of A’s cells that are located on the bounding box of the overlapped WB face; repeat this step for each face in the WB face list in grid B and identify all such cells. 3. Find out if one ore more edges of the cells (identified in step 2) intersect with any WB face in grid B; if so, determine the intersection points. The cells which contain such intersecting-edge(s) are called as cut-cells. 4. Inspect each edge of the cut-cells and classify the status of its two end points as either IN (if this point is inside WB) or OUT (if this point is outside WB). For example, if an edge intersects the WB odd number of times, one of its end points is IN and the other is OUT, as illustrated in Fig. 2; 5. Once the status of the end points of all edges that intersect the WB faces is checked, as shown in Fig. 3, propagate the status checking to other edges of the cut-cells and then to the adjacent cells until all the grid points that are IN are identified, as shown in Fig. 4; 6. Blank out the cells that contain IN points, as shown in Fig.5, thus the hole is generated. The limiting boundary of the hole is constituted by the cut-cells. The cells that lie outside the WB, adjacent to the hole are identified as fringe boundary cells, as shown in Fig. 6. 7. Steps 2-6 are repeated until all the component grids in the Chimera grid system are processed.

(a)

183

CFD-ACE_V2008.2_User_Manual

(b) Figure 2. Classifying the status of end of an edge which intersects the WB as either IN or OUT (a) Edge with an odd number of intersections (b) Edge with an even number of intersections

Each grid in an overset grid system may contain interpolation boundary cells and/or fringe boundary cells. They represent the linkage between the grids in an overset mesh. Intergrid communication occurs by virtue of interpolating data to them in each grid from the respective donors in another grid. A donor is a cell that overlaps with given interpolation boundary cell or fringe boundary cell and provides an interpolation stencil. If the user does not specify the candidate grids that could contain a donor, the algorithm searches all the grids of the overset mesh to find the best donor. The following algorithm is used to find a donor for a given interpolation boundary cell or fringe boundary cell. 1. Search all the other grids and identify the cells whose bounding boxes overlap with that of the interpolation boundary or fringe boundary. 2. Using these candidates, identify the cell that contains the centroid of the interpolation boundary cell or fringe boundary cell; this cell is a donor. 3. Once a donor cell is identified, values on the point in this cell are reconstructed by a weighted averaging procedure. In this work two methods have been implemented, one is inverse-distance weighting, the other is least-square. If more than one valid donors are found, select the donor with the smallest control volume (best grid resolution).

(a)

(b) Figure 3. (a) Assignment of IN/OUT status to end points (b) Cut-cells of the grid blanketing all grid points

184

Chimera Grid Methodology

(a)

(b)

Figure 4. (a) A hole cut in the grid with respect to the given WB (b) Fringe boundary cells adjacent to the cut hole

(a)

(b) Figure 5. (a) Fringe cells and their donor cells (b) Interpolation cells and their donor cells

The values of cells along interpolation boundary or fringe boundary are determined from their donor cell as well as its neighboring cells by weighted average (Zhang 2005b).

(1-1)

The inverse-distance-weighting factor is expressed as:

185

CFD-ACE_V2008.2_User_Manual

(1-2)

where (1-3)

This weighting has been used quite successfully for computing the flow over a number of complex configurations. However, its accuracy is known to be less than second-order. A full second-order accurate averaging method is least square. With least square, the weights are determined by defining (Zhang 2005b) (1-4)

where (1-5)

(1-6)

(1-7)

(1-8)

(1-9)

(1-10)

(1-11)

186

Chimera Grid Methodology

(1-12)

(1-13)

(1-14)

(1-15)

(1-16)

(1-17)

(1-18)

Chimera Model Setup Chimera Implementation and Grid Generation The Implementation section describes how to setup a model for simulation using Chimera in CFD-ACE+. For grid generation, the Chimera grid option can be applied to any geometric system (3D, 2D, or 2D axisymmetric). All grid cell types are supported. In some cases, the parts of the different grid systems could lie on top of each other, which would cause CFD-GEOM to filter the overlapping entities. To prevent this, the different parts could be created and saved into different DTF files. The different DTF files can then be merged together using the dtf_merge utility. This will merge the two DTF files into one DTF file. For more information on the dtf_merge utility, please send an email to [email protected].

Chimera Volume Conditions On the VC tab, you must specify the Chimera cutting priority for the overlapping grids. To define the hole cutting priority, you must change the VC Setting Mode to Chimera. CFD-ACE-GUI will automatically group separate grids in the VC Explorer list. These will show up as, Chi_1, Chi_2,....,Chi_N in the list, depending on the number of separate grids in the model. You then need to specify the hole cutting priority for the separate grids. There are two options available for specifying the hole cutting priority: •

User Defined: With this method, you must specify the cutting priority for each zone.



Automatic: If no priority is specified, i.e. the automatic option is used, then the Zone number is used to define the priority. The highest zone number will have the highest priority and the lowest zone number will have the lowest priority.

187

CFD-ACE_V2008.2_User_Manual

Figure 1. Defining the Chimera cutting priority.

Chimera Boundary Conditions On the BC tab, you must specify the Chimera boundaries, i.e. the wall boundaries for the overlapping zones. To specify a Chimera boundary, pick a wall boundary and check the Chimera Boundary box on the Chimera tab, as shown in Figure 1.

Figure 1. Defining Chimera boundaries

Chimera Example The following example is meant to provide a brief demonstration on setting up a simulation that uses the Chimera feature. You will learn the following: •

Where to activate the Chimera feature



Specifying the hole cutting priority for the overlapping grids



Specifying the Chimera boundaries

The example used will be a 2D, flow over a cylinder case.

188

Chimera Grid Methodology

Figure 1. Schematic of 2D, flow over a cylinder case In this example, we will have a fine mesh around the cylinder and a coarser mesh for the "tunnel".

Figure 2. Coarse mesh for the tunnel, and a fine mesh around the cylinder.

Activating the Chimera Feature The Chimera feature should be activated on the MO -> Shared Tab in CFD-ACE-GUI (as shown in Figure 1).

189

CFD-ACE_V2008.2_User_Manual

Figure 3. Activating Chimera

Hole Cutting Priority Since Chimera uses overlapping grids, you must specify a hole cutting priority for each of the zones. To define the hole cutting priority, go to the VC tab and select the Chimera option under the VC Setting Mode.

Figure 4. VC Setting mode for Chimera There are two options for specifying the hole cutting priority:

190



User Defined



Automatic

Chimera Grid Methodology

For this example, you can define the hole cutting priority for the zones around the cylinder as 1, and the hole cutting priority for the tunnel as 2. This will mean that the hole cutting for the tunnel will have a higher priority. If the Automatic option is used, then the hole cutting priority will be defined by the zone number. In this case, we have 4 zones, which will give Zone 4 the highest priority and Zone 1 the lowest priority.

Chimera Boundaries A Chimera boundary defines the boundary where the two meshes overlap, i.e. the solid boundary of an object in a flow field.. For this example, the outer boundary for the zones consisting of the cylinder are Chimera boundaries, shown in Figure 5.

Figure 5. Yellow boundaries indicate Chimera boundaries, i.e. where the two meshes overlap.

191

User Subroutines User Subroutines Introduction to User Subroutines The User Subroutines feature enables you to create and modify the CFD-ACE-Solver. Though CFD-ACE+ is a multi-purpose solver with a rich set of physical models and features, the User Subroutines enable you to write your own subroutines. This enables you to get information from and to the solver at critical locations in the solution process. User Subroutines include the following sections: •

User Subroutines-Applications



User Subroutines-Features



User Subroutines-Implementation



User Subroutines-Building a User Shared Library/DLL

Activating User Subroutines Here are the following steps for choosing the appropriate user subroutine and activating the subroutine in CFD-ACE-GUI. 1. Decide which kind of user subroutine you want to write, e.g. UBOUND, USOURCE, UOUT, etc. If you know where to activate the use of a user subroutine in CFD-ACE-GUI, then this will provide a hint about which user subroutine you want to write. For example, if you click the 'evaluation method' for the U velocity component for a Fixed Velocity inlet BC, you will see one option is 'UBOUND'. This is a hint that you need to write a UBOUND user subroutine. If you do not know a priori where to activate the use of a particular user subroutine, e.g. a user-specified source term, then see the descriptions of each user subroutine in the User Subroutine Implementation section. Note: In any event, the first documentation you should read is for the user subroutine of interest, e.g. USOURCE for a userspecified source term. 2. Write your user subroutine. Start by copying the template file 'libUserAce.f' from your ESI_Software/ACE_SOLVER_2006/usersub directory to a local working directory. Edit this file using any text or programming editor. Make use of the examples provided on the Support web site to figure out what to do. Generally, you will delete all the contents of this template file except the 1 or 2 user subroutines of interest, and the MODULE cfdrc_user at the top of the template file. 3. In CFD-ACE-GUI, set the 'evaluation method' to 'User-Specified' for the parameter or variable or source of interest. You must perform this step, else CFD-ACE-SOLVER will not use your user subroutine. 4. Compile your user subroutine using the 'build-userlib' script provided. You MUST use this script to compile your user subroutine because it links the appropriate libraries. If you do not have a compiler, you can use the online compiler provided on the support website.

193

CFD-ACE_V2008.2_User_Manual

5. Keep the compiled user subroutine (*.dll (Windows), *.so (Unix/Linux), or *.sl (Sun) file) with your DTF file (in the same directory) 6. In CFD-ACE-GUI, on the Run panel, indicate the name of the user subroutine.

User Subroutines User Subroutine Applications The User Subroutines option enables you to modify the solver in such a general way that the possibilities are almost unlimited. The most often used capabilities are user defined output, boundary conditions, source terms, and properties. You can also modify the time step during transient simulations, setup initial conditions, and obtain total control of grid deformation.

User Subroutines Introduction to User Subroutine Features In addition to existing user subroutines, there are numerous user access routines that enable you to communicate with the solver. There is an extensive list of variables which are accessible from the solver. The Features section includes: •

Accessible Variables



Access Routines

Accessible Variables User Subroutines Introduction to Accessible Variables Each variable or entity (cell, volume condition, boundary condition) is referred to by an index. The index can be retrieved by calling the appropriate access routine using the corresponding token name. Along with the solved variables, user subroutines also provide access to many other useful variables such as cell coordinates and volume. For many variables there are long and short token names and these are case insensitive. A complete list of variables, their description, and availability is included in the User Subroutines Accessible Variables section: •

Auxiliary Variables



Utility Variables

User Subroutines Features-Access Variables Token Name

Description

Availability1

FLOW U, V W

X, Y, W component of velocity. Available when solving for flow.

G(C,B), S(C4,B)

P or Pressure

Static Pressure. Available when solving for flow.

G(C,B), S(C4,B)

Vis or Viscosity

Total or Effective Viscosity. Available when solving for flow.

G(C)

VISL or Laminar_Viscosity

Laminar Dynamic Viscosity. Available G(C5), S(C) when solving for flow.

194

User Subroutines

DENS or RHO or DENSITY

Density. (set is available only for inlet/exit boundaries which are part of the volume condition for which density is user defined.)

G(C5,B), S(C,B)

DRHODP

Derivative of density with respect to pressure Available only for non constant densities (compressible flows). Need to be set whenever density is user defined.

G(C), S(C)

MASS_FLUX

Convective mass flux at boundary G(B) face. Available when solving for flow. At a reacting boundary the value is how much mass is deposited or etched. The sign convention for mass flux : flux entering the system is positive sign(+) and flux leaving the system is negative sign(-). Unit = Kg/s

WALL_SHEAR_STRESS_

X, Y, Z direction walls shear stress. Available when solving for Flow.

STRAIN_RATE

Strain rate. Available when solving for G(C) Flow.

G(B)

HEAT H0 or Enthalpy

Enthalpy. Available when solving for heat transfer.

G(C,B), S(C3,B)

T or Temperature

Temperature. Available when solving G(C,B), for stress, flow, heat transfer. S(C2,B)

COND or THERMAL_CONDUCTIVITY

Laminar Thermal Conductivity. Available when solving for heat transfer.

CP or SPECIFIC_HEAT

Specific Heat. Available when solving G(C5), S(C) for heat transfer.

WALL_HEAT_SOURCE

Heat source in W/m^2. Available when S(B) solving for heat transfer.

HEAT_THINWALL_K

Thinwall thermal conductivity. Available when solving for heat transfer.

G(C5), S(C)

S(B)

195

CFD-ACE_V2008.2_User_Manual

HEAT_THINWALL_D

Thinwall thickness, used for heat transfer. Available when solving for heat transfer.

S(B)

Q or HEAT_FLUX

Heat flux. Available when solving for heat transfer.

G(B),S(B)

HC or HEAT_TRANSFER_COEFFICIENT

Heat transfer coefficient. Available when solving for heat transfer.

S(B)

TINF

Temperature of air or ambient air S(B) temperature defined for external heat bc (rad + convection). Available when solving for heat transfer.

HEAT_FLUX_COND or Q_COND

Heat Flux Conduction. Available when G(B) solving for Heat.

HEAT_FLUX_CONV or Q_CONV

Heat Flux Convection. Available when G(B) solving for Heat.

RADIATION_FLUX or Q_RAD

Heat Flux Radiation. Available when solving for Heat.

G(B)

LIQ_FRACTION_SOLIDIFICATION

Liquid Fraction. Available when solving for Heat solidification.

G(B)

K or Turbulent_ke

Turbulent Kinetic Energy. Available when solving for turbulence.

G(C,B), S(C2,B)

D or Turbulent_Dissipation

Turbulent Dissipation Rate. Available G(C,B), when solving for turbulence. S(C2,B)

VIST or TURBULENT_VISCOSITY

Turbulent Viscosity. Available when solving for turbulence.

RH or ROUGHNESS_HEIGHT

Wall roughness height. Available when S(B) solving for turbulence. Unit = m.

TURBULANCE

CHEMISTRY

196

G(C5), S(C)

User Subroutines

/

G(C,B), Mixture fraction. Available when solving for Mixture Fractions. You can S(C4,B) access the mixture fraction value (at cells) by using the mixture name. You can only get the value of mixture fractions. You are not allowed to set the values for mixture fractions. OR Species mass fraction or concentration. Available when solving for Species Mass Fractions or Liquid Chemistry. You can access the species mass fraction or concentration using the species name.

BIO_

G(C,B), Analyte concentrations. Available when solving for Biochemistry. You S(C4,B) can access the analyte concentration by using the analyte names.

EPLATE_ELECTROLYTE

Electrolyte concentration. Available when solving for electro plating.

DIF_

Chemical species diffusivity. Available G(C), S(C) when solving for chemistry.

MOBILITY_

Chemical species mobility, used in calculating drift flux. Available when solving for chemistry and plasma or electric modules (Electrochemistry related problems. You need to be solving for liquid chemistry).

FLUX_

G(B) Chemical species total flux.(For gas phase chemistry, Units = Kg/m^2-sec. For liquid chemistry or Biochemistry Units = kmol/m^2-sec) Total flux include diffusive flux, cross diffusion terms, convective flux, and drift flux. Some of the terms are zero, depending on bc and problem type. Available when solving for chemistry.

TOTAL_DEP_THICKNES

Total deposition thickness or thickness G(B) of etching boundary. Available when solving for Chemistry with surface reactions and at lease one species is either getting deposited or etched. The sign convention for thickness : deposition is negative(-) and etching is positive(+). Unit = m/s

G(C), S(C3)

G(C), S(C)

197

CFD-ACE_V2008.2_User_Manual

PH

PH, used determine the hydrogen G(C) concentration in the system. Available when solving for liquid chemistry with auto ionization switched on.

ELECTRO_OSMOTIC_MOBILITY or EOS_MOBILITY

Electro osmotic mobility. Available when solving for both chemistry and electric problems together.

S(B)

ECD_SURF_CURRENT_DENSITY

Surface current density. Available when solving for electro-chemistry case.

G(B)

ECD_SURF_OVER_POTENTIAL

Surface over potential. Available when G(B) solving for electro-chemistry case.

ECD_SURF_DEP_THICKNESS

Surface deposition thickness. Available when solving for electrochemistry case.

G(B)

ECD_GROWTH_RATE

Growth rate. Available when solving for electro-chemistry case.

G(B)



Scalar Fraction. Available when solving for User Scalar. You can access scalar fraction by using the scalar name.

G(C,B), S(C4,B)

SKEW_

Cross diffusive face fluxes on G(B) boundaries. Available when solving for user defined scalar.

DIF_

User scalar diffusivity values. Available when solving for user defined scalar.

K_THINWALL_

Thinwall Conductivity of user defined S(B) scalar. Available when solving for user defined scalars.

D_THINWALL_

Thinwall thickness of user defined scalars. Available when solving for user defined scalars.

USER SCALAR

198

S(C)

S(B)

User Subroutines

RADIATION RADIATION_FLUX

Radiative flux at boundary face. G(B) Available when solving for radiation. The sign convention for radiation flux : flux entering the system is positive sign(+) and flux leaving the system is negative sign(-).

EMISSIVITY

Emissivity coefficient at boundary. Available when solving for radiation.

G(B), S(B)

Note: You need to use special user access routines to get and set emissivity. Refer to user access routines related to radiation quantities. ABSORBTIVITY

Absorbtivity coefficient. Available when solving for radiation.

G(C), S(C)

Note: You need to use special user access routines to get and set absorbtivity. Refer user access routines related to radiation quantities.

FREE SURFACE VOF_VOLUME_FRACTION

Liquid volume fraction. Available when G(B,C) solving for VOF.

'VOF_LAMINAR_VISCOSITY1'

Laminar Dynamic Viscosity of primary G(C) or first fluid. Available when solving for VOF.

'VOF_LAMINAR_VISCOSITY2'

Laminar Dynamic Viscosity of second G(C), S(C) fluid. Available when solving for VOF.

'VOF_THERMAL_CONDUCTIVITY1'

Laminar Thermal Conductivity of primary or first fluid. Available when solving for heat transfer and VOF.

G(C)

'VOF_THERMAL_CONDUCTIVITY2'

Laminar Thermal Conductivity of second fluid. Available when solving for heat transfer and VOF.

G(C), S(C)

VOF_DENSITY1

Density of primary or first fluid. Available when solving for VOF.

G(C)

199

CFD-ACE_V2008.2_User_Manual

VOF_DENSITY2

Density of second fluid. Available when solving for VOF.

G(C,B), S(C,B)

(set is available only for inlet/exit boundaries which are part of the volume condition for which density is user defined.) VOF_SPECIFIC_HEAT1

Specific Heat of primary or first fluid.

G(C)

Available when solving for VOF and heat transfer. VOF_SPECIFIC_HEAT2

Specific Heat of second fluid.

G(C)

Available when solving for VOF and heat transfer. VOF_VOLUME_FRACTION_GRAD_X

The x-component of the gradient vector of the VOF function, Grad(F). Available only when solving for VOF.

G(C)

VOF_VOLUME_FRACTION_GRAD_Y

The y-component of the gradient vector of the VOF function, Grad(F). Available only when solving for VOF.

G(C)

VOF_VOLUME_FRACTION_GRAD_Z

The z-component of the gradient vector of the VOF function, Grad(F). Available only when solving for VOF.

G(C)

VOF_SURFACE_TENSION

Surface tension. Available when solving for VOF.

G(C), S(C)

VOF_CONTACT_ANGLE

Contact Angle (With Respect to Secondary Fluid). Available when solving for VOF.

S(B), G(B)

FREE_SURFACE_AREA

VOF interface area. Available when solving for VOF.

G(C)

VOF_FLUID1

Mass Source for primary fluid. (Index for USOURCE). Available when solving for VOF.

S(C)

VOF_FLUID2

Mass Source for secondary fluid. S(C) (Index for USOURCE). Available when solving for VOF.

TWO FLUID

200

User Subroutines

TWOF_VOLUME_FRACTION

Fluid two - volume fraction. Available when solving for Two Fluids.

G(C), S(C)

TWOF_U or U2

X-direction velocity for Fluid 2. S(C)* Available when solving for Two Fluids.

TWOF_V or V2

Y-direction velocity for Fluid 2. S(C)* Available when solving for Two Fluids.

TWOF_W or W2

Z-direction velocity for Fluid 2. S(C)* Available when solving for Two Fluids.

TWOF_T or T2

Temperature of fluid 2. Available when S(C) solving for Two Fluids.

CAVITATION VAPOUR_MASS_FRACTION

Vapour Mass Fraction. Available when G(C) solving for cavitation.

VAPOUR_VOLUME_FRACTION

Vapour volume fraction. Available when solving for Cavitation.

CAV_TOTAL_VOLUME_FRACTION

Total volume fraction, including vapour G(C) volume fraction. Available when solving for Cavitation.

G(C)

STRESS FEM_DISPLACEMENT_X

X-direction Displacement. Available when solving for Stress

S(BN), G(N)

FEM_DISPLACEMENT_Y

Y-direction Displacement. Available when solving for Stress

S(BN), G(N)

FEM_DISPLACEMENT_Z

Z-direction Displacement. Available when solving for Stress

S(BN), G(N)

FEM_FIX_PRESSURE or FEM_PRESSURE Load. Available when solving for or FEM_FIX_LOAD Stress.

S(B) S(BN) for point load

201

CFD-ACE_V2008.2_User_Manual

PIEZOELECTRIC_POTENTIAL or FEM_VOLTAGE or

Piezoelectric potential. Available when G(N), S(BN) solving for Stress and electric case.

FEM_PIEZOELECTRIC_POTENTIAL FEM_YOUNGS_MODULUS

Youngs modulus. Available when solving for Stress.

FEM_YOUNGS_MODULUS_1

Youngs modulus coefficient 1 (E1) for G(C), S(C) Anisotropy Material. Available when solving for Stress.

FEM_YOUNGS_MODULUS_2

Youngs modulus coefficient 2 (E2) for G(C), S(C) Anisotropy Material. Available when solving for Stress.

FEM_YOUNGS_MODULUS_3

Youngs modulus coefficient 3 (E3) for G(C), S(C) Anisotropy Material. Available when solving for Stress (3D case only).

FEM_POISSONS_RATIO

Poissons ratio. Available when solving G(C), S(C) for Stress.

FEM_POISSONS_RATIO_12

Poissons ratio coefficient 12 (nu12) for G(C), S(C) Anisotropy Material. Available when solving for Stress.

FEM_POISSONS_RATIO_13

Poissons ratio coefficient 13 (nu13) for G(C), S(C) Anisotropy Material. Available when solving for Stress.

FEM_POISSONS_RATIO_23

Poissons ratio coefficient 23 (nu23) for G(C), S(C) Anisotropy Material. Available when solving for Stress.

FEM_POISSONS_RATIO_21

Poissons ratio coefficient 21 (nu21) for G(C), S(C) Anisotropy Material. Available when solving for Stress (3D cases only).

FEM_POISSONS_RATIO_31

Poissons ratio coefficient 31 (nu31) for G(C), S(C) Anisotropy Material. Available when solving for Stress (3D cases only).

FEM_POISSONS_RATIO_32

Poissons ratio coefficient 32(nu32) for G(C), S(C) Anisotropy Material. Available when solving for Stress (3D cases only).

FEM_EXPANSION_COEF

Thermal Expansion Coefficient. Available when solving for Stress.

202

G(C), S(C)

G(C), S(C)

User Subroutines

FEM_EXPANSION_COEF_1

Thermal Expansion Coefficient 1 (Alpha 1) for Anisotropy Material. Available when solving for Stress.

G(C), S(C)

FEM_EXPANSION_COEF_2

Thermal Expansion Coefficient 2 (Alpha 2) for Anisotropy Material. Available when solving for Stress.

G(C), S(C)

FEM_EXPANSION_COEF_3

Thermal Expansion Coefficient 3 (Alpha 3) for Anisotropy Material. Available when solving for Stress.

G(C), S(C)

FEM_STRESS_XX or FEM_STRESS_11

Stress on X plane. Available when solving for Stress.

G(N)

FEM_STRESS_YY or FEM_STRESS_22

Stress on Y plane. Available when solving for Stress.

G(N)

FEM_STRESS_ZZ or FEM_STRESS_33

Stress on Z plane. Available when solving for Stress.

G(N)

FEM_STRESS_XY or FEM_STRESS_12

Stress on XY plane. Available when solving for Stress.

G(N)

FEM_STRESS_XZ or FEM_STRESS_13

Stress on XZ plane. Available when solving for Stress.

G(N)

FEM_STRESS_YZ or FEM_STRESS_23

Stress on YZ plane. Available when solving for Stress.

G(N)

FEM_STRAIN_XX or FEM_STRAIN_11

Strain on X plane. Available when solving for Stress.

G(N)

FEM_STRAIN_YY or FEM_STRAIN_22

Strain on Y plane. Available when solving for Stress.

G(N)

FEM_STRAIN_ZZ or FEM_STRAIN_33

Strain on Z plane. Available when solving for Stress.

G(N)

FEM_STRAIN_XY or FEM_STRAIN_12

Strain on XY plane. Available when solving for Stress.

G(N)

FEM_STRAIN_XZ or FEM_STRAIN_13

Strain on XZ plane. Available when solving for Stress.

G(N)

FEM_STRAIN_YZ or FEM_STRAIN_23

Strain on YZ plane. Available when solving for Stress.

G(N)

203

CFD-ACE_V2008.2_User_Manual

FEM_REACTION_FORCE_X

Reaction Force X Component. Available when solving for Stress.

G(N)

FEM_REACTION_FORCE_Y

Reaction Force Y Component. Available when solving for Stress.

G(N)

FEM_REACTION_FORCE_Z

Reaction Force Z Component. Available when solving for Stress.

G(N)

PLASMA T_E or ELECTRON_TEMPERATURE

Electron Temperature. Available when G(C) solving for plasma.

N_E or ELECTRON_NUMBER_DENSITY

Electron Number Density. Available when solving for plasma.

'COLLISION_FREQUENCY'

Electron collision frequency. Available G(C), S(C) when solving for plasma.

ELECTRON_MOBILITY

Electron Mobility. Available when solving for Plasma.

G(C)

EPLATE_POTENTIAL

Electric Potential. Available when solving for electro plating.

G(C), S(C3)

ESTAT_POTENTIAL or

Electric Potential(real part). Available G(C,B), when solving for electric module. S(B)

G(C)

ELECTRIC/MAGNETIC

ELECTRIC_POTENTIAL or EL_POT ESTAT_POTENTIAL_I or ELECTRIC_POTENTIAL_I or EL_POT_I ZETA_POTENTIAL or ZETA_POT

Electric Potential(Imaginary part). G(C,B), Available when solving for electric with S(B) A.C. conduction or time domain settings. Zeta Potential. Available when solving G(B), S(B) for both chemistry and electric problems together.

ECOND or ELECTRICAL_CONDUCTIVITY Electrical Conductivity. Available when G(C), S(C) solving for electric or magnetic

204

User Subroutines

problems.

EL_EPSR or ELECTRICAL_PERMITTIVITY Electrical relative permittivity. Available when solving for electric or magnetic problems.

G(C), S(C)

ELECTRIC_FIELD_NORMAL or ESTAT_FIELD_N

Normal electric field. Available when solving for electric problems.

G(B)

ELECTRIC_FIELD_X or ESTAT_FIELD_X

Electric field in X-direction (Real). Available when solving for electric problems.

G(C)

ELECTRIC_FIELD_X_I or ESTAT_FIELD_X_I

Electric field in X-direction (Imaginary). G(C) Available when solving for electric problems. (AC conduction or time domain)

ELECTRIC_FIELD_Y or ESTAT_FIELD_Y

Electric field in Y-direction (Real). Available when solving for electric problems.

G(C)

ELECTRIC_FIELD_Y_I or ESTAT_FIELD_Y_I

Electric field in Y-direction (Imaginary). G(C) Available when solving for electric problems. (AC conduction or time domain)

ELECTRIC_FIELD_Z or ESTAT_FIELD_Z

Electric field in Z-direction (Real). Available when solving for electric problems and 3-D geometry.

ELECTRIC_FIELD_Z_I or ESTAT_FIELD_Z_I

Electric field in Z-direction (Imaginary). G(C) Available when solving for electric problems and 3D geometry.

G(C)

(AC conduction or time domain) SURFACE_CHARGE_DENSITY

Surface electric charge density. Available when solving for electrostatics. Unit = C/m2

CURRENT

Electric current. Available when G(B) solving for electric conduction or time domain. Unit = A

CURRENT_DENSITY

Electric current density. Available G(B), S(B) when solving for electric conduction or time domain. Unit = A/m2

G(B), S(B)

205

CFD-ACE_V2008.2_User_Manual

TOTAL_CURRENT

Total electric current, includes current G(B) generated due to electric field and magnetic field. Available when solving for electric conduction or time domain and lorentz forces. If lorentz forces are not calculated then this will have the same value as CURRENT. Unit = A

TOTAL_CURRENT_DENSITY

Total electric current density, includes G(B) current generated due to electric field and magnetic field. Available when solving for electric conduction or time domain and lorentz forces. If lorentz forces are not calculated then this will have the same value as CURRENT_DENSITY. Unit = A/m2

CURRENT_SOLID

Electric current in Solid. Available G(B) when solving for electric conduction or time domain. Unit = A

CURRENT_DENSITY_I

Electric current density (Imaginary). Available when solving for electric problems.

G(B), S(B)

(AC conduction or time domain) CURRENT_DENSITY_X

X-component of electric current density. Available when solving for electric conduction.

G(C)

CURRENT_DENSITY_Y

Y-component of electric current density. Available when solving for electric conduction.

G(C)

CURRENT_DENSITY_Z

Z-component of electric current density. Available when solving for electric conduction.

G(C)

CURRENT_DENSITY_X_I

X-component (imaginary) of electric current density. Available when solving for electric conduction.

G(C)

CURRENT_DENSITY_Y_I

Y-component (imaginary) of electric current density. Available when solving for electric conduction.

G(C)

CURRENT_DENSITY_Z_I

Z-component (imaginary) of electric current density. Available when solving for electric conduction.

G(C)

POWER_DISSIPATION

Power Dissipation. Available when solving for Electro-magnetic case.

G(C)

206

User Subroutines

MU_R or RELATIVE_PERMEABILITY

Relative Permeability. Available when G(C), S(C) ` solving for Electro-magnetic case.

SPACE_CHARGE_DENSITY

Space charge density. Available when G(C) solving for electric cases.

MAGNETIC_FIELD_REAL_X

Magnetic field in X-direction (Real). G(C) Available when solving for magnetic or electro-magnetic cases.

MAGNETIC_FIELD_REAL_Y

G(C) Magnetic field in Y-direction (Real). Available when solving for magnetic or electro-magnetic cases.

MAGNETIC_FIELD_REAL_Z

Magnetic field in Z-direction (Real). G(C) Available when solving for magnetic or electro-magnetic cases.

MAGNETIC_FIELD_IMAG_X

G(C) Magnetic field in X-direction (Imaginary). Available when solving for electro-magnetic cases. (AC conduction or time domain)

MAGNETIC_FIELD_IMAG_Y

Magnetic field in Y-direction G(C) (Imaginary). Available when solving for electro-magnetic cases. (AC conduction or time domain)

MAGNETIC_FIELD_IMAG_Z

G(C) Magnetic field in Z-direction (Imaginary). Available when solving for electro-magnetic cases. (AC conduction or time domain)

MAGNETIC_FIELD_STATIC_X

Magnetic field in X-direction (Static). Available when solving for electromagnetic cases. (AC +DC Single Frequency)

G(C)

MAGNETIC_FIELD_STATIC_Y

Magnetic field in Y-direction (Static). Available when solving for electromagnetic cases. (AC +DC Single Frequency)

G(C)

MAGNETIC_FIELD_STATIC_Z

Magnetic field in Z-direction (Static). Available when solving for electromagnetic cases. (AC +DC Single Frequency)

G(C)

MAGNETIC_POTENTIAL_REAL_X

Magnetic potential in X-direction (Real). Available when solving for magnetic or electro-magnetic cases.

G(C)

207

CFD-ACE_V2008.2_User_Manual

MAGNETIC_POTENTIAL_REAL_Y

Magnetic potential in Y-direction (Real). Available when solving for magnetic or electro-magnetic cases.

G(C)

MAGNETIC_POTENTIAL_REAL_Z

Magnetic potential in Z-direction (Real). Available when solving for magnetic or electro-magnetic cases.

G(C)

MAGNETIC_POTENTIAL_IMAG_X

Magnetic potential in X-direction G(C) (Imaginary). Available when solving for electro-magnetic cases. (AC conduction or time domain)

MAGNETIC_POTENTIAL_IMAG_Y

Magnetic potential in Y-direction G(C) (Imaginary). Available when solving for electro-magnetic cases. (AC conduction or time domain)

MAGNETIC_POTENTIAL_IMAG_Z

Magnetic potential in Z-direction G(C) (Imaginary). Available when solving for electro-magnetic cases. (AC conduction or time domain)

MAGNETIC_POTENTIAL_STATIC_X

Magnetic potential in X-direction (Static). Available when solving for electro-magnetic cases. (AC +DC Single Frequency)

G(C)

MAGNETIC_POTENTIAL_STATIC_Y

Magnetic potential in Y-direction (Static). Available when solving for electro-magnetic cases. (AC +DC Single Frequency)

G(C)

MAGNETIC_POTENTIAL_STATIC_Z

Magnetic potential in Z-direction (Static). Available when solving for electro-magnetic cases. (AC +DC Single Frequency)

G(C)

Ax_r

Real component of the magnetic vector potential in the X-direction

G(B), S(B)

Ay_r

Real component of the magnetic vector potential in the Y-direction

G(B), S(B)

Az_r

Real component of the magnetic vector potential in the Z-direction

G(B), S(B)

Ax_i

Imaginary component of the magnetic G(B), S(B) vector potential in the X-direction

Ay_i

Imaginary component of the magnetic G(B), S(B) vector potential in the Y-direction

208

User Subroutines

Az_i

Imaginary component of the magnetic G(B), S(B) vector potential in the Z-direction

Ax_s

Static component of the magnetic G(B), S(B) vector potential in the X-direction (when using DC+AC for magnetic field options)

Ay_s

Static component of the magnetic G(B), S(B) vector potential in the Y-direction (when using DC+AC for magnetic field options)

Az_s

Static component of the magnetic G(B), S(B) vector potential in the Z-direction (when using DC+AC for magnetic field options)

KINETIC DIFFUSION_COEF_U_KINETIC

Kinetic diffusion coefficient in U space. S(C) Available when solving for Kinetic.

DIFFUSION_COEF_R_KINETIC

Kinetic diffusion coefficient in R space. S(C) Available when solving for Kinetic.

DRIFT_COEF_U_KINETIC

Kinetic drift coefficient in U space. Available when solving for Kinetic.

S(C)

DRIFT_COEF_R_KINETIC

Kinetic drift coefficient in R space. Available when solving for Kinetic.

S(C)

POROUS MEDIA POROSITY

Porosity factor. Available when solving G(C), S(C) for flow and at least one domain is defined as porous media. The value of porosity should be between 0.0 and 1.0

TORTUOSITY

Tortuosity. Available when solving for G(C), S(C) Porous Media.

209

CFD-ACE_V2008.2_User_Manual

S_OVER_V

Surface to volume ration. Available when solving for Porous Media.

PORE_SIZE

Pore Size. Available when solving for G(C), S(C) Porous Media.

ELECTRICAL_CONDUCTIVITY_SOLID or ECOND_SOLID

G(C) Electrical Conductivity in Solid. Available when solving for porous media with electric problems (electrochemistry in porous media)

ELECTRIC_POTENTIAL_SOLID or EL_POT_SOLID or ESTAT_POTENTIAL_SOLID

Electrical Potential in Solid. Available G(C) when solving for porous media with electric problems (electro-chemistry in porous media)

ELECTRIC_FIELD_X_SOLID or ESTAT_FIELD_X_SOLID

Electrical Field in X-direction (real) in Solid. Available when solving for porous media with electric problems (electro-chemistry in porous media)

G(C)

ELECTRIC_FIELD_Y_SOLID or ESTAT_FIELD_Y_SOLID

Electrical Field in Y-direction (real) in Solid. Available when solving for porous media with electric problems (electro-chemistry in porous media)

G(C)

ELECTRIC_FIELD_Z_SOLID or ESTAT_FIELD_Z_SOLID

Electrical Field in Z-direction (real) in Solid. Available when solving for porous media with electric problems (electro-chemistry in porous media)

G(C)

POROUS_LIN_RESIST_NORMAL

Linear Resistance Coefficient (Normal) G(C), S(C) for Permeability. Available when solving for Porous Media.

POROUS_LIN_RESIST_TANGENTIAL_1

Linear Resistance Coefficient (Tau1) for Permeability. Available when solving for Porous Media.

POROUS_LIN_RESIST_TANGENTIAL_2

Linear Resistance Coefficient (Tau2) G(C), S(C) for Permeability. Available when solving for Porous Media (3D cases).

POROUS_QUAD_RESIST_NORMAL

Quadratic Resistance Coefficient (Normal) for Permeability. Available when solving for Porous Media.

POROUS_QUAD_RESIST_TANGENTIAL_1 Quadratic Resistance Coefficient (Tau1) for Permeability. Available when solving for Porous Media.

210

G(C), S(C)

G(C), S(C)

G(C), S(C)

G(C), S(C)

User Subroutines

POROUS_QUAD_RESIST_TANGENTIAL_2 Quadratic Resistance Coefficient (Tau2) for Permeability. Available when solving for Porous Media (3D cases). WATER_SATURATION

G(C), S(C)

G(C) Water saturation. Available when solving for porous media with electrochemistry.

OTHERS GRAVITY_X

Gravity in x-direction. Available when S(single) solving for flow. You can set only single value in problem domain.

GRAVITY_Y

Gravity in y-direction. Available when S(single) solving for flow. You can set only single value in problem domain

GRAVITY_Z

Gravity in z-direction (only for 3D). Available when solving for flow. You can set only single value in problem domain

OMG_X

Omega X direction component. S(B) Available when solving for rotating wall BC.

OMG_Y

Omega Y direction component. S(B) Available when solving for rotating wall BC.

OMG_Z

Omega Z direction component. S(B) Available when solving for rotating wall BC.

S(single)

* User have to use set_vc_array routine for this variable, he cannot use set_value_one_cell for this. 1

C = Cell value, F = Face value, B = Boundary Face value, N = Node value, BN = Boundary Node value, S = Available for setting the value, G = Available for getting the value, single = A single constant value for whole domain.

2 3 4

Only for initial conditions Only for source terms Both initial conditions and source terms

211

CFD-ACE_V2008.2_User_Manual

5

For transport properties (viscosity, thermal conductivity, and diffusivity) when getting the value, you get effective property value ( laminar + turbulence). When setting the value for transport properties, you set the value for laminar property value. When solving the VOF or Two fluid problem, you get effective property value of both primary and secondary fluids in a cell.

User Subroutines Features-Utility Variables Utility Variables Token Name

1

Availability

Description

’XC’ or ’CELL_CENTER_X’

Cell Center X-Coordinate

G(C)

’YC’ or ’CELL_CENTER_Y’

Cell Center Y-Coordinate

G(C)

’ZC’ or ’CELL_CENTER_Z’

Cell Center Z-Coordinate. Available when solving a 3D geometry.

G(C)

’AREA’

Boundary face area

G(B), G(F)

’VOL’ or ’VOLUME’

Cell volume

G(C)

’WALL_DISTANCE’

Normal Distance from boundary face center to cell center.

G(B)

’WALL_SHEAR_STRESS’

Shear Stress at a boundary face. Available when solving G(B) for flow.

’SHEAR_STRESS’

Shear Stress at a cell center. Available when solving for G(C) flow.

’NX’ or ’NORMAL_X’

Boundary face normal in X-direction.

G(B)

’NY’ or ’NORMAL_Y’

Boundary face normal in Y-Direction.

G(B)

’NZ’ or ’NORMAL_Z’

Boundary face normal in Z-Direction. Available when solving a 3D geometry.

G(B)

’XF’ or ’FACE_CENTER_X’

Face Center X-Coordinate.

G(B), G(F)

’YF’ or ’FACE_CENTER_Y’

Face Center Y-Coordinate.

G(B), G(F)

’ZF’ or ’FACE_CENTER_Z’

Face Center Z-Coordinate. Available when solving a 3D G(B), G(F) geometry.

’X’ or NODE_X’

Node or Corner X-Coordinate.

G(N)

’Y’ or ’NODE_Y’

Node or Corner Y-Coordinate.

G(N)

’Z’ or ’NODE_Z’

Node or Corner Z-Coordinate. Available when solving a 3D geometry.

G(N)

’DEFORM_X’ or ’TFI_X’ or 'TFI_DISPLACEMENT_X'

Boundary Node X-Coordinate. Available when solving for G(BN), S(BN) Grid Deformation.

212

User Subroutines

’DEFORM_Y’ or 'TFI_Y' or 'TFI_COORDINATE_Y'

Boundary Node Y-Coordinate. Available when solving for G(BN), S(BN) Grid Deformation.

’DEFORM_Z’ or 'TFI_Z' or 'TFI_COORDINATE_Z'

Boundary Node Z-Coordinate. Available when solving for G(BN), S(BN) Grid Deformation.

’DEFORM_DX’ or 'TFI_DX' or 'TFI_DISPLACEMENT_DX'

Boundary Node Displacement in X-Direction. Available when solving for Grid Deformation.

S(BN)

’DEFORM_DY’ or 'TFI_DY' or 'TFI_DISPLACEMENT_DY'

Boundary Node Displacement in Y-Direction. Available when solving for Grid Deformation.

S(BN)

’DEFORM_DZ’ or 'TFI_DZ' or 'TFI_DISPLACEMENT_DZ'

Boundary Node Displacement in Z-Direction. Available when solving for Grid Deformation.

S(BN)

’DEFORM_U’ or 'TFI_U' or 'TFI_VELOCITY_U'

Boundary Node Velocity in X-Direction. Available when solving for Grid Deformation.

S(BN)

’DEFORM_V’ or 'TFI_V' or 'TFI_VELOCITY_V'

Boundary Node Velocity in Y-Direction. Available when solving for Grid Deformation.

S(BN)

’DEFORM_W’ or 'TFI_W' 'TFI_VELOCITY_W'

Boundary Node Velocity in Z-Direction. Available when solving for Grid Deformation.

S(BN)

’DEFORM_ROTATION_SPEED’ or 'TFI_ROTATION_SPEED'

Boundary Node Rotation Speed. Available when solving S(BN) for Grid Deformation.

’DEFORM_ROTATION_ANGLE’ or 'TFI_ROTATION_ANGLE'

Boundary Node Rotation Angle. Available when solving for Grid Deformation.

S(BN)

’’

For user defined parameters in CFD-ACE+

G(single), S(single)

1

C = Cell value, F = Face value, B = Boundary Face value, N = Node value, BN = Boundary Node value, S = Available for setting the value, G = Available for getting the value, single = A single constant value for whole domain.

2 3 4

Only for initial conditions Only for source terms Both initial conditions and source terms

5

For transport properties (viscosity, thermal conductivity, and diffusivity) when getting the value, you get effective property value (laminar + turbulence). When setting the value for transport properties, you set the value for laminar property value. When solving the VOF or Two fluid problem, you get effective property value of both primary and secondary fluids in a cell.

213

CFD-ACE_V2008.2_User_Manual

User Access Routines User Subroutines Introduction to User Access Routines User access routines are called from user subroutines to exchange information with the solver. Most routines are concerned with getting information from the solver; a few are related to setting quantities (e.g. properties, boundary values, and source terms). The table below lists all of the available user access routines and gives the prototype for calling these routines. Plain italic type indicates information that needs to be passed to the user access routine, bold italic type indicates information that the user access routine will return. To retain information from one iteration to the next, or if you want to pass information from one subroutine to another, you should define global variables in the module cfdrc_user. Be sure to include the variables as needed in each subroutine. Consider the example, get_var_index. The variable index does not change from iteration to iteration, so get it only once and store it in a global variable. This can save memory and run time. The User Access Routines section includes: •

General Purpose Routines



DTF Read/Write Routines



Boundary Condition Routines



Volume Condition Routines



Porous Media Volume Condition Routines



Unsteady Problem Routines



Moving Grid Routines



Grid Deformation Routines



Radiation Routines



Spray Routines



Grid Connectivity Routines

User Subroutines General Purpose Routines The following general purpose routines can be used in any of the user subroutines with proper inputs. For these routines, argument segments that you must provide are not bold, but the segments that are returned from CFD-ACE-Solver are bold.

214



get_var_index(var_name, var_index, error)



get_cells(ncells, error)



get_iteration(iteration, error)



get_cell_index(vc_index, x, y, z, cell_index, error)



get_value_one_cell(var_index, cell_index, value, error)



get_model_name(model_name, error)



user_info(user_option, user_string)



get_parameter_value(param_index, value, error)



get_mat_from_cell(cell_index, material_type, error)



get_model_details(model_name, geom_index, model_index,error)



get_module_index(module_name, module_index, solve_module, error)

User Subroutines



get_residual_value(var_index, value, error)

The following general purpose routines need to be used inside property subroutines: e.g., UCOND, UDENS, UDRHODP, UVISC, UCPH_FROM_T, UDIFF_SCALAR, UECOND, UEPERMITTIVITY, UECOLL_FREQUENCY •

get_active_cell_index(cell_index, error)



set_value_one_cell(var_index, cell_index, value, error)

The following general purpose routines need to be used inside USOURCE and UOUT subroutine: •

get_gradient(var_index, dphidx, dphidy, dphidz, ncells, error)



get_laplace(var_index, laplace_value, ncells, error)

The following general purpose routines need to be used only when solving for Mixing: •

get_num_compositions(n_compos, error)



get_num_species(n_species, error)



get_species_name(species_index, species_name, error)



get_species_mol_wt(var_index, mol_wt, error)

The following general purpose routines need to be used only when solving for Mixing and Chemical Reactions (Species Mass Fraction approach): •

get_mechanism_index(reaction_type, mechanism_name, mechanism_index, error)



get_reaction_step_index(reaction_type, mechanism_index, react_step_name, react_step_index, error)



set_reaction_rate_factor(rate_factor, error)

The following general purpose routine needs to be used inside the UGRAVITY subroutine: •

set_gravity(var_index, g, error)

The following general purpose routine needs to be used inside the UPARAMETER subroutine: •

set_parameter_value(param_index, value, error)

Get Variable Index Prototype get_var_index(var_name, var_index, error)

Description All user access routines refer to variables with an integer index var_index. This index can be available with the get_var_index routine by passing in a string containing the variable name.

A significant amount of overhead is incurred on some platforms when calling this routine. The best practice is to retrieve the variable index only once, the first time the user subroutines is called, and then to use that value thereafter.

Inputs CHARACTER(len=*) :: var_name

Returns

215

CFD-ACE_V2008.2_User_Manual

INTEGER(int_p) LOGICAL

:: var_index :: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Cells Prototype get_cells(ncells, error)

Description Returns the total number of cells in whole domain.

Inputs None

Returns INTEGER(int_p) LOGICAL

:: ncells :: error

Error Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Iteration Prototype get_iteration(iteration, error)

Description Returns the current iteration number.

Inputs None

Returns INTEGER(int_p) LOGICAL

:: iteration :: error

Error Error will be true if some error occurs and the proper error file. Back to Top

Get Cell Index Prototype get_cell_index(vc_index, x, y, z, cell_index, error)

216

message will be printed in the

User Subroutines

Description Returns global cell index corresponding to physical location of x, y and z. vc_index is an option, and is useful in reducing the search criteria. If the user does not know where x, y, z are located, vc_index should be set to zero. This indicates to the solver that the whole problem domain should be searched.

A significant amount of overhead is incurred on some platforms when calling this routine. The best practice is to retrieve the global cell index only once, the first time the user subroutine is called, and then to use that value thereafter.

Inputs INTEGER(int_p)

:: vc_index

REAL(real_p)

:: x, y, z

Returns INTEGER(int_p) LOGICAL

:: cell_index :: error

Error Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Value One Cell Prototype get_value_one_cell(var_index, cell_index, value, error)

Description Returns the cell center value, for a variable with index var_index at cell cell_index of the problem domain.

Inputs INTEGER(int_p)

:: var_index, cell_index

Returns REAL(real_p) LOGICAL

:: value :: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Model Name Prototype get_model_name(model_name, error)

Description Returns the model name for the present simulation being run by the solver.

217

CFD-ACE_V2008.2_User_Manual

Inputs None

Returns CHARACTER(len=*) LOGICAL

:: model_name :: error

Error Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

User Info Prototype user_info(user_option, user_string)

Description Writes messages contained in user_string to .out, an output file written by solver. You can use user_option to stop the solver. By using this option, solver removes .RUN file after stopping the solver. The options are described as: user_option = 0 code gives warning, and continue. user_option = 1 code gives error, and solver will stop. user_option = 2 writes information with a header. user_option >= 3 writes information without header.

Example:

WRITE(user_string, *) "user_data =", user_data_value CALL USER_INFO(user_option, user_string)

Inputs INTEGER(int_p)

:: user_option

CHARACTER(len=*)

:: user_string

Returns None

Error Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Parameter Value Prototype get_parameter_value(param_index, value, error)

218

User Subroutines

Description Returns the parameter value, value, defined in the CFD-ACE+ parametric window. This way user can communicate from CFD-ACE+ to the Solver and user subroutines. This can be used only for the constant expression values. The expression cannot be evaluated against any spatial coordinates. But you can use time and any other mathematical function if needed. The return value is always a real value.

param_index can be available by using get_var_index(), with var_name same as parameter name defined in CFD-ACE+.

Inputs INTEGER(int_p)

:: param_index

Returns REAL(real_p) :: value LOGICAL :: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Material from Cell Prototype get_mat_from_cell(cell_index, material_type, error)

Description Returns the material type, material_type, of cell index, cell_index. material_type, has following values.

Value

Material Type

0

Error in subroutine

1

Fluid

2

Solid

3

Blocked

Inputs INTEGER(int_p)

:: cell_index

INTEGER(int_p)

:: material_type

Returns

LOGICAL

:: error

219

CFD-ACE_V2008.2_User_Manual

Error Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Model Details Prototype get_model_details(model_name, geom_index, model_index, error)

Description Returns the model name, geom_index and model_index. model_name is the name of DTF file currently run by the solver. geom_index indicates the type of geometry currently run by the solver.

Value geom_index 1

3-D geometry.

2

2-D geometry.

3

2-D axisymmetric geometry.

model_index indicates the steady or unsteady options and new run or restart run options.

Value model_index 1

Steady state, new run problem.

2

Steady state, restart problem.

3

Transient, new run problem.

4

Transient, restart problem.

Inputs None

Returns CHARACTER(len=*)

:: model_name

INTEGER(int_p)

:: geom_index, model_index

LOGICAL

220

:: error

User Subroutines

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Module Index Prototype get_module_index(module_name, module_index, solve_module, error)

Description Returns the module_index, for a given module_name. Also returns, solve_module, if this module is currently being solved(1) or not(0) by the solver.

Inputs CHARACTER(len = *) :: module_name

Returns INTEGER(int_p)

:: module_index

INTEGER

:: solve_module

LOGICAL

:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Residual Value Prototype get_residual_value(var_index, value, error)

Description Returns the present residual for var_index

Inputs INTEGER(int_p)

:: var_index

Returns REAL(real_p)

:: value

LOGICAL

:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Process ID Prototype get_process_id(process_id, error)

Description

221

CFD-ACE_V2008.2_User_Manual

Returns the rank (process_id)of the current process.

Inputs None

Returns INTEGER(int_p) :: process_id LOGICAL :: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Active Cell Index Prototype get_active_cell_index(cell_index, error)

Descriptionss Returns the current or active cell index, cell_index, for which user subroutine is being processed. This routine should be used inside user subroutines UDENS, UDRHODP, UVISC, UCOND, UCPH_FROM_T, UDIFF_SCALAR, UECOND,UEPERMITIVITY.

Inputs None

Returns INTEGER(int_p) LOGICAL

:: cell_index :: error

Error Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Set Value One Cell Prototype set_value_one_cell(var_index, cell_index, value, error)

Description Sets the value of a variable, var_index, at a cell, cell_index. This routine should be used inside user subroutines UDENS, UDRHODP, UVISC, UCOND, UCPH_FROM_T, UDIFF_SCALAR, UECOND,UEPERMITIVITY.

Inputs INTEGER(int_p)

:: var_index, cell_index

REAL(real_p)

:: value

Returns LOGICAL

Error

222

:: error

User Subroutines

Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Gradient Prototype get_gradient(var_index, dphidx, dphidy, dphidz, ncells, error)

Description Calculates the gradient of the variable with index var_index, for every cell in the entire domain. These quantities are computed at cell centers. dphidx, dphidy, dphidz are real arrays with dimensions ncells. Presently this routine is available for U, V, W, Temperature, and user defined scalars.

Inputs INTEGER(int_p)

:: var_index, ncells

Returns REAL(real_p), DIMENSION(ncells):: dphidx, dphidy, dphidz LOGICAL

:: error

Error Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Laplace Prototype get_laplace(var_index, laplace_value, ncells, error)

Description Calculates the laplacian operator of the variable with index var_index, for every cell in the entire domain. These quantities are computed at cell centers. laplace_value is a real array with dimensions ncells. Presently this routine is available for U, V, W, Temperature, and user defined scalars.

Inputs INTEGER(int_p)

:: var_index, ncells

Returns REAL(real_p), DIMENSION(ncells):: laplace_value LOGICAL

:: error

Error Error will be true if some error occurs and the proper error file.

message will be printed in the

Back to Top

Get Number of Compositions Prototype get_num_compositions(n_compos, error)

Description

223

CFD-ACE_V2008.2_User_Manual

Returns the number of compositions or mixtures, n_compos, defined in the problem. This routine is available only if solving for mixture fractions.

Inputs None

Returns INTEGER(int_p) LOGICAL

:: n_compos :: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Number of Species Prototype get_num_species(n_species, error)

Description Returns the number of species, n_species, defined in the problem. This routine is available only if solving for chemistry.

Inputs None

Returns INTEGER(int_p) LOGICAL

:: n_species :: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Species Name Prototype get_species_name(species_index, species_name, error)

Description Returns the species name for a given species index, species_index. Value of species_index is between 1 and n_species returned by get_num_species routine. This routine is available only if solving for chemistry.

Inputs INTEGER(int_p)

:: species_index

Returns CHARACTER(len=20) :: species_name LOGICAL

Errors

224

:: error

User Subroutines

Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Species Molecular Weight Prototype get_species_mol_wt(var_index, mol_wt, error)

Description Returns the species molecular weight for given species variable index, var_index. This routine is available only if solving for mixture fractions.

Inputs INTEGER(int_p)

:: var_index

Returns REAL(real_p) LOGICAL

:: mol_wt :: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Reaction Mechanism Index Prototype get_mechanism_index(reaction_type, mechanism_name, mechanism_index, error)

Description Returns the mechanism_index, for a given mechanism_name, defined in CFD-ACE+ Reaction Manager or Surface Reaction Manager. reaction_type need to be used to indicate gas phase reaction (reaction_type = 1) or surface reaction (reaction_type = 2). This is available only when solving for species mass fractions. This routine should only be used inside UREACTION_RATE_FACTOR.

Inputs INTEGER(int_p):: reaction_type CHARACTER(len = *):: mechanism_name

Returns INTEGER(int_p):: mechanism_index LOGICAL:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Reaction Step Index Prototype get_reaction_step_index(reaction_type, mechanism_index, react_step_name, react_step_index, error)

Description

225

CFD-ACE_V2008.2_User_Manual

Returns the reaction step index, react_step_index, for a given reaction step name, react_step_name, for a given mechanism, mechanism_index, defined in CFD-ACE-GUI Reaction Manager or Surface Reaction Manager. reaction_type need to be used to indicate gas phase reaction (reaction_type = 1) or surface reaction (reaction_type = 2). This is available only when solving for species mass fractions. This routine should only be used inside UREACTION_RATE_FACTOR.

Inputs INTEGER(int_p):: reaction_type, mechanism_index CHARACTER(len = *):: react_step_name

Returns INTEGER(int_p):: react_step_index LOGICAL:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Set Reaction Rate Factor Prototype set_reaction_rate_factor(rate_factor, error)

Description Sets the user defined reaction rate factor, rate_factor. This factor is multiplies the to Reaction rate constants calculated by solver. If the user wants to switch off the reaction somewhere in the volume, they can do it by setting this rate factor to zero. This routine should only be used inside UREACTION_RATE_FACTOR.

Inputs REAL(real_p) :: rate_factor

Returns LOGICAL:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Set Gravity Prototype set_gravity(var_index, g, error)

Description Sets the Gravity in X, Y, and Z directions for the current time step. Gravity in Z-direction should be set only for 3-D problems. Variable index for Gravity in X, Y, and Z directions is available using GET_VAR_INDEX. For key words refer to Accessible Variable list (10-1). Note that this routine should be used inside UGRAVITY only.

Inputs INTEGER(int_p):: var_index REAL(real_p):: g

Returns LOGICAL:: error

226

User Subroutines

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Set Parameter Value Prototype set_parameter_value(param_index, value, error)

Description Sets the parameter value, value, for a given parameter index, param_index. Parameter index is available by using GET_VAR_INDEX with parameter name as variable name. This routine should only be used inside UPARAMETER subroutine.

Inputs INTEGER(int_p):: param_index REAL(real_p):: value

Returns LOGICAL:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

User Subroutines DTF Read/Write Routines For these routines, argument segments that you must provide are not bold, but the segments that are returned from CFD-ACE-SOLVER are bold. The following DTF Read/Write routines need to be used inside UREAD_DTF subroutine: •

get_cell_data_from_dtf(varname, ncells, cell_value, units, error)



get_nodal_data_from_dtf(var_name,n_nodes,node_value,user_units,dtf_file_option, error)



read_real_sim_data_from_dtf(var_name, arraySize, valueArray, user_units, error)

The following DTF Read/Write routines need to be used inside UWRITE_DTF subroutine: •

write_cell_data_to_dtf(varname, ncells, cell_value, units, error)



write_nodal_data_to_dtf(varname,ncells, cell_value, units, error)



write_nodal_solution_to_dtf(var_name, n_nodes, nodal_values, user_units, error)



write_real_sim_data_to_dtf(var_name, arraySize, valueArray, user_units, error)

Get Cell Data from DTF Prototype get_cell_data_from_dtf(var_name, n_cells, cell_value,units, error)

Description Get cell data, cell_value, from the DTF file. You need to supply size, n_cells, of the array which is the total number of cells in the problem domain. The variable name should be the same as that used to write the cell data to DTF file. This routine should only be used inside UREAD_DTF user subroutine.

227

CFD-ACE_V2008.2_User_Manual

Inputs CHARACTER(len=6):: var_name INTEGER(int_p):: n_cells CHARACTER(len=6):: units

Returns REAL(real_p), DIMENSION(n_cells):: cell_value LOGICAL:: error

Error Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Nodal Data from DTF Prototype get_nodal_data_from_dtf(var_name, n_nodes, node_value,user_units,dtf_file_option,error)

Description Obtain the cell data from DTF file

Inputs CHARACTER(len =*) :: var_name, user_units INTEGER (int_p) :: n_nodes, dtf_file_option

Returns REAL (real_p), dimension(n_nodes) :: node_value LOGICAL :: error

Error Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Read Real Simulation Data from DTF Prototype read_real_sim_data_from_dtf(var_name, arraySize, valueArray, user_units, error)

Description Read the simulation data from DTF file.

Inputs CHARACTER(len= *) :: var_name CHARACTER(len= *) :: user_units INTEGER(int_p):: arraySize, dtf_file_option

Returns REAL(real_p), DIMENSION(arraySize):: valueArray LOGICAL:: error

Errors

228

User Subroutines

Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Write Cell Data to DTF Prototype write_cell_data_to_dtf(var_name, n_cells, cell_value, units, error)

Description Writes cell data to the DTF file used by solver to run the problem. You need to supply cell center values, cell_value, for all the cells in the problem domain. Variable name can be any name of 6 characters. There is no checking done on the values that you supply.This routine should only be used inside UWRITE_DTF subroutine.

Inputs CHARACTER(len=6):: var_name INTEGER(int_p):: n_cells REAL(real_p), DIMENSION(n_cells):: cell_value CHARACTER(len=6):: units

Returns LOGICAL:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Write Nodal Data to DTF Prototype write_nodal_data_to_dtf(var_name, n_cells, cell_value, units, error)

Inputs CHARACTER(len=6):: var_name INTEGER(int_p):: n_cells REAL(real_p), DIMENSION(n_cells):: cell_value CHARACTER(len=6):: units

Returns LOGICAL:: error

Description Writes the nodal data to DTF file. You need to supply cell center values, cell_value, for all the cells in the problem domain. Program will convert cell center values to nodal values by using area weighted average. After writing nodal data, you can see the data in CFD-VIEW. The variable name can be any name of 6 characters. There is no checking done on the values you supply. This subroutine should only be used inside the UWRITE_DTF subroutine.

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Write Nodal Solution to DTF Prototype write_nodal_solution_to_dtf(var_name, n_nodes, nodal_values, user_units, error)

229

CFD-ACE_V2008.2_User_Manual

Description Write the nodal data to DTF file. Nodal values are set by user.

Inputs CHARACTER(len= *) :: var_name CHARACTER(len= *) :: user_units INTEGER(int_p):: n_nodes REAL(real_p), DIMENSION(n_nodes):: nodal_values

Returns LOGICAL:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Write Real Simulation Data to DTF Prototype write_real_sim_data_to_dtf(var_name, arraySize, valueArray, user_units, error)

Description Write the simulation data to DTF file.

Inputs CHARACTER(len= *) :: var_name CHARACTER(len= *) :: user_units INTEGER(int_p):: arraySize, dtf_file_option REAL(real_p), DIMENSION(arraySize):: valueArray

Returns LOGICAL:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

User Subroutines Boundary Condition Routines For these routines, argument segments that you must provide are not bold, but the segments that are returned from CFD-ACE-Solver are bold. The following Boundary Condition routines can be used in any of the user subroutines with proper inputs:

230



get_number_bcs(nbc_patches, error)



get_bc_index(bc_name, bc_index, error)



get_bc_name(bc_index, bc_name, error)



get_bc_info(bc_index, bc_type, bc_faces, error)



get_bc(bc_index, var_index, bc_faces, bc_value, error)



get_bc_cells(bc_index, bc_faces, bc_cell_index, error)

User Subroutines



get_bc_interface_cells(bc_index, nbc_faces, bc_cells1, bc_cells2, error)



get_bc_global_faces(bc_index, bc_faces, bc_face_index, error)



get_value_one_bc_face(bc_index, face_index, var_index, bc_value, error)



get_avg_value_one_bc_patch(bc_index, var_index, bc_value, error)



get_integral_value_one_bc_patch(bc_index, var_index, bc_value, error)



get_active_bc_face_index(face_index, error)



get_bc_subtype(module_index, bc_index, bc_subtype, error)



get_cyclic_face_pair_indices(bcFaceIndex, globalFace1, globalFace2, error)



get_cyclic_bc_face_pair_index(bcFaceIndex, cyclicFaceIndex, error)



get_bc_face_index_from_global(globalFaceIndex, bcFaceIndex, error)



get_bc_indices(bc_name, n_bcs, bc_index, error)



get_num_bcs_same_name(bc_name, n_bcs, error)



get_value_one_face(var_index, global_face_index, face_value, error)

The following Boundary Condition routine needs to be used inside the UBOUND subroutine: •

set_bc(value, error)



set_value_one_bc_face(global_face_index, var_index, value, error)

Get Number of BC Patches Prototype get_number_bcs(nbc_patches, error)

Description Returns the number of boundary condition patches, nbc_patches, in the domain. The boundary condition patches are numbered from 1 to the number of boundary condition patches in the model.

Inputs None

Returns INTEGER(int_p) LOGICAL

:: nbc_rec

:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get BC Index Prototype get_bc_index(bc_name, bc_index, error)

Description The user access routines and the UBOUND user subroutine refer to boundary conditions with an integer index bc_index. This index can be determined with the get_bc_index routine by passing in a string containing the boundary condition name, as you assigned in CFD-ACE+ or CFD-GEOM. The boundary condition name must be unique.

231

CFD-ACE_V2008.2_User_Manual

Inputs CHARACTER(len=*) :: bc_name

Returns INTEGER(int_p) LOGICAL

:: bc_index :: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get BC Name Prototype get_bc_name(bc_index, bc_name, error)

Description Returns the boundary condition name, bc_name, corresponding to boundary condition index, bc_index.

Inputs INTEGER(int_p)

:: bc_index

Returns CHARACTER(len=*) :: bc_name LOGICAL

:: error

Errors Errors will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get BC Info Prototype get_bc_info(bc_index, bc_type, nbc_faces, error)

Description Returns the boundary condition type and number of boundary faces, nbc_faces, on the boundary, bc_index. bc_type will have one of the following integer values. For any other boundary condition, bc_type will be -1.

232

Value

Boundary Condition Type

1

Any inlet type (BC_TYPE_INLET)

2

Wall (BC_TYPE_WALL)

3

Any outlet type (BC_TYPE_EXIT)

User Subroutines

4

Interface (BC_TYPE_INTERFACE)

5

Fluid-Fluid interface (BC_TYPE_F_F_INTERFACE)

6

Solid-Solid Interface (BC_TYPE_S_S_INTERFACE)

7

Solid-Fluid Interface (BC_TYPE_S_F_INTERFACE)

8

Fluid-Block Interface (BC_TYPE_F_B_INTERFACE)

9

Block-Block Interface (BC_TYPE_B_B_INTERFACE)

10

Solid-Block Interface (BC_TYPE_S_B_INTERFACE)

11

Symmetry (BC_TYPE_SYMM)

12

Cyclic (BC_TYPE_CYCLIC)

13

Thin Wall (BC_TYPE_THINWALL)

Inputs INTEGER(int_p)

:: bc_index

INTEGER(int_p)

:: bc_type, nbc_faces

Returns

LOGICAL

:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. All parameters defined in the parenthesis can also be found in the MODULE cfdrc_user of the user subroutine template file libUSserAce.f. Back to Top

Get BC Prototype get_bc(bc_index, var_index, nbc_faces, bc_value, error)

Description Returns the value of a variable, var_index, at each boundary face center of a boundary condition index, bc_index. The boundary face value, bc_value, is a real array with dimension nbc_faces.

Inputs

233

CFD-ACE_V2008.2_User_Manual

INTEGER(int_p)

:: bc_index, var_index, nbc_faces

Returns

REAL(real_p), LOGICAL

DIMENSION(nbc_faces):: bc_value

:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get BC Cells Prototype get_bc_cells(bc_index, nbc_faces, bc_cell_index, error)

Description Returns the global cell index for each boundary cell associated with the boundary, bc_index. The boundary cell index, bc_cell_index, is an array with dimension nbc_faces.

Inputs INTEGER(int_p)

:: bc_index, nbc_faces

Returns INTEGER(int_p), LOGICAL

DIMENSION(nbc_faces):: bc_cell_index

:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get BC Interface Cells Prototype get_bc_interface_cells(bc_index, nbc_faces, bc_cell_index1, bc_cell_index2, error)

Description Returns the global cell indices for each boundary face, on both sides of the interface boundary, bc_index. The boundary cell index, bc_cell_index1, and bc_cell_index2 is an array with dimension nbc_faces. For external boundaries both of these arrays contain same cell index.

Inputs INTEGER(int_p)

:: bc_index, nbc_faces

Returns INTEGER(int_p), DIMENSION(nbc_faces):: bc_cell_index1, bc_cell_index2 LOGICAL

:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file.

234

User Subroutines

Back to Top

Get BC Global Faces Prototype get_bc_global_faces(bc_index, nbc_faces, bc_face_index, error)

Description Returns the global face index for each boundary face associated with the boundary, bc_index. The boundary face index, bc_face_index, is an array with dimension nbc_faces.

Inputs INTEGER(int_p)

:: bc_index, nbc_faces

Returns INTEGER(int_p), DIMENSION(nbc_faces):: bc_face_index LOGICAL

:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Value One BC Face Prototype get_value_one_bc_face(bc_index, face_index, var_index, bc_value, error)

Description Returns the value, bc_value, of a variable, var_index, at boundary face center, face_index of a boundary, bc_index.

Inputs INTEGER(int_p)

:: bc_index, face_index, var_index

Returns REAL(real_p) LOGICAL

:: bc_value :: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Average Value of One BC Patch Prototype get_avg_value_one_bc_patch(bc_index, var_index, bc_value, error)

Description Returns the area averaged value, bc_value, of a variable, var_index, on a boundary, bc_index. All the variables, for which boundary values are available, can be used in this routine.

Inputs INTEGER(int_p)

:: bc_index, var_index

235

CFD-ACE_V2008.2_User_Manual

Returns REAL(real_p)

:: bc_value

LOGICAL

:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Integral Value of One BC Patch Prototype get_integral_value_one_bc_patch(bc_index, var_index, bc_value, error)

Inputs INTEGER(int_p)

:: bc_index, var_index

Returns REAL(real_p)

:: bc_value

LOGICAL

:: error

Description Returns the integral value, bc_value, of a variable, var_index, on a boundary, bc_index. You can use all the variables, for which boundary values are available, in this routine.

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Active BC Face Index Prototype get_active_bc_face_index(face_index, error)

Description Returns the active face index, face_index, of currently processing boundary by solver. This routine can be used in boundary related user subroutines. e.g., UBOUND, UEMISSIVITY_BC, and UREACTION_RATE_FACTOR for surface reactions.

Inputs None

Returns INTEGER(int_p) LOGICAL

:: face_index

:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get BC Subtype

236

User Subroutines

Prototype get_bc_subtype(module_index, bc_index, bc_subtype, error)

Description Returns the boundary condition subtype (bc_subtype) corresponding to the passed module index(module_index). The module index can be obtained from the routine get_module_index. Currently this routine works for flow, heat, electric and semi modules.

Inputs INTEGER(int_p) :: module_index, bc_index

Returns INTEGER(int_p) :: bc_subtype LOGICAL

:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Cyclic Face Pair Indices Prototype get_cyclic_face_pair_indices(bcFaceIndex, globalFace1, globalFace2, error)

Description Returns the boundary global face indices corresponding to cyclic bc faces.

Inputs INTEGER(int_p) :: bcFaceIndex

Returns INTEGER(int_p) :: globalFace1, globalFace2 LOGICAL

:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Cyclic BC Face Pair Index Prototype get_cyclic_bc_face_pair_index(bcFaceIndex, cyclicFaceIndex, error)

Description Returns the boundary face index corresponding to cyclic bc face index.

Inputs INTEGER(int_p) :: bcFaceIndex

Returns INTEGER(int_p) :: cyclicFaceIndex LOGICAL

:: error

237

CFD-ACE_V2008.2_User_Manual

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get BC Face Index from Global Prototype get_bc_face_index_from_global(globalFaceIndex, bcFaceIndex, error)

Description Returns the boundary face index corresponding to global face index.

Inputs INTEGER(int_p) :: globalFaceIndex

Returns INTEGER(int_p) :: bcFaceIndex LOGICAL

:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get BC Indices Prototype get_bc_indices(bc_name, n_bcs, bc_index, error)

Description To get all bc indices having a given bc name (bc_name).

Inputs INTEGER(int_p) :: n_bcs CHARACTER(len = *) :: bc_name

Returns INTEGER(int_p), dimension(n_bcs) :: bc_index LOGICAL

:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Number of BC's with Same Name Prototype get_num_bcs_same_name(bc_name, n_bcs, error)

Description To get all the number of bcs having a given bc name (bc_name)

238

User Subroutines

Inputs CHARACTER(len = *) :: bc_name

Returns INTEGER(int_p) :: n_bcs LOGICAL

:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Value One Face Prototype get_value_one_face(var_index, global_face_index, face_value, error)

Description Returns the face center value, value for a variable with index, var_index, for a face with the input global_face_index. Note that only the face area and face center coordinates are currently available.

Inputs INTEGER(int_p) :: var_index, global_face_index

Returns REAL(real_p) LOGICAL

:: face_value :: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Set BC Prototype set_bc(bc_value, error)

Description Sets the boundary face value, bc_value, at current boundary for which UBOUND subroutine is called. This subroutine must only be used inside UBOUND.

Inputs REAL(real_p)

:: bc_value

Returns LOGICAL

:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Set Value of One BC Face

239

CFD-ACE_V2008.2_User_Manual

Prototype set_value_one_bc_face(global_face_index, var_index, value, error)

Description Sets the value, bc_value, of a variable, var_index, at boundary face center, face_index of a boundary.

Inputs INTEGER(int_p)

:: global_face_index, var_index

REAL(real_p)

:: bc_value

Returns LOGICAL

:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

User Subroutines Volume Condition Routines For these routines, argument segments that you must provide are not bold, but the segments that are returned from CFD-ACE-Solver are bold. The following Volume Condition routines can be used in any of the user subroutines with proper inputs: •

get_number_vcs(n_vc_rec, error)



get_vc_index(vc_name, vc_index, error)



get_vc_name(vc_index, vc_name, error)



get_cells_vc(vc_index, vc_cells, error)



get_cell_index_from_vc(vc_cell_index, vc_index, cell_index, error)



get_vc_index_from_cell(cell_index, vc_index, error)



get_mat_from_vc(vc_index, material_type, error)



get_cell_value_array(var_index, n_cells, value_array, error)



get_vc_indices(vc_name, n_vcs, vc_index, error)



get_num_vcs_same_name(vc_name, n_vcs, error)

The following Volume Condition routine needs to be used inside UINIT subroutine: •

set_value_vc(vc_index, var_index, vc_cells, value, error)

The following Volume Condition routine needs to be used inside udiff_scalar subroutine: •

set_value_scalar_diff(var_index, cell_index, value, error)

The following Volume Condition routine needs to be used inside the USOURCE subroutine when adding a source term: •

add_source_term(vc_index, var_index, su, sp, vc_cells, error)

The following Volume Condition routine needs to be used inside u_moving_solid subroutine: •

set_speed_mvsolid(ux, vy, wz, error)

Get Number of VC's

240

User Subroutines

Prototype get_number_vcs(nvc_rec, error)

Description Returns the total number of volume conditions, nvc_rec, defined in the problem.

Inputs None

Returns INTEGER(int_p) LOGICAL

:: nvc_rec :: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get VC Index Prototype get_vc_index(vc_name, vc_index, error)

Description The user access routines and user subroutines refer to volume conditions with an integer index vc_index. This index can be determined with the get_vc_index routine by passing in a string containing the volume condition name, as assigned by the user in CFD-ACE+ or CFD-GEOM. This VC index is useful in property user subroutines, user source (USOURCE) subroutine, user defined initial conditions (UINIT) subroutine, and wherever the user needs to get information regarding volume conditions. The volume condition name must be unique.

Inputs CHARACTER(len=*) :: vc_name

Returns INTEGER(int_p) LOGICAL

:: vc_index :: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get VC Name Prototype get_vc_name(vc_index, vc_name, error)

Description Returns the volume condition name, vc_name, corresponding to volume condition index, vc_index.

Inputs INTEGER(int_p)

:: vc_index

Returns

241

CFD-ACE_V2008.2_User_Manual

CHARACTER(len=*) :: vc_name LOGICAL

:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Cells VC Prototype get_cells_vc(vc_index, nvc_cells, error)

Description Returns the number of cells, nvc_cells, inside a volume condition, vc_index.

Inputs INTEGER(int_p)

:: vc_index

INTEGER(int_p)

:: nvc_cells

Returns

LOGICAL

:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Cell Index from VC Prototype get_cell_index_from_vc(vc_cell_index, vc_index, cell_index, error)

Description Returns the global cell index, cell_index, corresponding to local cell index, vc_cell_index, inside a volume condition, vc_index. value of vc_cell_index must be between 1 and nvc_cells returned by get_cells_vc.

Inputs INTEGER(int_p)

:: vc_cell_index, vc_index

INTEGER(int_p)

:: cell_index

Returns

LOGICAL

:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get VC index from Cell Prototype get_vc_index_from_cell(cell_index, vc_index, error)

242

User Subroutines

Description Returns the volume condition index, vc_index, corresponding to global cell index, cell_index.

Inputs INTEGER(int_p)

:: cell_index

INTEGER(int_p)

:: vc_index

Returns

LOGICAL

:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Material from VC Prototype get_mat_from_vc(vc_index, material_type, error)

Description Returns the material type, material_type, of vc index, vc_index. material_type, has following values.

Value

Material Type

0

Error in Subroutine

1

Fluid

2

Solid

3

Blocked

Inputs INTEGER(int_p)

:: vc_index

INTEGER(int_p)

:: material_type

Returns

LOGICAL

:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Cell Value Array Prototype get_cell_value_array(var_index, n_cells, value_array, error)

Description

243

CFD-ACE_V2008.2_User_Manual

Return cell data array for var_index for n_cells (Total number of cells in entire domain)

Inputs INTEGER(int_p) :: var_index, n_cells

Returns REAL(real_p), DIMENSION(n_cells) :: value_array LOGICAL

:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get VC Indices Prototype get_vc_indices(vc_name, n_vcs, vc_index, error)

Description To get all vc indices having a given vc name (vc_name).

Inputs INTEGER(int_p) :: n_vcs CHARACTER(len=*) :: vc_name

Returns INTEGER(int_p), DIMENSION(n_vcs) :: vc_index LOGICAL

:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Number of VC's with Same Name Prototype get_num_vcs_same_name(vc_name, n_vcs, error)

Description To get all the number of vcs having a given vc name (vc_name)

Inputs CHARACTER(len=*) :: vc_name

Returns INTEGER(int_p) :: n_vcs LOGICAL

:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file.

244

User Subroutines

Back to Top

Set Value VC Prototype set_value_vc(vc_index, var_index, nvc_cells, value, error)

Description Sets the value of a variable, var_index, for whole volume condition, vc_index. value must be a real array with dimension nvc_cells, returned by get_cells_vc. This routine should only be used inside UINIT.

Inputs INTEGER(int_p)

:: vc_index, var_index, nvc_cells

REAL(real_p), DIMENSION(nvc_cells):: value

Returns LOGICAL

:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Set Value of Scalar Diffusivity Prototype set_value_scalar_diff(var_index, cell_index, value, error)

Description Sets the value of user scalar diffusivity at a cell center, cell_index for a given user scalar variable index, var_index. This routine should only be used inside UDIFF_SCALAR.

Inputs INTEGER(int_p)

:: var_index, cell_index

REAL(real_p)

:: value

Returns LOGICAL

:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Add Source Term Prototype add_source_term(vc_index, var_index, Su, Sp, nvc_cells, error)

Description This routine should be called from the USOURCE subroutine to add a current source term for a dependent variable with index, var_index to a volume condition, vc_index. Note that Su and Sp are real arrays with dimension nvc_cells, returned by get_cells_vc. The source term is calculated as: S = Su + Sp*phi, where phi is the value of the dependent variable for which USOURCE is called.

245

CFD-ACE_V2008.2_User_Manual

The source term specified is the absolute source term for the cell (as opposed to per unit volume or mass). The units of Su for a variable phi will be equal to the units of mass flow rate (kg/sec) times the units for phi. For example, the units of Su for velocity (momentum source) will be [kg/sec][m/sec], or newtons, the units of Su for enthalpy (energy source) will be [kg/sec][J/kg] or watts, and the units of Su for a unitless variable, such as mass fraction will be simply [kg/sec].

Inputs INTEGER(int_p)

:: vc_index, var_index, nvc_cells

REAL(real_p), DIMENSION(vc_cells) :: Su, Sp

Return Value LOGICAL

:: error

Errors Error will be true if some error occurs and the proper errormessage will be printed in the file.

Examples In CFD-ACE+ for generalized total source term, specify the coeff and value, where source is calculated as: S = coeff(value - phi)

To mimic this in user subroutines, specify: Su = coeff * value Sp = -coeff e.g., If you want to fix a temperature in a volume at 400.0K. Assume cp for this volume is 1000.0

In CFD-ACE+, specify the following: coeff = 1.0E10 value = 400.0 * 1000.0

In user subroutine you specify the following : Su = 1.0E10 * 400.0 * 1000.0 Sp = - 1.0E10 Back to Top

Set Speed of Moving Solid Prototype set_speed_mvsolid(ux, vy, wz, error)

Description Sets the moving solid velocity, components, ux, vy, wz inside a current volume condition for which U_MOVING_SOLID is called. This routine should only be used inside U_MOVING_SOLID.

246

User Subroutines

Inputs REAL(real_p)

:: ux, vy, wz

LOGICAL

:: error

Returns

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

User Subroutines Porous Media Volume Condition Routines For these routines, argument segments that you must provide are not bold, but the segments that are returned from CFD-ACE-Solver are bold. The following Porous Media Volume Condition routines can be used in any of the user subroutines with proper inputs: •

get_porous_info(vc_index, normal, tau1, tau2, linear, quadratic, error)



get_value_one_porous_cell(var_index, cell_index, value, error)

The following Porous Media Volume Condition routine needs to be used inside UPOROUS user subroutine: •

set_value_one_porous_cell(var_index, cell_index, value, error)

Get Porous Information Prototype get_porous_info(vc_index, normal, tau1, tau2, linear, quadratic, error)

Description Returns the porous media information for a given volume condition, vc_index. Remember that this particular volume condition should also be specified as porous media in CFD-ACE+. This routine returns, 3 directions in vector form, one normal direction, normal, two tangential directions, tau1, tau2. Also, two resistances in vector form, linear and quadratic.

Inputs INTEGER(int_p) :: vc_index

Returns REAL(real_p) LOGICAL

, DIMENSION(3) :: normal, tau1, tau2, linear, quadratic :: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Value One Porous Cell Prototype get_value_one_porous_cell(var_index, cell_index, value, error)

Description

247

CFD-ACE_V2008.2_User_Manual

Returns the cell center value inside porous media, value, for a variable with index var_index at cell cell_index of the problem domain. Use porous related routines for all porous media related properties and porosity .

Inputs INTEGER(int_p)

:: var_index, cell_index

Returns REAL(real_p)

:: value

LOGICAL

:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Set Value One Porous Cell Prototype set_value_one_porous_cell(var_index, cell_index, value, error)

Description Sets the cell center value inside porous media, value, of a variable, var_index, at a cell, cell_index. This routine should only be used inside user subroutine UPOROUS.

Inputs INTEGER(int_p) REAL(real_p)

:: var_index, cell_index :: value

Returns LOGICAL

:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

User Subroutines Unsteady Problem Routines For these routines, argument segments that you must provide are not bold, but the segments that are returned from CFD-ACE-Solver are bold. The following Unsteady Problem routines can be used in any of the user subroutines: •

get_time(time, time_step_no, error)



get_time_step(dt, error)



get_prev_time_value_one_cell(var_index, cell_index, value, error)



get_restart_time(time, nsteps, error)



get_max_time(max_time, error)

The following Unsteady Problem routine needs to be used inside UDT user subroutine:

248



set_time_step(dt, error)



set_max_time(max_time, error)

User Subroutines

Get Time Prototype get_time(time, time_step_no, error)

Description Returns the current time, time, and time step number, time_step_no.

Inputs None

Returns REAL(real_p)

:: time

INTEGER(int_p) LOGICAL

:: time_step_no

:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Time Step Prototype get_time_step(dt, error)

Description Returns the current time step size, dt

Inputs None

Returns REAL(real_p) LOGICAL

:: dt :: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Previous Time Value One Cell Prototype get_prev_time_value_one_cell(var_index, cell_index, value, error)

Description Returns the previous time step, cell center value, for a variable with index var_index at cell cell_index of the problem domain. This routine can only be used to retrieve the values of Solved Variables. For a list, see User Subroutines-Features-Solved Variables.

Inputs INTEGER(int_p)

:: var_index, cell_index

249

CFD-ACE_V2008.2_User_Manual

Returns REAL(real_p) LOGICAL

:: value :: error

Error Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Restart Time Prototype get_restart_time(time, time_step_no, error)

Description Returns the time (time) and time step number (ime_step_no) at which the restart simulation started.

Inputs None

Returns REAL(real_p)

:: time

INTEGER(int_p) :: time_step_no LOGICAL

:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Maximum Time Prototype get_max_time(max_time, error)

Description Returns the maximum time (max_time) for auto time step problems.

Inputs None

Returns REAL(real_p)

:: max_time

LOGICAL

:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Set Time Step

250

User Subroutines

Prototype set_time_step(dt, error)

Description Sets the time step size, dt, for current time step. This routine should only be used inside UDT.

Input REAL(real_p)

:: dt

Returns LOGICAL

:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Set Maximum Time Prototype set_max_time(max_time, error)

Description Sets the maximum time (max_time) for auto time step problems.

Inputs REAL(real_p)

:: max_time

LOGICAL

:: error

Returns

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

User Subroutines Grid Deformation Routines For these routines, argument segments that you must provide are not bold, but the segments that are returned from CFD-ACE-Solver are bold. The following Grid Deformation routines need to be used when solving for Moving Grid problems and inside UDEFORM_BC subroutine: •

get_bc_node_info(bc_index, nbc_nodes, error)



get_bc_global_nodes(bc_index, nbc_nodes, bc_nodes, error)



get_value_one_node(time_option, node_index, var_index, node_value, error)



set_value_one_node(node_index, var_index, node_value, error)

Get BC Node Information Prototype get_bc_node_info(bc_index, nbc_nodes, error)

Description

251

CFD-ACE_V2008.2_User_Manual

Returns the total number of bc nodes, nbc_nodes, for a given boundary index, bc_index. This can be used to allocate memory for arrays to get the global indices corresponding to local indices. This routine should only be used inside UDEFORM_BC user subroutine.

Inputs INTEGER(int_p):: bc_index

Returns INTEGER(int_p):: nbc_nodes LOGICAL:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get BC Global Nodes Prototype get_bc_global_nodes(bc_index, nbc_nodes, bc_nodes, error)

Description Returns the global node indices corresponding to local indices, in a array, bc_nodes, for a given boundary, bc_index. The size of array bc_nodes, should be exactly equal to the total number of nodes, nbc_nodes, for this boundary index. This is available using get_bc_node_info(). This routine should only be used inside UDEFORM_BC user subroutine.

Inputs INTEGER(int_p):: bc_index, nbc_nodes

Returns INTEGER(int_p), DIMENSION(n_cells):: bc_nodes LOGICAL:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Value of One Node Prototype get_value_one_node(time_option, node_index, var_index, node_value, error)

Description Returns the nodal value, node_value, for a given variable, var_index and for given global node index, node_index. This can be used for DEFORM_X, DEFORM_Y, and DEFORM_Z variables. Time option indicates, current, previous or original coordinates. This routine should only be used inside UDEFORM_BC.

Inputs INTEGER(int_p):: time_option, node_index, var_index

Returns REAL(real_p) :: node_value LOGICAL:: error

252

User Subroutines

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Set Value of One Node Prototype set_value_one_node(node_index, var_index, node_value, error)

Description Sets the new nodal coordinate value, node_value, for a given variable, var_index, and for a given node, node_index. This can be used to set the values for deforming grid for variables, such as displacement, velocity, coordinate motion and rotation angle, and rotation speed. This routine should only be used inside UDEFORM_BC.

Inputs INTEGER(int_p):: node_index, var_index REAL(real_p) :: node_value

Returns LOGICAL:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

User Subroutines Moving Grid Routines For these routines, argument segments that you must provide are not bold, but the segments that are returned from CFD-ACE-Solver are bold. The following Moving Grid routines need to be used when solving for Moving Grid problems and inside UGRID subroutine: •

get_zone_index(zone_name, zone_index, error)



get_num_nodes_unstr_zone(zone_index, nodes, error)



get_value_corner_unstr_zone(zone_index, time_option, nodes, x, y, z, error)



get_num_nodes_str_zone(zone_index, imax, jmax, kmax, error)



get_value_corner_str_zone(zone_index, time_option, imax, jmax, kmax, x, y, z, error)



set_value_corner_unstr_zone(zone_index, nodes, x, y, z, error)



set_value_corner_str_zone(zone_index, imax, jmax, kmax, x, y, z, error)

Get Zone Index Prototype get_zone_index(zone_name, zone_index, error)

Description

253

CFD-ACE_V2008.2_User_Manual

UGRID subroutine refers to volume conditions with an integer index, zone_index. This index can be determined with the get_zone_index routine by passing in a string containing the volume condition name, that you assign in CFD-ACE+ or CFD-GEOM. The volume condition name must be unique.

The zone_name is the same as the volume name defined in CFD-ACE+ or CFD-GEOM.

The zone_index should be used only for moving grid related user access routines and inside UGRID only.

Inputs CHARACTER(len=*) :: zone_name

Returns INTEGER(int_p) LOGICAL

:: zone_index :: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Number of Nodes in an Unstructured Zone Prototype get_num_nodes_unstr_zone(zone_index, nodes, error)

Description Returns the number of nodes, nodes, inside an unstructured zone, zone_index. This routine should only be used inside UGRID.

Inputs INTEGER(int_p)

:: zone_index

INTEGER(int_p)

:: nodes

Returns

LOGICAL

:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Value of Unstructured Zone Corner Nodes Prototype get_value_corner_unstr_zone(zone_index, time_option, nodes, x, y, z, error)

Description Returns the corner or node coordinates (x, y, z) in zone, zone_index, at given time option, time_option. The time option has the following integer values. x, y, and z are real arrays with dimension nodes. This routine should only be used inside UGRID. For 2D problems, the z coordinate is zero.

254

User Subroutines

Value

Option

0

Original (1st time step) coordinates.

1

Previous time step coordinates.

2

Current time step coordinates.

Inputs INTEGER(int_p)

:: zone_index, time_option, nodes

Returns REAL(real_p), DIMENSION(nodes):: x, y, z LOGICAL

:: error

Errors

Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Number of Nodes in a Structured Zone Prototype get_num_nodes_str_zone(zone_index, imax, jmax, kmax, error)

Description Returns maximum nodes in i, j, k directions in a structured zone, zone_index. This routine should only be used inside UGRID. This routine should be used for structured zones only.

Inputs INTEGER(int_p)

:: zone_index

INTEGER(int_p)

:: imax, jmax, kmax

Returns

LOGICAL

:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Value of Structured Zone Corner Nodes Prototype get_value_corner_str_zone(zone_index, time_option, imax, jmax, kmax, x, y, z, error)

Description

255

CFD-ACE_V2008.2_User_Manual

Returns the corner or node coordinates in a zone, zone_index, for a given time option, time_option. x, y, and z are 3D real arrays with dimensions (imax, jmax, kmax). This routine should only be used inside UGRID. This routine should only be used for structured zones. For 2D, kmax should be 1 and z will be zero. The time option has the following integer values.

Value

Option

0

Original (1st time step) coordinates.

1

Previous time step coordinates.

2

Current time step coordinates.

Inputs INTEGER(int_p) :: zone_index, time_option, imax, jmax, kmax

Returns REAL(real_p), DIMENSION(imax, jmax, kmax) :: x, y, z LOGICAL

:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Set Value of Corner Nodes for an Unstructured Zone Prototype set_value_corner_unstr_zone(zone_index, nodes, x, y, z, error)

Description Assigns the new set of coordinates for the nodes or corners in a zone, zone_index. x, y, and z are real arrays with dimension nodes. This routine should only be used inside UGRID. For 2D problems, z coordinate is zero.

Inputs INTEGER(int_p)

:: zone_index, nodes

REAL(real_p), DIMENSION(nodes):: x, y, z

Returns LOGICAL

:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Set Value of Corner Nodes for a Structured Zone Prototype set_value_corner_str_zone(zone_index, imax, jmax, kmax, x, y, z, error)

256

User Subroutines

Description Sets the new coordinates for all corners or nodes in a zone, zone_index. This routine should only be used inside UGRID. This routine should only be used for structured zones. For 2D, kmax should be 1 and z should be zero.

Inputs INTEGER(int_p) x, y, z

:: zone_index, imax, jmax, kmax REAL(real_p), DIMENSION(imax, jmax, kmax)::

Returns LOGICAL

:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

User Subroutines Radiation Routines For these routines, argument segments that you must provide are not bold, but the segments that are returned from CFD-ACE-Solver are bold. The following Radiation routines need to be used when solving for Radiation problems and inside UABSORPTION_COEF or UEMISSIVITY_BC subroutines. •

get_radiation_model_info(rad_model, gray_radiation, nbands, error)



get_radiation_band_info(nbands, lwavelength, uwavelength, error)



get_value_cell_absorbtivity(cell_index, band_no, value, error)



get_value_bc_face_emissivity(bc_index, face_index, band_no, bc_value, error)



get_value_bc_emissivity(bc_index, band_no, nbc_faces, bc_value, error)

The following Radiation routines need to be used when solving for Radiation problems and inside UABSORPTION_COEF subroutine: •

set_value_cell_absorption_coef(cell_index, band_no, value, error)

The following Radiation routines need to be used when solving for Radiation problems and inside UEMISSIVITY_BC subroutine: •

set_value_bc_face_emissivity(bc_index, face_index, band_no, bc_value, error)

Get Radiation Model Information Prototype get_radiation_model_info(rad_model, gray_radiation, nbands, error)

Description Returns the radiation model information currently run by solver. Also, returns a logical, gray_radiation, indicating whether the current model is gray radiation(true) or non gray radiation(false). nbands, indicates the no of bands in non gray radiation model, defined in radiation model window of CFD-ACE+. For gray radiation model, nbands is 1.

Inputs None

Returns INTEGER(int_p)

:: rad_model, nbands

257

CFD-ACE_V2008.2_User_Manual

LOGICAL :: gray_radiation LOGICAL

:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Radiation Band Information Prototype get_radiation_band_info(nbands, lwavelength, uwavelength, error)

Description Returns the lower wavelength, lwavelength, and upper wavelengths, uwavelength, for each band defined in radiation model window of CFD-ACE+. This routine should be used for non gray radiation model. For gray radiation model, only one band exists with lower wavelength as 0, and upper wavelength as 1.0E20. For non gray radiation model, lower wavelength of first band is set to zero and upper wavelength of last band is set to 1.0E20. lwavelength and uwavelength are arrays of dimension, nbands.

Inputs INTEGER(int_p)

:: nbands

Returns REAL(real_p), DIMENSION(nbands) LOGICAL

:: lwavelength, uwavelength

:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Value of Cell Absorptivity Prototype get_value_cell_absorbtivity(cell_index, band_no, value, error)

Description Returns cell center absorbtivity value, value, at cell, cell_index, for a given band, band_no. For gray radiation band_no should be 1 and for non gray radiation band no should be between 1 and no of bands defined in radiation window of CFD-ACE+.

Inputs INTEGER(int_p)

:: cell_index, band_no

Returns REAL(real_p)

:: value

LOGICAL :: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

258

User Subroutines

Get Value of BC Face Emissivity Prototype get_value_bc_face_emissivity(bc_index, face_index, band_no, bc_value, error)

Description Returns emissivity value, bc_value, for a single bc face, with face_index, on a given bc, bc_index for a given band, band_no. For gray radiation band_no should be 1 and for non gray radiation band no should be between 1 and no of bands defined in radiation window of CFD-ACE+.

Inputs INTEGER(int_p)

:: bc_index, face_index, band_no

Returns REAL(real_p)

:: bc_value

LOGICAL

:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Value of BC Emissivity Prototype get_value_bc_emissivity(bc_index, band_no, nbc_faces, bc_value, error)

Description Returns emissivity value, bc_value, for a whole bc patch, bc_index and for a given band, band_no. For gray radiation band_no should be 1 and for non gray radiation band no should be between 1 and no of bands defined in radiation window of CFD-ACE+.

Inputs INTEGER(int_p)

:: bc_index, band_no, nbc_faces

Returns REAL(real_p), DIMENSION(nbc_faces) LOGICAL

:: bc_value

:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Set Cell Value of Cell Absorption Coefficient Prototype set_value_cell_absorption_coef(cell_index, band_no, value, error)

Description Sets the absorptivity value, value, for a given band, band_no in a cell, cell_index. This routine should only be used inside UABSORPTION_COEF. For gray radiation band_no should be 1 and for non gray radiation band no should be between 1 and no of bands defined in radiation window of CFDACE+.

Inputs

259

CFD-ACE_V2008.2_User_Manual

INTEGER(int_p)

:: cell_index, band_no

REAL(real_p) :: value

Returns LOGICAL

:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Set Value of BC Face Emissivity Prototype set_value_bc_face_emissivity(bc_index, face_index, band_no, bc_value, error)

Description Sets the emissivity value, bc_value, for a given band, band_no, on a given single bc face, face_index, at a bc, bc_index. This routine should only be used inside UEMISSIVITY_BC. For gray radiation band_no should be 1 and for non gray radiation band no should be between 1 and no of bands defined in radiation window of CFD-ACE+.

Inputs INTEGER(int_p)

:: bc_index, face_index, band_no

REAL(real_p) :: bc_value

Returns LOGICAL :: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

User Subroutines Spray Routines For these routines, argument segments that you must provide are not bold, but the segments that are returned from CFD-ACE-Solver are bold. The following Spray routines can be used in any of the user subroutines with proper inputs:

260



get_spr_species_index(name, sp_index, phase_index, error)



get_injector_index(name, inj_id, pcl_id_start, pcl_id_end, error)



get_num_injector(n_inj, n_pcl, error)



get_injector_val(inj_id, x, y, z, u, v, w, mean_dia, tem, mdot, error)



get_parcel_val(pcl_id, x, y, z, u, v, w, dia, tem, nden, error)



get_cur_spray_time(time, spray_dt, error)



get_cur_drop_state(cell_id, x, y, z, u, v, w, tem, dia, nden, error)



get_cur_drop_prop(density, cp, hvap, psat, mfsurf, error)



get_cur_drop_ndparams(cd, rey, nusl, sher, spal, error)



get_cur_gas_state(ug, vg, wg, deng, presg, temg, error)

User Subroutines



get_cur_gas_prop(cpg, dvis, cond, diff, mfinf, prdt, schm, lews, mach, mwtg,error)



get_num_sub_iter(num_sub_iter, error)



set_parcel_val(pcl_id, x, y, z, u, v, w, dia, tem, nden, error)



set_num_sub_iter(num_sub_iter, error)



set_cur_drop_density(density, error)



set_cur_drop_cp(cp, error)



set_cur_drop_psat(psat, error)



set_cur_drop_hvap(hvap, error)



set_cur_drop_param_drag(drag_coef, error)



set_cur_drop_param_nusl(nusl, error)



set_cur_drop_param_sher(sher, error)



set_cur_drop_mom_source(source_x, source_y, source_z, error)



set_cur_drop_energy_source(source_value, error)



set_cur_drop_mass_source(source_value, error)



set_spray_dt(dt_spray, error)

Get Spray Species Index Prototype get_spr_species_index(name, sp_index, phase_index, error)

Description The index of the spray species can be obtained from a call to this routine. This index will be needed in calculating species properties as well as in other user subroutines. name is the name of the spray species as defined in the CFD-ACE+ (when specifying injectors). sp_index is the spray species index. phase_index is phase index of spray species, 1 - liquid, 2 - solid.

Use this routine instead of get_var_index when the spray model is on (do not try to access spray species using get_var_index of ).

Inputs CHARACTER(len=*):: name

Returns INTEGER(int_p) :: sp_index, phase_index LOGICAL

:: error

Errors Error will be set to TRUE if something goes wrong.

Back to Top Get Injector Index Prototype get_injector_index(name, inj_id, pcl_id_start, pcl_id_end, error)

261

CFD-ACE_V2008.2_User_Manual

Description The index of the spray injectors and parcels can be obtained from this routine. These indices will be needed for modifying the injector and parcel properties. name is the name of the spray injector as defined in the CFD-ACE+. inj_id is the index of the injector. pcl_id_start, pcl_id_end are the starting and ending indices of parcels.

Inputs CHARACTER(len=*):: name

Returns INTEGER(int_p) :: inj_id INTEGER(int_p) :: pcl_id_start, pcl_id_end LOGICAL

:: error

Errors Error will be set to TRUE if something goes wrong

Back to Top Get Number of Injectors Prototype get_num_injector(n_inj, n_pcl, error)

Description The number of injectors and parcels specified in this problem can be obtained from this subroutine call. These may be needed when looping through all the injectors. n_inj and n_pcl are the number of injectors and number of parcels specified from the CFD-ACE+. The number of parcels is calculated by the code from the size and velocity specifications.

Inputs None

Returns INTEGER(int_p) :: n_inj, n_pcl LOGICAL

:: error

Errors Error will be set to TRUE if something goes wrong.

Back to Top Get Injector Value Prototype get_injector_val(inj_id, x, y, z, u, v, w, mean_dia, tem, mdot, error)

Description The subroutine could be used to get the properties of the injector. inj_id is Injector id obtained from call to get_injector_index. x, y, z are injector location coordinates in meters. u, v, w are droplet velocity 2. components in m/s mean_dia, tem, mdot are geometric mean diameter (m), temperature (K), and flow rate of droplets (1/s)

Inputs INTEGER(int_p) :: inj_id

Returns

262

User Subroutines

REAL(real_p) :: x, y, z REAL(real_p) :: u, v, w REAL(real_p) :: mean_dia, tem, mdot LOGICAL

:: error

Errors Error will be set to TRUE if something goes wrong. Back to Top

Get Parcel Value Prototype get_parcel_val(pcl_id, x, y, z, u, v, w, dia, tem, nden, error)

Description The subroutine could be used to get the properties of the Drop Parcels. pcl_id is Parcel id obtained from call to get_injector_index. x, y, z are parcel location coordinates in meters. u, v, w are droplet velocity 2. components in m/s dia, tem, nden are geometric diameter (m), temperature (K), and number flow rate (1/s) of current parcel.

Inputs INTEGER(int_p) :: pcl_id

Returns REAL(real_p) :: x, y, z REAL(real_p) :: u, v, w REAL(real_p) :: dia, tem, nden LOGICAL

:: error

Errors Error will be set to TRUE if something goes wrong Back to Top

Get Current Spray Time Prototype get_cur_spray_time(time, spray_dt, error)

Description The subroutine could be used to get the spray time and time step. time is the current droplet time in seconds. spray_dt is the current spray time step.

Inputs None

Returns REAL(real_p) :: time, spray_dt LOGICAL

:: error

Errors Error will be set to TRUE if something goes wrong.

263

CFD-ACE_V2008.2_User_Manual

Back to Top

Get Current Droplet State Prototype get_cur_drop_state(cell_id, x, y, z, u, v, w, tem, dia, nden, error)

Description The subroutine gets the current state of the Drop Parcel. cell_id is cell at which the current droplet resides. 2. x, y, z are injector location coordinates in meters. u, v, w are droplet velocity components in m/s tem, dia, nden are temperature (K), diameter (m), and number flow rate (1/s) of the current parcel.

Inputs None

Returns INTEGER(int_p):: cell_id REAL(real_p)

:: x, y, z

REAL(real_p)

:: u, v, w

REAL(real_p)

:: tem, dia, nden

LOGICAL

:: error

Errors Error will be set to TRUE if something goes wrong. Back to Top

Get Current Droplet Properties Prototype get_cur_drop_prop(density, cp, hvap, psat, mfsurf, error)

Description The subroutine could be used to get the current properties of the Drop Parcel. density, cp and hvap are density, specific heat at constant pressure, and heat of vaporization. psat is saturation pressure at current drop temperature. mfsurf is mass fraction of vapor at droplet surface.

Inputs None

Returns REAL(real_p) :: density, cp, hvap REAL(real_p) :: psat REAL(real_p) :: mfsurf LOGICAL

:: error

Errors Error will be set to TRUE if something goes wrong Back to Top

Get Current Droplet Non-Dimensional Parameters

264

User Subroutines

Prototype get_cur_drop_ndparams(cd, rey, nusl, sher, spal, error)

Description The subroutine could be used to get the current non-dimensional numbers evaluated for the Drop Parcel. cd and rey are the drag coefficient and droplet Reynolds number. nusl, sher, and spal are the Nusselt number, Sherwood number and Spalding (mass transfer) number

Inputs None

Returns REAL(real_p) :: cd, rey REAL(real_p) :: nusl, sher, spal LOGICAL

:: error

Errors Error will be set to TRUE if something goes wrong. Back to Top

Get Current Gas State Prototype get_cur_gas_state(ug, vg, wg, deng, presg, temg, error)

Description The subroutine could be used to get the state of the ambient fluid. ug, vg, and wg are the ambient fluid 2. velocity components in m/s deng, presg, and temg are the Density, pressure, and temperature of ambient fluid.

Inputs None

Returns REAL(real_p) :: ug, vg, wg REAL(real_p) :: deng, presg, temg LOGICAL

:: error

Errors Error will be set to TRUE if something goes wrong. Back to Top

Get Current Gas Properties Prototype get_cur_gas_prop(cpg, vis, cond, diff, mfinf, prdt, schm, lews, mach, mwtg, error)

Description The subroutine could be used to get the properties of the ambient fluid. cpg, and dvis are Specific heat at constant pressure and dynamic viscosity of ambient fluid. cond, and diff are conductivity and diffusion coefficient of ambient fluid . mfinf is the mass fraction of vapor in the cell. prdt, schm, and lews are the Prandtl number, Schmidt number and Lewis number of ambient fluid. mach, and mwtg are Mach number and molecular weight of ambient fluid.

265

CFD-ACE_V2008.2_User_Manual

Inputs None

Returns REAL(real_p) :: cpg, vis REAL(real_p) :: cond, diff REAL(real_p) :: mfinf REAL(real_p) :: prdt, schm, lews REAL(real_p) :: mach, mwtg LOGICAL

:: error

Errors Error will be set to TRUE if something goes wrong Back to Top

Get Number of Sub-Iterations Prototype set_num_sub_iter(num_sub_iter, error)

Description Sets the number of sub iterations num_sub_iter, used for spray calculations.

Inputs INTEGER(int_p):: num_sub_iter

Returns LOGICAL:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Set Parcel Value Prototype set_parcel_val(pcl_id, x, y, z, u, v, w, dia, tem, nden, error)

Description The subroutine could be used to set the properties of the Drop Parcels. pcl_id is Parcel id obtained from call to get_injector_index. x, y, z are parcel location coordinates in meters. u, v, w are droplet 2. velocity components in m/s dia, tem, nden are geometric diameter (m), temperature (K), and number flow rate (1/s) of current parcel.

Inputs INTEGER(int_p) :: pcl_id REAL(real_p) :: x, y, z REAL(real_p) :: u, v, w REAL(real_p) :: dia, tem, nden

266

User Subroutines

Returns LOGICAL

:: error

Errors Error will be set to TRUE if something goes wrong. Back to Top

Set Number of Sub-Iterations Prototype set_num_sub_iter(num_sub_iter, error)

Description Sets the number of sub iterations num_sub_iter, used for spray calculations.

Inputs INTEGER(int_p):: num_sub_iter

Returns LOGICAL:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Set Current Droplet Density Prototype set_cur_drop_density(density, error)

Description Sets the current drop density, density.

Inputs REAL(real_p) :: density

Returns LOGICAL:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Set Current Droplet Specific Heat Prototype set_cur_drop_cp(cp, error)

Description Sets the current drop specific heat, cp.

Inputs REAL(real_p) :: cp

267

CFD-ACE_V2008.2_User_Manual

Returns LOGICAL:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Set Current Droplet Saturation Pressure Prototype set_cur_drop_psat(psat, error)

Description Sets the current drop saturation pressure, psat.

Inputs REAL(real_p) :: psat

Returns LOGICAL:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Set Current Droplet Heat of Vaporization Prototype set_cur_drop_hvap(hvap, error)

Description Sets the current drop heat of vaporization, hvap.

Inputs REAL(real_p) :: hvap

Returns LOGICAL:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Set Current Droplet Drag Coefficient Prototype set_cur_drop_param_drag(drag_coef, error)

Description Sets the current drop drag coefficient, drag_coef.

Inputs

268

User Subroutines

REAL(real_p) :: drag_coef

Returns LOGICAL:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Set Current Droplet Nusselt Number Prototype set_cur_drop_param_nusl(nusl, error)

Description Sets the current drop Nusselt number, nusl.

Inputs REAL(real_p) :: nusl

Returns LOGICAL:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Set Current Droplet Sherwood Number Prototype set_cur_drop_param_sher(sher, error)

Description Sets the current drop Sherwood number, sher.

Inputs REAL(real_p) :: sher

Returns LOGICAL:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Set Current Droplet Momentum Source Prototype set_cur_drop_mom_source(source_x, source_y, source_z, error)

Description Sets the current drop Momentum Source

269

CFD-ACE_V2008.2_User_Manual

Inputs REAL(real_p) :: source_x, source_y, source_z

Returns LOGICAL:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Set Current Droplet Energy Source Prototype set_cur_drop_energy_source(source_value, error)

Description Sets the current drop Energy Source

Inputs REAL(real_p) :: source_value

Returns LOGICAL:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Set Current Droplet Mass Source Prototype set_cur_drop_mass_source(source_value, error)

Description Sets the current drop Mass Source

Inputs REAL(real_p) :: source_value

Returns LOGICAL:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Set Spray Time Step Prototype set_spray_dt(dt_spray, error)

Description

270

User Subroutines

Sets the user defined spray time step

Inputs REAL(real_p) :: dt_spray

Returns LOGICAL:: error

Errors Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

User Subroutines Grid Connectivity Routines The following grid connectivity routines can be used in any of the user subroutines with proper inputs. For these routines, argument segments that you must provide are not bold, but the segments that are returned from CFD-ACE-Solver are bold. •

get_num_cell_types(num_cell_types, error)



get_num_cells_by_type(cell_type, ncells, error)



get_global_cell_by_type(cell_type, cell_index, global_cell, error)



get_cell_type(cell_index, cell_type, error)



get_num_cell_faces(cell_index, ncell_faces, error)



get_cell_faces(cell_index, ncell_faces, cell_faces, error)



get_num_cell_nodes(cell_index, ncell_nodes, error)



get_cell_nodes(cell_index, ncell_nodes, cell_nodes, error)



get_num_face_types(num_face_types, error)



get_num_faces_by_type(face_type, nfaces, error)



get_num_faces(nfaces, error)



get_face_type(face_index, face_type, error)



get_num_face_nodes(face_index, nface_nodes, error)



get_face_nodes(face_index, nface_nodes, face_nodes, error)



get_face_cells(face_index, cell_index1, cell_index2, error)



get_num_nodes(nnodes, error)



get_num_bc_faces(nbc_faces, error)



get_bc_type(bc_face_index, bc_type, error)



get_bc_cell_index(bc_face_index, bc_cell_index, error)



get_global_face_index(bc_face_index, global_face_index, error)



get_bc_record_index(bc_face_index, bc_record_index, error)



get_bc_patch_key(bc_face_index, bc_patch_key, error)



get_num_bc_nodes(nbc_nodes, error)



get_global_node_index(bc_node_index, global_node_index, error)



get_bc_node_index(global_node_index, bc_node_index, error)



get_cell_group_index(global_cell_index, cell_group_index, error)

271

CFD-ACE_V2008.2_User_Manual



get_num_bc_faces_by_type(flag, nbc_faces, error)



get_nodal_value_array(var_index, n_nodes, value_array, error)



get_cyclic_node_pair_index(nodeIndex, cyclicNodeIndex, error)

Get Number of Cell Types Prototype get_num_cell_types(num_cell_types, error)

Description Returns the total number of cell types (num_cell_types) in the user's model. A cell type is the shape of the grid cell, e.g. quadrilateral or triangle (in 2D), or hex, prism, pyramid, tetrahedral (in 3D). Polyhedral cells (arbitrary number of faces) can be either 2D or 3D.

Inputs None

Returns INTEGER(int_p) :: num_cell_types LOGICAL

:: error

Error Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Number of Cells by Type Prototype get_num_cells_by_type(cell_type, ncells, error)

Description Returns the total number of cells (ncells) for a given cell type (cell_type). The cell type is indicated by passing in an integer argument that indicates the desired cell type. The valid values are defined in the CFDRC_USER module: TRI_CELL = 1, QUAD_CELL = 2, TET_CELL = 3, PYRAMID_CELL = 4, PRISM_CELL = 5, HEX_CELL = 6, POLY_CELL = 7

An example would be: CALL get_num_cells_by_type( TRI_CELL, ncells, error )

This would return the total number of triangle cells in the model.

Inputs INTEGER(int_p) :: cell_type

Returns INTEGER(int_p) :: ncells

272

User Subroutines

LOGICAL

:: error

Error Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Global Cell by Type Prototype get_global_cell_by_type(cell_type, local_cell_index, global_cell_index, error)

Description Returns the global cell index (cell_index) for a given local cell index (local_cell_index) and cell type(cell_type). TRI_CELL = 1, QUAD_CELL = 2, TET_CELL = 3, PYRAMID_CELL = 4, PRISM_CELL = 5, HEX_CELL = 6, POLY_CELL = 7

Inputs INTEGER(int_p) :: cell_type, local_cell_index

Returns INTEGER(int_p) :: global_cell_index LOGICAL

:: error

Error Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Cell Type Prototype get_cell_type(cell_index, cell_type, error)

Description Returns the cell type (cell_type) for a given global cell index (cell_index).

Inputs INTEGER(int_p) :: cell_index

Returns INTEGER(int_p) :: cell_type LOGICAL

:: error

Error Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Number of Cell Faces Prototype get_num_cell_faces(cell_index, ncell_faces, error)

273

CFD-ACE_V2008.2_User_Manual

Description Returns the number of cell faces (ncell_faces) for a given global cell index (cell_index).

Inputs INTEGER(int_p) :: cell_index

Returns INTEGER(int_p) :: ncell_faces LOGICAL

:: error

Error Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Cell Faces Prototype get_cell_faces(cell_index, ncell_faces, cell_faces, error)

Description Returns the cell face indices for a given global cell index (cell_index) in an array (cell_faces) of size ncell_faces.

Inputs INTEGER(int_p) :: cell_index, ncell_faces

Returns INTEGER(int_p), DIMENSION(ncell_faces) :: cell_faces LOGICAL

:: error

Error Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Number of Cell Nodes Prototype get_num_cell_nodes(cell_index, ncell_nodes, error)

Description Returns the number of cell nodes (ncell_nodes) for a given global cell index (cell_index).

Inputs INTEGER(int_p) :: cell_index

Returns INTEGER(int_p) :: ncell_nodes LOGICAL

:: error

Error Error will be true if some error occurs and the proper error message will be printed in the file.

274

User Subroutines

Back to Top

Get Cell Nodes Prototype get_cell_nodes(cell_index, ncell_nodes, cell_nodes, error)

Description Returns the cell node indices for a given global cell index (cell_index) in an array (cell_nodes) of size ncell_nodes.

Inputs INTEGER(int_p) :: cell_index, ncell_nodes

Returns INTEGER(int_p), DIMENSION(ncell_nodes) :: cell_nodes LOGICAL

:: error

Error Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Number of Face Types Prototype get_num_face_types(num_face_types, error)

Description Returns the total number of face types (num_face_types ).

Inputs None

Returns INTEGER(int_p) :: num_face_types LOGICAL

:: error

Error Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Number of Face by Type Prototype get_num_faces_by_type(face_type, nfaces, error)

Description Returns the total number of faces (nfaces) for a given face type (face_type). The face type is indicated by passing in an integer argument that indicates the desired face type. The valid values are defined in the CFDRC_USER module: LINE_FACE = 1, TRI_FACE = 2, QUAD_FACE = 3, POLY_FACE = 4.

275

CFD-ACE_V2008.2_User_Manual

An example would be: CALL get_num_faces_by_type( TRI_FACE, nfaces, error )

This would return the total number of triangle faces in the model. This function would normally be used to allocate some storage.

Inputs INTEGER(int_p) :: face_type

Returns INTEGER(int_p) :: nfaces LOGICAL

:: error

Error Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Number of Faces Prototype get_num_faces(nfaces, error)

Description Returns the total number of faces (nfaces) in total simulation domain (all zones). A face is part of the boundary of a grid cell. A grid cell can have any number of faces, although typically a grid cell would have 3 faces or 4 faces in 2D models (triangles or quadrilaterals), and 4, 5, or 6 faces in 3D models (tetrahedral, pyramid, prism/hex).

This function would normally be used to allocate storage for arrays which need to be sized to the total number of faces in the model.

Inputs None

Returns INTEGER(int_p) :: nfaces LOGICAL

:: error

Error Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Face Type Prototype get_face_type(face_index, face_type, error)

Description Returns the face type (face_type) for a given face index (face_index).

276

User Subroutines

LINE_FACE = 1, TRI_FACE = 2, QUAD_FACE = 3, POLY_FACE = 4.

Inputs INTEGER(int_p) :: face_index

Returns INTEGER(int_p) :: face_type LOGICAL

:: error

Error Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Number of Face Nodes Prototype get_num_face_nodes(face_index, nface_nodes, error)

Description Returns the number of nodes (nface_nodes) for a given face index (face_index).

Inputs INTEGER(int_p) :: face_index

Returns INTEGER(int_p) :: nface_nodes LOGICAL

:: error

Error Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Face Nodes Prototype get_face_nodes(face_index, nface_nodes, face_nodes, error)

Description Returns the global node indices for a given face index (face_index) in an array (face_nodes) of size nface_nodes.

Inputs INTEGER(int_p) :: face_index, nface_nodes

Returns INTEGER(int_p), DIMENSION(nface_nodes) :: face_nodes LOGICAL

:: error

Error Error will be true if some error occurs and the proper error message will be printed in the file.

277

CFD-ACE_V2008.2_User_Manual

Back to Top

Get Face Cells Prototype get_face_cells(face_index, cell_index1, cell_index2, error)

Description Returns the adjacent global cell indices (cell_index1, cell_index2) for a given face index (face_index). If both cell indices are same, that means it is an external boundary face and has only one cell associated with it.

Inputs INTEGER(int_p) :: face_index

Returns INTEGER(int_p) :: cell_index1, cell_index2 LOGICAL

:: error

Error Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Number of Nodes Prototype get_num_nodes(nnodes, error)

Description Returns the total number of nodes (nnodes) in total simulation domain (all zones).

Inputs None

Returns INTEGER(int_p) :: nnodes LOGICAL

:: error

Error Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Number of BC Faces Prototype get_num_bc_faces(nbc_faces, error)

Description Returns the total number of BC faces (nbc_faces) in total simulation domain (all zones).

Inputs None

278

User Subroutines

Returns INTEGER(int_p) :: nbc_faces LOGICAL

:: error

Error Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get BC Type Prototype get_bc_type(bc_face_index, bc_type, error)

Description Returns the geometry bc type (bc_type) for a given bc face index (bc_face_index). BC_TYPE_INLET = 1, BC_TYPE_WALL = 2, BC_TYPE_EXIT = 3, BC_TYPE_INTERFACE = 4, BC_TYPE_F_F_INTERFACE = 5, BC_TYPE_S_S_INTERFACE =6, BC_TYPE_S_F_INTERFACE = 7, BC_TYPE_F_B_INTERFACE =8, BC_TYPE_B_B_INTERFACE = 9,BC_TYPE_S_B_INTERFACE = 10, BC_TYPE_SYMM = 11, BC_TYPE_CYCLIC = 12, BC_TYPE_THINWALL = 13

Inputs INTEGER(int_p) :: bc_face_index

Returns INTEGER(int_p) :: bc_type LOGICAL

:: error

Error Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get BC Cell Index Prototype get_bc_cell_index(bc_face_index, bc_cell_index, error)

Description Returns the global cell index (bc_cell_index) associated with the specified face index (bc_face_index). The face index is a global face index, meaning that the value should be between 1 and the total number of BC faces in the model. The total number of BC faces in the model is not the same thing as the total number of faces in the model. Two values are maintained inside the solver, one counts only the faces that are part of BCs, and the other counts internal faces as well.

The cell index that is returned, is a global cell index, meaning that the value lies between 1 and the total number of cells in the model.

279

CFD-ACE_V2008.2_User_Manual

If you are looping over the number of BC faces for a particular boundary condition patch, you must first translate from the "local" boundary condition face index, e.g. 1 to number_of_faces_for_current_BC, into the "global" boundary condition face index, before calling this function.

Inputs INTEGER(int_p) :: bc_face_index

Returns INTEGER(int_p) :: bc_cell_index LOGICAL

:: error

Error Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Global Face Index Prototype get_global_face_index(bc_face_index, global_face_index, error)

Description Returns the global face index (global_face_index) for a given BC face index (bc_face_index).

Inputs INTEGER(int_p) :: bc_face_index

Returns INTEGER(int_p) :: global_face_index LOGICAL

:: error

Error Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get BC Record Index Prototype get_bc_record_index(bc_face_index, bc_record_index, error)

Description Returns the BC record index (bc_record_index) for a given BC face index (bc_face_index).

Inputs INTEGER(int_p) :: bc_face_index

Returns INTEGER(int_p) :: bc_record_index LOGICAL

Error

280

:: error

User Subroutines

Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get BC Patch Key Prototype get_bc_patch_key(bc_face_index, bc_patch_key, error)

Description Returns the BC patch key (bc_patch_key) for a given BC face index (bc_face_index).

Inputs INTEGER(int_p) :: bc_face_index

Returns INTEGER(int_p) :: bc_patch_key LOGICAL

:: error

Error Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Number of BC Nodes Prototype get_num_bc_nodes(nbc_nodes, error)

Description Returns the number of BC nodes (nbc_nodes).

Inputs None

Returns INTEGER(int_p) :: nbc_nodes LOGICAL

:: error

Error Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Global Node Index Prototype get_global_node_index(bc_node_index, global_node_index, error)

Description Returns the global BC node index (global_node_index) corresponding to local BC node index (bc_node_index).

Inputs

281

CFD-ACE_V2008.2_User_Manual

INTEGER(int_p) :: bc_node_index

Returns INTEGER(int_p) :: global_node_index LOGICAL

:: error

Error Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get BC Node Index Prototype get_bc_node_index(global_node_index, bc_node_index, error)

Description Returns the local BC node index (bc_node_index) corresponding to global node index (global_node_index).

Inputs INTEGER(int_p) :: global_node_index

Returns INTEGER(int_p) :: bc_node_index LOGICAL

:: error

Error Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Cell Group Index Prototype get_cell_group_index(global_cell_index, cell_group_index, error)

Description Returns the cell group index (cell_group_index) corresponding to global cell index (global_cell_index). (This subroutine is same as get_vc_index_from_cell and that cell_group_index is same as vc_index)

Inputs INTEGER(int_p) :: global_cell_index

Returns INTEGER(int_p) :: cell_group_index LOGICAL

:: error

Error Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

282

User Subroutines

Get Number of BC Face by Type Prototype get_num_bc_faces_by_type(flag, nbc_faces, error)

Description Returns the total number of arbitrary/interface BC faces (nbc_faces) in total simulation domain (all zones). flag = 1 (All interfaces) flag = 2 (Interfaces) flag = 3 (Arbitrary Interfaces)

Inputs INTEGER(int_p) :: flag

Returns INTEGER(int_p) :: nbc_faces LOGICAL

:: error

Error Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Nodal Value Array Prototype get_nodal_value_array(var_index, n_nodes, value_array, error)

Description Return nodal data array for var_index

Inputs INTEGER(int_p) :: var_index, n_nodes

Returns REAL(real_p), dimension(n_nodes) :: value_array LOGICAL

:: error

Error Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Get Cyclic Node Pair Index Prototype get_cyclic_node_pair_index(node_Index, cyclicNodeIndex, error)

Description Return the global node index corresponding to cyclic global node index.

283

CFD-ACE_V2008.2_User_Manual

Inputs INTEGER(int_p) :: node_Index

Returns INTEGER(int_p) :: cyclicNodeIndex LOGICAL

:: error

Error Error will be true if some error occurs and the proper error message will be printed in the file. Back to Top

Implementation of User Subroutines User Subroutines Implementation-Introduction The Implementation section provides implementation information for the user subroutines. It includes: •

The prototype or subroutine statement and its arguments



User subroutine description and usage



Instructions on how to activate the user subroutine



The calling structure, given in pseudo code, which describes how the user subroutine is called from within the CFD-ACE-Solver.

The User Subroutine Implementation section includes: •

User Defined Output (UOUT)



User Defined Boundary Condition Values (UBOUND)



User Defined Grid Deformation Boundary Condition Values (UDEFORM_BC)



User Defined Emissivity Boundary Condition Values (UEMISSIVITY_BC)



User Defined Parameter (UPARAMETER)



User Defined Source Terms (USOURCE)



User Defined Reaction Rate Factor (UREACTION)



User Defined Properties



User Defined Time Step (UDT)



User Defined Gravity (UGRAVITY)



User Defined Initial Conditions (UINIT)



User Defined Grid Deformation (UGRID)



User Defined Moving Solid Motion



User Defined Spray Subroutines

User Subroutines User Defined Output Routines (UOUT, UREAD_DTF, UWRITE_DTF) The user output routine enables you to:

284

User Subroutines



Calculate detailed engineering quantities with the help of the solver. This is possible because you have access to all of the information that the solver has (i.e., cell volumes, face areas, fluxes, etc.).



Send information to third party control simulation software for use in a feedback control simulation.



Write a solution file in the format of a third party post-processor. o

UOUT

o

UREAD_DTF

o

UWRITE_DTF

UOUT Prototype uout(iflag)

Arguments INTEGER(int_p):: iflag- call position indicator

Description When user output has been activated, this subroutine will be called from various points in the solution cycle. The value of iflag can be used to determine from where in the solution cycle that this routine has been called:

iflag = 0 at the beginning of the simulation, when reading DTF data. This can be used to read data from DTF. iflag = 1 at the beginning of the simulation iflag = 2 at the beginning of each time step (transient only) iflag = 3 at the end of each iteration iflag = 4 at the end of each time step (transient problems only) iflag = 5 at the end of the simulation. This flag can be used to write cell or nodal data into DTF.

Most user access routines related to getting information and variable quantities are available for use in the user output subroutine. This routine should not be used to set any information.

Activation To activate, select User Sub (uout) under the Output tab located on the Solution Control [SC] panel.

Call Structure start simulation start reading DTF data call UOUT(0) end of reading DTF data call UOUT(1) do itime = 1, number of times steps

285

CFD-ACE_V2008.2_User_Manual

call UOUT(2) do iter = 1, number of iterations process solution call UOUT(3) end do call UOUT(4) end do call UOUT(5) end simulation Back to Top

UREAD_DTF Arguments None

Description When user sub(uread_dtf) has been activated, this subroutine will be called from solver. This subroutine is called at the beginning of simulation, when solver is reading the DTF file. At this point, you should not do any thing except reading from the DTF file, since most of the variables are not even set by this time.

Activation To activate, select User Sub (uread_dtf) under the Output tab located on the Solution Control [SC] panel.

Call Structure start simulation start reading DTF data call UREAD_DTF end of reading DTF data end simulation Back to Top

UWRITE_DTF Prototype uwrite_dtf

Arguments None

Description When user sub(uwrite_dtf) has been activated, this subroutine will be called from solver. This subroutine is called at the end of simulation, when solver is writing the DTF file. At this point, you should not do anything except write to the DTF file. You can use any generalized user access routines to get the values.

Activation To activate, select User Sub (uwrite_dtf) under the Output tab located on the Solution Control [SC] panel.

Call Structure

286

User Subroutines

start simulation start writing output to DTF call UWRITE_DTF end of writing output to DTF. end simulation Back to Top

User Subroutines User Defined Boundary Condition Values (UBOUND) The user defined boundary condition routine gives you total control over the boundary condition values for any given boundary condition. This routine does not allow you to change the boundary condition type (i.e., fixed pressure outlet, fixed velocity inlet, etc.) but it does allow you to change the values. This routine gives you the opportunity to set more general profile type boundary conditions than can be set with the standard profile in x, y, z, or time options. An example would be boundary values that vary in both space and time. The routine is also useful for feedback control simulations where, for example, you could monitor the temperature at a certain location to determine what a wall heat flux value should be set to ubound(bc_index, var_index, face_index, xfc, yfc, zfc). Prototype ubound(bc_index, var_index, face_index, xfc, yfc, zfc)

Arguments INTEGER(int_p):: bc_index, var_index, face_index REAL(real_p):: xfc, yfc, zfc

Description The UBOUND routine is called on a boundary face by boundary face basis for each boundary condition and variable which has an evaluation method of user defined.

Your code should check the value of var_index to determine for which variable the boundary values are being set. The value of var_index will match values returned by the get_var_index() access routine. Furthermore, the value of bc_index should be checked to determine which boundary condition is being processed. This value will match the value returned by the get_bc_index() access routine. The current face index and face center coordinates are passed in to UBOUND as face_index, xfc, yfc, and zfc respectively. For two-dimensional models, zfc will always be 0. Within the UBOUND subroutine, the set_bc() access routine should be used to set the boundary value of variable var_index for the current boundary face. Note that boundary values of enthalpy and density are automatically recalculated if necessary (e.g., if the user defined temperature or pressure is prescribed).

For the user defined density option, UBOUND is called with the variable index as density. The density value needs to be set at inlet and exit boundaries for which associated volume condition has user defined density option selected.

Activation To activate, set the evaluation method for any boundary variable to User Sub. (ubound).

Call Structure start boundary condition evaluation do ibc = 1, number of bcs

287

CFD-ACE_V2008.2_User_Manual

do ivar = 1, number of values for ibc if method for BC ibc and VAR ivar = user sub then do iface = 1, number of faces for BC ibc call UBOUND(bc_ind,var_ind,face_ind,xfc,yfc,zfc) end do end if end do end do end boundary condition evaluation

User Subroutines User Defined Boundary Condition Values (UBOUND_PATCH) The user defined boundary patch gives user control to set one single value for whole boundary patch (bc patch) based on some function of time or experimental data. This routine does not allow you to change the boundary condition type. Currently this subroutine is required for fix mass inlet, where mass is specified per boundary patch. In most of the other variables, you can use generalized “ubound” user subroutine. Prototype ubound_patch(option, bc_index, var_index, bc_patch_value)

Arguments INTEGER(int_p), INTENT(in) :: option, bc_index, var_index option - indicating different options. (currently not required.) bc_index - global boundary condition (bc) index for which this subroutine is called. var_index - variable index for which this subroutine is called.

Outputs: rEAL(real_p), INTENT(out) :: bc_patch_value bc_patch_value – return value for specified bc patch value to be set for this boundary patch.

Description This UBOUND_PATCH subroutine is called bc patch by bc patch basis for each boundary condition where user has selected "User Sub (ubound_patch)" option in GUI.

Your code should check the value of var_index to determine for which variable the boundary values are being set. The value of var_index will match values returned by the get_var_index() access routine. Furthermore, the value of bc_index should be checked to determine which boundary condition is being processed. This value will match the value returned by the get_bc_index() access routine.

Assign the calculated boundary patch value to bc_patch_value (last argument) to set the value for current variable (var_index) at current boundary condition (bc_index). If this variable is not set to correct value, you may get erroneous results for the simulation.

Activation

288

User Subroutines

To activate this user subroutine, select “User sub (ubound_patch)” as evaluation method for the variables in CFD-ACE-GUI. Currently “Mass flow rate per patch” is the only variable uses this user subroutine.

Call Structure start boundary condition evaluation do ibc = 1, number of bcs do ivar = 1, number of values for ibc if method for BC ibc and VAR ivar = user sub then call UBOUND_PATCH(option, bc_index, var_index, bc_patch_value) end if end do end do end boundary condition evaluation

User Subroutines User Defined Boundary Condition Values (UMODAL_SHAPES) Prototype umodal_shapes(option, mode_shape_index, num_nodes, x, y, z, mode_shape_frequency, mode_shape_disp_x, mode_shape_disp_y, mode_shape_disp_z)

Arguments INTEGER(int_p), INTENT(in) :: mode_shape_index, num_nodes REAL(real_p), INTENT(in), dimension(num_nodes) :: x, y, z mode_shape_index - current mode shape index for which user need to supply mode shape frequency and displacements. num_nodes - Total number of nodes in structural zones. x, y, z - coordinates of each node. For 2-D problems, z is will be set to 0.0 and users are advised not use this array.

Outputs: REAL(real_p), INTENT(out) :: mode_shape_frequency REAL(real_p), INTENT(out), DIMENSION(num_nodes) :: mode_shape_disp_x, mode_shape_disp_y, mode_shape_disp_z mode_shape_frequency - Mode shape frequency (Hz) corresponding to given mode shape index. (same as square root of (eigenvalue)/2*pi) mode_shape_disp_x, mode_shape_disp_y, mode_shape_disp_z – Displacements in x, y, and z directions corresponding to given mode shape index. For 2-D problems, solver ignores mode_shape_disp_z and users are advised not to set any values for this array. These are popularly known as eigenvectors in the eigen solution.

Description This UMODAL_SHAPES subroutine is called only once and at the beginning of the simulation, before any calculations are done. It is called once for each mode. User indicates the number of modes in the GUI.

289

CFD-ACE_V2008.2_User_Manual

Your code below should use mode_shape_index to assign the frequency and displacements for the current mode. The information is passed back to the solver through the subroutine's argument list.

Assign the calculated mode shape frequency to mode_shape_frequency and fill the mode_shape_disp_x, mode_shape_disp_y, and mode_shape_disp_z arrays displacements for each node corresponding to each degree of freedom (in x, y, and z directions). Do not fill mode_shape_disp_z array if your problem is 2-Dimensional.

The modal displacements for each structural node are to be assigned. If you have information about modal displacements on a different grid, then you will need to implement interpolations to determine the displacements at the node in question. You may use x, y, and z nodal coordinates if you need to do some kind of interpolation. For 2-D problems, z-nodal coordinate will be set to zero. So do not use z-coordinates.

Do not allocate any memory for mode_shape_disp_x etc., because the memory is already allocated inside solver before calling this routine. You may of course allocate any other memory required for your interpolation calculations.

Also note that the num nodes is not necessarily same as total number of nodes you get using get_num_nodes() access routine. num_nodes is only for structural zone related nodes and may possibly include fictitious locations associated with higher-order accuracy Gaussian integrations. get_num_nodes() gives the total number nodes in the model, including both structure where stress is being solved and other parts of of geometry, but do not include any quadratic nodes created for structural solver.

Note that the routine is not called with any arguments related to grid connectivity or indexing, so you cannot query for other data. This need is not anticipated. However, if you discover any needs related to the proper use of this routine, please contact us at [email protected]

Activation To activate this user subroutine, select "User sub (umodal_shapes)" as method for "Modal Analysis" in CFD-ACE-GUI, available under MO/Stress/Modal Analysis.

Call Structure start of structural calculations using FEM if (modal_analysis) then if (method for modal analysis = user sub(umodal_shapes)) then do mode_shape_index = 1, number of modes call UMODAL_SHAPES(option, mode_shape_index, num_nodes, x, y, z, mode_shape_frequency, mode_shape_disp_x, mode_shape_disp_y, mode_shape_disp_z) end do else calculate mode shapes internally. end if update load BC's. calculate displacements using eigen solution. end if

290

User Subroutines

end structural calculations

User Subroutines User Defined Grid Deformation Boundary Condition Values (UDEFORM_BC) The user defined grid deformation boundary condition routine gives you total control over the boundary condition values for any given boundary condition. This routine does not allow you to change the boundary condition motion type (i.e., displacement, velocity, coordinate, or rotation angle, rotation speed etc.) but it does allow you to change the values for a given motion type. This routine gives you the opportunity to set more general grid motion for a given boundary conditions than can be set with the standard expression allowed in CFD-ACE+. An example would be boundary values that are complicated to fit into any mathematical formulation. The routine is also useful for feedback control simulations where, for example, you could monitor the pressure forces at a certain location to determine displacement of the boundaries. This routine is different from Ugrid, as you need to specify the motion along the boundary and displacement of the interior nodes of the domain are calculated using TFI (Transfinite Interpolation). In UGRID you need to specify the motion for all the nodes inside a zone and TFI will not be used. Prototype udeform_bc(bc_index, var_index, node_index)

Arguments INTEGER(int_p):: bc_index, var_index, node_index

Description The UDEFORM_BC routine is called on for each node where Grid deformation motion is selected as user defined. This will be called for all translation or rotation nodes. But the bc_index, will let you know to which boundary current node belong to. This subroutine is called for dx, dy, dz, u, v, w, x, y, z, rotation angle(deg), or rotation speed (deg/s), depending which motion type is selected in CFDACE+.

Your code should check the value of var_index to determine for which variable the boundary values are being set. The value of var_index will match values returned by the get_var_index() access routine. Furthermore, the value of bc_index should be checked to determine which boundary condition the current global node, indicated by node_index, belongs to. This value will match the value returned by the get_bc_index() access routine. The current node index is passed in to UDEFORM_BC as node_index.

Within the UDEFORM_BC subroutine, the set_value_one_node() access routine should be used to set the boundary value of variable var_index for the current boundary node.

Activation To activate, set the evaluation method for any grid deformation boundary variable to User Sub.(udeform_bc).

Call Structure start grid deformation motion evaluation if translation motion is specified For calculating displacement in x-direction do inode = 1, number of translation nodes bc_index = bc_record(inode)

291

CFD-ACE_V2008.2_User_Manual

var_index = variable(bc_index) node_index = global(inode) var_index is one of deform_dx, deform_x, deform_u if method for BC bc_index and VAR var_index = user sub then call UDEFORM_BC(bc_index,var_index,node_index) end if end do For calculating displacement in y-direction do inode = 1, number of translation nodes bc_index = bc_record(inode) var_index = variable(bc_index) node_index = global(inode) var_index is one of deform_dy, deform_y, deform_v if method for BC bc_index and VAR var_index = user sub then call UDEFORM_BC(bc_index,var_index,node_index) end if end do if 3D problem For calculating displacement in z-direction do inode = 1, number of translation nodes bc_index = bc_record(inode) var_index = variable(bc_index) node_index = global(inode) var_index is one of deform_dz, deform_z, deform_w if method for BC bc_index and VAR var_index = user sub then call UDEFORM_BC(bc_index,var_index,node_index) end if end do end if end if

if rotation motion is specified

For calculating displacement based on rotation angle(deg) or rotation speed(deg/sec) do inode = 1, number of rotation nodes bc_index = bc_record(inode)

292

User Subroutines

var_index = variable(bc_index) node_index = global(inode) var_index is one of deform_rotation_angle, deform_rotation_speed if method for BC bc_index and VAR var_index = user sub then call UDEFORM_BC(bc_index,var_index,node_index) end if end do endif end of grid deformation motion evaluation

User Subroutines User Defined Emissivity Boundary Condition Values (UEMISSIVITY_BC) The user defined emissivity boundary condition routine gives you total control over the emissivity values for any given boundary condition. This routine allows you to change the emissivity values. This routine gives you the opportunity to set more general profile type boundary conditions. An example would be emissivity values that vary with temperature. Prototype uemissivity_bc(bc_index, face_index, band_no)

Arguments INTEGER(int_p):: bc_index, face_index, band_no

Description The UEMISSIVITY_BC routine is called on a boundary face by boundary face basis for each boundary condition for which emissivity evaluation method is specified as user defined. Your code should check the value of bc_index to determine which boundary condition is being processed. This value will match the value returned by the get_bc_index() access routine. The current face index is passed in to UEMISSIVITY_BC as face_index. Within the UEMISSIVITY_BC subroutine, the set_value_bc_face_emissivity() access routine should be used to set the boundary value of emissivity for the current boundary face.

Activation To activate, set the evaluation method for emissivity to User Sub. (uemissivity_bc)

Call Structure start boundary condition evaluation for emissivity do ibc = 1, number of bcs if method for BC ibc and emissivity = user sub then do iface = 1, number of faces for BC ibc do iband = 1, number of bands call UEMISSIVITY_BC(bc_index,face_index,band_no) end do end do end if

293

CFD-ACE_V2008.2_User_Manual

end do end boundary condition evaluation for emissivity

User Subroutines User Defined Parameter (UPARAMETER) This subroutine is called for each parameter which is defined as user defined in CFD-ACE+ in the parametric input window. You can get the time and the x, y, z coordinates, face center values, etc, at this point. You can also get boundary values for all the variables except the ones which are using parameters. Cell center values are not available at this point because initial conditions are not set by this time. Description Parameter values should be assigned by using set_parameter_value(). You should use the same var_index which is passed to this routine. You should not use other parameter index to set the value. var_index is available by using get_var_index(). var_name should be the name specified in the parametric input window.

Activation This routine is activated by typing USER_DEFINED in the parametric value text field of the Parametric definition window of CFD-ACE+.

Call Structure Do parameter = 1, Number of parameters if parameter is user defined Call uparameter end if End do

User Subroutines User Defined Source Terms The user defined source terms enable you to modify the general equation for any of the solved variables by adding source terms to the equation on a cell by cell basis. With this feature you can reproduce and expand on the capabilities such as momentum resistance, heat sources, fan model, gas and surface reaction models, etc. The user defined source routines are required to control the solution of user scalar variables. Prototype usource(var_index, vcindex)

Arguments INTEGER(int_p): var_index, vcindex

Description The USOURCE routine is called on a volume condition by volume condition basis for each variable that is requested. Your code should check the value of var_index to determine for which variable source terms are being set. The value of var_index will match values returned by the get_var_index() access routine. Furthermore, the value of vcindex should be checked to determine which volume condition is being processed. This value will match the value returned by the get_vc_index() access routine.

Within the USOURCE subroutine, the add_source_term() access routine should be used to set the source term values Su and Sp of variable var_index for the current volume condition.

294

User Subroutines

The source term specified is the absolute source term for the cell (as opposed to per unit volume or mass). The units of Su for a variable phi will be equal to the units of mass flow rate (kg/sec) times the units for phi. For example, the units of Su for velocity (momentum source) will be [kg/sec][m/sec], or newtons, the units of Su for enthalpy (energy source) will be [kg/sec][J/kg] or watts, and the units of Su for a unitless variable, such as mass fraction will be simply [kg/sec] For more information on how to set Su and Sp, see Direct Specification of Source Terms.

Activation To activate, select User Sub (usource) as the evaluation method for any of the variable’s source terms. This can be done through the CFD-ACE+ from the Volume Conditions [VC] page. Change the setting mode to the appropriate set of equations (e.g., flow, heat, etc.), and select User Sub (usource) as the evaluation method for the desired equation.

Call Structure setup solution matrix for variable ivar do ivc = 1, number of volume conditions if VAR ivar for VC ivc has user source term then call USOURCE(var_index, vc_source_index) endif enddo goto linear equation solver

User Subroutines User Defined Reaction Rate Factor The user defined reaction rate factor enables you to modify the reaction rates calculated by the solver. With this feature you can increase/decrease reaction rates or even completely stop the reaction in some parts of the domain by setting the factor to zero. This is called for both surface and gas phase reaction. Prototype ureaction_rate_factor(react_type, mechanism_index, react_step_index, react_step_type)

Arguments INTEGER(int_p): react_type, mechanism_index, react_step_index, react_step_type

Description The UREACTION_RATE_FACTOR routine is called for every reaction step which has user defined reaction rate activated in CFD-ACE+ Reaction or Surface Reaction Manager. This is visible for Finite Rate General Reactions only.

This routine is called for every fluid volume cell. You can get the active cell index using get_active_cell_index() access routine and active face index incase of surface reactions using get_active_bc_face_index(). You can get volume index from get_vc_index_from_cell(). react_type indicates whether Gas phase reaction(1) or surface reaction(2). mechanism_index indicates for which mechanism this routine is called. For gas phase reactions mechanism_no is 1 and for surface reactions it depends on the boundary. You can get the mechanism_no from the name of the mechanism used in Reaction managers. You need to use get_mechanism_index() to get the mechanism index. react_step_index is the reaction step index, which can be obtained from the get_reaction_step_index(), from reaction step name. react_step_type indicates whether to use a forward(1) or reverse(2) step. Whenever you define a reaction in Reaction managers, remember to give names for each reaction step and mechanism. If not, it is difficult to use this user subroutine. Rate Factor can be set by calling the set_reaction_rate_factor() access routine.

Activation To activate, select the check box which is labeled as user rate factor in the Reaction Managers of CFD-ACE+ for each reaction step. This is available for species mass fraction approach.

295

CFD-ACE_V2008.2_User_Manual

Call Structure Calculation of arrhenius rate constants for gas phase or surface reactions rtype = 1 (for gas phase reactions) rtype = 2 (for surface reactions) do ivc = 1, number of volume conditions do imech = 1, no of gas phase reactions do istep = 1, no of reaction steps in this mechanism if (forward rate has user defined rate factor) rstep_type = 1 (for forward reaction rates) call ureaction_rate_factor(rtype, imech, istep, rstep_type) end if if (reverse rate has user defined rate factor) rstep_type = 2 (for reverse reaction rates) call ureaction_rate_factor(rtype, imech, istep, rstep_type) end if end do end do end do

User Subroutines User Defined Properties Through the user defined property routines you can perform your own fluid, second fluid (in case of VOF), and solid property calculations for density, viscosity, conductivity, specific heat, diffusivity, electrical conductivity, electrical permittivity, electron collision frequency, and absorbtivity. This will allow you to use advanced or unique property functions for materials that may not obey the standard property functions available in the solver. For the second fluid, iopt is set to 10, and is called for density, thermal conductivity, and laminar dynamic viscosity, and surface tension (iopt = 1). Properties for thermal conductivity, species diffusivity, and scalar diffusivity are set for laminar flow. Turbulence effects are calculated inside the solver. You can set only laminar transport properties using user subroutines. When using udens you must also use udrhodp. For incompressible simulations set udrhodp = small # (such as 1E-10). Also, set density at all inlet/exit boundaries using UBOUND as UBOUND is called automatically whenever density is user defined in the adjacent volume condition.

Density

Drho_Dp

296

Prototype udens(iopt, vcindex) Arguments INTEGER(int_p):: iopt, vcindex Prototype udrhodp(iopt, vcindex) Arguments INTEGER(int_p):: iopt, vcindex

User Subroutines

Viscosity

Thermal Conductivity

Prototype uvisc(iopt, vcindex) Arguments INTEGER(int_p):: iopt, vcindex Prototype ucond(iopt, vcindex) Arguments INTEGER(int_p):: iopt, vcindex Prototype ucph_from_t(iopt, vcindex, tval, cpval, hval)

Specific Heat and Enthalpy

Mass Diffusivity1

Arguments INTEGER(int_p):: iopt, vcindex REAL(real_p):: tval, cpval, hval The UCPH_FROM_T routine will pass in temperature (t) and the user must return the values for specific heat (cp) and enthalpy (h). Prototype

Arguments INTEGER(int_p)::iopt, vcindex, varindex

Mobility of Chemical Species1

Prototype

Mass Diffusivity for Scalar1

Prototype

Electrical Conductivity

Electrical Permittivity

Electrical Permeability

Surface Tension (for VOF) Electron Collision Frequency (for Plasma) Absorbtivity2 (for Radiation)

udiff(iopt,vcindex, var_index)

umobility(iopt,vcindex,varindex)

Arguments INTEGER(int_p)::iopt, vcindex, varindex udiff_scalar(iopt, vcindex, var_index)

Arguments INTEGER(int_p):: iopt, vcindex, var_index Prototype

uecond(iopt, vcindex)

Arguments INTEGER(int_p):: iopt, vcindex Prototype

uepermittivity(iopt, vcindex)

Arguments INTEGER(int_p):: iopt, vcindex Prototype

urpermeability(iopt, vcindex)

Arguments INTEGER(int_p):: iopt, vcindex Prototype

usurfacetension(iopt, vcindex)

Arguments INTEGER(int_p):: iopt, vcindex Prototype

uecoll_frequency(iopt, vcindex)

Arguments INTEGER(int_p):: iopt, vcindex Prototype

uabsorption_coef(vcindex, band_no)

Arguments INTEGER(int_p):: vcindex, band_no

297

CFD-ACE_V2008.2_User_Manual

Porosity3 (for Porous Media Volume conditions)

Prototype

uporous(vcindex, var_index)

Arguments INTEGER(int_p):: vcindex, var_index

These subroutines are called on a cell-by-cell basis for each volume condition and property that is set to user defined. The variable iopt is currently only used for the UVISC routine: iopt = 1 - UVISC has been called to set laminar dynamic viscosity iopt = 2 - UVISC has been called to set turbulent viscosity iopt = 10 - UVISC has been called to set second fluid laminar dynamic viscosity Use the get_active_cell_index() access routine to get the current cell’s global integer index Use set_value_one_cell() access routine to set the value of the property variable. Activation To activate, set the evaluation method for a property to User Sub.

Call Structure example shown for density (other properties are similar) start density calculation volume condition loop: do ivc = 1, number of VCs in simulation if density for VC ivc is user defined then do icell = 1, number of cells in VC ivc call UDENS(iopt, vc_index) if flow is compressible then call UDRHODP(iopt, vc_index) endif enddo endif enddo end density calculation

1. These routines are called for each chemical species/scalar defined in a problem with the outer loop as: do isp = 1, number of species/scalars volume condition loop end do 2. These routines are called for each band defined for non gray radiation inside radiation model window of CFD-ACE+. For gray radiation number of bands is one, and the subroutine is called only once. Also, you need to use set_value_one_cell_absorbtivity() to set the absorbtivity instead of set_value_one_cell. The outer loop is:

298

User Subroutines

do iband = 1, number of bands volume condition loop end do 3. The uporous user subroutine is called for only those volume conditions where porous media is defined in CFD-ACE+. You should use only porous media related user access routines to get (get_value_one_porous_cell) or set (set_value_one_porous_cell) the values defined for porous media instead of regular get_value_one_cell or set_value_one_cell. The code structure is: volume condition loop (as shown above for density) if (porous media is defined) then if (porosity is user defined) then volume condition cell loop endif endif end of volume condition loop

User Subroutines User Defined Time Step (UDT) For transient simulations you can use the user defined time step routine to vary the time step size during the simulation. This can be especially helpful if you have a simulation with a wide range of time varying values. For instance if you start a simulation from zero initial conditions, you may want to use a small time step during the start-up phase to accurately capture the start-up effects. After the start-up transient has been passed you may want to increase the time step size to reach the final solution in fewer time steps. Prototype udt

Arguments NONE

Description This subroutine is called at the beginning of every time step to set the current time step size (seconds). Use the set_time_step() access routine to set the time step size,

Activation To activate, set the time step evaluation method to User Sub (udt).

Call Structure start simulation do itime = 1, number of time steps if time step evaluation method is user sub then call UDT endif do iter = 1, number of iterations process solution enddo enddo end simulation

299

CFD-ACE_V2008.2_User_Manual

User Subroutines User Defined Gravity (UGRAVITY) This subroutine is called for each time step (transient cases) or at the beginning of the run (for steady state cases) whenever gravity is set to user defined. Use the set_gravity() access routine to set the gravity. Activation To activate, select User sub(ugravity) for each user defined gravity direction. This can be done by using CFD-ACE+, from Model Options (MO) panel, shared tab page, activate the gravity option, and select the User sub(ugravity option in the direction you choose.

Call Structure Do time step = 1, number of time steps if at least one of gravity_x, gravity_y, gravity_z is user defined Call ugravity endiif Enddo

For steady state, this is called only once at the beginning of the simulation.

User Subroutines User Defined Initial Conditions (UINIT) The user defined initial conditions are used for two purposes; 1) provide more realistic initial conditions than constant values, and 2) to provide exact initial conditions needed for start-up of transient simulations. The user defined initial condition routine enables you to set the initial conditions for the simulation on a cell by cell basis. Prototype uinit(var_index, vcindex)

Arguments INTEGER(int_p):: var_index, vcindex

Description This subroutine is called at the beginning of the simulation for each volume condition that has its initial condition evaluation mode set to user defined. Since the routine is called on a volume condition by volume condition basis, it is up to the user to create an array of initial values, one for each cell of the volume. Do not use set_value_one_cell.

Activation Use the set_value_vc() access routine to set the value of a variable. This routine is activated by selecting UserSub(uinit) as the evaluation method for any of the variables in the Initial Conditions (IC) page. Select the volume by volume option as the initial condition, then select UserSub(uinit) as the evaluation method for each desired variable.

Call Structure determine initial conditions do ivc = 1, number of volume conditions do ivar = 1, number of variables requiring IC’s if VAR ivar for VC ivc has user sub eval then call UINIT(var_index, vcindex) endif

300

User Subroutines

enddo enddo start simulation

User Subroutines User Defined Grid Deformation (UGRID) The user defined grid generation routine gives you total access to modify the grid shape of any structured grid region. You cannot add or delete cells. This routine is especially useful for valve simulations and any other simulations which can be modeled with a stretching grid approach. You must set the location of each and every node in volumes that have user defined grid motion. Prototype ugrid(iopt, zone_index)

Arguments INTEGER(int_p):: iopt, zone_index

Description This subroutine is called at the beginning of every time step and allows you to set the xyz location of all of the grid nodes in any deforming zone.

Use the get_value_corner_str_() and get_value_corner_unstr_zone() access routines to get the current node locations for structured and unstructured grids respectively.

Use the set_value_corner_str_() and set_value_corner_unstr_zone() access routines to set the new node locations for structured and unstructured grids respectively.

Activation To activate, set the deformation model option to Manual Remesh with User Sub (ugrid) function. These settings can be found on the Model Options [MO] panel under the Deformation tab.

Call Structure start simulation read initial grid do itime = 1, number of time steps do ivc = 1, number of volume condition zones if VC ivc has manual remesh set to user sub then call UGRID(cell_type, zone_index) endif enddo do iter = 1, number of iterations process solution enddo enddo end simulation

301

CFD-ACE_V2008.2_User_Manual

User Subroutines User Defined Moving Solid Motion Prototype u_moving_solid(iopt, vcindex)

Arguments INTEGER(int_p):: iopt, vcindex

Description This subroutine will be called for each volume condition that has it’s moving solid evaluation mode set to user defined. Use the set_speed_mvsolid() access routine to set the moving solid velocity components.

Activation To activate, select Trans (User Defined) or Rot (User Defined) as evaluation methods for Solid Movement. This can be done through CFD-ACE+ from the Volume Conditions (VC) panel: select the setting mode as Heat, then select the Moving Solid option. For solid movement select either Trans (User Defined) or Rot (User Defined) as evaluation methods.

Call Structure do ivc = 1, number of volume conditions if Solid Movement for the VC has User Defined option call u_moving_solid(iopt, ivc) endif enddo

User Subroutines URADIATION A URADIATION user subroutine has been added to the P1 method in the radiation module. This user subroutine allows you to set the emission sink/source for any VC where the URADIATION user subroutine is activated. The URADIATION subroutine can be activated by selecting the Radiation option under the VC Setting Mode in CFD-ACE-GUI. This routine is called on a cell-by-cell basis, i.e. CFD-ACE-SOLVER loops over all cells for each volume condition defined as URADIATION. The user access variable for setting the source term is 'RAD_EMMISION_SOURCE'. The variable index can be obtained using get_var_index() and the source term is set using set_value_one_cel(). Prototype uradiation(iopt, var_index, cell_index, band_no)

Arguments INTEGER(int_p), INTENT(IN) :: iopt, var_index, cell_index, band_no

Description Purpose : set emission source term for each cell.

iopt : option for specifying mode of settings for radiation. Currently not used. This is for future use. Default value is 1. var_index : Variable index of radiation variable. cell_index : Active Cell index for which user need to set value. band_no : For non gray radiation band_no is the current band number for which radidion Intensity is being solved. User can get total band number from get_radiation_band_info()

302

User Subroutines

This routine is called on for each Cell where user-defined radiation source terms are specified. The user has to specify source for each cell. User can use get_vc_index_from_cell(cell_index, vc_index, error) to get volume condition index.

One may use get_value_one_cell to obtain values of various dependent variables such as temperature, velocity, Volume etc. using cell index

Use the set_value_one_cell() to set the radiation emission source.

Activation To activate, select User Sub (uradiation) as the evaluation method to set the radiation source term for the P1 radiation model. This can be done through the CFD-ACE+ from the Volume Conditions [VC] page. Change the setting mode to Radiation and select Radiation Source check box.

Call Structure setup solution matrix for variable ivar do ivc = 1, number of volume conditions do cell = 1, ncells call URADIATION(iopt, var_index, cell_index, band_no) enddo enddo goto linear equation solver

User Subroutines Spray Subroutines For all the spray related user subroutines, you can use following access routines to get the different properties and parameter values. You can get the properties of the gas (cp, visc, cond, rdiff, mfinf, prdt, schm, lews, mach, mol_wt) using get_cur_gas_prop(). You can get the gas state variables (u, v, w, den, pres, tem) using get_cur_gas_state(). You can get drop properties (den, cp, hvap, psat, mfsurf) using get_cur_drop_prop(). You can get drop state variables (tem, dia, ndrp, x, y, z, u, v, w) using get_cur_drop_state(). You can get drop parameters (drag coef, reynolds, nusl, sherwood, spal) using get_cur_drop_ndparams(). The species index (sp_index) will be the index for the species and can be obtained using get_var_index(), where the variable is the species name. The property routines (cp, den, psat, and hvap) need to be activated in the Database Manager if you want to write a user subroutine to evaluate these properties. •

spr_usr_bc(sp_index, parcel_index, bc_type, bc_cell, bc_face)



spr_usr_cp(sp_index, phase_index)



spr_usr_den(sp_index, phase_index)



spr_usr_drag(sp_index, phase_index)



spr_usr_end(iteration, time_step_no, time, global_dt)



spr_usr_engy(sp_index, parcel_index)



spr_usr_hvap(sp_index, phase_index)



spr_usr_mom(sp_index, parcel_index)



spr_usr_mass(sp_index, parcel_index)

303

CFD-ACE_V2008.2_User_Manual



spr_usr_nusl(sp_index, phase_index)



spr_usr_psat(sp_index, phase_index)



spr_usr_sher(sp_index, phase_index)



spr_usr_start(iteration, time_step_no, time, global_dt))



spr_usr_tstep(sp_index, parcel_index)

SPR_USR_BC Prototype spr_usr_bc(sp_index, parcel_index, bc_type, bc_cell, bc_face)

Arguments INTEGER(int_p):: sp_index INTEGER(int_p):: parcel_index INTEGER(int_p):: bc_type INTEGER(int_p):: bc_cell INTEGER(int_p):: bc_face

Description Processes information at the boundary. This subroutine could be used to perform some processing whenever a droplets hits a boundary. For example, using this routine, one could count the number of droplets hitting a certain boundary.

Activation To invoke this routine, select the user processing option in the spray boundary options on the MO −> Spray tab.

Call Structure do ipcl = 1, number of parcels do j = 1, number of spray time steps integrate spray equations check if droplet hit a boundary if the droplet hit a boundary and if user processing is set for spray boundary then call spr_usr_bc(sp_index, ipcl, bc_type,bc_cell, bc_face) end if end if end do end do end time step loop end parcel loop Back to Top

304

User Subroutines

SPR_USR_CP Prototype spr_usr_cp(sp_index, phase_index)

Arguments INTEGER(int_p):: sp_index INTEGER(int_p):: phase_index

Description The subroutine is used to set the specific heat of the droplet phase. You may need to check the species index (sp_index) and phase index (phase_index) before setting the density of droplet. Temperature (temperature) can be used to calculate the specific heat. Set the cp using set_cur_drop_cp().

Activation To activate, set the User Defined option for Specific Heat in the Database Manager on the Thermal tab for the desired species..

Call Structure do ipcl = 1, number of parcels get parcel species (sp_index) and phase (phase_index) do j = 1, Number of Spray Time Steps For the current drop state (temperature) Evaluate drop properties if drop cp is user defined call spr_usr_cp(sp_index, phase_index) end if end do end do end spray time step loop end parcel loop Back to Top

SPR_USR_DEN Prototype spr_usr_den(sp_index, phase_index)

Arguments INTEGER(int_p):: sp_index INTEGER(int_p):: phase_index

Description This subroutine sets the density of droplet phase. One may need to check the species index (sp_index) and phase index (phase_index) before setting the density of the droplet. Temperature and pressure can be used to calculate the density. Set the density using set_cur_drop_density().

Activation

305

CFD-ACE_V2008.2_User_Manual

To activate, set the User Defined option for Density in the Database Manager on the Physical tab for the desired species..

Call Structure do ipcl = 1, number of parcels get parcel species (sp_index) and phase (phase_index) do j = 1, Number of Spray Time Steps For the current drop state (temperature) Evaluate drop properties if drop density is user defined call spr_usr_den(sp_index, phase_index) end if end do endo end spray time step loop end parcel loop Back to Top

SPR_USR_DRAG Prototype spr_usr_drag(sp_index, phase_index)

Arguments INTEGER(int_p):: sp_index INTEGER(int_p):: phase_index

Description The subroutine sets the drag coefficient of the droplet phase. Set the drag coefficient using set_cur_drop_param_drag().

Activation To activate, set the User Defined option for Drag Coefficient on the MO −> Spray tab.

Call Structure do ipcl = 1, number of parcels do j = 1, Number of Spray Time Steps for the current drop state of Droplet calculate properties evaluate non-dimensional parameters if drop drag coefficient is user defined call spr_usr_drag(sp_index,phase_index) end if end spray time step loop

306

User Subroutines

end parcel loop Back to Top

SPR_USR_END Prototype spr_usr_end(iteration, time_step_no, time, global_dt)

Arguments INTEGER(int_p):: iteration INTEGER(int_p):: time_step_no REAL(real_p):: time REAL(real_p):: global_dt

Outputs None

Description This subroutine performs post-processing at the end of the spray calculation (every iteration). For example, using this routine, one could monitor the spray source terms at a particular cell.

Activation To activate, select the At Spray End option in the User Access section on the MO −> Spray tab.

Call Structure do time_step = 1, number of global time steps do iteration = 1, number of global iterations solve gas phase equations if spray model is on then if At Spray Start option is User Access is set then call spr_usr_start(iteration, time_step, time, global_dt) end if do spray trajectory calculations for all the parcels if At Spray End option in User Access is set then call spr_usr_end(iteration, time_step, time, global_dt) end if end do end do end do end global iteration loop end global time step loop (for transient only) Back to Top

SPR_USR_ENGY

307

CFD-ACE_V2008.2_User_Manual

Prototype spr_usr_engy(sp_index, parcel_index)

Arguments INTEGER(int_p):: sp_index INTEGER(int_p):: parcel_index

Description The subroutine could be used to set source terms for the droplet phase energy equation. Units for the source term are J. Set the Energy source using set_cur_drop_energy_source().

Activation To activate, set the User Defined sources for the spray energy equation on the MO −> Spray tab. The heat option must be checked to have this option.

Call Structure do ipcl = 1, number of parcels do j = 1, Number of Spray Time Steps for the current drop state of droplet evaluate properties evaluate non-dimensional parameters evaluate spray equation terms if Energy sources are user defined call spr_usr_engy(sp_index, ipcl) end if end do end do end spray time step loop end parcel loop Back to Top

SPR_USR_HVAP Prototype spr_usr_hvap(sp_index, phase_index)

Arguments INTEGER(int_p):: sp_index INTEGER(int_p):: phase_index

Description The subroutine is used to set the heat of vaporization of the droplet phase. You may need to check the species index (sp_index) and phase index (phase_index) before setting the density of droplet. Temperature (temperature) can be used to calculate the specific heat. Set the heat of vaporization hvap using set_cur_drop_hvap().

Activation To activate, set the User Defined option for Heat of Vaporization in the Database Manager on the Spray tab for the desired species.

308

User Subroutines

Call Structure do ipcl = 1, number of parcels get parcel species (sp_index) and phase (phase_index) do j = 1, Number of Spray Time Steps For the current drop state (temperature) Evaluate drop properties if drop Heat of vaporization is user defined call spr_usr_hvap(sp_index, phase_index) end if end do end do end spray time step loop end parcel loop Back to Top

SPR_USR_MOM Prototype spr_usr_mom(sp_index, parcel_index)

Arguments INTEGER(int_p):: sp_index INTEGER(int_p):: parcel_index

Description The subroutine could be used to set source terms to the droplet phase momentum equations. Units 2 for the source term are m/s . Set the momentum source using set_cur_drop_mom_source().

Activation To activate, set the User Defined sources for spray momentum equations on the MO −> Spray tab

Call Structure do ipcl = 1, number of parcels do j = 1, Number of Spray Time Steps for the current drop state of droplet evaluate properties evaluate non-dimensional parameters evaluate spray equation terms if momentum sources are user defined call spr_usr_mom(sp_index, ipcl) end if end do end do

309

CFD-ACE_V2008.2_User_Manual

end spray time step loop end parcel loop Back to Top

SPR_USR_MASS Prototype spr_usr_mass(sp_index, parcel_index)

Arguments INTEGER(int_p):: sp_index INTEGER(int_p):: parcel_index

Description The subroutine could be used to set source terms for the droplet phase mass equation. Units for the source term are Kg/s. Set the mass equation source using set_cur_drop_mass_source()

Activation To activate, set the User Defined source for the spray mass equation on the MO −> Spray tab when the Heat Module is activated and the Evaporation option is activated.

Call Structure do ipcl = 1, number of parcels do j = 1, Number of Spray Time Steps for the current drop state of droplet evaluate properties evaluate non-dimensional parameters evaluate spray equation terms if mass sources are user defined call spr_usr_mass(sp_index, ipcl) end if end do end do end spray time step loop end parcel loop Back to Top

SPR_USR_NUSL Prototype spr_usr_nusl(sp_index, phase_index)

Arguments INTEGER(int_p):: sp_index INTEGER(int_p):: phase_index

Description

310

User Subroutines

The subroutine could be used to set the Nusselt number of the droplet phase. Set the Nusselt number using set_cur_drop_param_nusl(nusl, error)

Activation To activate, set the User Defined option for Nusselt Number on the MO −> Spray tab when the Heat Module is activated and the Heat option is activated on the MO −> Spray tab.

Call Structure do ipcl = 1, number of parcels do j = 1, Number of Spray Time Steps for the current drop state of Droplet calculate properties evaluate non-dimensional parameters if drop Nusselt Number is user defined call spr_usr_nusl(sp_index,phase_index) end if end do end do end spray time step loop end parcel loop Back to Top

SPR_USR_PSAT Prototype spr_usr_psat(sp_index, phase_index)

Arguments INTEGER(int_p):: sp_index INTEGER(int_p):: phase_index

Description The subroutine sets the saturation pressure of droplet phase. You may need to check the species index (sp_index) and phase index (phase_index) before setting the density of droplet. Temperature (temperature) can be used to calculate the specific heat. Set the psat using set_cur_drop_psat().

Activation To activate, set the User Defined option for Saturation Pressure in the Database Manager on the Spray tab for the desired species.

Call Structure do ipcl = 1, number of parcels get parcel species (sp_index) and phase (phase_index) do j = 1, Number of Spray Time Steps For the current drop state (temperature) Evaluate drop properties if drop saturation pressure is user defined

311

CFD-ACE_V2008.2_User_Manual

call spr_usr_psat(sp_index, phase_index) end if end do end do end spray time step loop end parcel loop Back to Top

SPR_USR_SHER Prototype spr_usr_sher(sp_index, phase_index)

Arguments INTEGER(int_p):: sp_index INTEGER(int_p):: phase_index

Description The subroutine sets the Sherwood number of the droplet phase. This is needed only if evaporation is turned on. Set the Sherwood number using set_cur_drop_param_sher().

Activation To activate, set the User Defined option for Sherwood Number on the MO −> Spray tab when the Heat Module is activated and the Heat and Evaporation options are activated on the MO −> Spray tab.

Call Structure do ipcl = 1, number of parcels do j = 1, Number of Spray Time Steps for the current drop state of Droplet calculate properties evaluate non-dimensional parameters if drop Sherwood Number is user defined call spr_usr_sher(sp_index,phase_index) end if end do end do end spray time step loop end parcel loop Back to Top

SPR_USR_START Prototype spr_usr_start(iteration, time_step_no, time, global_dt)

312

User Subroutines

Arguments INTEGER(int_p):: iteration INTEGER(int_p):: time_step_no REAL(real_p):: time REAL(real_p):: global_dt

Description This subroutine enables you to perform initialization before spray calculations, at the start of the spray calculation (every iteration). For example, using this routine, one could monitor the spray source terms at a particular cell.

Activation To activate, select the At Spray Start option under the User Access section on the MO −> Spray tab.

Call Structure do time_step = 1, number of global time steps do iteration = 1, number of global iterations solve gas phase equations if spray model is on then if At Spray Start option is User Access is set then call spr_usr_start(iteration, time_step, time, global_dt) end if do spray trajectory calculations for all the parcels if At Spray End option in User Access is set then call spr_usr_end(iteration, time_step, time, global_dt) end if end do end do end do end global iteration loop end global time step loop (for transient only) Back to Top

SPR_USR_TSTEP Prototype spr_usr_tstep(sp_index, parcel_index)

Arguments INTEGER(int_p):: sp_index INTEGER(int_p):: parcel_index

Description

313

CFD-ACE_V2008.2_User_Manual

The subroutine sets the time step for the droplet phase equations. The code calculates several time steps and the final time step will be selected as the minimum of all the time steps including the user specified time steps. Set the time step for spray using set_spray_dt().

Activation To activate, select the User Defined option on the SC −> Spray Tab.

Call Structure do ipcl = 1, number of parcels based on initial conditions estimate spray time steps for integrating each spray equation if time step is user defined call spr_usr_tstep(sp_index, ipcl) end if take the minimum of all the time steps do j = 1, Number of Time Steps integrate spray equations evaluate next spray time step evaluate spray equation terms end do end do end time step loop end parcel loop Back to Top

User Shared Library/DLL User Subroutines Building a User Shared Library/DLL ESI CFD has changed the building of user subroutines. You no longer need to build an executable. Instead you create a Shared Library or DLL. CFD-ACE+ Flow solver opens this shared library whenever it requires. You need to specify the shared library or DLL name with or without file extension, (for example, libUserAce.so or libUserAce.DLL or libUserAce.sl) in the CFD-ACE+ RUN panel. The library name will be passed on to CFD-ACE-+ Flow Solver. If the user defined subroutines are not required for a problem, then you do not need to specify the name of the user shared library and CFD-ACE+ Flow solver does not even look for a shared library or DLL. In order to apply the user subroutine, you must compile a customized shared library which will be used by the Flow Solver when needed. This way, there is no need to change the name of the executable in the Preferences panel of CFD-ACE+. The instructions differ depending upon whether the software is installed on a UNIX or Windows platform. From Version 2002, onwards, ESI CFD will be checking the compatibility of user subroutines, user access routines and their arguments, and user shared library/dll version numbers, compatible with flow solver or not. You need to rebuild the shared library/dll with latest builduserlib scripts. If you are using beta codes, then you need to use beta version of the scripts to build the shared library/dll. After this version, onwards, ESI CFD will support the backward compatibility but not forward compatibility.

314

User Subroutines

Compilers The following table outlines the types of required compilers. Platform

Fortran Compiler

Windows XP/2000/NT on Intel or AMD (32-bit)

Compaq Visual Fortran v6.2

Linux Red Hat 9.0+ on Intel or AMD (32-bit)

NAGware v5.0

Linux Red Hat Enterprise Edition on Intel or AMD (32-bit)

NAGware v5.0

SuSE Linux 8.0+ for AMD64

NAGware v5.0

HP-UX 11.0+ on PA-RISC (64-bit)

HP Fortran Compiler v2.5.3

HP-UX 11.22+ on Itanium2 (64-bit)

HP Fortran Compiler v2.8

SGI IRIX 6.5+ on MIPS (64-bit)

MIPSpro Compiler v7.3.1.3m

SUN Solaris 8+ (64-bit)

Sun Fortran 95 v7.1

SGI Altix on Itanium2 (64-bit)

Intel Fortran Compiler v8.0

HP Linux on Intanium2 (64-bit)

Intel Fortran Compiler v7.1

This section includes: •

Building a User Shared Library/DLL for UNIX



Building a User Shared Library/DLL for Windows

User Shared Library-UNIX User Subroutines UNIX Required Files •

build-userlib (shell script, available in $ESI_Software/ACE_SOLVER_2004/bin)



cfdrc_include (fortran include file should be in $ESI_Software/ACE_SOLVER_2004/bin. This is an empty file for all UNIX machines.)



FORTRAN source file (e.g., libUserAce.f written by the user). Use new and modified template, libUserAce.f

For IBM AIX platforms you need need two more files: UserAce.exp and UserAce.imp. These should be present in $ESI_Software/ACE_SOLVER_2004/bin. build-userlib automatically looks for these files at $ESI_Software/ACE_SOLVER_2004/bin.

315

CFD-ACE_V2008.2_User_Manual

Use new and modified template, libUserAce.f present in $ESI_Software/ACE_SOLVER_2004/bin to write and edit your user subroutine. Look for the comments specific to UNIX and Windows machines. See Also Unix-Assumptions Unix-Building User Shared Libraries Unix-Running the Executable Unix-Setting Environment Variables User Subroutines UNIX-Assumptions Assuming: Present working directory: /usr/local/esi_cfd FORTRAN source file: libUserAce.f Executable name: CFD-ACE-SOLVER See Also Unix-Required Files Unix-Building User Shared Libraries Unix-Running the Executable Unix-Setting Environment Variables User Subroutines UNIX-Building User Shared Libraries Build the shared library/object from the FORTRAN source file using build-userlib shell script with the following command: build-userlib libUserAce

build-userlib always uses the name of the FORTRAN source file and adds the extension .so or .sl. This will build a shared library/object with the following name in the current working directory: libUserAce.so libUserACE.sl on HP-UX machines

For example, on HP-UX machines: /usr/local/esi_cfd/libUserAce.so/usr/local/esi_cfd/libUserAce.sl

See Also Unix-Required Files Unix-Assumptions Unix-Running the Executable Unix-Setting Environment Variables

316

User Subroutines

User Subroutines UNIX-Running the Executable While setting up the problem, you need to specify the name of the user shared library (libUserAce.so) in the GUI. GUI writes this information into DTF file with the name as USER_SHARED_LIBRARY. Give only name of the user shared library under the Run/User Shared Library field in the GUI. This field should not include absolute nor relative path where user shared library is available. Then run the executable from the command line: CFD-ACE-SOLVER -dtf or Click on Submit button in CFD-ACE-GUI. NOTE: Make sure that step 1 is done before running the executable. CFD-ACE-SOLVER executable searches for the shared library/object in the following order. 1.

The solver looks for the library in the present working directory.

2.

If the solver does not find the shared library in the present working directory, the solver gives a warning message in and then searches the path specified in the environment variable. LD_LIBRARY_PATH on all UNIX machines LIBPATH on IBM-AIX machine SHLIB_PATH on HP-UX machines

3. If solver does not fine the library in the path specified by environment variable, then Executable stops by writing error message in to file.

See Also Unix-Required Files Unix-Assumptions Unix-Building User Shared Libraries Unix-Setting Environment Variables User Subroutines UNIX-Setting Environment Variable If the user shared library/object is in /usr/local/esi_cfd. You can set the environment variable as shown below. # for sunOS # for cshell or tcsh shell setenv LD_LIBRARY_PATH "/usr/local/esi_cfd:$LD_LIBRARY_PATH" # for bourne shell or kshell set LD_LIBRARY_PATH = "/usr/local/esi_cfd:$LD_LIBRARY_PATH" export LD_LIBRARY_PATH

# for OSF1 (DEC) # for cshell or tcsh shell setenv LD_LIBRARY_PATH "/usr/local/esi_cfd:$LD_LIBRARY_PATH"

317

CFD-ACE_V2008.2_User_Manual

# for bourne shell or kshell set LD_LIBRARY_PATH = "/usr/local/esi_cfd:$LD_LIBRARY_PATH" export LD_LIBRARY_PATH

# for Linux # for cshell or tcsh shell setenv LD_LIBRARY_PATH "/usr/local/esi_cfd:$LD_LIBRARY_PATH" # for bourne shell or kshell set LD_LIBRARY_PATH = "/usr/local/esi_cfd:$LD_LIBRARY_PATH" export LD_LIBRARY_PATH

# for sgi 6.5 # for cshell or tcsh shell setenv LD_LIBRARY_PATH "/usr/local/esi_cfd:$LD_LIBRARY_PATH" # for bourne shell or kshell set LD_LIBRARY_PATH = "/usr/local/esi_cfd:$LD_LIBRARY_PATH" export LD_LIBRARY_PATH

# for hp-ux 11.0 # for cshell or tcsh shell setenv SHLIB_PATH "/usr/local/esi_cfd:$SHLIB_PATH" # for bourne shell or kshell set SHLIB_PATH = "/usr/local/esi_cfd:$SHLIB_PATH" export SHLIB_PATH

# for IBM AIX # for cshell or tcsh shell setenv LIBPATH "/usr/local/esi_cfd:$LIBPATH" # for bourne shell or kshell set LIBPATH = "/usr/local/esi_cfd:$LIBPATH" export LIBPATH

See Also Unix-Required Files Unix-Assumptions Unix-Building User Shared Libraries

318

User Subroutines

Unix-Running the Executable

User Shared Library-Windows User Subroutines Windows-Required Files •

build-userlib.bat (MS-DOS batch file to build userlib, available in $CFDRCDIR\bin)



build-userlib.mak (should be in $CFDRCDIR\bin)



cfdrc_include (fortran include file should be in $CFDRCDIR\bin)



FORTRAN file cfdrc_access_calls.f (should be in $CFDRCDIR\bin)



FORTRAN source file libUserAce.f (written by the user)

Use the new and modified template, libUserAce.f that is found in your $CFDRCDIR\bin directory to write and edit your user subroutine. Look for the comments specific to UNIX and Windows machines. One the user subroutine is written, compile and build the user shared library (.DLL file) using the build-userlib.bat batch script. build-userlib.bat always looks in $CFDRCDIR\bin for the extra files, build-userlib.mak and cfdrc_access_calls.f User Subroutines Windows-Assumptions Present working directory: C:\esi_cfd FORTRAN source file: libUserAce.f Executable name: CFD-ACE-SOLVER.exe User Subroutines Windows-Building User Dynamic Linked Library (DLL) Build the DLL from the FORTRAN source file using build-userlib batch script with the following command. build-userlib.bat always looks in $ESI_Software/ACE_SOLVER_2004/bin for the extra files, build-userlib.mak and cfdrc_access_calls.f build-userlib.bat libUserAce

build-userlib.bat always uses the name of the FORTRAN source file and adds the extension .dll. This will build a DLL with following name in the current working directory. libUserAce.dll

For example: C:\esi_cfd\libUserAce.dll

User Subroutines Windows-Running the Executable While setting up the problem, you need to specify the name of the user DLL (libUserAce.dll) in the GUI under the Run/User Shared Library field. GUI writes this information into DTF file with the name as USER_SHARED_LIBRARY. Give only name of the user DLL which should not include neither absolute nor relative path where user DLL is available. Then run the executable from the command line

319

CFD-ACE_V2008.2_User_Manual

CFD-ACE-SOLVER.exe -dtf model_name.DTF or Click on Submit button in CFD-ACE-GUI. NOTE: Make sure that step 1 is done before running the executable. CFD-ACE-SOLVER.exe executable Searches for the DLL in the following order. 1.

The solver looks for the DLL in present working directory.

2.

If the solver does not find the DLL in present working directory, the solver gives a warning message and then searches the path specified in the environment variable named PATH

3.

If the solver does not find the library in the path specified by environment variable, then the Executable stops by writing an error message into file.

User Subroutines Windows-Setting Environment Variable For example, if your DLL is in C:\esi_cfd, you can set the environment variable called PATH as follows: 1.

Go to Control Panel/System/Advanced tab.

2.

Click on the environment variable named PATH.

3.

Add the directory C:\esi_cfd to the path, using a semicolon (;) as separator.

4.

Open a new MS-DOS prompt and run the code.

User Subroutines FAQ Why can't user subroutines be compiled on Linux AMD64? The NAGWare compiler as installed does not work properly for building user subroutines for CFD-ACE+. To enable it to work properly you will need to contact NAGWare customer support and obtain the -fPIC versions of the following object files and libraries quickfit.o safefit.o libf96.a In a normal installation these files are located in the directory /usr/local/lib/NAGWare Which unit numbers (for writing files) are ok to use in user subroutines? Numbers 100+ are ok to use.

320

Numerical Methods Numerical Methods Introduction The Numerical Methods feature yields a discrete solution of the field which is comprised of the values of the variables at the cell centers. The Partial Differential Equations (PDE’s) governing each module’s physics are presented in each module. A numerical method to solve these PDE’s consists of the discretization of the PDE’s on a computational grid, the formation of a set of algebraic equations, and the solution of the algebraic equations. Numerical Methods includes: •

Numerical Methods-Discretization



Numerical Methods-Velocity-Pressure Coupling



Numerical Methods-Boundary Conditions



Numerical Methods-Solution Methods



Numerical Methods-References

Numerical Methods-Discretization Numerical Methods Discretization Introduction To start the numerical solution process, discretization of the differential equations is introduced to produce a set of algebraic equations. In CFD-ACE+, the finite-volume approach is adopted due to its capability of conserving solution quantities. The details of the finite volume approach and the discretization methods are described in the following sections: •

Discretization-Finite Volume Method



Discretization-Transient Term



Discretization-Convection Term



Discretization-Diffusion Terms



Discretization-Source Term Linearization



Discretization-Finite Difference Equations

Numerical Methods Discretization-Finite Volume Method The solution domain is divided into a number of cells known as control volumes. In the finite volume approach of CFD-ACE+, the governing equations are numerically integrated over each of these computational cells or control volumes. An example of one such control volume is shown.

321

CFD-ACE_V2008.2_User_Manual

3D Computational Cell (Control Volume)

The geometric center of the control volume, which is denoted by P, is also often referred to as the cell center. CFD-ACE+ employs a co-located cell-centered variable arrangement, i. e. all dependent variables and material properties are stored at the cell center P. In other words, the average value of any quantity within a control volume is given by its value at the cell center. Most of the governing equations can be expressed in the form of a generalized transport equation, equation 12-1: (12-1)

This equation is also known as the generic conservation equation for a quantity φ. Integrating this equation over a control-volume cell, we have: (12-2)

Numerical Methods Discretization-Transient Term The transient term in equation 12-2 is integrated as follows: (12-3)

322

Numerical Methods

where the superscript o denotes an older time, while no superscript denotes the current or the new time. The cell volume, represented by ϑ, may change with time (in particular when moving grids are used).

Numerical Methods-Discretization-Convection Term Numerical Methods Discretization-Convection Term Introduction The convection term is discretized as follows: (12-4)

where subscript e denotes one of the faces of the cell in question, Ae is the area of face e, Ven represent the velocity component in the direction that is normal to the face, Ce is thus the mass flux across the face. Evaluation of the mass flux, Ce, will be described later when the issue of velocity-pressure coupling is addressed. The evaluation of φ at control volume faces is described next. For ease of illustration, let us consider a 2D control volume as shown. Because the solution variable φ is available only at the cell-centers, the cell-face values of φ need to be interpolated. Various interpolation schemes with varying levels of numerical accuracy and stability are in use today. In CFD-ACE+ you can choose from several popular schemes, each of which is illustrated below in the evaluation of φe, the value at face e. This section includes: •

First-Order Upwind Scheme



Central Difference Scheme



Second-Order Upwind Scheme



Second-Order Upwind with Limiter



Smart Scheme



Third-Order Scheme

323

CFD-ACE_V2008.2_User_Manual

2D Computational Cell (Control Volume)

Numerical Methods Discretization-Convection Term-First-Order Upwind Scheme In this scheme, φe is taken to be the value of φ at the upstream grid point, i. e. φe equals either φP or φE depending on the flow direction at cell face e. Mathematically, φ at this face can be expressed as: (12-5)

As its name implies, this scheme has first-order accuracy and is one of the most stable schemes. Numerical Methods Discretization-Convection Term-Central Difference Scheme In the conventional second-order accurate central difference scheme, φe is evaluated by arithmetically averaging the values at cell centers P and E, assuming that φ varies linearly between the two centers: (12-6)

where

is the geometrical weighting function at face e.

It is well known that conventional central difference scheme may give rise to non-physical oscillations in the numerical solution. Moreover, most iterative methods tend to be unstable when central differencing is used to evaluate convection terms. For most problems, some damping (or artificial/numerical viscosity) is needed for stability. In CFD-ACE+, central difference scheme with damping is constructed:

324

Numerical Methods

(12-7)

where α is a blending factor that combines the central scheme with the first-order upwind scheme to produce a stable scheme. The scheme represented by the preceding equation has an order of accuracy between 1 and 2. You may note that α= 0 yields the conventional second-order accurate central difference scheme, while α = 1 results in the first-order accurate upwind scheme. Numerical Methods Discretization-Convection Term-Second-Order Upwind Scheme The original idea of this scheme is to evaluate the cell face value by using linear interpolation of values at two upstream cells, instead of one. To implement this scheme in an unstructured grid system, quadrangle cells are treated differently from triangle cells in CFD-ACE+. With the index notation in figure 12-2, the second-order upwind scheme gives: (12-8)

Again, a blending factor is used with this scheme: (12-9)

Numerical Methods Discretization-Convection Term-Second-Order Upwind with Limiter To achieve boundedness of the interpolation given by the second-order upwind scheme, the face value may be further limited to within the range of the surrounding cell center values. Such a scheme is also implemented in CFD-ACE+ (Barth and Jaspersen, 1989). Numerical Methods Discretization-Convection Term-Smart Scheme For the central difference scheme implemented in CFD-ACE+, the damping coefficient, i. e. the blending factor a, which you specify, is used throughout the flow domain. However, damping is needed only in certain limited regions with steep spatial variation of flow variables. In CFD-ACE+, a unique damping scheme, called the Smart scheme, is designed to adaptively calculate the damping coefficient depending on the local variation of φ (Gaskell and Lau, 1988). A new function known as the minimode limiter is defined as follows (12-10)

325

CFD-ACE_V2008.2_User_Manual

The Smart Scheme with adaptive damping can also be represented by defining damping factor as: (12-11)

where re is a parameter defined to measure the variation of φ. It is convenient to introduce numerical subscripts for φ to represent the functional form of re. Let i-1, i, and i+1 denote the grid points B1, P, and E respectively (see figure). (12-12)

Thus u is +1 or -1. The smart scheme reduces to the first-order upwind scheme when re < 0, to central difference scheme when re > 1, and to the second-order upwind scheme for 0aP, and

>>

the governing equation reduces to

,

which is what we set out to achieve. An example application of this last option is or fixing the temperature in a range of cells to some value. In this case, we must actually compute the desired enthalpy, since CFD-ACE+ solves for the enthalpy (H), and not the temperature. Assuming a constant specific heat Cp, and a desired temperature T*, the desired enthalpy is H* = CpT* which value is then used to set the enthalpy. The source term specified is the absolute source term for the cell (as opposed to per unit volume or mass). The units of Su for a variable phi will be equal to the units of mass flow rate (kg/sec) times the units for phi. For example, the units of Su for velocity (momentum source) will be [kg/sec][m/sec], or newtons, the units of Su for enthalpy (energy source) will be [kg/sec][J/kg] or watts, and the units of Su for a unitless variable, such as mass fraction will be simply [kg/sec].

Numerical Methods Discretization-Finite Difference Equations If the numerically integrated transient, convection, diffusion and source terms are assembled together, it results in the following linear equation.

(12-26) where the subscripts nb denote values at neighboring cells, anb are known as the link coefficients. For convenience, we use ap to represent ap-Sp in the following sections. This finite difference equation (PDE) is the discrete equivalent of the continuous flow transport equation we started with. This FDE, in general, is nonlinear because the link coefficients themselves are functions of φP, φnb, etc. When an FDE is formulated for each computational cell, it results in a set of coupled nonlinear algebraic equations. No direct matrix inversion method is available to solve a set of nonlinear algebraic equations. Therefore, an iterative procedure is employed in CFD-ACE+ at every time step. A linear FDE is formed by evaluating the link coefficients with the values of φ available at the end of the previous iteration.

Numerical Methods-Velocity-Pressure Coupling Numerical Methods Velocity-Pressure Coupling Introduction The continuity equation, which governs mass conservation, requires special attention because it cannot be written in the form of the general convection-diffusion equation. It is used to determine the pressure field in the pressure-based method as employed in CFD-ACE+. This section includes: •

Continuity and Mass Evaluation

329

CFD-ACE_V2008.2_User_Manual



Pressure Correction and SIMPLEC Algorithm

Numerical MEthods Velocity-Pressure Coupling-Continuity and Mass Evaluation The mass conservation equation can be written as:

(12-27) Integrating the above equation over the cell in the figure, we have:

(12-28) Vne is

where the face-normal component of the velocity at face e, which is obtained by the inner product of the velocity vector (u,v,w) and the face-normal unit vector (nx,ny,nz), .

(12-29)

Because the fluid density and velocities are available only at cell centers, their face values need to be interpolated from cell-center values. Linear interpolation de-couples the velocity and pressure fields giving rise to the well known checkerboard instability, in particular, for incompressible flows. In CFD-ACE+, the checkerboard problem is circumvented by following the method proposed by Rhie and Chow (1983) and later refined by Peric (1988). In this method, the cell-face mass flux is evaluated by averaging the momentum equation to the cell faces and relating the cell face velocity directly to the local pressure gradient Without going into the details of the derivations, the three Cartesian components at the center of face e are obtained as follows, (12-30) (12-31) (12-32) is again the geometrical weighting function at face e and Ds are evaluated from link where coefficients of momentum equations. The density at the face may be estimated with any one of the differencing schemes described in online help. With the face values of both velocity and density obtained, the mass flux evaluation is completed.

Numerical Methods Velocity-Pressure Coupling-Pressure Correction and SIMPLEC Algorithm Solutions of the three momentum equations yield the three Cartesian components of velocity. Even though pressure is an important flow variable, no governing PDE for pressure is presented. Pressure-based methods utilize the continuity equation to formulate an equation for pressure. In CFD-ACE+, the SIMPLEC scheme has been adopted. The basic framework of this method is briefly described below.

330

Numerical Methods

SIMPLEC stands for Semi-Implicit Method for Pressure-Linked Equations Consistent, and is an enhancement to the well known SIMPLE algorithm. In SIMPLEC, originally proposed by Van Doormal and Raithby (1984), an equation for pressure-correction is derived from the continuity equation. It is an inherently iterative method. The finite-difference form of the x-momentum equation can be rewritten as

(12-33)

with the subscript P again indicating that the equation is written for cell center P. The pressure field should be provided to solve equation 12-33 for u. However, the pressure field is not known a priori. If the preceding equation is solved with a guessed pressure (or the latest available pressure in an iterative procedure) P*, it will yield velocity u* which satisfies the following equation

(12-34) In general, u* will not satisfy continuity. The strategy is to find corrections to u* and P* so that an improved solution can be obtained. Let

and

stand for the corrections. (12-35) (12-36)

An expression for

can be obtained by subtracting equation 12-34 from equation 12-33:

(12-37) Because our aim is to find an incrementally better solution, we will approximate giving us an expression for

by

:

(12-38) where:

(12-39) Moreover, an expression for from the cell-center values:

, the velocity correction at the face, is obtained by averaging

331

CFD-ACE_V2008.2_User_Manual

(12-40) Let us now define a mass flux as:

(12-41) The mass conservation equation 12-28 is rewritten as:

(12-42) If u* and ρ* is used to evaluate Ce and the resulting C*e will not satisfy the preceding equation. Let represent the correction to C, i.e.

(12-43) Equation 12-42 can be recast as:

(12-44) Sm represents the mass correction or mass source in the control volume:

(12-45)

From equation 12-43, we have: (12-46) In deriving the preceding equation, terms containing products of primes have been neglected. For incompressible flows

is zero. For compressible flows

is estimated as:

(12-47) An equation of state is used to estimate

. If the fluid is a perfect gas:

(12-48)

332

Numerical Methods

The density correction at the cell face

, is estimated from

and

using the same

scheme used to estimate The correction to face-normal velocity is obtained as:

(12-49) With the face-normal velocity correction and the density correction thus expressed in terms of pressure correction, a pressure correction equation can be obtained from equation 12-44:

(12-50) The SIMPLEC procedure can be summarized as follows: 1.

Guess a pressure field P*.

2.

Obtain u*, υ*, and w* by solving discretized momentum equation 12-34.

3.

Evaluate C* from ρ*, u*, using the procedure outlined earlier in this section.

4.

Evaluate mass source from equation 12-45.

5.

Obtain

by solving equation 12-50. to correct the pressure and velocity fields using equation 12-36 and equation 12-35.

6.

Use

7.

Solve the discretized equations for other flow variables such as enthalpy, turbulent quantities, scalars etc.

8.

Go to step 2 and repeat the procedure until convergence is obtained.

Fractional Step Method (FTS) Fast Time Stepping (FTS) is a new feature for efficient transient simulations. It speeds up practical flow simulations typically by factor of five. For flows with complex geometry, FTS speedup is even higher, can be orders of magnitude, as sharp corners and other high gradients in the geometry slows down the convergence of the current Standard Time Stepping (STS). FTS removes a great deal of this limitation. FTS enhances the time stepping efficiency in two ways. First, by splitting the momentum equations and pressure equation, this has the effect of reducing non-linearity in the flow system. Second, in FTS the system matrixes of both momentum and pressure equations are constant in the course of iterations within a timestep. Only the right hand side of the matrix equation changes during the iterative process. These two main factors contribute to the fast convergence in each timestep. The splitting of the flow system into momentum and pressure, introduces a splitting error. However, the FTS methods in CFD-ACE+ make sure that the splitting error is second order in time, which does not reduce the overall temporal accuracy when compared to the Standard Time Stepping (STS). Two methods are implemented in FTS that have second order splitting error in time, i.e. Fractional Step Method (FSM) and PISO Method. FSM is based on an approximate factorization algorithm, while PISO is a higher order extension of the SIMPLE algorithm. The fact that FTS speedup relies on decoupling a system of equations into smaller subsystems in reducing the non-linearity implies that as the physics of the system get more complex, the greater the advantage of FTS compared to STS for transient simulations. The speedup is thus higher for three dimensional flows.

333

CFD-ACE_V2008.2_User_Manual

The FTS in the current release of CFD-ACE+ has several limitations, which will be removed gradually in the course of its further development and enhancement. The FSM method is currently only applicable for incompressible flow and turbulence. The PISO method is still in its first order version, therefore not officially released yet, but can be activated through a DTF input and applicable for most physics the same way as the current Standard Time Stepping (STS). DTF inputs are provided for FTS to allow for further tunings and experimenting beyond the essential CFD-ACE-GUI inputs. The idea is to minimize the DTF inputs in the future when the optimal FTS setting is established by user experiences. The momentum equation for the second order fractional step method is given in the equation below: (1)

where yields

is the cross or explicit diffusion term. Rearranging

(2)

where (3)

(4)

(5)

Momentum error due to splitting can be found by doing [(6) - [(7)+(8)+(9)] yielding:

334

Numerical Methods

(6)

Rearranging (7)

Hence, the momentum error is second order. The boundary conditions can be expressed as: (8)

From (3) and (4), the fact that the boundary condition is second order is apparent: (9)

Looping over the boundaries yields: (10)

or (11)

Numerical Methods Boundary Conditions The general treatment of boundary conditions in the CFD-ACE+ finite-volume equations is discussed in this section. A control cell adjacent to the west boundary of the calculation domain is shown.

335

CFD-ACE_V2008.2_User_Manual

Computational Boundary Cell

A fictitious boundary node labeled B is shown. The finite-volume equation for node P will be constructed as: (12-51) coefficient is set to zero after the links to the boundary node are incorporated into the source term S in its linearized form, (12-52) All CFD-ACE+ boundary conditions are implemented in this way.

Fixed Value Boundary Condition If the boundary value is fixed as φB, the source term is modified as: (12-53) (12-54)

Zero-Flux Boundary Conditions At zero-flux boundaries, such as adiabatic walls for heat and symmetric boundaries for any scalar variables, the boundary link coefficients are simply set to zero without modifying source terms.

336

Numerical Methods

Numerical Methods-Solution Methods Numerical Methods Solution Methods Introduction CFD-ACE+ uses an iterative, segregated solution method wherein the equation sets for each variable are solved sequentially and repeatedly until a converged solution is obtained. In this chapter, the overall solution method is presented in flowchart form for the solution algorithm. Additional details of the solution procedure are also presented, namely under-relaxation, relevant details of the linear equation solvers. The Solution Methods section includes: •

Solution Methods-Solution Procedure



Solution Methods-Under-Relaxation



Solution Methods-Linear Equation Solvers

Numerical Methods Solution Methods-Solution Procedure The overall solution procedure is shown below. You can specify the parameters that dictate how many times a procedure is repeated. These are the number of iterations (NITER), and, in the case of a transient simulation is simply repeated at each time step of a transient simulation. The number of iterations to be performed is dictated by the overall residual reduction desired. At each iteration the program calculates a residual for each variable, which is the sum of the absolute value of the residual for that variable at each computational cell. You want to see a five order of magnitude reduction in the residual before declaring that convergence has been obtained.

337

CFD-ACE_V2008.2_User_Manual

Solution Flowchart

Numerical Methods Solution Methods-Under Relaxation Under relaxation of dependent and auxiliary variables is used to constrain the change in the variable from iteration to iteration in order to prevent divergence of the solution procedure. For all dependent variable, this is done by modifying equation 12-26 in the following way:

338

Numerical Methods

(12-55) is the current value of . At convergence, when there is no change in from where one iteration to the next, the equation is not modified at all by the addition of these terms. Prior to convergence, however, they provide a link between the new value of

and the current iteration

. The larger this link or the value of I the stronger the under-relaxation.

value

Reasonable values for I can be deduced if we think of it as being analogous to the transient term link coefficient

(12-56) is a false time step. If I is equal to 1.0, then is comparable to the maximum time where step allowed in an explicit time-marching solution scheme. Since CFD-ACE+ uses an implicit solution scheme it is possible to use larger false time steps and, hence, smaller values of I. Values of I in the range of 0.2 to 0.8 are common. In very difficult problems it may be necessary to use values of I in excess of 1.0. The auxiliary variables ρ, P, T and μ can be under-relaxed by specifying a linear under-relaxation factor, λ, which is applied in the following way: (12-57) where θ is the updated value of the auxiliary variable, θ is the value of that auxiliary variable that would be calculated with no under-relaxation and θ* is the current iteration value of the auxiliary variable. new

Numerical Methods-Solution Methods-Linear Equation Solvers Numerical Methods Solution Methods-Linear Equation Solvers Introduction Once the equation set for a variable has been assembled it must be solved. Iterative equation solvers are preferred for this task because they are more economical in terms of memory requirements than are direct solvers. CFD-ACE+ contains the following linear equation solvers: •

Conjugate Gradient Squared (CGS) Solver



Algebraic MultiGrid (AMG) Solver

Numerical Methods Solution Methods-Linear Equation Solvers-Conjugate Gradient Squared (CGS) +Preconditioning Solver Conjugate gradient type solvers have many advantages over classic iterative methods such as suitability for vectorization and the lack of user-specified parameters. The CGS algorithm has been incorporated into the CFD-ACE+ program. The CGS algorithm applied to the system A φ = S is expressed as follows: Initialization (n = 0)

339

CFD-ACE_V2008.2_User_Manual

(12-58) th

n sweep (n > 0)

(12-59)

th

where rn+1 is the residual at the n sweep.

The convergence rate of the above CGS solver depends on the spectral radius of the coefficient matrix and can be effectively accelerated by preconditioning the system. This preconditioning is to , where P is a accomplished by transforming the system A preconditioning matrix which approximates A. Incomplete Cholesky decomposition is used as a pre-conditioner in CFD-ACE+. See Saad (1996) for details. See Also Algebraic MultiGrid (AMG) Solver Numerical Methods Solution Methods-Linear Equation Solvers-Algebraic Multi-Grid (AMG) Solver Multigrid approach offers two major advantages over other iterative methods including the CGS solvers discussed above: (a). the CPU time only increase in proportion to the number of unknowns in the equations; (b). faster convergence particularly for fully-unstructured meshes. The basic idea of a multi-grid solution is to use a hierarchy of grids, from fine to coarse, to solve a set of equations, with each grid being particularly effective for removing errors of wavelength characteristic of the mesh spacing on that grid. The solution method can be best illustrated for a two-grid system:

340



On the fine grid (original grid) obtain residual after performing few iterations



Perform iterations on the coarse grid to obtain corrections, with the fine-grid residual being imposed as a source term



Interpolate the corrections to the fine grid and update the fine grid solution

Numerical Methods



Repeat the entire procedure until the residual is reduced to the desired level

There are two primary types of multi-grid methods, geometric and algebraic multi-grid, respectively. In CFD-ACE+ the latter method is adopted because it uses only the equation matrix itself (not the geometry) to generate the coarse grids. For details of this method, refer to Lonsdale (1993).

Numerical Methods References Barth, T.J., and Jespersen, D.C., "The Design and Application of Upwind Schemes on Unstructured Meshes." 27th Aerospace Sciences Meeting and Exhibit, Reno, Nevada, AIAA89-0366, 1989. Gaskell, P.H., and Lau, A.K.C., "Curvature-Compensated Connective Transport: SMART, a New Boundedness Preserving Transport Algorithm." International Journal for Numerical Methods in Fluids, vol. 8, pp. 617-641, 1988. Lonsdale, "An algebraic multigrid solver for the Navier-Stokes equations on unstructured meshes." Int. J. Num. Meth. Heat Fluid Flow, Vol. 3, pp. 3-14, 1993. Patankar, S.V., "Numerical heat transfer and fluid flow." McGraw-Hill, New York, 1980. Peric, M., Kessler, R., and Scheuerer, G., "Comparison of finite-volume numerical methods with staggered and collocated grids." Computers and Fluids, Vol. 16, No. 4, pp. 389-403, 1988. Rhie, C.M. and Chow, W.L., "Numerical study of the turbulent flow past an airfoil with trailing edge separation." AIAA Journal, Vol. 21, No. 11, pp. 1525-1532, 1983. Saad, Y., "Iterative Methods for Sparse Linear Systems." PWS, Boston, 1996. Van doormaal, J. P., and Raithby., G. D., "Enhancements of the SIMPLE Method for Predicting Incompressible Fluid Flows." Numer. Heat Transfer, 7, pp. 147-163, 1984.

341

Mixing Plane Mixing Plane Introduction The Mixing Plane feature models turbo-machinery blade rows in a multistage environment by deploying a standard 3D Navier Stokes solver on a number of blade rows. The principal assumption being that the flow is steady relative to each blade row individually and that the rows can communicate via inter-row mixing planes. These mixing planes introduce circumferential averaging of flow properties but preserve quit general radial variations. The mixing plane concept was first introduced by Dawes[1] and has been used in the turbo machinery community (Singh, 1995). A paper on modeling of torque converters with the present formulation has been presented by the developers and customers at the SAE International Congress (Shin, 1999). The Mixing Plane section includes: •

Mixing Plane-Applications



Mixing Plane-Limitations



Mixing Plane-Implementation



Mixing Plane-References

Mixing Plane Applications Mixing Plane is used in modeling/analysis of various turbo machinery devices. Since the method reduces an inherently transient system to a series of steady state units separated by mixing planes, it reduces modeling/analysis time dramatically. Various uses of mixing planes include: •

Modeling of Torque Convertors



Study of rotor/stator interaction in multiple row turbine/compressor sections

Mixing Plane Theory In progress.

Mixing Plane Limitations •

The Mixing plane cannot be used with any module other than flow, turbulence and heat



Mixing plane formulation works only with structured grids



The grid in the circumferential direction should be circular and radii of the corresponding grid lines should match exactly



Mixing plane does not work in the parallel mode



Present formulation of the mixing plane works only with incompressible flow



Total number of pairs of mixing planes boundary conditions allowed is 9

Mixing Plane Implementation The Implementation section describes model setup for simulation with CFD-ACE+ using the mixing planes. Usually mixing planes separate a rotating domain from a stationary domain or two rotating domains that are rotating at different speeds. All flow data is circumferentially averaged at the boundaries separating these domains. These boundaries are called mixing planes. Mixing planes appear in pairs. One in each domain as defined above.

343

CFD-ACE_V2008.2_User_Manual

Model Setup and Solution The Pair of Mixing Plane boundaries are identified by their names. CFD-ACE+ provides the inputs required for the set up of mixing plane boundaries. Setting up the problem:

Frame rotation specification Mixing plane problems will have different blade stages rotating at different speeds, and/or are stationary. To impose different rotational speeds: 1.

Use the Frame (VC Based) option for rotation in the MO panel.

2.

Specification of frame rotation is then done by selecting the rotation option in VC panel. For rotating frames, turn on rotation and then input (x0,y0,z0) and (wx,wy,wz) for the domain. One can group domains rotating at the same speed and assign the rotational speed.

Boundary Condition Specification Currently the mixing plane boundaries are identified through the name of the boundary patch. A mixing plane has two boundary patches (or patch groups) associated with it. One patch is upstream of the mixing plane, and the other is 'downstream' of the mixing plane. The up/down stream orientation is determines based on the know flow direction through the interface. To specify a complete mixing plane boundary: 1.

Name the upstream boundary patch (or each patch in a group if there is more than one patch in the boundary) MIXPUP_number; where number refers to the mixing plane number. Currently a single digit number is supported, so up to 9 mixing planes can be handled. The boundary condition type must be outlet with fixed pressure at the MIXPUP boundary. The parameter number should start at 1.

2.

Name the downstream boundary patch (or all patches in a group); MIXPDN_number. Here number refers to the mixing plane number. For a given mixing plane pair, the parameter number will obviously be the same in the upstream and downstream mixing plane boundary specifications. This boundary must be of the type inlet with fixed vel. (Cartesian).

Additional Input A text file named axis.dat must be included in the directory where the DTF file is stored. This file has additional data that will be moved to the GUI later on. The file contains five lines of data as described below: 1.0 0.0 0.0 0.0 0.0 0.0 1 -0.0228 0.0136 0.09 10.0 1

Description of the Parameters in Each Line First line gives the direction cosines of the axis of rotation. Three real numbers should be specified. No format restrictions. These are simply the x, y and z components of a unit vector along the axis of rotation. Thus, if Cartesian X is the axis of rotation, the direction cosines will be (1.0, 0.0, 0.0). Second line contains x0,y0,z0 coordinates of a point on the axis of rotation (similar to the frame rotation specification). This can be any format. Third line contains four parameters that are used to set up a reference point for pressure. This is needed for problems where there are no explicit pressure levels specified anywhere in the flow field.

344

Mixing Plane

The first parameter is an integer flag, which can be 0 or 1. If the flag is 0, the remaining parameters in this line are ignored. This flag should be set to 0 if the flow problem contains a specified pressure boundary, other than those in the mixing plane. If the flow problem has no specified pressure exit boundaries other than the mixing planes (e.g. torque converter), the flag should be set to 1. The next three numbers then provide the approximate coordinates of a point in the flow field (xref,yref,zref) where the reference pressure is to be set to zero. CFD-ACE+ then searches for the cell closest to the specified reference coordinates. Fourth line contains a velocity value that will be used to initialize the velocity field. Initialization of the velocities is important in mixing plane formulation, to ensure proper flow direction through the mixing plane. The specified value is taken as the grid-aligned velocity in the coordinate direction of the flow in the mixing plane. CFD-ACE+ then internally resolves the velocity in appropriate components using local grid metrics. The initial velocities specified through the user interface are overwritten. Fifth Line contains an integer variable that specifies the iteration interval for updating and data transfer across the mixing plane interface. Default/recommended value is 1, i.e. the mixing plane data exchange will be done at every iteration.

Special Instructions There are no special requirements for running the mixing plane. Currently the mixing plane formulation can handle incompressible turbulent flow. One recommendation is to tighten the linear solver criteria: we recommend the solver criteria for velocities and pressure to be below 1.e-6, (in the SC panel under solvers button)

Mixing Plane References Dawes, W. N., "Toward Improved Throughflow Capability: The Use of Three-Dimensional Viscous Flow Solvers in a Multi-Stage Environment." Journal of Turbo machinery, Vol. 114 pp 8-17. Shin, S., Chang, H., and Athavale, M., "Numerical Investigation of the pump flow in an automotive torque convertor." 1999 Transmission and Driveline Systems Symposium, March 1-4, 1999, ISSN0148-7191. Singh, G., Walker, P. J., and Haller, B. R., "Development of Three-Dimensional Stage viscous time marching method for optimization of short height stages, 1st European Conference on Turbo machinery-Fluid Dynamics and Thermodynamic Aspects.” Erlangen, 1-3 March 1995.

345

Filament Model Filament Model Introduction Engineering problems frequently contain embedded objects or components that are predominantly one-dimensional e.g., long and slender with transverse length scales that are much smaller than the isotropic length scales of the multi-dimensional space in which the objects are embedded. Those objects are called filaments. Examples include micro-channels, in fluidic devices, optical or electrical leads, resistive electric micro-heaters, or conducting paths in microchips. Conventional numerical simulation on a domain containing such disparate length scales requires simultaneous grid of small geometrical features in an otherwise large-scale domain. The main challenge is difficulty in mesh generation caused by the large differences in scale length. This can unnecessarily increase the total number of cells by several orders of magnitude. If the number of such small features is large, the gridding as all as computational process can become prohibitive. The Filament Model meshes and simulates domains with multiple length scales and dispersed topologies. It provides the framework for modeling one-dimensional devices and components embedded in multi-dimensional spaces. Its primary characteristic is that one-dimensional and multi-dimensional objects are meshed completely independent of each other without regard to their relative location or alignment and are subsequently combined into a single, unified composite mesh. The coupling between the different domains is fully automated through exchange of source terms between these domains of different dimensions. During the simulation, physical phenomena such as fluid flow and heat transfer are solved separately in the filament and background, but they interact with each other through the change of the source of mass, momentum, energy, etc. The source terms are evaluated locally on a cellby-cell basis, depending on the solution values in these domains and the manner in which the one-dimensional grids intersect with the multi-dimensional grids. The Filament Model section includes: •

Filament Model-Applications



Filament Model-Limitations



Filament Model-Implementation



Filament Model-Frequently Asked Questions

Filament Model Applications Engineering designs and natural entities frequently contain embedded objects or components that are predominantly one-dimensional i.e., long and slender with transverse length scales that much smaller than the isotropic length scales of the multi-dimensional space in which the objects are embedded. Examples include: •

Micro channels in fluid devices that exchange mass, momentum and heat



Optical or electric leads which exchange heat sources



Resistive electric micro heaters



High density wire bonds in packages



Wave guides and antennas in open spaces



Modeling of resistive heater coils in baths, heaters, blowers etc.



Coils used to heat plasmas inductively



Fluid channels in biomedical such as blood vessels

347

CFD-ACE_V2008.2_User_Manual



348

HVAC pipe systems

Filament Model

Heating Element in Cross Flow Model

Electromagnetic Sources from a Coil Model

Capillary Electrophoresis Model

349

CFD-ACE_V2008.2_User_Manual

Blood Vessel Model with Grid

Drug Release Through Blood Vessel Model

Filament Model Limitations

350



The Filament Model can interact with only part of the modules in CFD-ACE+, including flow, heat, magnetic, and partial support for chemistry modules



The filament domain boundaries cannot be set up as cyclic boundaries



The model must be built in meters. Scaling cannot be used.

Filament Model

Filament Model Implementation The Implementation section describes how to setup a model for simulation using the Filament Model. Filaments are defined as slender, flexible thread-like objects. The thread-like quality implies that the ratio of transverse to axial dimensions is small, and the filament can be gridded with a single cell in the transverse direction. The filaments are 3D structures represented as a length-wise polyhedral mesh. The filaments are embedded in a surrounding macroscopic domain or they can join several different domains. In this approach, the filaments occupy a small volume relative to the computational cells of the surrounding domain. This is an assumption used to derive the model's calculating interaction source terms between the filaments and the surrounding domains. Most systems with filament modules have either multi-dimensional grids or filament grids. The multi-dimensional grids are created the usual way (CFD-GEOM, CFD-Viscart, CFD-Micromesh, CFD-Toolkit). Once the multi-dimensional grid is in the DTF format, you can use CFD-Toolkit to add any number of domains to be modelled as filaments into the DTF file. CFD-Toolkit enables you to add a series of filament grids into the DTF file using its interface and a flexible ASCII file. Once the DTF file is ready, you can set up the properties, boundary conditions, and volume conditions. The filament domains will appear in CFD-ACE+ like any other domain. For more information regarding the use of the Filament interface, see CFD-Toolkit. To use the Filament Model: 1.

Create a background grid using CFD-GEOM and save the grid in a DTF format.

2.

Generate a text filament path data file.

3.

Create a filament grid and save it together with the background grid in a single DTF file.

4.

With the CFD-ACE+ Filament Model:



Import the background grid DTF file.



Import the Text filament path data file.



Generate the filament grid.



Save the filament grid, background grid, and filament information as a single DTF file.

Model Setup and Solution CFD-ACE+ provides the inputs required for the filament domain and the multi-dimensional domain.

Filament Model Input File Format A filament is defined as a Nodes group connected by an Edges group. Other geometry or physical values can be associated with each node or each edge. For example, the size (radius) of a filament is assigned to the node, while the number of subsections is assigned to the edge. In general, a filament is assumed to have a circular cross-section. In grid generation, the crosssection circle will be represented as a polygon based on the number of side faces you have specified. CFD-Toolkit uses the following filament path data: Number_Of_Nodes Number_Of_Edges Number_Of_Side_Faces Maximum_Cell_Length X_Coordinate Y_Coordinate Z_Coordinate Radius X_Coordinate Y_Coordinate Z_Coordinate Radius . . .

351

CFD-ACE_V2008.2_User_Manual

(repeat for number of nodes) Node1_Of_Edge Node2_Of_Edge Group_Number Number_Of_Sub-Section Node1_Of_Edge Node2_Of_Edge Group_Number Number_Of_Sub-Section . . .

(repeat for number of edges) where, the Maximum_Cell_Length defines how many subsections for each edge need to be generated, if you have not explicitly specified. The Node1_Of_Edge and Node2_Of_Edge used in the edge definition are based on the order of the nodes listed in the node section. Note that the node numbers start from zero. The Number_Of_Sub-Section determines how many subsections (or how many cells) need to be generated for each edge. If Number_Of_Sub_Section is zero, it will automatically be calculated based on the Maximum_Cell_Length. The following is an example: 6

6

8

0.8

0

0

0

0.1

0

1

0

0.1

0.5

1.5

0

0.1

-0.5

1.5

0

0.1

0

2

0

0.1

0

3

0

0.2

0

1

1

1

1

2

1

1

1

3

1

1

2

4

1

0

3

4

1

2

4..

5..

1.. 0

From the input file we can get the following information: •

From the first line of input, we know this filament has 6 nodes, 6 edges, 8 side faces, and the maximum length of each filament cell is 0.8.



From lines 2-7, we know the coordinates and radius of each node:



o

First node (node number 0); at (0,0,0) with radius as 0.1 meter

o

Second node (node number 1); at (0,1,0) with radius as 0.1 meter

o

...

From lines 8-13, we know how those nodes are connected: o

First edge; connect node 0 and node 1, in group 1, and has 1 subsection

o

Second edge; connect node 1 and node 2, in group 1 and has 1 subsection

Filament Model Frequently Asked Questions How does the solver know which domain is to be treated as a filament module?

352

Filament Model

The interface in CFD-Toolkit adds information in the DTF file regarding the connectivity and the information regarding solution using a filament module. So all domains added via the interface in CFD-Toolkit automatically become filaments. How do I setup boundary conditions for filaments?

The filament boundary can be set to any boundary type in CFD-ACE+. However, the outside surface should be set as an adiabatic wall, even though there is supposed to be heat exchanged through that surface. The heat exchange is calculated using filament heat transfer, and not the boundary condition of the surface. Setting side surface boundary conditions to a different type may product incorrect results.

353

Applications: Electrokinetics Electrokinetics Introduction CFD-ACE+ solves three different types of electrokinetic transport phenomena: electroosmosis, electrophoresis, and dielectrophoresis. The Electrokinetics module describes the theory and implementation details for simulating electroosmotic flow and electrophoretic transport.

Electroosmotic Flow Recent advances in microfabrication technologies, coupled with the demand for high throughput screening of samples in medical, pharmaceutical and defense applications have spurred the growth of miniaturized lab-on-a-chip systems. Electrokinetic flows, popularly known as EOF, are widely used as a mechanism for analyte transport and mixing in many of these biological and chemical analysis systems. EOF results from the body forces applied to the electrical double layer when they are subjected to an external electric field [1]. The double-layer is formed at the solid-liquid interface due to the electrostatic interaction between the surface charges and charged ions in the liquid electrolyte. This occurs in commonly used materials, such as silicon, glass, polymeric materials, etc., when they are brought in contact with a polar medium [2]. This layer is normally characterized by a zeta potential (z).

Electrophoresis This is a phenomenon of movement of charged particles under the influence of externally imposed electric field. This mode of transport has many applications in chemical and biomedical engineering, most notably in molecular separation, electrokinetic transport and biochip/bioMEMS design. The Electrokinetics section includes: •

Electrokinetics-Theory



Electrokinetics-Implementation



Electrokinetics-Future Work



Electrokinetics-Frequently Asked Questions



Electrokinetics-References

Electrokinetics Features CFD-ACE+ supports modeling of EOF via specifying both electroosmotic mobility (wEOF) in the units of m2V-1s-1 and zeta potential (ζ) in the units of V. The relationship between electroosmotic mobility and associated zeta potential is given by: (15-1)

355

CFD-ACE_V2008.2_User_Manual

where ε and μ are the electrical permittivity and dynamic viscosity of the buffer (electrolyte) solution, respectively. Besides specifying constant values for these properties, you can write your own subroutines to specify any functional forms or variations. Details on how to access these properties and write a subroutine are explained in User Subroutines. Since the distribution of the zeta potential and the body force it exerts on the bulk flow is computed analytically, there is no need to grid the double layer during modeling. To model electrophoretic motion of the charged particles, you must enter the electroosmotic mobility (ω) in the units of m2V-1s-1 This can be specified as a constant value, user defined, or computed from diffusivity using Nernst-Einstein relation.

Electrokinetics Limitations The electrokinetic transport models have following limitations: •

EOF and electrophoretic transport in concentrated electrolyte solution is not supported



The hydrodynamic interaction between charged particles is weakly coupled.



The double layer is assumed thin compared to the system length scale (< ~5%), so that double layer distortion and relaxation are neglected.



The double layer is homogeneous and the polarization is neglected. In other words, the ion transport within the diffuse double layer is not modeled.



The charged particles experiencing electrophoresis are assumed small so that the fluid flow induced by the double layer on each charged particle is neglected.



Only structured grids are supported for electrophoresis cases. The artificial diffusion/disperion becomes significant due to the non-orthogonality of the grid if unstructured grids are used.

Electrokinetics Theory Electroosmotic flow (EOF) refers to the bulk movement of an aqueous solution past a stationary solid surface due to an externally applied electric field. This requires the existence of a charged double-layer at solid-liquid interface. The EOF is dominant in the micron-sized channels and results in a flat velocity profile (as opposed to a parabolic laminar flow in a pressure-driven flow) across the cross-section. The following assumptions are also made in the formulation of the mathematical model for the system. •

The fluid is assumed Newtonian, incompressible and dilute



The double layer is extremely thin so that double layer relaxation and distortion are neglected (ion convection effects neglected).

The governing equations for the electrokinetic fluid flow are the conservation equations for mass (continuity equation) and momentum (Navier-Stokes equations): (15-2)

(15-3)

356

Applications: Electrokinetics

where is the velocity vector, is the gradient operator, μ is the dynamic viscosity of the electrolyte solution, κ is the inverse of Debye-Huckel thickness, ζ is the zeta potential and φ is the externally imposed electric potential. The last term arises due to the presence of the electric double layer and is a measure of electroosmotic forces. In a typical system, you need to solve for the potential distribution within the thin electric double layer to compute this source terms. In this regard, CFD-ACE+ uses the linearized Poisson-Bolzmann equation to compute appropriate source terms analytically. The electric potential is computed by solving the Poisson Equation: (15-4)

where εr is the relative permittivity, F is Faraday constant and ε0 is permittivity of free space. To model electrophoretic transport of charged analytes, the equations governing advection, diffusion and electromigration in an electric field are solved. The conservation equation for given analyte “i” is expressed as: (15-5)

where the flux vector Ji is given by: (15-6)

In the above equation ci is the concentration (M), Di is the diffusion coefficient (m2/s), zi is the valence and ωi is the electrophoretic mobility (m2V-1s-1) of ith specie. V is the velocity vector (m/s) and Φ is the externally imposed electric potential (Volt). The next step is to calculate the potential distribution due to externally imposed electric field. In CFD-ACE+, this is accomplished by solving the DC conduction equation (Equation 7): (15-7)

Where F is the Faraday constant. The electric current flux density consists of both conducting and diffusive contributions. Since the electrolyte is assumed dilute and the electric conductivity is calculated by (Equation 08): (15-8)

357

CFD-ACE_V2008.2_User_Manual

CFD-ACE+ supports several boundary conditions in solving the above system of governing equations. You can specify Dirichilet or Neumann or combined type boundary conditions for the analytes. User subroutines enable you to input any functional form. Current, potential, and userdefined boundary conditions are supported in the electric module. Details can be found in Electric Module.

Electrokinetics Implementation In the CFD-ACE+, simulations of electrokinetic problems are invoked by combining several modules: Problem Type and Related Modules Problem Type Electroosmosis Electrophoresis

CFD-ACE+ Modules Flow+Electric Flow+Chemistry+Electric

Description Charged/neutral Species Charged species

The entire set of governing equations is solved by a finite volume method. For EOF simulations, an analytical method is employed to compute the zeta potential and appropriate body forces exerted on the bulk fluid. Therefore you are not required to grid the double layer. The thickness of the double layer should be very small (< 5% of system length scale) and a default value of 10-8 m is set in the user interface.

Electroosmosis To simulate electroosmotic flow (EOF) problem, you must activate both the Flow and Electric modules. The Chemistry module will be activated only if studying transport of charged/neutral analytes under EOF is required.

358

Applications: Electrokinetics

PT Panel - Electroosmosis

The EOF mobility or zeta potential is specified in BC panel, under Electric tab.

359

CFD-ACE_V2008.2_User_Manual

BC Panel - Electroosmosis

Electrophoresis To activate electrophoresis, the Chemistry, Flow, and Electric modules must be activated. In some electrochemical problems, the chemical reaction among species as well as electrode surface reaction may take place. In CFD-ACE+, these reactions are implemented in a standard way described in the Chemistry Module-Implementation-Model Options-Chem-Liquid Phase. For a specialized reaction, CFD-ACE+ enables you to include your own subroutines into the solver using user-supplied subroutines. You can examine the results with CFD-VIEW, a post-processing tool in CFD-ACE+.

Electrokinetics Future Work In the future, possible extension for electrokinetic application may be focused on, but not limited to:

360



Electrokinetic transport in porous media (membranes, gels, etc).



Modeling of electrothermal flows.



Electrokinetic transport in concentrated electrolyte systems.

Applications: Electrokinetics



Non net electroneutrality solver to compute potential field (This will be used in situations where electroneutrality condition is violated locally such as near electrode surfaces, sample stacking regions, etc.).



Models that describes variations in ζ or ωEOF as a function of pH and ionic strength.

Electrokinetics Frequently Asked Questions Does the code use permittivity in computing electric field?

In the current version, permittivity is not used in computing electric field. Since the model assumes that the permittivity is constant, the electric field is governed by the Poisson equation:

for electric potential. However, the electrical permittivity is used while computing EOF mobility from zeta potential:

I have to choose both Chemistry and Electric to set up an electrophoresis problem. What does Chemistry mean?

Chemistry pertains to the CHEMISTRY module in CFD-ACE+, where the solution of species transport is done. In electrokinetics applications using CFD-ACE+, chemistry is adopted in order to use the available resources that have already developed. For example, boundary conditions, surface reactions, bulk reaction (for electrochemistry applications) etc. How do I calculate the electrical conductivity of the buffer?

The current code does not explicitly calculate the conductivity of the buffer if its value is given. On the other hand, if the composition of buffer solution is known, the electric conductivity can be calculated in a manner similar to that for the entire electrolyte solution, namely, using Ohm’s law. My buffer is made up of several ions. Do I have to solve the transport equation for each ion?

Usually no. In most applications, buffer ions are assumed to have little influence on the transport of sample ions. However, when strong coupling of buffer ions and sample ions occurs, for example, in ionization applications (see Applications: Electrochemistry), it may be important to solve transport equation for each ion. -6

How is the default value (4 X 10 ) of electrical conductivity of the buffer calculated?

This value is the measured conductivity of distilled water at 25C. Can I model electrode reactions?

Yes, but not directly from the GUI setup. The electrode reaction can only be included by usersupplied subroutine and it depends on the reaction form. Can I model turbulent flow with the electrokinetics option?

Yes. The electrokinetic application contains all features of the Flow Module, which can include turbulence simulation with the activation of the Turbulence Module. However, special attention should be paid to turbulence simulation since the viscosity, diffusivity and other parameters may be different from those for laminar flow because of eddy/vortex interaction. See the Turbulence Module documentation for details. Under what circumstance should I turn on the Flow Module? What induces fluid flow in electrokinetics applications?

361

CFD-ACE_V2008.2_User_Manual

In the framework of EOF, the bulk flow is induced when the system is subjected to external electric field. In the framework of charge particle transport, the motion of the particle under the electric field itself will induce bulk motions. This can be attributed to local fluid flow induced by the interaction between double-layer of the charged particle and the buffer. However, in the current implementation, we have assumed that the suspending particle is so small that the electroosmosis on their surface does not result in any significant bulk fluid flow. Hence FLOW module needs to be activated only if EOF of bulk (induced due to the interaction between charged boundary surface and buffer) is studied. Some people use slip condition when a double layer is involved; is this used in CFD-ACE+?

There are two approaches to solving the governing equations for electroosmotic flow: (a) The Slip condition approach, derived from Smoluchowski approximation, and (b) body-force approach, adding a force contribution in near-wall region, while solving for Navier-Stokes equations. CFDACE+ uses the second approach. In some applications, we do not know the zeta potential on the surface, but rather, we specify the electroosmotic mobility. What is the relationship between these two quantities?

The following equation correlates zeta potential and electroosmotic mobility:

Electrokinetics References Brenner, H. and Edwards, D., Macrotransport Processes. Butterworth-Heinemann, 1992. Kim, S., and Karrila, S., Microhydrodynamics, Principles and Selected Applications. ButterworthHeinemann, 1991. Patankar, N.A. and Hu, H. H., "Numerical simulation of electroosmotic flow." Analysis Chem. 70(1998). Probstein, R.F., Physicochemical Hydrodynamics: An Introduction. John Wiley & Sons,1992.

362

Applications: Ionization Ionization Introduction When a solution containing acids, bases or amphoteric compounds is subjected to an external electric field, the migration of ions occurs along with rapid association-dissociation reactions. A mathematical model describing ionization equilibria has been implemented in CFD-ACE+. This enables simulation of a variety of electrokinetic transport phenomena such as capillary zone electrophoresis, moving boundary electrophoresis, isotachophoresis and isoelectric focusing of proteins. The Ionization section includes: •

Ionization-Features



Ionization-Limitations



Ionization-Theory



Ionization-Implementation



Ionization-Comments



Ionization-Frequently Asked Questions



Ionization-Examples



Ionization-References

Ionization Features The Ionization model implemented in CFD-ACE+ is capable of simulating various modes of electrophoresis of soluble materials in either acid, base or amphoteric solutions in a same framework of theory. The model predicts the evolution of concentration for multi-species undergoing transport by fluid flow, thermal diffusion and drift in an electric field as well as simultaneous rapid dissociation-association reaction. Typical applications to electrophoretic systems include: •

Capillary zone electrophoresis



Moving boundary electrophoresis



Isoelectric focusing



Isotechophoresis



Sample tacking and pH gradient generation

Ionization Limitations Despite the united model for various electrophoresis, CFD-ACE+ exhibits certain limitations in simulation: •

The system is dilute and the density of the solution is constant



Effect of Joule heating on transport is not accounted for and the system is assumed to be isothermal



Non-equilibrium ionic reactions can not be modeled



The dissociation-association of species is assumed instantaneous

363

CFD-ACE_V2008.2_User_Manual

Ionization Theory Acids and bases dissociate partially (weak) or fully (strong) in an aqueous solution. The equilibrium is formed between the acid or base and its ionized conjugate. The ionization equilibrium for monovalent acid (HAn) and bases (Bm) along with auto-ionization of water can be written as:

(16-1) (16-2) (16-3)

where the subscript n and m denote nth and mth base in the system. The figure below shows partial dissociation of weak acid in aqueous solution at equilibrium described by equation 16-1. Keep in mind that the status before dissociation is just theoretical since the dissociation and association time scale is almost instantaneous. Similar process to acid solution described by figure also occurs for strong and weak base, as long as hydroxide ions take place hydrogen ions.

Illustration of Acid Dissociation in Aqueous Solution

At equilibrium, this reaction is characterized by equilibrium constants Ka and Kb. Given the concentration of various acids and bases and their equilibrium constants, the system should satisfy the electroneutrality condition (see equation 16-8). The general model for equilibrium reaction involving amphoteric solution can be expressed as: (16-4)

and:

364

Applications: Ionization

(16-5)

The transport equation for the conservation of total concentration of acids, bases, or ampholytes can be written as: (16-6)

where: (16-7)

j is the jth component of the velocity vector, φ is the electric potential, ci, zi, wi, and Di are the total concentration, valence, mobility and diffusivity of the ith specie respectively. In this model a specie can be an acid or base or an ampholyte. The electroneutrality condition is expressed as: (16-8)

where [H+] and [OH-] are the concentration of the H+ and OH- ions respectively, (16-9)

for acid-base equilibria and: (16-10)

for ampholyte association-dissociation reactions. Here Ka and Kb represent equilibrium constants so that: (16-11)

(16-12)

365

CFD-ACE_V2008.2_User_Manual

The pH of the system is expressed as: (16-13)

The electrical conductivity σ is calculated from the relation: (16-14)

where F is the Faraday number. A complete description of the model used can be found in Saville and Palusinski (1986) and Palusinski et. al. (1986), Ermakov and Righetti (1994), Giridharan and Krishnan (1998), and Krishnamoorthy et. al (2001).

Ionization Implementation To use the ionization model: 1.

In the Problem Type [PT] panel, select Chemistry. The Ionization checkbox becomes available in the Model Options [MO] panel, Chem tab.

2.

Click the Model Options [MO] tab, then click the Chem tab. The MO/Chem Panel appears as shown below.

3.

In the Liquid Phase section, select Ionization.

Model Options Tab - Ionization

You have to define if a given species is an acid, base, ampholyte or an ion in the database available in Tools Menu-Database. Depending on the type of soluble species, pKa or pKb or both values need to be specified as shown in the above figure where protein is defined. The model assumes equal charge number for positive and negative parts of an ampholyte or protein. The charge number of an acid or a base or an ampholyte is specified in its name itself similar to an ionic specie. The Ionization model will not be invoked if the charge number is not specified.

366

Applications: Ionization

Database Manager Window with pKa and pKb Input for Protein

Other model setups follow a similar way to those for general chemistry problems. The output includes species concentration, electric field, and fluid flow. Consult the demo or examples in CFD-ACE+.

Ionization Example This example is based on the work of Mosher et. al. (1986) in which glutamic acid and histidine are separated using isoelectric focusing. The length of the separation channel is taken as 1 cm and the initial concentration of glutamic acid and histidine is 15 mM channel. A constant electric current density of 5 A/m2 is applied for separation. The channel is considered fully closed. The following table lists the species’ properties used in the simulations. Glutamic Acid

Histidine

8.28571E-10

8.14286E-10

Mobility (m /s-V)

2.9E-8

2.84E-8

pKa

2.16

6.02

pKb

4.29

9.17

2

Diffusivity (m /s) 2

367

CFD-ACE_V2008.2_User_Manual

By default, all the species are considered as ions. Once the ionization model is activated under the MO/Chem panel, each species can be set to an ion, acid, base, or an ampholyte using the property manager. A typical property manager panel is shown.

Ionization Model Activation

Property Manager Panel with Ionization Model Activated

368

Applications: Ionization

Concentration profiles of glutamic acid and histidine at time interval of 20 minutes are shown in (a) and (b) respectively. Corresponding pH profile and electric conductivity profile are shown in (c) and (d) respectively.

From figure 3(a) and figure 3(b), we observe that glutamic acid and histidine migrate to opposite sides of the channel. The isoelectric pH value, pI is given by

(16-22)

Hence, pI=(2.16+4.29)/2=3.23 for glutamic acid and pI=(6.02+9.17)/2=7.6 for histidine. These theoretical values agree very well with numerical predictions presented in figure 3(c).

Ionization Comments The no flux condition at a solid boundary (Wall) requires a very fine grid near the boundary in order to capture the detailed flux balance between diffusion and electric drift. Even a small error introduced into the system may lead to a large discrepancy in mass conservation when a transient simulation is performed. Hence a small time step and a finer grid (near the solid boundary) is highly recommended. It is also recommended that you use the upwind scheme whenever the no flux condition is activated. The Ionization model is built on and works in conjunction with the standard Electrokinetics application in CFD-ACE+. For more information on the Electrochemistry module, please refer to Applications: Electrokinetics.

369

CFD-ACE_V2008.2_User_Manual

Ionization Frequently Asked Questions How do I activate Ionization?

1. PT: Activate Flow and Chemistry modules 2. PT -> Flow, Chemistry, Electric 3. MO-> Chem->Select Chemistry media as Liquid Phase 4. MO-> Chem-> Chemistry Media-> Liquid Chemistry Chem: Select Application as Biochemistry 5. MO-> Chem-> Liquid Phase-> Application-> Biochemistry Chem: Activate Ionization 6. MO-> Chem-> Liquid Phase-> Ionization Elec: Select DC condition How do I define buffers in the database?

1. Open Database - Tools-> Database 2. Click on Buffer under Biochemistry - Biochemistry-> Buffer 3. Click on the Local Folder 4. Click on File/New/Buffer 5. Type the Buffer Name and enter the required physical, transport, thermal and electromagnetic properties.

370

Applications: Ionization

Electrochemistry Buffers - Database Manager Window How do I define species (ions, acid conjugates, ampholyte etc.) in database?

1. Open Database - Tools-> Database 2. Click on Analytes under Biochemistry 3. Click on Local Folder 4. Click on File/New/Analyte 5.

Type the Analyte Name and Select the Type - Name: ACETATE; Type-> Acid Conjugate

6. Enter the required properties Molecular-> Molecular Weight (M) -> M Pka -> Pka How do I define Species Diffusivity and Mobility?

1. Open Database Tools-> Database 2. Click on Mixing rule under Biochemistry Biochemistry-> Mixing Rule 3. Click on Local Folder 4. Click on File/New/Rule 5. Type the Rule Name 6. From the list of Buffers, select a Buffer 7. From the list of Analytes, select one Analyte, click on Add and choose a method for Diffusivity and Mobility. Enter values if required. Diffusivity-> Constant-> 1e-011 Mobility-> Constant-> 1e-011 8. From the list of Analytes, select other Analytes of interest and follow the previous step to define Diffusivity and Mobility

371

CFD-ACE_V2008.2_User_Manual

Electrochemistry Mixing Rules-Database Manager Window

Ionization References Coltrin, M.E., Kee, R.J., and Rupley, F.M., “Surface Chemkin: A General Formalism and Software for Analyzing Heterogeneous Chemical Kinetics at a Gas-Surface Interface." International Journal of Chemical Kinetics. 23(1991):1111-1128. Ermakov, S. V., and Righetti, P.G., “Computer Simulation for Capillary Zone Electrophoresis: A Quantitative Approach.” J. Chromatograph 667(1994):257-270. Giridharan, M. G., and Krishnan, A., “An Implicit Numerical Model for Electrophoretic Systems.” ASME Intl. Congress and Exposition. 66(1998): 61-68. Gochberg, L., “Modeling of Uniformity and 300-mm Scale-Up in a Copper Electroplating Tool,” 196th Meeting of the Electrochemical Society, October 17-22, 1999. Krishnamoorthy, S., Feng, J.J., and Makhijani, V.B., Analysis of Sample Transport in Capillary Electrophoresis Microchip using Full-Scale Numerical Analysis. Modeling Simulation of Microsystems. MSM2001, Hilton Head, SC, 2001. Mosher, R. A., Dewey, D., Thormann, W., Saville, D.A., and Bier, M., “Computer Simulation and Experimental Validation of the Electrophoretic Behavior of Proteins.” Anal. Chem. 61(1989): 362-366. Newman, J.S., and Tobias, C.W., “Theoretical Analysis of Current Distribution in Porous Electrode.” Journal of The Electrochemical Society. 109(1962): 1183-1191. Newman, J.S., Electrochemical Systems. Prentice-Hall, 1973. Palusinski, O. A., Graham, A., Mosher,. R.A., Bier, M., and Saville, D.A., AIChE Journal. 32(1986): 215-223. Saville, D. A., and Palusinski, O.A., “Theory of Electrophoretic Separations, Part I: Formulation of a Mathematical Model.” AIChE Journal 32.2(1986): 207-214. Springer, T.E., Zawodinski, T.A., and Gottesfeld, S., “Polymer Electrolyte Fuel Cell Model.” Journal of The Electrochemical Society 136.8(1991): 2334-2342.

372

Applications: Ionization

Um Sukhee, Wang, C.Y., and Chen, K.S., “Computational Modeling of Proton Exchange Membrane Fuel Cells." Journal of The Electrochemical Society, 147.12(2002):4485-4493.

373

Applications: Dielectrophoresis (DEP) Dielectrophoresis Introduction Dielectrophoresis (DEP) is a common phenomenon in AC electrokinetics. (See Electrokinetics Module for details). Such a phenomenon occurs due to the interaction between induced dipole and electric field. This interaction creates a net force that depends on the gradients of electric field, electric properties, permittivity and conductivity of particle and media. For AC electric field, DEP force also depends on the frequency of the signal. This net force, when applied to particle (charged or uncharged), drives them to move. This technique can be successfully used in analysis, manipulation and separation of cellular-scale and micrometer scale particles, like cells, latex beads, etc. Dielectrophoresis (DEP) in Electric Field describes the theory and implementation details for simulating dielectrophoretic transport. Dielectrophoresis includes the following sections: •

Features



Limitations



Theory



Implementation



DC electric with sinusoidal wave



Additional Output



Frequently Asked Questions



Examples



References

Dielectrophoresis Features CFD-ACE+ Dielectrophoresis features enable you to: •

Calculate particle motion (or particle agglomerate) in non-uniform electric fields generated by an AC or DC signal.



Perform DEP simulations using the CFD-ACE+ Spray module that simulates the hydrodynamic interaction between particles and fluid.



Monitor position and velocity components of individual particles.



Simulate DEP, vizconventional (c-DEP), and traveling wave (tw-DEP).

The model is fully coupled with other modules for multi-physics simulations that may involve heat transfer and biochemical reaction on the surface of the particles. Additional forces such as the added mass force, Saffman lift force, or Brownian force can also be modeled automatically while using the Spray module.

Dielectrophoresis Limitations The DEP model contains the following limitations: •

It can only model solid, spherical, and homogenous particles.



The particle size should be smaller than the electrode dimensions.



Electrical properties of the particle are isotropic.

375

CFD-ACE_V2008.2_User_Manual



The electrostatic interactions between particles and between a particle and boundaries are neglected.



The particle should occupy only a small fraction (< ~5%) of the computational cell. In other words, the computational cell size should be larger than the largest diameter particle.

Dielectrophoresis Theory When a polarizable spherical particle is exposed to a spatially non-uniform AC electric field, it will be polarized to create a dipole moment vector. The components of dipole moment depend on the particle size, strength of the electric field and permittivities of both, particle and media. This can be given as (Jones, 1995): (17-1)

where

is Clausius Mosotti factor defined as:

(17-2)

where: =

Complex permittivity of surrounding media

=

Complex permittivity of particle

r

=

Radius of the particle

E

=

Electric field strength

The complex permittivity is defined as ( where the subscript x denotes either medium (m) or particle (p)):

(17-3)

where: =

conductivity

=

angular frequency f

376

=

frequency of AC field in Hz

Applications: Dielectrophoresis (DEP)

i

=

The net force applied to particle, including the Coulomb’s force, is given as: (17-4)

where q is that total charge carried by the particle. If the particle is uncharged, the net force will be contributed only by dipole moment and gradient of electric filed strength. The time average value (over one period of the AC field) is give by:

(17-5)

where Re refers to the real part. It can be seen that the dielectrophoretic force depends on the gradient of square of electric field, gradient of electric phase angle, AC frequency, particle size, and electrical permittivity and conductivity of both medium and particle.

Dielectrophoresis Implementation The Implementation section describes how to set up a modeI for dielectrophoresis using the Flow, Spray, and Electric modules. The post processing section provides tips on what to look for in the solution output.

Grid Generation The Grid Generation section provides gridding guidelines. In CFD-ACE+, you can simulate DEP in any geometric system (3D, 2D planar, or 2D axisymmetric). While all available grid cell types in CFD-GEOM are supported, structured grid with good orthogonality is recommended for accurate predictions and reliability. The general grid generation concerns apply, i.e., ensure that the grid density is sufficient to resolve solution gradients, especially near electrodes, minimize skewness in the grid system and locate computational boundaries in areas where boundary values are well known.

Model Setup and Solution The Model Setup and Solution section describes the Flow module related inputs for the CFDACE-Solver. See the Control Panel-Introduction for details on general model setup operations. The following sections describe a general approach for DEP case set up. Problem Type Settings To set up a DEP case: 1.

Click the Problem Type [PT] tab to view the Problem Type settings in the Control Panel. See Control PanelProblem Type for details. The Modules panel appears.

2.

Under the Modules section select Flow, Spray, and Electric to run a DEP simulation.

377

CFD-ACE_V2008.2_User_Manual

Problem Type (PT Panel)

Model Option Settings 3.

Click the Model Options [MO] tab. The Model Options panel appears.

4.

Click the Spray tab and select Dielectrophoresis to activate DEP capability.

Model Option Tab - DEP Setting 5. The Inj (Injector) tab appears where you can define the particle initialization and their properties. Click the Add Injector button to add an injector of particles.

378

Applications: Dielectrophoresis (DEP)

INJ Tab - Add Injector 6.

7.

Select one of three types of injectors:



Injector read from an external file



Annular Injector



Point Injector - When you choose a point or annular injector, you can also generate a particle assembly that includes a prescribed number of particles randomly distributed in a cubic (3D) or rectangular (2D) domain that is defined by upper and lower limits. (See the Spray module for details).

To handle particle collections of different sizes, click Distribution Table button in the Size section.

379

CFD-ACE_V2008.2_User_Manual

Inj Tab - Point Injector 8. The Database Manager window appears. Choose Solid as the material type from the Material Properties section. The solid material properties can be defined in the Database.

Database Manager Window - Solid Materials 9. To open the database, click the Define button or from the control panel, click Tools, Database, and then click Solid. The Solid Material database appears. 10. Enter different required properties in the database. Particle density is defined in Physical property. The electric properties such as conductivity and relative permittivity are defined in the Electric/Magnetic property. These parameters will be applied to each particle for given injector.

A more general way to provide initial status, properties and sizes etc. of particles is to create a text file. For this you must use the Read From File option for injector type. The data file format should be: ‘Injector name’ ‘Number of particles’ ‘2’ ‘x’ ‘y’ ‘z’ ‘u’ ‘v’ ‘w’ ‘diameter’ ‘temperature’ ‘fraction’ ‘permittivity’ ‘conductivity’ The integer following the number of particles should be 2. The number two indicates two additional variables, relative permittivity and conductivity. Following is a sample file:

Relative Permittivity and Conductivity Sample File

You can also provide initial temperature of particles if heat transfer is of interest. If you want continuous injection of particle at every certain time steps, you may do so by entering proper value in Repeat Injector or you can increase Injection Frequency to a number larger than the total number of time steps to ensure that the particles are only injected once.

380

Applications: Dielectrophoresis (DEP)

If you do not want to save initial particle positions, then you need to create a file named as spray.dat in simulation directory. This file should read: OPTIONS 0 Output_Start_Point END_OPTIONS END_SPRAY_INPUT

For further details on Flow, Spray and Electric module set up, see the Flow, Spray and Electric Modules.

Dielectrophoresis DC Electric with Sinusoidal Wave The AC electric field in DEP simulation is described in Dielectrophoresis-Theory. To simulate DEP motion, select a DC field with a sinusoidal boundary condition. Only one frequency, entered through the boundary condition of the electric module, is allowed in this type of simulation.

Dielectrophoresis Additional Output In addition to the electric field quantities and particle locations, the electric field square and its gradient components in a Cartesian coordinate system have been output to DTF file. You can view the contours in CFD-VIEW. The electric field square is named as E_square and the gradients are grad_E2_x etc. in the DTF file.

Dielectrophoresis Frequently Asked Questions Why do not I see the movement of particles?

Since the dipole moment of particle is proportional to the absolute value of media’s permittivity (which is of the order of 10-12) , the particles’ motion would be small, if the gradient of the electric field square is not large enough. Also, as the particle size decreases, the DEP force also decreases rapidly so you may not be able to observe any significant movement of the particle in short time period. What should I do if I want to change the electric field frequency during the simulation?

Run the simulation to a specific time period till the frequency start to change. Stop the simulation and set a new frequency value through CFD-ACE+ and restart the simulation again with previous simulation as Initial Condition. What should I do if I want to see pure dielectrophoretic phenomenon without the interaction with fluid flow?

Under the Solver Control [SC] panel, select the Spray tab and turn off the Fluid Phase Source Terms option. The coupling between fluid and particles will be shut off.

Dielectrophoresis-Examples Dielectrophoresis Examples-Case 1 The geometry and grids of the first test case are shown in Figure 1. The non-uniform AC electric field is generated by two electrodes, located at left and right end of the geometry. The electric potentials at left and right ends are 10 and 0 volt and the frequency is 10 Hz. The particles are located inside the geometry initially. The diameter of particle is 10 mm. The relativity permittivity and conductivity of particle is 1.0 and 0.1 respectively. The relativity permittivity and conductivity of media is 1.0 and 0.0001. Figure 2 shows the locations of particle at different times. Figure 3 shows the electric potential and Figure 4 shows the total electric field strength defined as:

381

CFD-ACE_V2008.2_User_Manual

(17-6)

Figure 1 - Geometry and Grids

Figure 2 - Location of particles at different times under the effect of Dielectrophoresis

382

Applications: Dielectrophoresis (DEP)

Figure 3 - Electric Potential

Figure 4 - Total Electric Field Strength

Dielectrophoresis Examples-Case 2 An AC electric field is generated by four electrodes in this case study. Each electrode has a 90o shift. The AC frequency is 100 Hz. Figure 1 and Figure 2 show the geometry and electric potential at different times. To perform the simulation and include particles, we randomly generate charged particles inside the electric field. During the rotation of AC field, the particles move following the interaction between dipole moment and gradient of electric field. Figure 3 shows the particle distribution at different times.

383

CFD-ACE_V2008.2_User_Manual

Figure 1 Electrode Sketch (not to scale)

Figure 2 - Electrical Potential at Time, t, in seconds

384

Applications: Dielectrophoresis (DEP)

Figure 3 - Particle Distribution at Time , t, in seconds

Dielectrophoresis Examples-Case 3 Traveling Wave Dielectrophoresis Traveling wave dielectrophoresis (twDEP) refers to the motion of particle in an AC electric field with non-uniformity in both magnitude and phase. The component of DEP force associated with phase change is known as a traveling wave DEP force, besides the component due to the gradient of the square of electric field strength. Traveling wave DEP is used to separate particles of different dielectric properties. Field flow fractionation (FFF), used in separation technology, uses twDEP. Such a device contains a micro fabricated channel with arrays of thin electrode stripes on one or both channel walls. The electric field is applied in such a way that they have π/2 phase difference between the two adjacent electrodes, as shown below. twDEP is usually combined with negative DEP so that the particle will not be trapped to the electrode. A negative DEP force component will levitate particles at a certain height above the electrode, and the twDEP component will drive particles along the gradient of the phase.

385

CFD-ACE_V2008.2_User_Manual

Figure 1 - Side and top view of electrode structure in a FFF chamber that generates traveling wave dielectrophoresis of particles of different properties or sizes. Only lower channel wall is fabricated by electrodes.

In CFD-ACE+ simulations, the boundary conditions on the electrodes are calculated by:

(17-7) In terms of real and imaginary components, we have:

(17-8) where α is phase angle of each electrode. Without loss of generality, α=0, π/2, π, 3π/2 are used for four adjacent electrodes. Successfully applying twDEP involves carefully choosing parameters to create the desired results. Changing parameters, such as the permittivities and conductivities of both the particle and suspension and magnitude and frequency of the AC electric potential, will lead to a change in both DEP and twDEP force components. These parameters have to generate a negative DEP force and a twDEP force large enough to move the particle. Figure 2 shows two groups of particle with different properties are placed in an AC field. Figure 3 shows the trajectories of two groups of particles after 10 seconds.

386

Applications: Dielectrophoresis (DEP)

Figure 2 - Initial positions of two groups of particles (t=0.0s)

Figure 3 - Trajectories of two groups of particles (t=10.0s)

Dielectrophoresis References Green, N. G., et al., “AC electrokinetics: a survey of sub-micrometer particle dynamics.” J. Phys, D: Appl. Phys. 33(2000): 632-541. Jones, T. B., “Electromechanics of Particles.” New York, Cambridge University Press. (1995). Ramos, A., et al., “AC electrokinetics: a review of forces in microelectrode structures.” J. Phys, D: Appl. Phys. 31 (1998): 2338-2353.

387

Applications: Solidification Solidification Introduction The Solidification Module can simulate flow and heat transfer in solid-liquid phase change processes. The key feature in a solid-liquid phase change problem is the presence of a moving boundary on which heat and mass balance conditions have to be met. A popular approach in modeling these problems is the enthalpy method (Carman, 1987). The major advantage of this method is that despite the presence of moving boundaries, the problem is cast in a conservative form that allows the solution to be obtained on a fixed grid system. Two common variations are: •

The latent heat is accounted for using a modified heat capacity term



The source based method

In CFD-ACE+, a non-source term method is applied to implement the calculations. The mixture of solid-liquid is characterized by the solid mass faction, fs, which ranges from 0 to 1. The version of the Solidification Module in CFD-ACE+ is compatible with the Incompressible, Heat Transfer, and Deformation modules. Solidification includes the following sections: •

Solidification-Applications



Solidification-Theory



Solidification-Limitations



Solidification-Model Setup and Solution



Solidification-Frequently Asked Questions



Solidification-Examples



Solidification-References

Solidification Applications Phase change is common phenomena in material processing and includes the synthetic production of alloy and crystal phase change processes. Examples include casting, melting, etc. Use the Solidification module to solve a wide variety of liquid-solid or solid-liquid phase change engineering problems.

Solidification-Theory Solidification Theory Introduction The enthalpy of the material can be expressed as: (18-1)

where h is the sum of sensible heat, heat can be written:

, and

is latent heat. A general form for latent

(18-2)

389

CFD-ACE_V2008.2_User_Manual

where is the local solid fraction (mass fraction), is the temperature at which the solid is the temperature at which full solidification is achieved. For the formation commences and first step, the thermal properties used are assumed constant with temperature and phase change. The method is to regard the entire domain as a porous medium, where the porosity λ takes the following values:

(18-3)

The governing equations can be written in terms of the superficial velocity (i.e. the ensembleaverage velocity) defined as: (18-4)

where

is the actual fluid velocity.

The Solidification Theory section includes: •

Solidification-Theory-Definition of Source Terms



Solidification-Theory-Implementation in CFD-ACE-Solver



Solidification-Theory-Initialization



Solidification-Theory-Non-Source Term Methods

Solidification Definition of Source Terms The flow in the mush is governed by the Darcy law, i.e. (18-5) where K is the permeability, which is function of λ. And the source term in momentum equation is defined as:

i=1, 2, 3

(18-6)

can be obtained from the Carman-Koseny equation 18-3: (18-7) and A can be calculated from:

(18-8)

390

Applications: Solidification

where the value of C will depend on the morphology of the porous media, and the q is set at 0.001. The buoyancy sources term: (18-9) where β is the thermal expansion coefficient and href is a reference value of the sensible heat. The thermal source term is: (18-10) In the isothermal case, u=0 and the convective part of this source term takes the value of zero.

Solidification Theory-Implementation in CFD-ACE-Solver In CFD-ACE+ the enthalpy at TLow (the temperature at which full solidification is achieved) is:

(18-11)

and the enthalpy at THigh ( the temperature at which solid formation commences) is: (18-12)

Solidification Theory-Initialization A key step in solidification is the initialization of enthalpy. In ACE+, the reference temperature is set to 0K, which means the enthalpy at T1 (the start temperature in Cp-T relationship) is defined as:

(18-13)

and the enthalpy is initialized as:

(18-14)

391

CFD-ACE_V2008.2_User_Manual

Solidification Theory-Non-Source Term Methods In a fluid undergoing a liquid to solid phase transformation (i.e., solidification), the conservation of energy can be expressed in terms of the mixture enthalpy H as:

(18-15)

The finite volume discretization of equation 18-15 gives:

(18-16)

where subscript P refers to the value of the local finite volume; subscript i is the face index is the unit normal vector of face; superscript n and (n+1) represent the surrounding this cell; value at nth time step and (n+1)th time step, respectively. In CFD-ACE+ the upwind scheme is applied to deal with the convection terms, and 2nd-order schemes are employed to obtain the diffusion terms. The issue is how to deal with the function of H(T). If H is solved directly in equation 18-16, we need to find the function T=T(H). On the contrary, H=H(T) is required. Voller et. al.(1993) gave a detailed discussion on such kind of solution, and the result is that a source term is introduced into the equation due to the latent heat during the solidification process. In CFD-ACE+ a more general methodology is provided in which no source term is introduced when the energy equation is solved for phase-changing issues. The treatment is described as: The solution of H or T obtained from equation 18-16 can be rewritten as:

(18-17)

where H and T are the exact solutions for enthalpy equation and temperature field, respectively; H* and T* are solutions obtained from iterative procedure, and H' and T' are the corrections to H* and T*, respectively. An expression for H' and T' can be obtained by substituting equation 18-17 into equation 18-16:

(18-18)

where

is the energy imbalance of finite volume during iteration.

Introducing the following relationship:

392

Applications: Solidification

(18-19)

Equation 18-18 is rewritten as:

(18-20)

where subscript nb represents the neighboring cells, a is the corresponding coefficient. A solution T' can be obtained from equation 18-20, and then H' from equation 18-19. The key step in the solution is to get the exact Cp (dH/dT) from the H(T) function. For isothermal cases, dH/dT = ∞, but T=Tmelt, dT=0 for cells with solidification. Then we can choose any value (except 0) for Cp. At this point, a correction T' does not mean a correction to T, just a solution to get H'. In CFDACE+, Cp in cells that are in solidification is calculated as:

(18-21)

Solidification Limitations The Solidification Module has the following limitations: •

Must be run as a transient



Not coupled with VOF, Porous Media, and Stress



Volume condition should be set up as fluid (just for solidification domain)



Cp should be constant or piece-wise linear in T (just for solidification domain)



Density is constant during phase change



Compatible only with the following modules: o

Incompressible

o

Heat Transfer

o

Deformation

Solidification Model Setup and Solution CFD-ACE+ provides the inputs required for the Solidification module. This section describes the settings specific to the solidification Module. See the Control Panel Introduction for information on general model settings and basic CFD-ACE+ operation.

Problem Type Click the Problem Type [PT] tab to see the Problem Type Panel. See Control Panel-Problem Type for details.

393

CFD-ACE_V2008.2_User_Manual

Available Modules Under the Modules tab select Heat Transfer to activate the solidification Module. The Flow Module is also required when the mushy flow is wanted. Use of the Turbulence and Grid Deformation modules have not been fully tested in conjunction with the solidification module.

Model Options Click the Model Options [MO] tab to see the Model Options Panel. See Control Panel-Model Options for details. All of the model options for the solidification Module are located under the Flow and Heat tab.

Shared Select transient option under the Shared tab. If Flow module is activated, activate Gravity under body force and Boussinesq Force under Boussinesq Approximation, input the Reference Temperature and Thermal Expansion coefficient.

Heat Activate the solidification module.

Model Options Tab - Heat Tab - Solidification Option

Volume Conditions All volume conditions for Solidification Module can be found in Heat Transfer Module-Volume Conditions-Solidification.

Graphic Output Activation of the Solidification Module allows output of the liquid fraction in CFD-VIEW with variable f_liq.

Solidification Frequently Asked Questions How do I set up time step for a transient problem?

The time step depends on the CFL number. For pure heat transfer process (no mushy flow) the time step depends on the size of the grid, cooling rate, and Cp. It is acceptable for most engineering solutions. Can I use user defined Cp?

It is not recommended to do so. The key step in solving energy equation including phase change is to handle the relationship of Cp-T and H-T. It is not easy to do this through a user subroutine. If general functions need to be added to the code, please contact ESI CFD customer support.

394

Applications: Solidification

Soldification-Examples Solidification Examples The Solidification modules includes the following case studies: •

Case 1: Pure Heat Conduction, Multi-zone, and Isothermal Case



Case 2: Natural Convection + Heat Conduction, Single Zone, and Isotherm/Mush Zone Cases



Case 3: Heat Conduction, Single-zone, Piecewise Linear Cp, and Isothermal/Mush Zone Cases



Case 4: Heat Conduction, Single-zone, Constant Cp and Isothermal Case

Solidification Case 1: Pure heat conduction, multi-zone, and isothermal case Time step: 10s Density: 1000kg/m3 Cp: 500 J/kg-K Latent heat: 100000 J/kg Solidification temperature: 1000 K Initial temperature: 1100 K Details on the computation model can be found below and show the distributions of temperature and liquid fraction, respectively.

395

CFD-ACE_V2008.2_User_Manual

Computation Model

Temperature Distribution at t=1300s

Liquid Fraction Distribution at t=1300s

396

Applications: Solidification

Soldification Case 2:Natural convection + heat conduction, single-zone, and isothermal/mush-zone cases Time step: 1s Density: 2500kg/m3 Cp: 1000 J/kg-K Latent heat: 400000 J/kg Solidification temperature: 873 K (isothermal) Solidification temperature: 823 K (Tlow) and 923 K (Thigh) (mushy-zone)

Initial temperature: 973 K

397

CFD-ACE_V2008.2_User_Manual

Computation Model

Liquid Fraction and Velocity Vectors (isothermal) t= 10s

Distribution of Temperature (isothermal), t = 10s

398

Applications: Solidification

Liquid Fraction and Velocity Vectors (mushy-zone) t = 10s

Distribution of Temperature (mushy-zone) t = 10s

Solidification Case 3: Heat conduction, single-zone, piece-wise linear Cp, and isothermal/mush-zone cases Time step: 1s Density: 7400kg/m3

Thermal conductivity:

Cp:

Latent heat: 272000 J/kg Solidification temperature: 50 K (Tlow) and 1795 K (Thigh) (mushy-zone)

399

CFD-ACE_V2008.2_User_Manual

Initial temperature: 1845 K Boundary conditions: two symmetric boundaries, two external walls (h=w/m2-K, Tinf = 500 K) Geometry: square with side length of 0.09m

400

Applications: Solidification

Temperature History at Fixed Monitor Points

Calculation Results (Swaminathan and V.R. Voller, 1992)

401

CFD-ACE_V2008.2_User_Manual

Distribution of Temperature t = 300s

Distribution of Liquid Fraction t = 300s

Solidification Case 4: Heat conduction, single-zone, constant Cp, and isothermal case 402

Applications: Solidification

Time step: 20s Density: 7200 kg/m3 Thermal conductivity: 30 w/m-K Cp: 750 J/kg-K Latent heat: 262500 J/kg Solidification temperature: 1773 K Initial temperature: 1808 K Boundary conditions:two symmetric boundaries, two isothermal (T=1423K) Geometry: square with side length of 0.381m.

403

CFD-ACE_V2008.2_User_Manual

Temperature History at Fixed Monitor Points

Calculation Results (Swaminathan and Voller, 1992)

404

Applications: Solidification

Distribution of Liquid Fraction t = 2000s

Distribution of Temperature t = 2000s

Solidification References Carman, P.C., 1987, “Fluid flow through granular beds.” Trans. Inst. Chem. Engrs 15, pp. 150166. Swaminathan, C.R., and Voller, V.R., 1993, “On the enthalpy method.” Int. J. Num. Meth. Heat Fluid Flow, Vol. 3, pp. 233-244.

405

CFD-ACE_V2008.2_User_Manual

Swaminathan, C.R., and Voller, V.R., 1992, “A general enthalpy method for modeling solidification process.” Metallurgical Transactions B, Vol. 23B, pp. 651-664.

406

Applications: Fuel Cell Modeling Fuel Cell Modeling Introduction Fuel Cells constitute an important alternative to power generation by engines or turbines. With an increasing trend towards reduced emission and higher efficiency, fuel cells are emerging rapidly as the technology of choice for power generation in the new century. Fuel cells have several advantages over conventional power generation appliances, which deem them the power-generating device of the future: •

In a fuel cell, chemical energy is directly converted to electrical energy, with little heat production. This implies that the efficiency of a fuel cell is not limited by the Carnot cycle.



In general, they produce less toxic by-products than conventional appliances, making them environment-friendly.



Fuel cells are very quiet during operation, making them ideal for installation in any place.



Fuel cells can be of various sizes, ranging from the size of a fist to that of a house. This renders their application range very wide, from a soldier’s equipment on the battlefield to huge power generators for residential and industrial applications.



With the exception of solid oxide fuel cells, most fuel cells operate at low temperature (around 70oC). This, added to the fact that they do not have any moving parts, makes them easy to design from a material standpoint.

The figure below shows the primary components of a fuel cell power generation station.

407

CFD-ACE_V2008.2_User_Manual

Fuel Cell Power Generation Station, Primary Components

It is comprised of three main components: the Fuel Processor, the Fuel Cell and the Power Conditioner. In the evaporator, liquid fuel and liquid water is injected in the form of a spray onto a hot surface, where both components evaporate. The liquid fuel may be either methanol or a hydrocarbon mixture (typically gasoline). Currently, both of these are being pursued by the industry. Methanol has the advantage of being a very clean fuel, while gasoline has the advantage of being available worldwide from any pumping station. If natural gas (mostly methane) is used as the primary fuel, as is often the case for residential applications, this step is not necessary, since the fuel is already in gaseous form. This mixture of gaseous fuel and water vapor is then passed through a catalytic converter, where it undergoes a reformation process (known as steam reformation) to produce carbon monoxide and hydrogen. At this point, depending on the fuel cell type to be used, several additional reforming steps may be necessary. If a hydrogen driven proton exchange membrane (PEM) fuel cell is to be used, CO must be eliminated completely from the mixture to avoid poisoning the active catalyst layer within the cell. If a solid oxide fuel cell (SOFC) is to be used, CO elimination is not necessary. In a direct methanol fuel cell (DMFC), the reformation step can be completely eliminated, since methanol itself is the fuel for the fuel cell. The fuel evaporation as well as reformation processes are typically endothermic. Although the efficiency of the fuel cell itself can be quite high (about 80%), the efficiency of the fuel processor as a whole is in the order of 40%, leading to an overall efficiency of about 40-50%. This, of course, is higher than traditional internal combustion engines or gas turbine cycles. Fuel Cell modeling includes:

408



Fuel Cell Modeling-Where Can CFD Help?



Fuel Cell Modeling-Fuel Cell Modeling Examples

Applications: Fuel Cell Modeling



Fuel Cell Modeling-Reformer Modeling Examples



Fuel Cell Modeling-Fuel Cell Simulation Features



Fuel Cell Modeling-Fuel Reformer Simulation Features



Fuel Cell Modeling-Theory



Fuel Cell Modeling-Limitations



Fuel Cell Modeling-Implementation



Fuel Cell FAQ

Fuel Cell Modeling Where Can CFD Help? The current challenge in the fuel cell industry is to reduce the cost of manufacturing and/or increase the efficiency of the overall process, especially that of the fuel reformation process. This can be achieved by a number of ways. These include better catalysts for the reformation stages as well as for the electrochemical reactions, better membranes (or solid electrolytes for SOFC), better fuel distribution among individual cells of a stack, better water management, amongst several other issues. CFD analysis can provide performance characteristics of a cell or reformer under various operating conditions, catalysts, membranes, etc. This reduces the cost of development significantly by eliminating costly experiments or by narrowing down the range of parameters over which the final set of experiments need to be performed.

Fuel Cell Modeling Examples CFD-ACE+ allows the simulation of the detailed processes within a PEM or SOFC fuel cell. As a final output, it can provide the polarization curves of a fuel cell as a function of several different parameters. An example of a hydrogen-driven PEM fuel cell simulation performed using CFDACE+ is shown below.

409

CFD-ACE_V2008.2_User_Manual

Hydrogen-Driven PEM Fuel Cell Simulation

Such analysis can be performed in full-scale three-dimensional geometry for PEM as well as SOFC fuel cells.

Fuel Cell Modeling Reformer Modeling Examples In addition to modeling the fuel cell itself, CFD-ACE+ can also aid in the analysis of the fuel reformation process. CFD-ACE+ is equipped with tools to simulate heterogeneous reactions of arbitrary complexity within porous media. Given a chemical reaction mechanism, the porosity and permeability of the porous monolith, and the catalyst loading, CFD-ACE+ can provide detailed species concentration and temperature distributions within the catalytic converter. The chemistry can be extremely complex involving a number of surface-adsorbed species.

Fuel Cell Modeling Fuel Cell Simulation Features The underlying physics of the operation of fuel cells is complex. It involves complex coupling between fluid flow, heat transfer, electron transport, mass transport and heterogeneous electrochemical reactions, all occurring within porous media. The following advanced physical models in CFD-ACE+ allow these types of simulations:

410



Comprehensive porous media treatment, including effects on heat and mass transfer, is supported.



Heterogeneous reactions within porous media are supported. This includes finite-rate multi-step reactions of arbitrary complexity, both neutral (Arrhenius kinetics) as well as electrochemical (Butler-Volmer kinetics).

Applications: Fuel Cell Modeling



Solution of DC conduction equations (current continuity equations) both for the pore phase as well as the solid phase of porous media is supported. This allows accurate determination of the electrode overpotential, necessary to treat electrochemical reactions via Butler-Volmer kinetics.



Implicit coupling between flow, heat transfer, mass transfer, species transport, and electron transport.

Fuel Cell Modeling Fuel Reformer Simulation Features Comprehensive porous media treatment, including effects of heat and mass transfer, is supported. Heterogeneous reactions within porous media are supported. This includes finite-rate multi-step reactions of arbitrary complexity, including surface-adsorbed species. Effects of catalyst loading and catalyst poisoning can be simulated.

Fuel Cell Modeling-Theory Fuel Cell Modeling Theory Introduction Fuel cell modeling takes advantage of the physics already built into CFD-ACE+. Consult the theory sections of the Flow, Heat Transfer, Chemistry, Electric modules, and Porous Media feature.

Fuel Cell Modeling Theory-Electrochemical Reactions in Porous Media In the case of electrochemical reactions, the volumetric production rate of a given specie is expressed by the ratio of the transfer current,

, and the Faraday constant, F: (19-1)

where

and

are the stoichiometric coefficients of the products and reactants, respectively.

The transfer current, jT, is obtained from the Butler-Volmer condition, and may be written in its most general form as: (19-2)

where j0 is the reference current at a known open circuit voltage. and are kinetic constants determined from experimentally generated Tafel plots. [L] represents the near-wall molar concentration of the reacting species, N is the total number of reacting species, and are the concentration exponents. A set of non-linear equations for the mass-fractions at the pore-catalyst interface can be obtained by substituting equation 19-1 and 19-2 into the following equation: (19-3)

where:

411

CFD-ACE_V2008.2_User_Manual

is the effective surface to volume ratio of the catalyst.

This equation set is solved numerically to obtain Yi for all species. Once this is known the species sources in each cell can be computed. The electrode overpotential, η, is the potential difference between the solid (ΦS) and pore (or fluid) phase (ΦF) of the electrode, and may be explained as:

Schematic of Electrochemical Reactions and the Transfer of Current Within a Porous Catalyst Containing Electrode

The continuity of current in a conducting material leads to: (19-4)

When the material is a porous electrode, the current may be split into two parts: one flowing through the pores and the other flowing through the solid parts of the porous matrix (see figure above). If these components are denoted by and , respectively, the equation above can be rewritten as: (19-5)

During electrochemical reactions within a porous solid, electrons are either transferred (expressed by the transfer current) from the pores to the solid matrix or vice versa. This results in a source in one of the phases and a sink in the other phase. Thus, the equation above may be written as: (19-6)

where the transfer current, above, yields:

412

, has units of A/m3. Application of Ohm’s law to the equation

Applications: Fuel Cell Modeling

(19-7)

where ΦF and ΦS are the electric potentials of the fluid (or pore) and solid phases, respectively. Equation 19-7 is solved in a strongly coupled implicit solver. Such a formulation is more advanced than ones used in previous research where the solid parts of the electrodes are assumed as perfect electrical conductors. The above formulation clearly establishes the strong coupling between fluid flow, species transport and the electric field in both the porous and solid phase, and the numerical solution of this problem is quite challenging.

Fuel Cell Modeling Theory-Membrane Electrical Conductivity The exact physics of the proton exchange membrane is extremely complex. Theoretically, it is known that the membrane electrical conductivity is the net result of the product of the charge, mobility and Faraday constant summed over all charged species. Unfortunately, the membranes used in PEM fuel cells often have embedded charges, the exact amounts of which are not usually known. Secondly, the liquid water within the membrane dissociates into acid and base radicals to preserve electroneutrality. This is also a complex phenomenon. As a consequence of these complex ongoing processes, the exact concentrations of charged species within the membrane are not always known. It is common practice, instead, to use semiempirical models to determine the electrical conductivity of the membrane. These semi-empirical models express the electrical conductivity of the membrane as function of liquid water activity, which in turn depends on the local thermodynamic conditions. In CFD-ACE+, we have built in a membrane model for Nafion 117, and the data is available from Springer et al. (1991). In addition, you can provide such information through user-subroutines.

Fuel Cell Modeling Theory-Springer Model In PEMFC, the water transport across the membrane is of particular interest: the water molecules, only after being attached to a sulfonic-acid group ( ) (defined as “water content” by Springer et al. 1991), can be carried across the membrane by electro-osmotic drag (EOD) of protons, and the diffusion due to water content gradient. Springer et al. (1991) proposed a phenomenological model to describe the membrane water transport, which is regarded by the PEMFC modeling community as the best available mechanism to account for the water movement in membrane. The transport equation for the water vapor, following the general species transport equation, can be written as (19-8)

The water vapor flux Jw is defined by the general expression of species flux outside the membrane. But inside the membrane, this flux is replaced by the net water flux of Springer model. In Springer et al. (1991), the multi-dimensional molar flux of net water in the membrane can be expressed (see the Eq.23 of Springer et al., 1991) in terms of λ, the water content as: (19-9)

413

CFD-ACE_V2008.2_User_Manual

where i is the ion current, and the membrane dry density , equivalent weight . The diffusivity Dλ is measured for Nafion 117 and fitted as a function of λ (see Fig.3 of Springer et al., 1991):

(19-10)

(19-11)

(19-12)

Here s is the swelling factor as 0.0126. The electro-osmotic drag coefficient was also measured by Springer et al. (1991) for Nafion 117 membrane as (19-13)

or (19-14)

The mass flux is obtained by product of the molar flux and water molecular weight and rearranged as:

(19-15)

Assuming no net water source is present in the membrane, the conservation equation (steady state) of net water flux becomes

(19-16)

414

Applications: Fuel Cell Modeling

Eq.(19-8) and Eq.(19-16) are solved for water vapor mass fraction (for whole fuel cell) and water content (inside membrane), respectively. At the interface of membrane and catalyst (with finite volume), the relation of water content to water activity “a” measured and fitted by Springer et al. (1991)

(19-17)

is employed to calculate the λ as the boundary condition of the membrane domain, based on the solution of water vapor outside the membrane. In this way, the water content inside membrane is self-consistently obtained by Eq.(19-16) and the boundary values by Eq.(19-17).

Fuel Cell Modeling Limitations Despite these advanced models, CFD-ACE+ has certain limitations for simulating Fuel Cells: •

Phase Change of Water is not considered. It is assumed that all reactions occur in the gas phase. (Phase change and liquid water transport effects can be studied using the passive scalar module of CFD-ACE+).



Phase equilibrium is assumed to compute liquid water content for membrane electrical conductivity model.



Effect of surface tension on transport is neglected. (The effect of surface tension on liquid water transport can be studied using isolated simulations with the volume-offluid (VOF) model of CFD-ACE+.)



The Fuel Cell model now supports arbitrary interfaces or parallel computations.

Fuel Cell Modeling Implementation Fuel Cell modeling can be done with CFD-ACE+. You can find information below about special concerns which must be taken into account when running fuel cell simulations. See each module/feature’s documentation for details on how to implement those features.

Problem Type Fuel Cell simulations require at least the Flow, Heat Transfer, Chemistry, and Electric Modules.

Model Options Under Chemistry model options you must be solving species mass fractions. Under Electric model options, you must be solving DC Conduction and the Porous Media Electrochemistry option should be selected.

Volume Conditions All of the general volume condition settings apply with the addition that the membrane, anode and cathode catalyst layers, and anode and cathode diffusion layers should be modeled using the Porous Media feature. Both the anode and cathode catalyst layers should have a surface reaction specified to take place in those layers. Springer Model The Springer Model can be activated for membrane VC under VC Setting Mode --> Porous Media. When Springer Model is selected, the following parameters must be specified:

415

CFD-ACE_V2008.2_User_Manual



Electro-osmotic drag coefficient (default = 2.5)



Back Diffusivity (default = 1E-10)



Membrane Dry Density (default = 1.98E3kg/m )



Equivalent Weight (default = 1100kg/kmol)

3

Constant values may be provided through CFD-ACE-GUI or they may be specified through user subroutine. When using a user subroutine, the drag velocity coefficient ( diffusion coefficient (

) and back

) must be specified.

Boundary Conditions All of the general boundary condition settings apply. Usually fuel cell simulations will be run either at a constant current (to determine voltage) or a constant voltage (to determine current). By selecting the appropriate boundary condition evaluation method for the current collector plates you determine how the problem will be solved.

Initial Conditions There are no special initial condition settings.

Solver Controls There are no special solver control settings required for fuel cell modeling. You may want to make sure that you request the desired printed and graphical output quantities. Printed current summary is quite useful.

Fuel Cell Modeling References Coltrin, M.E., Kee, R.J., and Rupley, F.M., “Surface Chemkin: A General Formalism and Software for Analyzing Heterogeneous Chemical Kinetics at a Gas-Surface Interface." International Journal of Chemical Kinetics. 23(1991):1111-1128. Ermakov, S. V., and Righetti, P.G., “Computer Simulation for Capillary Zone Electrophoresis: A Quantitative Approach.” J. Chromatograph 667(1994):257-270. Giridharan, M. G., and Krishnan, A., “An Implicit Numerical Model for Electrophoretic Systems.” ASME Intl. Congress and Exposition. 66(1998): 61-68. Gochberg, L., “Modeling of Uniformity and 300-mm Scale-Up in a Copper Electroplating Tool,” 196th Meeting of the Electrochemical Society, October 17-22, 1999. Krishnamoorthy, S., Feng, J.J., and Makhijani, V.B., Analysis of Sample Transport in Capillary Electrophoresis Microchip using Full-Scale Numerical Analysis. Modeling Simulation of Microsystems. MSM2001, Hilton Head, SC, 2001. Mosher, R. A., Dewey, D., Thormann, W., Saville, D.A., and Bier, M., “Computer Simulation and Experimental Validation of the Electrophoretic Behavior of Proteins.” Anal. Chem. 61(1989): 362-366. Newman, J.S., and Tobias, C.W., “Theoretical Analysis of Current Distribution in Porous Electrode.” Journal of The Electrochemical Society. 109(1962): 1183-1191. Newman, J.S., Electrochemical Systems. Prentice-Hall, 1973. Palusinski, O. A., Graham, A., Mosher,. R.A., Bier, M., and Saville, D.A., AIChE Journal. 32(1986): 215-223.

416

Applications: Fuel Cell Modeling

Saville, D. A., and Palusinski, O.A., “Theory of Electrophoretic Separations, Part I: Formulation of a Mathematical Model.” AIChE Journal 32.2(1986): 207-214. Springer, T.E., Zawodinski, T.A., and Gottesfeld, S., “Polymer Electrolyte Fuel Cell Model.” Journal of The Electrochemical Society 136.8(1991): 2334-2342. Um Sukhee, Wang, C.Y., and Chen, K.S., “Computational Modeling of Proton Exchange Membrane Fuel Cells." Journal of The Electrochemical Society, 147.12(2002):4485-4493. Mazumder, S. & Cole, J.V., J. Electrochemical Soc., 150(11) A1503-A1509 (2003A) Mazumder, S. & Cole, J.V., J. Electrochemical Soc., 150(11) A1510-A1517 (2003B) Springer, T.E., Zawodinski, T.A. and Gotteresfeld, S., J ElectroChem Soc, 138, 2334(1991)

Fuel Cell Modeling FAQ Should I use the temperature equation option when running fuel cell cases? Yes. When running fuel cell cases, this option makes convergence of the heat solution much faster and requiring little relaxation. What are the suggested solver parameters when using the Springer Model? •

Use the temperature equation option under MO/Adv



Species Relaxation: Should be specified between 0 and 1. The suggested value is 0.5.



Temperature Relaxation: The linear relaxation can be as large as 1, and the inertial relaxation should be ~ 0.001.



Flow Relaxation: The linear relaxation for pressure should be ~ 0.5. This value may have to be even lower due to the porous media for the membrane.



Species Conservation: The "Species Conservation Enforced" option should be checked on the SC/Adv tab.

417

Applications: Biochemistry Biochemistry Introduction CFD-ACE+ contains a suite of tools for simulating a variety of biomolecular bulk flow, surface reactions, and volume reactions. The spatial and temporal evolution of species concentration in the computational domain is determined by convection, advection, forced drift (example electrophoresis), diffusion, and chemical reactions occurring on surfaces or within the domain. Surface and volume chemistry locally alters the species concentrations and can set up concentration gradients. Mass transport can have a strong influence on surface reactions as it determines the rate at which biochemical species are arriving at the reactive surface. Slower mass transport relative to the reaction rate can set up a complex interdependence and be affected by such things as the flow geometry, physical properties of the biochemical species and surface chemistry. The CFD-ACE+ tools for simulating biochemical problems account for all of the above factors. Biochemistry includes the following sections: •

Biochemistry-Applications



Biochemistry-Features



Biochemistry-Limitations



Biochemistry-Theory



Biochemistry-Implementation



Biochemistry-Frequently Asked Questions



Biochemistry-References

Biochemistry Applications The CFD-ACE-Solver simulates biochemical problems and bio-molecular interactions in diagnostic devices, such as immunosensors, DNA microarrays, etc., and perform evaluation and design of microfluid devices involving bio-assays. The enzyme catalysis model provides information on the contribution of mass transport and flow parameters to catalysis in a bio-reactor or a cell culture system. The Spray Module can simulate analyte binding on micro spheres.

Biochemistry Features The following types of reaction capabilities are currently available in the biochemistry module: •

Chemistry



Coupling of spray and Biochemistry



Coupling of VOF and Biochemistry



Echem Application

Chemistry The set of tools available in the CFD-ACE+ for defining surface and volume chemistry has expanded tremendously. You can define chemical mechanisms containing any number of individual chemical reaction steps. The individual steps can be of different types (Stoichiometric, Michaelis-Menten, or Arrhenius) and are not limited as to the number of species in each step or the stoichiometric coefficients of each species. Reaction steps and can be either reversible or irreversible. Mechanisms can be defined for surface chemistry or volume chemistry. Surface and volume chemistry can also be used in a fully coupled manner.

419

CFD-ACE_V2008.2_User_Manual

Coupling of Spray and Biochemistry Biochemistry is fully coupled to the SPRAY module and allows the user to define surface chemistry that takes place on the surface of the spray particle. All of the options available for defining mechanisms are available for spray particles. For more information on the spray module see the spray module chapter. A discussion of the specialized boundary conditions used for spray particles is given in the BC section.

Coupling of VOF and Biochemistry Surface and volume biochemistry can now be used in conjunction with the VOF module. Biochemical species can be transported in a liquid bounded by an air/water interface. For more information on the VOF module please see the VOF module chapter. A discussion of the boundary conditions for analytes at an air/water interface is provided in online help.

Echem Applications Electrical fields can be readily used to transport species, with an example of this being electrophoresis. For more information on the ECHEM module please see the appropriate section.

Biochemistry Limitations The Chemistry model has the following limitations: •

Multi-layer protein adsorption is not allowed.



The solver does not account for the surface diffusion of the adsorbed species.



Substrate/Feedback Inhibition, Allosteric activation, co-factor activation and other non-Michaelis Menten Kinetics will be available in future releases.



Analyte transport is not allowed across a VOF interface.

Biochemistry-Theory Biochemistry Theory Introduction The Theory section contains a description of the convective and diffusive equations used to simulate biochemistry problems. Building off of that discussion is a description of the equations used to model both surface and volume chemistry along with the boundary conditions used to model surface chemistry. The section concludes with a description of the data file output and the output for post processing in VIEW. The Biochemistry Theory section includes: •

Theory-Convection/Diffusive Transport Equations



Theory-Surface and Volume Chemistry Rates



Theory-Capabilities



Theory-Surface Reaction Data Output



Theory-Graphical Output for Post Processing

Biochemistry Theory-Convective/Diffusive Transport Equations Navier-Stokes Momentum Equation

(20-1)

420

Applications: Biochemistry

where: ρ

=

solution density

=

velocity vector

P

=

pressure

μ

=

dynamic viscosity

Mass Conservation Equation (Diffusive transport in the bulk)

(20-2)

where t = time, Dj = species diffusivity, Cj is the species concentration (mol/L), and Sj is a species source term.

Biochemistry Theory-Surface and Volume Chemistry Rates Consider the ith step in a reaction mechanism, composed of Ni reactants and Mi products. The stoichiometric coefficients for the species are denoted as νij, where j denotes the species index. Forward and reverse reaction rate coefficients for this reaction step are denoted as Kfi and Kri. From this information we can construct the forward and reverse reaction rates for this step. These are given in the equations below:

(20-3)

(20-4)

The forward and reverse rate coefficients can be constants, or have an Arrhenius type form. For more information on the expression used to evaluate Arrhenius rate coefficients see the chapter on General Chemistry. After computing the rate expressions for each step, the individual species production rates for the jth species can be computed by summing over the individual step rates. This is given in the equation below.

(20-5)

Where Nsteps represents the number of steps in a particular reaction mechanism. The function θij can take on three possible values:

421

CFD-ACE_V2008.2_User_Manual

1. θij = 1 if the jth species is a product in the ith reaction step 2. θij = 0 if the jth species does not participate in the ith reaction step 3. θij = -1 if the jth species is a reactant in the ith reaction step Enzyme Catalysis Enzymes are the catalysts of biomolecular reactions. The most striking characteristics of enzymes are their catalytic power and specificity. Nearly all the known enzymes are proteins. Proteins are highly effective in catalyzing diverse chemical reactions owing to their capacity to bind a wide range of molecules. Enzymes are highly specific in their choice of reaction catalyzed and the reactants (substrates). An enzyme does not alter the equilibrium of a reaction, it merely accelerates the formation of the equilibrium state by decreasing the free energy of activation. Most of the catalytic power of enzymes arises from the formation of the Enzyme-Substrate complexes. The substrate binds to a specific site on the enzyme known as the active site that contain the catalytic groups that catalyze the reaction. The substrates are bound to the enzyme by multiple weak interactions mediated by electrostatic bonds, hydrogen bonds, van der Walls forces and hydrophobic interactions.

Enzyme catalysis (Michaelis-Menten Kinetics) is a simplification of the two step reaction scheme given in the first equations below.. This can be reduced to the second equation below with the rate coefficients being subsumed into two constants describing the reaction; Km and Vmax.

(20-6)

(20-7)

Where E is an enzyme serving as a catalyst, S is the substrate, P is the product, and ES is the substrate/enzyme complex. The reaction kinetics for the substrate and product can be modeled using the rate expressions given in the following equations.

(20-8)

(20-9)

Where Vmax is the maximum rate of product formation, and Km is the Michaelis constant for the system. CFD-ACE+ enables you to specify stoichiometry for an enzyme catalysis reaction. The case of urea decomposition by the urease enzyme to form two ammonia molecules is an practical of where specifying stoichiometry is important.

Biochemistry Theory-Capabilities The biochemistry module is capable of simulating the following different phenomena:

422

Applications: Biochemistry

1.

Irreversible Binding: In this scenario, analyte A binds with receptor B and then the complex undergoes a conformational change leading to an irreversible state.

A+B⇔AB AB⇒AB*

2.

Multiple Analytes (Competitive Binding): Two or more analytes (A and A*) compete for the same receptor (B)

A+B⇔AB *

*

A +B⇔A B

3. Multiple Analyte (Non Competitive Binding): Two analytes (A and A*) bind independently to two different receptors (B and B*).

A+B⇔AB A +B ⇔A B *

*

*

*

Non-reactive Impermeable Wall Boundary Condition

At non-reaction surfaces the flux of analyte is set to zero for all species:

(20-10)

Where

is the unit normal at the surface, oriented into the computational domain.

423

CFD-ACE_V2008.2_User_Manual

Fixed Molar Flux Wall Boundary Condition

A fixed molar flux wall boundary condition imposes a fixed incoming diffusive flux (αj) of biochemical species. (20-11)

Where

is the unit normal at the surface, oriented into the computational domain.

Fixed Concentration Wall Boundary Condition

A fixed concentration wall boundary condition imposes a fixed concentration (mol/L) of biochemical species at a wall. (20-12) Combination of Fixed Flux and Fixed Concentration

A wall boundary condition that imposes a fixed value or the linear combination of fixed flux and fixed concentration of biochemical species is available in this release. Where you provide values of a, b, and h.

(20-13)

Where

is the unit normal at the surface, oriented into the computational domain.

Reactive Wall: Reaction/Diffusion Balance The figure below illustrates the application of the surface binding kinetics model for simulation of multi-protein adsorption on a bio-material surface different processes of adsorption, desorption and irreversible adsorption of multiple species along the surface, are.

424

Applications: Biochemistry

Protein Adsorption Process

At a reactive surface there are two types of species; analytes and surface phase species. Analytes are in the flow domain and have concentrations of mol/L, while surface phase species are found only on surfaces and have concentrations of mol/m2. Each species must satisfy a balance equation at a reactive surface depending on the type of species. For surface phase species the following balance equation is applied.

(20-14)

For analyte species, another balance equation is used:

(20-15)

This equation assumes a quasi-steady approximation for the analyte species, where the net flux of each species from the bulk solution towards the near wall layer balances the production rate of that species at the surface. For spray particles the Fickian diffusion term is replaced by a flux term described by a mass transfer coefficient Kj. For more information on the calculation of the mass transfer coefficient on a spray particle please refer to the spray chapter. For more information on spray source terms used in the mass balance equation, refer to the Spray Module.

(20-16) VOF Module Air/Liquid Interface Boundary Condition

Biochemical species are not permitted to cross an air/liquid interface and species from the gas are not allowed to transfer into the liquid. No chemistry occurs at the air/liquid interface. The condition that is imposed for biochemical species at an air/liquid interface is:

425

CFD-ACE_V2008.2_User_Manual

(20-17)

Where

is the unit normal of the air/liquid interface.

Inlet Boundary Conditions

The available conditions for an inlet are constant analyte concentration for each analyte species, profile of concentration in time, profile of concentration from a file, parametric input, and specification of concentration using user subroutines. Outlet Boundary Conditions

An outflow boundary condition is imposed on all outlets, whereby the species flux at an outlet is purely convective. Initial Conditions

Initial conditions for surface and volume concentrations can be imposed through CFD-ACE+, or using a user subroutine.

Biochemistry Theory-Surface Reaction Data Output If surface chemistry is being performed, then three data files are output: •

filename_patchname_Near_Surf_Conc.DAT: This file contains the near surface concentrations (mol/L) of the analyte species. The file contains a brief 3 line description of the problem followed by columns of data. The first column will be time for unsteady problems, and iteration number for steady state chemistry. The subsequent columns the values of analyte concentration averaged over the surface of patchname.



filename_patchname_Surf_Conc.DAT: This file contains the surface concentrations (mol/m2) of the surface species. The file contains a brief 3 line description of the problem followed by columns of data. The first column will be time for unsteady problems, and iteration number for steady state chemistry. The subsequent columns the values of surface concentration averaged over the surface of patchname.



filename_patchname_RXN_rate.DAT: This file contains the rates of reaction for both analytes and surface species(mol/m2-sec). The file contains a brief 3 line description of the problem followed by columns of data. The first column will be time for unsteady problems, and iteration number for steady state chemistry. The subsequent columns the values of reaction rate averaged over the surface of patchname.

Biochemistry Theory-Graphical Output for Post Processing The analyte concentrations (mol/L) are written to the DTF file under the name speciesName_mole. The surface phase species concentrations (mol/m2) are written to the DTF file under the name speciesName(R).

Biochemistry-Implementation Biochemistry Implementation Introduction The Implementation section gives details about how to setup a model for simulation with CFDACE+.

426

Applications: Biochemistry



Grid Generation - Describes the types of grids that are allowed and general gridding guidelines



Model Setup and Solution - Describes the Biochemistry related inputs to the CFDACE-Solver



Post Processing - Provides tips on what to look for in the solution output

Biochemistry Implementation-Grid Generation The Biochemistry application problems can be applied to any geometric system (3D, 2D planar, or 2D axisymmetric). All grid cell types are supported (quad, tri, hex, tet, prism, poly). The general grid generation concerns apply, i.e., ensure that the grid density is sufficient to resolve solution gradients, minimize skewness in the grid system, and locate computational boundaries in areas where boundary values are well known.

Implementation-Model Setup and Solution Biochemistry Implementation-Model Setup and Solution-Introduction CFD-ACE+ provides the inputs required for the Biochemistry Module. Model setup and solution requires data for the following panels: •

Problem Type



Model Options



Volume Conditions



Boundary Conditions



Initial Conditions



Solver Controls



Output

Biochemistry Implementation-Model Setup and Solution-Problem Type Click the Problem Type [PT] tab to see the Problem Type Panel. See Control Panel-Problem Type for details. Available Modules

Under the Modules section, select Chemistry to set up Biochemistry problems. The Flow Module is also required for Biochemistry simulations. Biochemistry Implementation-Model Setup and Solution-Model Options Click the Model Options [MO] tab to see the Model Options Panel. See Control Panel-Model Options for details. Shared Tab

There are no settings under the Shared tab that relate to the Bio-Chemistry Module. Chem Tab

Select Liquid Phase as chemistry media. Under liquid chemistry, select Biochemistry as the application.

427

CFD-ACE_V2008.2_User_Manual

Model Options - Chem Tab

Binary Diffusion

Use binary diffusion to simulate liquid mixing. Upon activation Binary Diffusion, the model options appears as follows:

Binary Diffusion Option

Where you have to enter Solvent Species name and molar volumes of Solvent and Solute. Currently this method is limited to mixing of two liquids only. Bulk Reaction

When you select Bulk Reaction, the model options appears:

428

Applications: Biochemistry

Liquid Phase Model Options

Select Volume Reaction from the pull down menu. The mechanism of the volume reaction can be defined in the database. Refer to frequently asked questions for mechanism set up in the database. Ionization

Activate the Ionization checkbox for Ionization problems. See Electrokinetics for details on Ionization theory and problem set up. Biochemistry Implementation-Model Setup and Solution-Volume Conditions Click the Volume Conditions [VC] tab to show the Volume Condition Panel. See Control PanelVolume Conditions for details. Before any volume condition information can be assigned, one or more volume condition entities must be made active by picking valid entities from either the Viewer Window or the VC Explorer. With the volume condition setting mode set to Properties select any volume conditions and ensure that the volume condition type is set to Fluid. Only volume conditions that are of type Fluid need to have biochemical properties specified (since there is no flow in solid or blocked regions there are no diffusion properties for those regions.) The volume condition property required by chemistry module is Diffusivity of different analytes used in the mechanism. Typical input panel is shown below. The diffusivity can be either constant value or user defined.

429

CFD-ACE_V2008.2_User_Manual

Volume Conditions

Model Setup and Solution-Boundary Conditions Biochemistry Implementation-Model Setup and Solution-Boundary Conditions-Introduction

Click the Boundary Conditions [BC] tab to see the Boundary Conditions Panel. See Control Panel-Boundary Conditions for details. Before any boundary values can be assigned, one or more boundary condition entities must be made active by picking valid entities from either the Viewer Window or the BC Explorer. The Bio-Chemistry application is fully supported by the Cyclic, Thin Wall, and Arbitrary Interface boundary conditions. (See Cyclic Boundary Conditions, Thin-Wall Boundary Conditions or Arbitrary Interface Boundary Conditions for details). All of the general boundary conditions for the Biochemistry applications are located under the Chemistry (Chem) tab and can be reached when the boundary condition setting mode is set to General. Each boundary condition is assigned a type (e.g., Inlet, Outlet, Wall, etc.). See BC Type. You also have the option to prescribe time-dependent concentration or user-defined concentration boundary conditions similar to that done Scalar Module (see User Scalar Module). This option must be used to specify time-varying inlet concentrations boundary conditions in the code. (For example, when simulating a plug of the sample analyte entering the flowing domain.) Inlets

The concentration of each analyte is required for the inlet boundary conditions. Walls

430

Applications: Biochemistry

Each wall boundary condition by default is of subtype Zero Flux. From the pull down menu you can select Surface Reaction or Analyte Specification options. The Boundary Conditions section includes: •

Boundary Conditions-Surface Reaction



Boundary Conditions-Analyte Specification

Biochemistry Implementation-Model Setup and Solution-Boundary Conditions-Surface Reaction

This can be selected to model surface reaction on any wall patches. Input panel is shown below:

Boundary Conditions - Chemistry Tab

Select Surface Reaction from the pull down menu. The mechanism of the surface reaction can be defined in database. Please refer frequently asked questions for mechanism set up in database. Biochemistry Implementation-Model Setup and Solution-Boundary Condition-Analyte Specification This can be selected to impose a fixed value or the linear combination of fixed flux and fixed concentration of biochemical species.

Fixed Flux

Apply Fixed Flux of biochemical species (Analyte) on wall boundary condition. Typical input panel is shown below:

431

CFD-ACE_V2008.2_User_Manual

Boundary Conditions - Wall Option

Fixed Value

This can be used to apply Fixed Concentration Value of biochemical species (Analyte) on wall boundary condition. Typical input panel is shown below:

432

Applications: Biochemistry

Boundary Conditions - Fixed Value

Combination

This can be used to apply Combination of Fixed Flux and Fixed Value of biochemical species (Analyte) on wall boundary condition. Typical input panel is shown below:

433

CFD-ACE_V2008.2_User_Manual

Boundary Condition - Analyte Specification

Here a, b and c is user-entered data, where c can be either in kmol/m3 or kmol/m2-sec. For details, refer to the Theory section. Biochemistry Implementation-Model Setup and Solution-Initial Conditions Click the Initial Conditions [IC] tab to see the Initial Condition Panel. See Control Panel-Initial Conditions for details.

434

Applications: Biochemistry

Initial Conditions Tab

You can specify initial conditions as constant values or read from a previously run solution file. If constant values are specified then you must provide initial values required by Chemistry module for biochemistry applications. The values can be found under the Chem tab. The initial concentration of each Analyte is required. Although, for steady state calculations, the Initial Condition values do not affect the final solution, reasonable values should be specified so that the solution does not have convergence problems at start-up. Model Setup and Solution-Solver Controls Biochemistry Implementation-Model Setup and Solution-Solver Control Introduction

Click the Solver Control [SC] tab to see the Solver Control Panel and obtain access to the settings that control the numerical aspects of the CFD-ACE-Solver. •

Spatial Differencing Scheme



Solver Selection



Under-Relaxation Parameters



Variable Limits



Output Options



Printed Output



Graphical Output

Biochemistry Implementation-Model Setup and Solution-Solver Control-Spatial Differencing Scheme

Under the Spatial Differencing tab, select the differencing method to be used for the convective terms in the equations. Activating the Biochemistry Module enables you to set the analyte calculations. The default method is first order upwind. See Spatial Differencing Scheme for more information on the different differencing schemes available. Also see Discretization for numerical details of the differencing schemes. Biochemistry Implementation-Model Setup and Solution-Solver Control-Solver Selection Under the Solvers tab, select the linear equation solver to be used for each set of equations. Activating the Biochemistry application enables you to set the analyte equations. The default linear equation solver is the conjugate gradient squared + preconditioning (CGS+Pre) solver with 50 sweeps and a convergence criteria of 0.0001. See Solver Selection for more information on the different linear equation solvers available. See Linear Equation Solvers for numerical details of the linear equation solvers.

435

CFD-ACE_V2008.2_User_Manual

Biochemistry Implementation-Model Setup and Solution-Solver Control-Under Relaxation Parameters

Under the Relaxation tab, select the amount of under-relaxation to be applied for each of the dependent (solved) equations. Activating the Biochemistry Module enables you to set the analyte dependent variables. See Under Relaxation Parameters for details on the mechanics of setting the under relaxation values. See Numerical Methods-Under Relaxation for numerical details of how under-relaxation is applied. The analyte equations use an inertial under relaxation scheme and the default values are 0.2. Increasing this value applies more under relaxation and therefore adds stability to the solution at the cost of slower convergence. The default values for all of the under relaxation settings will often be sufficient. In some cases, these settings will have to be changed, usually by increasing the amount of under relaxation that is applied. There are no general rules for these settings and only past experience can be a guide. Biochemistry Implementation-Model Setup and Solution-Solver Control-Variable Limits

Settings for minimum and maximum allowed variable values can be found under the Limits tab. CFD-ACE+ will ensure that the value of any given variable will always remain within these limits by clamping the value. Activating the Biochemistry Module enables you to set limits for the analyte variables. See Control Panel-Solver Controls-Variable Limits for details on how limits are applied. Model Setup and Solution-Output Biochemistry Implementation-Model Setup and Solution-Output-Output Introduction

There are no settings under the Output tab that effect the Biochemistry Module. The Output section includes: •

Output-Graphical Output



Output-Printed Output

Biochemistry Implementation-Model Setup and Solution-Output-Graphical Output

Under the Graphics tab, select the variables to output to the graphics file (modelname.DTF). These variables will then be available for viewing and analyzing in CFD-VIEW. Activating the Biochemistry module allows output of the variables listed: Flow Module Related Graphics Output

436

Variable

Units

Analyte Concentrations

Kmoles/m

Analyte Diffusivity

m /sec

2

3

Applications: Biochemistry

Biochemistry Implementation-Model Setup and Solution-Output-Printed Output

Under the Print tab, select the printed information to be written to the text based output file (modelname.out). Activating the Binding Kinetics option automatically outputs surface concentration, irreversible concentration, and analyte near wall concentration data to files (modelname_Surface_conc.DAT, modelname_Irreversible_con.DAT and modelname_Wall_conc.DAT) in addition to the general printed output options. See Control Panel-Printed Output for details on the general printed output options including boundary condition integral output, diagnostics and monitor point output.

Biochemistry Implementation-Post Processing Use the DTF file to view results. For transient runs, at the end of every time step, surface and volume concentrations for each species (receptors and analytes) will be reported in text files. A list of Biochemistry post processing variables is shown below: Post Processing Variables Variable

Definition

Units 2

D_AnalyteName

Diffusivity

m /s

Receptor(R)

Surface Concentration

moles/m

AnalyteName

Analyte Concentration

M

J_AnalyteName

Analyte Flux in x, y and z

Kg/ m -s

J_ReceptorName

Receptor Flux in x, y and z

2

2

2

Kg/ m -s

Biochemistry Frequently Asked Questions How do I activate Biochemistry? 1.

PT-> Select the Flow and Chemistry modules

2.

MO-> Chem: Select Chemistry media as Liquid Phase

3.

MO-> Chem-> Chemistry Media-> Liquid Chemistry - Chem: Select Application as Biochemistry

4.

MO-> Chem-> Liquid Phase-> Application-> Biochemistry

437

CFD-ACE_V2008.2_User_Manual

Model Options - Chemistry Tab

How do I define buffers?

438

1.

Open Database - Tools-> Database.

2.

Click on Buffer under Biochemistry - Biochemistry-> Buffer.

3.

Click on Local Folder.

4.

Click on File/New/Buffer.

5.

Type the Buffer Name and enter the required physical, transport, thermal and electromagnetic properties.

Applications: Biochemistry

Database Manager - Buffer Name

How do I define Analytes? 1.

Open the Database by selecting Tools-> Database.

2.

Click on Analytes under Biochemistry - Biochemistry-> Analyte.

3.

Click on Local Folder.

4.

Click on File/New/Analyte.

5.

Type the Analyte Name and Select the Type.

6.

Type-> Protein or Ampholyte or DNA/RNA or Ions.

7.

Enter the required molecular and chemical properties.

Database Manager - Analyte Name

How do I define Analyte Diffusivity and Mobility? 1.

Open Database - Tools-> Database.

2.

Click on Mixing rule under Biochemistry Biochemistry-> Mixing Rule.

3.

Click on Local Folder.

4.

Click on File/New/Rule.

5.

Type the Rule Name.

6.

From the list of Buffers, select a Buffer.

7.

From the list of Analytes, select one Analyte, click on Add and choose a method for Diffusivity and Mobility. Enter values if required. Diffusivity-> Constant-> 1e-011 - Mobility-> Constant-> 1e-011

8.

From the list of Analytes, select other Analytes of interest and follow the previous step to define Diffusivity and Mobility.

439

CFD-ACE_V2008.2_User_Manual

Database Manager - Rule Name

How do I define Receptors?

440

1.

Open Database - Tools-> Database.

2.

Click on Receptors under Biochemistry - Biochemistry-> Receptors.

3.

Click on Local Folder.

4.

Click on File/New/Receptors.

5.

Type the Receptor Name and Select the Type - Type-> Reversible Complex or Irreversible complex.

Applications: Biochemistry

Database Manager - Receptor Name

How do I define Receptor density? 1.

Open Database - Tools-> Database.

2.

Click on Receptor Group under Biochemistry - Biochemistry-> Receptor Group.

3.

Click on Local Folder.

4.

Click on File/New/Group.

5.

Type the Group Name and enter Surface Density.

6.

From the list of available Receptors, pick the one that belongs to current group and hit Add button. You will see that Receptor name in Receptor list.

7.

Enter the Initial Receptor Fraction of that Receptor.

8.

Repeat last two steps if you have more than one receptor in the group.

441

CFD-ACE_V2008.2_User_Manual

Database Manager - Receptor Group

How do I define Bulk Reaction?

Let's say the bulk reaction is: m*A1 + n*A2 r* P1 +s* P2 Forward Reaction rate: 1e+06 Reverse Reaction Rate: 0.001

442

1.

Open Database - Tools-> Database.

2.

Define Analytes A1, A2, P1 and P2 as discussed above (in questions 3 and 4).

3.

Click on Volume Reactions under Biochemistry - Biochemistry-> Volume Reactions.

4.

Click on Local Folder.

5.

Click on File/New/Mechanism.

6.

Type the Mechanism Name - Mechanism Name-> Bulk_Reaction.

7.

Type the reaction in Equation type in box - Equation: m A1 + nA2 r P1 + sP2. Alternately, you can also select the Analyte from list of Analytes and double click on it, it will appear in equation type in box).

8.

Select the Reaction Type for the current reaction step - Reaction Type-> Stoichiometric.

9.

Enter the Forward and Reverse reaction rates: Forward Reaction Rates-> Kinetic Coefficient-> 1e+06 Reverse Reaction Rates-> Kinetic Coefficient-> 0.001

Applications: Biochemistry

Database Manager - Volume Reactions

How do I define Surface reaction (Binding kinetics)?

Let's say the Surface reaction is: A1+R1A1R1 -> A1R1_IRR Forward Reaction rate: 1e+06 Reverse Reaction Rate: 0.001 Irreversible Reaction Rate: 1E+04 The above mechanism is actually set of two reaction steps: 1. A1 + R1 A1R1 2.

A1R1 -> A1R1_IRR

Where: A1 = Analyte of type Proteins or Ions or … R1 = Receptor of type Reversible Complex or Receptor or … A1R1

= Receptor of type Reversible Complex

A1R1* = Receptor of type Irreversible Complex 1. Open Database - Tools-> Database 2. Define Analyte A1 as discussed above (in questions 3 and 4)

443

CFD-ACE_V2008.2_User_Manual

3. Define Receptors R1, A1R1_IRR and A1R1 as discussed above (in question 5) Receptor Type R1 Passive Binding Site A1R1 Reversible complex A1R1_IRR Irreversible Complex 4. Define Receptor group and enter Surface Density as discussed above (in question 6) Group Name -> Reaction_Site Surface Density-> 1E-06 With, Receptors Initial Fractions R1 1 A1R1 0 5. Click on Surface Reactions under Biochemistry - Biochemistry-> Surface Reactions 6. Click on Local Folder 7. Click on File/New/Mechanism 8. Type the Mechanism Name - Mechanism Name-> Surf_Reaction 9. Type the reaction in Equation type in box = Equation: A1 + R1 A1R1 (Alternately, you can also select the Analyte and Receptors from list of Analytes and receptors and double click on it, it will appear in equation type in box) 10. Select the Reaction Type for the current reaction step - Reaction Type-> Stoichiometric 11. Enter the Forward and Reverse reaction rates Forward Reaction Rates-> Kinetic Coefficient-> 1e+06 Reverse Reaction Rates-> Kinetic Coefficient-> 0.001 12. Click on Add Step to type the Second reaction in Equation type in box - Equation: A1R1 > A1R1* (Alternately, you can also select the Receptors from list of Receptors and double click on it, it will appear in equation type in box) 13. Select the Reaction Type for the current reaction step - Reaction Type-> Stoichiometric 14. Enter the Irreversible reaction rate (Which is Forward Reaction rate for this step) Forward Reaction Rates-> Kinetic Coefficient-> 1e+04

444

Applications: Biochemistry

Database Manager - Surface Reactions

How do I define Bulk Enzyme reaction?

Let's say the Enzyme reaction is: (Assuming Enzyme is in excess and everywhere in bulk) A1 (Substrate) Km

->

P1 (Product)

: 1e+03

Vmax : 1.0 1. Open Database - Tools-> Database 2. Define Analytes A1and P1 as discussed above (in questions 3 and 4) 3. Click on Volume Reactions under Biochemistry - Biochemistry-> Volume Reactions 4. Click on Local Folder 5. Click on File/New/Mechanism 6. Type the Mechanism Name - Mechanism Name-> Bulk_enzyme_Reaction 7. Type the reaction in Equation type in box - Equation: A1 ->P1 8. Select the Reaction Type for the given step. Reaction Type-> Michaelis Menten 9. Enter Km and Vmax values - Reaction Rates-> Km -> 1e+03; Reaction Rates-> Vmax -> 1e+03

445

CFD-ACE_V2008.2_User_Manual

Database Manager - Volume Reaction - Mechanism Name

How do I define Surface Enzyme reaction? Let's say the Enzyme reaction is: (Assuming the enzyme is in excess and immobilized on surface) A1 (Substrate) Km

->

P1 (Product)

: 1e+03

Vmax : 1.0 1. Open Database - Tools-> Database 2. Define Analytes A1and P1 as discussed above (in questions 3 and 4) 3. Click on Surface Reactions under Biochemistry - Biochemistry-> Surface Reactions 4. Click on Local Folder 5. Click on File/New/Mechanism 6. Type the Mechanism Name - Mechanism Name-> Surface_enzyme_Reaction 7. Type the reaction in Equation type in box - Equation: A1 ->P1 8. Select the Reaction Type for the given step. Reaction Type-> Michaelis Menten 9. Enter Km and Vmax values: Reaction Rates-> Km -> 1e+03; Reaction Rates-> Vmax -> 1e+03

446

Applications: Biochemistry

Database Manager - Surface Reactions - Mechanism Name

For the well-mixed case, why am I not getting an exponential curve for the binding? Calculate the product of the bulk concentration of the analyte, Ci and the adsorption coefficient, ka. The inverse of the product gives the time required for maximum binding. Your time step may be too large to allow satisfactory resolution of the binding curve. Reduce your time steps to allow at least 10 time steps before you reach this characteristic binding time. Can I have both enzyme kinetics and protein binding on the same boundary? No, at present, you cannot activate both enzyme catalysis and protein binding on the same boundary. However, you can run both enzyme catalysis and protein binding in the same simulation. Can I have more than one substrate and one product for each enzyme catalysis? No, currently the catalysis reaction is limited to one substrate and one product for each enzyme. How many analytes can be specified for a single bulk reaction? You can specify a maximum of two analytes as reactants and two analytes as products. What Spatial Differencing Schemes should I use? It is recommended to use higher order differential schemes (other than upwind) to minimize effects of numerical diffusion. How can I cut down on computational time for my simulations?

447

CFD-ACE_V2008.2_User_Manual

If you are flowing analytes in a constant buffer solution, it is advisable to converge a steady state of flow with the properties of the buffer. Once the flow has reached desirable convergence, start your protein binding/enzyme catalysis with the initial condition set to the flow solution. In the solver condition for Velocity and Pressure, set the number of sweeps to zero. Now the solver maintains the flow at the steady rate and only solves for analytes, thereby cutting computational time.

Biochemistry References Bailey, J.E., and Ollis, D.F., "Biochemical Engineering Fundamentals." 2nd edition, McGraw-Hill, 1986. Myszka, D.G., et al, “Kinetic Analysis of a Protein Antigen-Antibody Interaction Limited by Mass Transport on an Optical Biosensor.” Biophysical Chemistry, 64:127-137, 1997.

448

Applications: Electroplating Electroplating Introduction Electroplating is the oldest industrial application of electrochemical reactions where metals or alloys from metallic ions in electrolytes are deposited on a substrate. Plating enables engineers to tailor a deposit’s mechanical, electrical and magnetic properties and resistance to corrosion. Electroplating has significant applications in present day industry, ranging from microelectronics to metallurgy. Global competitive pressure has caused the microelectronic manufacturers to develop high yield cost effective devices using electrochemical processes. Electrochemical methods are used to create thin- and thick-film-patterned microstructures. The Electroplating model includes: •

Electroplating-Applications



Electroplating-Features



Electroplating-Theory



Electroplating-Limitations

Electroplating Applications Modeling the electrochemical deposition processes will help engineers select appropriate operating conditions, so that uniform plating thickness is achieved. Engineers may want to operate at an appreciable fraction of limiting current to have uniform deposition (due to possible contamination at the diffusion limit). To achieve this goal, it is essential to consider the concentration variation near the electrodes, surface overpotential associated with electrode reactions and ohmic potential drop in the bulk solution. These problems are inherently of greater complexity than potential theory or other simple models for advection-diffusion transport. Hence a full-scale modeling analysis is required.

449

CFD-ACE_V2008.2_User_Manual

Schematic of Electroplating Copper

Where Can Modeling Help? From a reactor scale point of view, modeling can be used as a guide to enhance plating efficiency, achieve uniform plating thickness, improve deposit quality, and optimize the design of reactor geometry. From a feature scale point of view, modeling can be used to optimize the filling of trenches and vias, and prevent the occurrence of voids (i.e., superfilling).

Electroplating Features The physics involved in an electroplating process are complex. These include multi-dimensional transports of electrolyte flow, ion species, additives, electric current flow, and the transient deposition and dissolution of metals via electrochemical reactions. In terms of modeling methodology, simulating the process is further complicated by implementation issues such as (1) nonlinear Butler-Volmer condition on the reaction surfaces, and (2) numerical cells with large aspect ratios and large differences in electrical conductivity at the interface between the electrolyte and the seed layer. All these potential problems make the numerical simulation of electroplating processes a very challenging issue. The present model has special numerical techniques that enable the user to obtain converged solution smoothly. The model has been developed using observations from various numerical models developed at ESI CFD over the past several years and a large number of investigations done by other research groups presented at conferences and reported in literature. As a result, CFD-ACE+ has the following specific advanced features:

450



Multi-Species transport including charged or neutral species, multi-step surface reactions including both electrochemical and neutral chemical reactions, and multispecies deposition including metal and non-metal can be handled in the electroplating process. This feature enables the study of additive effect on the deposit quality and uniformity.



Multiple options for the distribution of surface current density on electrochemical reaction surfaces are available. These options include distributions of primary current, secondary current, tertiary current, and limiting current.

Applications: Electroplating



Heat transfer in an electroplating process can be resolved. The heat generated due to Joule heating and electrochemical reactions is now considered in the transport of energy within an electroplating system.



The effect of the growth of the deposited layer on the electrical conductivity of the seed layer is fully accounted for.



A scaling factor is now available to facilitate modeling of the seed layer. For semiconductor applications, the aspect ratio of the seed layer typically is very high (~ 5 to 6 orders). This makes the meshing and the condition setup for seed layer extremely difficulty. With the use of this new feature, the aspect ratio for the seed layer can be decreased to one order and therefore tremendously simplify the meshing and setup procedures.



The initial profile of the seed layer thickness is allowed to be non-uniform. This profile can be two-dimensional or three-dimensional and it is input from the GUI using a text file.

Electroplating Theory Electroplating involves fluid flow of electrolyte, transport of charged and neutral species, and electrochemical reactions on electrode surfaces. The specific equations for fluid flow are conservation of mass and momentum. The transport equation for species is given by:

(21-1)

where Ci is the concentration of species i, U is the velocity of bulk flow, z is the valence, ω is the mobility, E is the electric field, and J is the diffusion flux. The third term on the left hand side of the above equation represents the drift flux driven by electric force. This term does not apply for the transport of neutral species. In an electroplating problem, you need to compute the transport of electrical current flow. For this, the present model solves one additional equation: the conduction equation for electric current in the electroplating system, which is given by:

(21-2)

where σ is the electrical conductivity, φ is the electrical potential, and F is the Faraday constant. The first term on the right hand side of the above equation represents the source due to ion convection. The second term on the right hand side of the above equation represents the source due to ion diffusion. These two terms are dropped from the model based on the assumptions of electrical neutrality and equal diffusion coefficients among charged species. If heat transfer is considered, one additional equation, conservation of energy, is solved. The energy equation, expressed based on the transport of enthalpy, is given by:

(21-3)

451

CFD-ACE_V2008.2_User_Manual

where ρ represents the density, η represents the enthalpy, q represents the conduction heat flux, τ represents the shear stress, and p represents the pressure. The last term on the right hand side of the above equation is the Joule heating term. There is an additional source (not shown in the above equation) generated from the electrochemical reaction on electrode surfaces. This source, treated as a boundary condition for energy on the reaction surfaces, is expressed as: (21-4) where η is the potential drop and JT is the transfer current density across the interface of the electrolyte and the electrode.

Surface Reactions CFD-ACE+ is capable of including both neutral and electrochemical reactions in a mechanism. For neutral reactions, the reaction forms follow those as explained in the Chemistry module manual. For electrochemical reactions, the reaction rate is expressed by the ratio of the transfer current density, the Faraday constant, and the stoichiometric coefficients of the products and reactants (e.g., see Equation 21-1). The transfer current density is then calculated based on the continuity of current density across the reaction surface. There are four models available for calculating this transfer current density in CFD-ACE+ as discussed below. Tertiary The most comprehensive model in CFD-ACE+ for calculating the transfer current density assumes a tertiary current distribution. This model considers the effects of both concentration overpotential (i.e., concentration and its gradient on the reaction surfaces) and surface overpotential (i.e., potential drops across the reaction surfaces) on the reaction rate, e.g., see figure below, and is expressed as:

(21-5)

where the subscript “e” represents electrolyte, subscript “m” represent deposited metal, and subscript “k” represents the reaction index. In the above equation, the first term represents the ion flux transported to the reaction surface. This term is equal to the current density conducted from the electrolyte to the reaction surface (i.e., the second term in the above equation). Based on the continuity of current density, the current density conducted from electrolyte to the reaction surface is equal to that conducted from the reaction surface to the deposited metal (i.e., the third term in the above equation) and also equal to the transfer current density generated due to the electrochemical reactions on the reaction surface (i.e., the fourth term in the above equation). This model is closed by the concentration-dependent Butler-Volmer condition that expresses the transfer current density as a function of surface overpotential and the surface concentrations of ionic species, i.e.:

(216)

452

Applications: Electroplating

where j0 represents the exchange current density, and αa and αc represent the anodic and cathodic transfer coefficients, respectively. The surface overpotential η is defined as (φm - φe - φ0), where φ0 is the equilibrium open-circuit potential relative to a reference electrode.

A schematic showing the concentration gradient (concentration overpotential) and the potential drop (surface overpotential) on an electrochemical reaction surface

Secondary The second model in CFD-ACE+ adopts the secondary current distribution. This model assumes the distributions of ion concentrations are uniform and the migration of ions due to electric force is negligible. Under these assumptions, the first term in Equation (21-5) and the concentrationdependent term in Equation (21-6) are dropped. After combining these two equations, the current density across the reaction surface is expressed as:

(217)

Primary The third model in CFD-ACE+ constitutes only the primary current distribution. It is simplified from the secondary current distribution model with the assumption of zero surface overpotential. Under this assumption, the third term in Equation (21-7) is dropped and the current density across the reaction surface is given by:

(21-8)

Limiting The final model in CFD-ACE+ is the limiting current distribution model. This model assumes the surface over potential is sufficiently high such that all reacting ions reaching the reaction surfaces are totally consumed. Under such conditions, the transfer current density is expressed as:

453

CFD-ACE_V2008.2_User_Manual

(21-9)

Electroplating Limitations Despite these advanced models, CFD-ACE+ has certain limitations for simulating electroplating processes: •

Electrochemical reaction surfaces have to align with X, Y, or Z coordinates to correctly account for the electrical conduction in the thin deposited layer.



The electroplating model currently does not support feature scale simulations.



The electroplating model currently is not suitable for high concentration electrolyte.



The scaling factor for seed layer should not exceed 6 orders.



The scaling factor for seedlayer thickness can be assingned only in one direction. For e.g. if the seedlayer thickness has been specified in X direction then it should not be specified in Y or Z directions.

Electroplating-Implementation Electroplating Implementation-Introduction The Implementation section describes how to setup a model for simulation using the Electroplating model. The Electroplating Implementation section includes: •

Grid Generation - Describes the types of grids that are allowed and general gridding guidelines



Model Setup and Solution - Describes the Electroplating model related inputs to the CFD-ACE-Solver



Post Processing - Provides tips on what to look for in the solution output

Electroplating Implementation-Grid Generation The Electroplating model can be applied to any geometric system (3D, 2D planar, or 2D axisymmetric). Furthermore all grid cell types are supported (quad, tri, hex, tet, prism, poly). The general grid generation concerns apply, i.e., ensure that the grid density is sufficient to resolve solution gradients, minimize skewness in the grid system, and locate computational boundaries in areas where boundary values are well known. It is recommended that you name the cathode boundary condition as cathode and anode boundary condition as anode in CFD-GEOM during BC settings. The code automatically solves Butler-Volmer condition at these (named) interfaces.

Implementation-Model Setup and Solution Electroplating Implementation-Model Setup and Solution-Introduction CFD-ACE+ provides the inputs required for the Electroplating model. Model setup and solution requires data for the following panels:

454

Applications: Electroplating



Problem Type



Model Options



Volume Conditions



Boundary Conditions



Initial Conditions



Solver Control

Electroplating Implementation-Model Setup and Solution-Problem Type Under the Available Modules section, select Flow, Chemistry, and Electric modules to activate the Electroplating model. The Flow Module is required for electroplating simulations so it will be activated automatically. The Electroplating model should not be run with the Heat Transfer, Turbulence, or Cavitation Modules. Electroplating Implementation-Model Setup and Solution-Model Options Under the Chemistry Model options, set the Chemistry Media to Liquid Phase, set the Applications of Liquid Phase to General Liquid Chemistry, and click on the Solve Concentration option. Under the Electric Model options, select DC Conduction as the Electric Field option, click on the Electroplating option, and choose the appropriate option for surface current distribution. Electroplating Implementation-Model Setup and Solution-Volume Conditions All of the general volume condition settings apply. Electroplating Implementation-Model Setup and Solution-Boundary Conditions-Introduction All of the general boundary condition settings apply. To set up the electrochemical reactions: 1.

Select the interfaces between the electrodes and the electrolyte.

2.

Under the Chemistry Model options, select Surface Reaction as the subtype boundary condition.

3.

Choose the reaction mechanism from Surf React Name.

Electroplating Implementation-Model Setup and Solution-Initial Conditions All of the general initial condition settings apply. To set up the scaling factor for seed layer, first select the volume condition corresponding to the seed layer. Next, under the Electric Model options, input the initial average value or profile for seed layer thickness. The ratio of this input value and the thickness value you set up from the grid file will be the scaling factor. The default value for seed layer thickness is zero. Under such condition, the model assumes no scaling for seed layer. For the profile from file option for the average seed layer thickness, the format is: # no_of_points

prof_method

profile_x/y/z/t value(s)

profile_fit

prof_var value(s)

455

CFD-ACE_V2008.2_User_Manual

where no_of_points is total number of profile points, prof_method is profile method (profile_x/y/z/t), prof_var is allowed profile variable (e.g., x,y,z,t), profile_fit is curve fit method (spline/linear), profile_x/y/z/t value(s) are values of the independent variable x/y/z/t, and prof_var value(s) are values of dependent variable, i.e. the seed layer thickness. Here is an example input file: # 3 PROFILE_Y LINEAR 0.0 0.1 0.1 0.2 Electroplating Implementation-Model Setup and Solution-Solver Control-Introduction There are no special solver control settings required for electroplating modeling except for the inertial relaxation factor for the electric potential. This value is recommended to be no larger than 10E-10, to enhance the convergence speed.

Electroplating Implementation-Model Setup and Solution-Solver Control-Output To activate the graphic outputs for the surface current density, the surface overpotential, the deposition rate, and the deposit thickness on the reaction surfaces, click the Deposition Rate option under the liquid chemistry category. The representative symbols for these outputs in CFDVIEW are Surf_current, Surf_Over_P, Dep_species name, and Dep_Thickness, respectively. A text output file for these variables is also available by adding an integer variable into DTF file: EPLATE_TXT_OUTPUT int 1 1 The name of this output file is model_name.ECD.

Electroplating Implementation-Post Processing CFD-VIEW can post-process the solutions. When the Electroplating model is invoked, the potential and electrolyte concentration fields are usually of interest. You can view these fields with surface contours and analyzed through the use of point and line probes. The Electroplating model automatically writes some text based output files. The files cathode.dat and anode.dat are text files with seven columns. In the fist three columns x, y, and z coordinates of the cathode (or anode) interface will be printed. In the next four columns, the interfacial potential on the electrolyte side, interface potential at the seed-layer side, concentration of the ions at the interface and current at the interface will be printed out. This file can be viewed in any xy-plotting package.

Electroplating Examples CFD-ACE+ allows simulation of the electroplating processes within a complex reactor. As a final output, it provides the distributions of the electrical potential, the current density, and the ionic concentrations in the system. In addition, it also provides the distributions of the surface overpotential, the transfer current density, the deposition rate, and the deposit thickness on the reaction surfaces. As an example, simulation of the electroplating process in a typical reactor performed using CFD-ACE+ is shown below.

456

Applications: Electroplating

Configuration, distribution of electrical potential, and transient deposit thickness along the seed layer predicted using CFD-ACE+ (configuration, operating conditions, and experimental data are adopted from Larry Gochberg, 1999).

Electroplating References Coltrin, M.E., Kee, R.J., and Rupley, F.M., “Surface Chemkin: A General Formalism and Software for Analyzing Heterogeneous Chemical Kinetics at a Gas-Surface Interface." International Journal of Chemical Kinetics. 23(1991):1111-1128. Ermakov, S. V., and Righetti, P.G., “Computer Simulation for Capillary Zone Electrophoresis: A Quantitative Approach.” J. Chromatograph 667(1994):257-270. Giridharan, M. G., and Krishnan, A., “An Implicit Numerical Model for Electrophoretic Systems.” ASME Intl. Congress and Exposition. 66(1998): 61-68. Gochberg, L., “Modeling of Uniformity and 300-mm Scale-Up in a Copper Electroplating Tool,” 196th Meeting of the Electrochemical Society, October 17-22, 1999. Krishnamoorthy, S., Feng, J.J., and Makhijani, V.B., Analysis of Sample Transport in Capillary Electrophoresis Microchip using Full-Scale Numerical Analysis. Modeling Simulation of Microsystems. MSM2001, Hilton Head, SC, 2001.

457

CFD-ACE_V2008.2_User_Manual

Mosher, R. A., Dewey, D., Thormann, W., Saville, D.A., and Bier, M., “Computer Simulation and Experimental Validation of the Electrophoretic Behavior of Proteins.” Anal. Chem. 61(1989): 362-366. Newman, J.S., and Tobias, C.W., “Theoretical Analysis of Current Distribution in Porous Electrode.” Journal of The Electrochemical Society. 109(1962): 1183-1191. Newman, J.S., Electrochemical Systems. Prentice-Hall, 1973. Palusinski, O. A., Graham, A., Mosher,. R.A., Bier, M., and Saville, D.A., AIChE Journal. 32(1986): 215-223. Saville, D. A., and Palusinski, O.A., “Theory of Electrophoretic Separations, Part I: Formulation of a Mathematical Model.” AIChE Journal 32.2(1986): 207-214. Springer, T.E., Zawodinski, T.A., and Gottesfeld, S., “Polymer Electrolyte Fuel Cell Model.” Journal of The Electrochemical Society 136.8(1991): 2334-2342. Um Sukhee, Wang, C.Y., and Chen, K.S., “Computational Modeling of Proton Exchange Membrane Fuel Cells." Journal of The Electrochemical Society, 147.12(2002):4485-4493.

458

Appendix A CFD-ACE+ Files Appendix A CFD-ACE+ Files Introduction The model name assigned during model preparation is used to derive the names of (almost) all of the files associated with a CFD-ACE+ simulation. The CFD-ACE+ Files chapter contains the following sections: •

DTF File



Output File



MOD File



Profile BC File



Boundary Condition Integral File



Monitor Point File



CVD File

The table lists the files which may be created and provides a brief description of each. CFD-ACE+ Standard File Extensions (Continued) Name

Description

model.RUN

Run-in-progress file; deleted when solver terminates normally

model.RSL

Residual listing file

model.out

Analysis program output file

model.DTF

Data transfer facility file

model.par

Used to submit a serial run with different boundary conditions applied to same geometry

model.*.MON

Monitor point data output file

MODEL.mod

Used for solution control while solver is running; this file is deleted once read by the solver

model.HIS

Commands from model.MOD are echoed in this file

model_steady.*.DTF

Steady state results file written every iteration frequency

459

CFD-ACE_V2008.2_User_Manual

Appendix A DTF File The DTF file is the mechanism used to transfer information between all of the ESI CFD products. Although the file is binary there are ways to work with the file using the DTF Utility. Also, you may obtain a DTF Development Library from ESI CFD free of charge. This development library allows you to write your own programs to read/write DTF files. Contact ESI CFD Technical Support for details on how to obtain the library. CFD-GEOM will create the DTF file that will contain the computational grid system as well as boundary and volume condition location information. There are other third-party grid generators which can also generate a DTF file, and with the use of the DTF Development Library, you may write your own DTF files. CFD-ACE+ will read the DTF file and write it back out with all of the model setup and solver control information. CFD-ACE+ will read the DTF file and write it back out with all of the solution results. CFD-VIEW reads the DTF file to allow visualization and analysis of the results.

Appendix A Output File The model output file (modelname.out) is an ASCII text file written by the CFD-ACE-Solver during execution. The information written to the output file depends on what options have been selected. Most of the information presented is self explanatory. There are several summaries presented before the solver starts. These summaries will give you information about the solver inputs, grid system, properties, initial conditions, etc. Once the solver starts, minimum information will be presented unless you have requested diagnostics output (from the SC -> Print panel of the CFD-ACE-GUI). If you have requested printed summary outputs (such as mass flow summary, heat transfer summary, species summary, etc.) then these summaries will be written every time the solver performs a save operation (as specified in the SC -> Output page). The summary information provides integrated information over each boundary patch of the model and is self explanatory. If you have requested diagnostics output then you will get more information written to the output file. Every iteration, the solver will report diagnostic information about each equation. The information will appear as shown below:

460

Appendix A CFD-ACE+ Files

Diagnostics Output

The first set of information provides an insight into the convergence of the linear equation solver. A line is presented for each equation which states which solver is used, the number of sweeps that the solver ran and the first and last residual for the solver. You should see that the last residual for the solver is a few orders of magnitude lower than the first residual. (If you specify a four order-of-magnitude criteria, you will actually only see two orders-of-magnitude reduction because the residuals are squared in the CGS solver). The second set of information gives you information on where the maximum residual is occurring. For each variable you will see the cell center location where the maximum residual is occurring, the absolute value of the residual at that cell, the sum of all of the residuals for that equation and the value of the variable at indicated cell. This information enables you to find where (physically) in your model that the solution of a certain variable may be having trouble. When diagnostics output has been activated, timing information will be given. This informs you of how much CPU time (the time spent by the CPU for processing) and Wallclock time (the real elapsed time) was required for different portions of the simulation. The overall cumulative time is also be reported.

Appendix A MOD File MOD File Explanation: The CFD-ACE Solver looks for a modelname.MOD file every iteration. If the file is found, then it's commands will be processed and a modelname.HIS history file written to document the changes. The MOD file is deleted after the commands are processed.

MOD File Usage Usage from CFD-ACE-GUI The MOD File option allows for the creation of the .MOD file without the use of a text editor. The various supported variables are documented in "Appendix A MOD File". To use, check the appropriate variable box and supply the desired value. When finished, select the Generate MOD file button.

461

CFD-ACE_V2008.2_User_Manual

Tools --> MOD File option in CFD-ACE-GUI

462

Appendix A CFD-ACE+ Files

MOD File dialog in CFD-ACE-GUI

Using a Text File Create an ASCII text file called modelname.MOD in the running directory with the following syntax: KEYWORD DATA

For example, to change the relaxation for Enthalpy at the next iteration use: numeric_Under_Relaxation_Enthalpy 0.001

Use perform_at_iteration or perform_at_timestep commands to delay the change until the specified iteration or timestep. For example to change the relaxation for Enthalpy to 0.001 at iteration 100 and then to 0.0001 at iteration 200 use: Perform_at_iteration 100 Numeric_Under_Relaxation_Enthalpy 0.001 Perform_at_iteration 200 Numeric_Under_Relaxation_Enthalpy 0.0001

General Commands

Keyword

Data

Purpose

STOP

None

Stops the solver at the end of current iteration

SAVE

None

Saves data and stops the solver at the end of current iteration

SAVE_CONTINUE

None

Saves data at the end of current iteration and solver continues

RESTART_SAVE

Integer Value

Changes the number of iterations for output frequency

ITERATIONS

Integer Value

Changes number of iterations

TIME_STEPS

Integer Value

Changes number of time steps

TIME_SAVE

Integer Value

Changes number of time step frequency

DIAGNOSTICS

ON / OFF

Sets on/off diagnostics

MASS_FLOW_SUMMARY

ON / OFF

Sets on/off Mass Flow Summary

HEAT_TRANSFER_SUMMARY

ON / OFF

Sets on/off Heat Transfer Summary

PRESSURE_FORCE_SUMMARY

ON / OFF

Sets on/off Pressure Flow Summary

Convergence_Criterion

Real Value

Changes Convergence Criterion

Minimum_Residual

Real Value

Changes Minimum Residual

DT

Real Value

Changes the Time Step Size

ENDTIME

Real Value

Changes the End Time

463

CFD-ACE_V2008.2_User_Manual

Relaxation Commands

Keyword

Data

Purpose

numeric_Under_Relaxation_Velocities

Real Value Changes the under relaxation parameter for velocities

numeric_Under_Relaxation_Swirl_Velocities

Real Value Changes the under relaxation parameter for swirl veloci

numeric_Under_Relaxation_P_Correction

Real Value Changes the under relaxation parameters for Pressure c

numeric_Under_Relaxation_Pressure

Real Value Changes the under relaxation parameters for Pressure

numeric_Under_Relaxation_Density

Real Value Changes the under relaxation parameters for Density

numeric_Under_Relaxation_Viscosity

Real Value Changes the under relaxation parameters for Viscosity

numeric_Under_Relaxation_Enthalpy

Real Value Changes the under relaxation parameters for Enthalpy

numeric_Under_Relaxation_Temperature

Real Value Changes the under relaxation parameters for Temperat

numeric_Under_Relaxation_Turbulence

Real Value Changes the under relaxation parameters for Turbulenc

numeric_Under_Relaxation_Species

Real Value Changes the under relaxation parameters for Species

numeric_Under_Relaxation_Mixtures

Real Value Changes the under relaxation parameters for Mixture

numeric_Under_Relaxation_Saturation

Real Value Changes the under relaxation parameters for Saturation

numeric_Under_Relaxation_Ne

Real Value Changes the under relaxation parameters for Electron N

numeric_Under_Relaxation_Te

Real Value Changes the under relaxation parameters for Electron T

numeric_Under_Relaxation_Caviation

Real Value Changes the under relaxation parameters for Cavitation

numeric_Under_Relaxation_Potential

Real Value Changes the under relaxation parameters for Electric Po

numeric_Under_Relaxation_Electron

Real Value Changes the under relaxation parameters for Electron

numeric_Scalar_Under_Relaxation_ScalarName Real Value Changes the under relaxation parameters for Scalar relax_drift_vel

Real Value Changes the relaxation parameters for drift velocity

Variable Limit Commands

Keyword

Data

Purpose

numeric_Limits_U_Minimum

Real value Changes the minimum allowed value for U component

numeric_Limits_U_Maximum

Real value Changes the maximum allowed value for U component

numeric_Limits_V_Minimum

Real value Changes the minimum allowed value for V component

numeric_Limits_V_Maximum

Real value Changes the maximum allowed value for V component

numeric_Limits_W_Minimum

Real value Changes the minimum allowed value for W component

numeric_Limits_W_Maximum

Real value Changes the maximum allowed value for W componen

numeric_Limits_K_Minimum

Real value Changes the minimum allowed value for Turbulent kine

numeric_Limits_K_Maximum

Real value Changes the maximum allowed value for Turbulent kin

464

Appendix A CFD-ACE+ Files

numeric_Limits_D_Minimum

Real value Changes the minimum allowed value for Turbulent diss

numeric_Limits_D_Maximum

Real value Changes the maximum allowed value for Turbulent dis

numeric_Limits_Enthalpy_Minimum

Real value Changes the minimum allowed value for Enthalpy

numeric_Limits_Enthalpy_Maximum

Real value Changes the maximum allowed value for Enthalpy

numeric_Limits_Pressure_Minimum

Real value Changes the minimum allowed value for Pressure

numeric_Limits_Pressure_Maximum

Real value Changes the maximum allowed value for Pressure

numeric_Limits_Density_Minimum

Real value Changes the minimum allowed value for Density

numeric_Limits_Density_Maximum

Real value Changes the maximum allowed value for Density

numeric_Limits_Viscosity_Minimum

Real value Changes the minimum allowed value for Viscosity

numeric_Limits_Viscosity_Maximum

Real value Changes the maximum allowed value for Viscosity

numeric_Limits_Temperature_Minimum

Real value Changes the minimum allowed value for Temperature

numeric_Limits_Temperature_Maximum

Real value Changes the maximum allowed value for Temperature

numeric_Limits_Mixture_Minimum

Real value Changes the minimum allowed value for Mixture

numeric_Limits_Mixture_Maximum

Real value Changes the maximum allowed value for Mixture

numeric_Limits_Species_Minimum

Real value Changes the minimum allowed value for Species

numeric_Limits_Species_Maximum

Real value Changes the maximum allowed value for Species

numeric_Scalar_Limits_Minimum_ScalarName

Real value Changes the minimum allowed value for Scalar

numeric_Scalar_Limits_Maximum_ScalarName

Real value Changes the maximum allowed value for Scalar

Spatial Differencing Commands

Keyword

Data

Purpose

numeric_Spatial_Differencing_Density

Central/2ndOrder/2n Changes the Spatial differencing scheme fo dOrder_Limiter/Upwi nd/Smart_Scheme/3r dOrder

numeric_Spatial_Differencing_Turbulence

Central/2ndOrder/2n Changes the Spatial differencing scheme fo dOrder_Limiter/Upwi nd/Smart_Scheme/3r dOrder

numeric_Spatial_Differencing_Enthalpy

Central/2ndOrder/2n Changes the Spatial differencing scheme fo dOrder_Limiter/Upwi nd/Smart_Scheme/3r dOrder

numeric_Spatial_Differencing_Velocities

Central/2ndOrder/2n Changes the Spatial differencing scheme fo dOrder_Limiter/Upwi nd/Smart_Scheme/3r dOrder

465

CFD-ACE_V2008.2_User_Manual

numeric_Spatial_Differencing_Species

Central/2ndOrder/2n Changes the Spatial differencing scheme fo dOrder_Limiter/Upwi nd/Smart_Scheme/3r dOrder

numeric_Spatial_Differencing_Mixtures

Central/2ndOrder/2n Changes the Spatial differencing scheme fo dOrder_Limiter/Upwi nd/Smart_Scheme/3r dOrder

numeric_Scalar_Spatial_Differencing_ScalarName Central/2ndOrder/2n Changes the Spatial differencing scheme fo dOrder_Limiter/Upwi nd/Smart_Scheme/3r dOrder numeric_Spatial_Differencing_Velocity_Blending

Real Value

Changes blending factor of spatial differenc velocity

numeric_Spatial_Differencing_Density_Blending

Real Value

Changes blending factor of spatial differenc Density

numeric_Spatial_Differencing_Enthalpy_Blending

Real Value

Changes blending factor of spatial differenc Enthalpy

numeric_Spatial_Differencing_Mixtures_Blending

Real Value

Changes blending factor of spatial differenc Mixture

numeric_Spatial_Differencing_Species_Blending

Real Value

Changes blending factor of spatial differenc Species

numeric_Spatial_Differencing_Turbulence_Blending Real Value

Changes blending factor of spatial differenc Turbulence

Numeric Solver Commands

Keyword

Data

Purpose

numeric_Solvers_Velocities

CGS+Pre/AMG

Changes the solver for Velocities

numeric_Solvers_Enthalpy

CGS+Pre/AMG

Changes the solver for Enthalpy

numeric_Solvers_Turbulence

CGS+Pre/AMG

Changes the solver for Turbulence

numeric_Solvers_Mixtures

CGS+Pre/AMG

Changes the solver for Mixture

numeric_Solvers_Species

CGS+Pre/AMG

Changes the solver for Species

numeric_Scalar_Solvers_ScalarName

CGS+Pre/AMG

Changes the solver for Scalar

numeric_Solvers_P_Correction_Sweeps

Integer Value

Changes number of sweeps for Pressure Correction So

numeric_Solvers_Velocities_Sweeps

Integer Value

Changes number of sweeps for Velocity Solver

numeric_Solvers_Enthalpy_Sweeps

Integer Value

Changes number of sweeps for Enthalpy Solver

numeric_Solvers_Turbulence_Sweeps

Integer Value

Changes number of sweeps for Turbulence Solver

numeric_Solvers_Species_Sweeps

Integer Value

Changes number of sweeps for Species Solver

466

Appendix A CFD-ACE+ Files

numeric_Solvers_Mixtures_Sweeps

Integer Value

Changes number of sweeps for Mixture Solver

numeric_Solvers_Velocity_Criterion

Real Value

Changes the solver convergence criterion for velocity

numeric_Solvers_P_Correction_Criterion

Real Value

Changes the solver convergence criterion for Pressure

numeric_Solvers_Enthalpy_Criterion

Real Value

Changes the solver convergence criterion for Enthalpy

numeric_Solvers_Turbulence_Criterion

Real Value

Changes the solver convergence criterion for Turbulenc

numeric_Solvers_Species_Criterion

Real Value

Changes the solver convergence criterion for Species

numeric_Solvers_Mixtures_Criterion

Real Value

Changes the solver convergence criterion for Mixture

Appendix A Profile BC File When a boundary condition evaluation method is set to Profile from File, you must create an ASCII file with the necessary inputs to determine the profile information. The format of the profile BC file is a two-column (space delimited) text file with each data pair listed on a separate line. The first line must have a # symbol as the first character, followed by the number of pairs to be specified (n) (Note that there should be a space between the # character and the number of points value), the profile type (PROFILE_X, PROFILE_Y, PROFILE_Z, or PROFILE_T), the variable being specified (U, V, W, T, etc.), and the fit option (SPLINE or LINEAR). Lines 2 through n+1 must have the independent value (location or time) followed by the dependent value (boundary value).There is also a PROFILE_2D option. Lines 2 through n+1 for this case will have 4 columns. The first three columns represent the x,y, and z coordinates and the last represents the variable value. An example of the file format is shown in below:

Profile BC File

The current list of variables is given in the following table: Variable

Description

Units

U

X-Direction Velocity

m/s

V

Y-Direction Velocity

m/s

W

Z-Direction Velocity

m/s

OMEGA

Swirl Velocity

rad/s

P

Static Pressure

N/m

T

Temperature

K

2

467

CFD-ACE_V2008.2_User_Manual

Q

Heat flux

w/m

2

K

Turbulent Kinetic Energy

m /s

2

2

D

Turbulent Dissipation Rate

J/kg-s

PHI

Equivalence Ratio

-



Species Mass Fraction

-

Appendix A Boundary Condition Integral File The BC Integral Output option allows the solver to integrate engineering quantities over selected boundary condition patches. For transient simulations, the time history of these integrated quantities will be written to the output file. Upon selecting the BC Integral Output option, the solver will look for a modelname.fmt file for instructions on which variables to integrate and on which boundary conditions they should be integrated over.

BC Integral File Usage Usage from CFD-ACE-GUI The Create FMT File option allows for the creation of a Boundary Condition Integral File without the use of a text editor. To use specify the Surface Name and then add the desired variables. Note surfaces can be Assembled. When finished select Generate File. This is the same as creating the text file manually, only you can do it through CFD-ACE-GUI. The BC Integral output option can be found under the Out −−> Print tab in CFD-ACE-GUI.

468

Appendix A CFD-ACE+ Files

Boundary Condition Integral output dialog

Text File Usage When you select the Boundary Condition Integral output option, (see Boundary Condition Integral Output), the solver will attempt to read a file named modelname.fmt for instructions. If this file does not exist, the solver will stop and also write a file named modelnamd.fmt_hlp with instructions on how to create a proper BC Integral file. If the first column of any line in the modelname.fmt file has an asterisk (*), that line is commented out and has no effect. The file format is not case sensitive so either lower or upper case text may be used. A formula can be defined to compute non-dimensional quantities for instance. The following functions are accepted for use in the formula: SIN(), COS(), TAN(), EXP(), ABS(), **, +, -, *, /

General Format The general format of the file is: Surface: surface_name Variable: result_type, formula Assemble n: surf_name_1, surf_name_2, ... surf_name_n Zone : zone_number Node : node_count, i, j, k, direction, Cal: formula Zone : zone_number, Mass_average_type

Explanation Surface, Variable, and Assemble n are the keywords. The function Assemble is optional, where n is a number for ordering the Assemble files. So n=1 would mean that ASSEM_01.dat will be created. Zone, Node, and Cal are keywords. surface_name : the boundary condition name as shown in the BC Explorer. result_type : an output quantity formula: (optional) a formula to perform calculations on the quantity zone_number: zone number in which the time history of a specific grid node will be tracked. node_count: node count. i, j, k: i, j, and k (k=1 for 2D grid) index of a node direction: X_dir or Y_dir or Z_dir Cal: formula: (optional) formula to scale the time history of a grid node Mass_average_type : a definition to output mass average pressure, temperature or mass summation. Zone_number: All or a specific zone number An example modelname.fmt file is shown below: Surface: Wall_top Variable: Pressure Force in Y_dir

469

CFD-ACE_V2008.2_User_Manual

Variable: Shear Force in X_dir Surface: Wall_bottom Variable: Pressure Force in Y_dir Variable: Shear Force in X_dir Assemble 1: Wall_top, Wall_bottom Surface: Wall_left Variable: Torque, Axis(0.0, 0.0, 0.0), (0.0, 1.0, 0.0) Zone: 5 Node: 1, 1, 5, 1, Y_dir, Cal: Y_dir*1e5 Zone: 5 Node: 2, 2, 5, 2, Y_dir, Cal: Y_dir*1e5 Zone: 5, Mass Average Pressure

The length of a line is limited to 80 characters, except when the "Assemble" statement is used. If your "Assemble" statement is longer than 80 characters, you must use an "&" at the end of the line and then continue specifying your surfaces on the next line. Example Assemble Statement: Assemble 1 : Wall1, Wall2, Wall3, Wall4, & Wall5, Wall6, Wall7, Wall8 To use a formula, the generic variable PHI must be used for all variables. For example, if the square of the mean velocity and the pressure values converted to atmospheres is desired then the following would need to be used in the BC Integral File: Surface: Surface_Name Variable: VN_mean, PHI*PHI Variable: P_wall, (PHI/101325)

List of Variables Variable: Pressure Force (N) in X_dir (wall or solid/fluid interface) Variable: Pressure Force (N) in Y_dir (wall or solid/fluid interface) Variable: Pressure Force (N) in Z_dir (wall or solid/fluid interface) Variable: Pressure Force (N) in N_dir (normal direction) (wall or solid/fluid interface) Variable : Shear Force (N) in X_dir (wall or solid/fluid interface) Variable : Shear Force (N) in Y_dir (wall or solid/fluid interface) Variable : Shear Force (N) in Z_dir (wall or solid/fluid interface) Variable : Torque (N-m), Axis (x1, y1, z1), (x2, y2, z2) (wall) (Note: x1,y1,z1, and x2,y2,z2 are coordinates of rotation axis. For 2D, set z1=z2=0.) Variable : Mass Flow (kg/s) (mass flow rate at inlet and outlet) Variable : Volumetric Flow (m3/s) (volumetric flow rate at inlet and outlet) Variable : U_mean (m/s) (mean value of U velocity at inlet and outlet) Variable : V_mean (m/s) (mean value of V velocity at inlet and outlet)

470

Appendix A CFD-ACE+ Files

Variable : W_mean (m/s) (mean value of W velocity at inlet and outlet) Variable : VN_mean (mean value of Normal velocity at inlet and outlet) Variable : P_mean (Pa) (mean value of Pressure at inlet or outlet) Variable : P_wall (Pa) (mean value of Pressure at Wall) Variable: PT_mean (Pa) (mean value of Total Pressure at an inlet or outlet) Variable : T_mean (K) (mean value of Temperature at inlet and outlet) Variable : T_wall (K) (mean value of Temperature at Wall) Variable: TT_mean (K) (mean value of Total temperature at an inlet or outlet) Variable : H_coef (W/m2-K) (mean value of the Heat Transfer Coefficient at a Wall) Variable : Enthalpy Flux (J/m2-s) (Enthalpy convection term (rho*vel*H0)) Variable : Heat Transfer Rate (W) (mean value of Heat Flux) Variable : Mean Heat Transfer Rate (W) (mean heat transfer rate at the wall (Heat Flux)) Variable : Pressure Moment (N-m) in X_dir (Wall or solid/fluid interface) Variable : Pressure Moment (N-m) in Y_dir (Wall or solid/fluid interface) Variable : Pressure Moment (N-m) in Z_dir (Wall or solid/fluid interface) Variable : Viscous Moment (N-m) in X_dir (Wall or solid/fluid interface) Variable : Viscous Moment (N-m) in Y_dir (Wall or solid/fluid interface) Variable : Viscous Moment (N-m) in Z_dir (Wall or solid/fluid interface) Variable: Electric_potential (V) (Any Boundary Condition) Variable: Electric_current (A) (Any Boundary Condition) Variable : E_Static_Flux (V/m) (Electrostatic Flux) Variable : Em Current (A) (Total Emission Current) Variable : SFlux A (kg/s) (mass flux of species "A") Variable : SConc A (mol/m3) (concentration of species "A") Variable : S_Conc_mean A (mol/m3 for liquid, mol/kg for gas phase) (mean concentration of species "A") Zone : . (Pa/kg) Mass Average Pressure Zone : . (K/kg) Mass Average Temperature Zone : . (kg) Mass Sum Node : (integer node number)

Appendix A Monitor Point File When the monitor point option has been selected with the File Input option (see Graphical Output) a file name is requested. You must create an ASCII file with the necessary inputs to create the monitor point output. The format of the monitor point file is as follows. The first line must contain an integer to specify the number of monitor total monitor points to be specified (npts) and an integer to specify the number of variables to be monitored at each point (nvar). The next line contains nvar entries which are the names of the variables to be monitored. The current list of variables is given in the following table:

Shared

Cavitation

471

CFD-ACE_V2008.2_User_Manual

Flow

Stress

Heat

Electric

Turbulence

Magnetic

Gas Chemistry

Kinetic

Two Fluid

VOF (Free Surfaces)

Plasma

Shared Variable

Description

Units

RHO

Density

kg/m

X, Y, Z

Location

m

3

Flow Variable

Description

Units

U, V, W

Velocity Components

m/s

P

Static Pressure

Pa

P_TOTAL

Total Pressure

Pa

MU

Effective Viscosity

kg/m-s

MACH

Mach Number

-

VORT

Vorticity

-

STR_FUN

Strain Function

m /s

STR_RAT

Strain Rate

1/s

2

Heat

472

Variable

Description

Units

T

Static Temperature

K

H0

Static Enthalpy

J/kg

COND

Thermal Conductivity

W/m-K

Appendix A CFD-ACE+ Files

CP

Specific Heat

J/kg-s

Turbulence Variable

Description

Units

K

Turbulent Kinetic Energy

m /s

D

Turbulent Dissipation Rate

J/kg-s

TURB_MU

Turbulent Viscosity

kg/m-s

Y+

Turbulent Y+

-

2

2

Gas Chemistry Variable

Description

Units



Species Mass Fraction

-

M_

Mixture Mass Fraction

-

Two Fluid Variable

Description

Units

U2, V2, W2

Velocity 2 Components

m/s

RHO2

Density 2

kg/m

MU2

Laminar Viscosity 2

kg/m-s

STR_FUN2

Stream Function 2

kg/s

T2

Static Temperature 2

K

CP2

Specific Heat 2

J/kg-s

COND2

Thermal Conductivity 2

W/m-K

H02

Static Enthalpy 2

J/kg

ALPHA

Volume Fraction

-

3

Cavitation Variable

Description

Units

473

CFD-ACE_V2008.2_User_Manual

Mass_Frac

Mass Fraction

-

Vol_Frac

Volume Fraction

-

Vap_Vol_Fr

Vapor Volume Fraction

-

Stress Variable

Description

Units

FEM_PHI_

Displacements in X, Y, and Z directions

m

FEM_PHI_V

Piezoelectric Voltage

V

FEM_VEL_

Velocity in X, Y, and Z direction

m/s

FEM_ACC_

Acceleration in the X, Y, and Z directions

m/s

STRESS_XX

Cartesian Stress XX

N/m

STRESS_YY

Cartesian Stress YY

N/m

STRESS_ZZ

Cartesian Stress ZZ

N/m

STRESS_XY

Cartesian Stress XY

N/m

STRESS_YZ

Cartesian Stress YZ

N/m

STRESS_XZ

Cartesian Stress XZ

N/m

MAX_PSTRESS

Maximum Principal Stress

N/m

MIN_PSTRESS

Minimum Principal Stress

N/m

SHR_STRESS

Maximum Shear Stress

N/m

STRAIN_XX

Cartesian Strain XX

-

STRAIN_YY

Cartesian Strain YY

-

STRAIN_ZZ

Cartesian Strain ZZ

-

STRAIN_XY

Cartesian Strain XY

-

STRAIN_YZ

Cartesian Strain YZ

-

STRAIN_XZ

Cartesian Strain XZ

-

MAX_PSTRAIN

Maximum Principal Strain

-

MIN_PSTRAIN

Minimum Principal Strain

-

SHR_STRAIN

Maximum Shear Strain

-

RFORCE_

474

Reaction Force in the X, Y,

2

2

2

2

2

2

2

2

2

N

2

Appendix A CFD-ACE+ Files

and Z directions VONMISES

Von Mises Stress

2

N/m

Electric Variable

Description

Units

EL_POT

Electric Potential

V

EL_POT_I

Imaginary Component of Electric Potential

V

EL_POT_S

Porous Media Solid Potential (Fuel Cells)

V

OVER_P

Over Potential (Electrochemistry)

V

EFIELDfile.html

or DTF -cvh file.DTF >file.html

This will create an HTML file that contains either the standard (all arrays printed to 10 elements only) or verbose (entire arrays printed) output. If you do not want to use a browser, the contents mode will generate ASCII data similar to the HTML. This data gets directed to standard out, so you may want to redirect it like so: DTF -c file.DTF >file.ascii or DTF -cv file.DTF >file.ascii

Printing a data array: -ph You can print a single data array instead of the entire contents of the DTF file. If you know the section number of the data array, perhaps from a contents dump, you can run: DTF -ph file.DTF section

Viewing and Updating General Simulation Data The DTF command can be used to create an editable ASCII file, which can in turn be used to update specific data in the DTF file. This is useful for quickly modifying simple run-time parameters, such as iteration number or relaxation factor. The DTF utility can print out the all of the simulation data of general topo type for the simulation numbered Simnum to standard out which is redirected to a temporary file here: DTF -vd file.DTF Simnum > foobar This allows easy reviewing of the various inputs for this simulation and the opportunity to change them without using the user interface. For example, you could edit the temporary file such that the value of the iteration variable is different and uncomment that line by removing the leading # symbol, then running the update data function with standard in redirected to the modified temporary file like so: DTF -ud file.DTF Simnum < foobar Alternatively, you can echo the update into the command: echo ‘MAX_ITER int 1 100’ | DTF -ud file.DTF Simnum or even just type it in straight from the keyboard (do not forget to end with the control-D character): DTF -ud file.DTF Simnum MAX_ITER int 1 100 ^D

Testing File You can issue the command: DTF -t file.DTF

481

CFD-ACE_V2008.2_User_Manual

to check the file for both integrity (all sections that are referenced actually exist) and for valid data (all single and double precision data arrays contain finite numbers and no NaN’s).

Testing Structured Grid Patch Data for Overlaps: -tp You can test for overlapping patches using the command: DTF -tp file.DTF This checks all patches in all zones, and compares index ranges. If any patches exist with the same range of indices, it will tell you so.

Testing Connectivity: -tc To verify the connectivity information of a particular simulation in a DTF file, execute: DTF -tc file.DTF Simnum This inherently checks file integrity, index ranges, and boundary face associations.

Tagging Bad Boundary Faces: -tag_bad_bc The connectivity testing may reveal unassociated boundary faces in a simulation. Executing DTF -tag_bad_bc file.DTF Simmum will associate these boundary faces with a BAD_BC BC record that can be modified in CFD-ACE+.

Deleting a Simulation from the File: -[f]del_sim You can delete a specific simulation from the file by issuing the command: DTF -del_sim file.DTF Simnum This will delete the simulation numbered Simnum from the DTF file after asking for confirmation. Using ‘-fdel_sim’ will not confirm your intention.

Deleting a Zone from the File: -[f]del_zone You can delete a specific zone from a simulation in a file by issuing the command: DTF -del_zone file.DTF Simnum Zonenum This will delete the zone numbered Zonenum from the simulation numbered Simnum in the DTF file after asking for confirmation. Using ‘-fdel_zone’ will not confirm your intention.

Deleting Particular Simulation Data Arrays: -[f]del_sd You can delete Simulation Data (sd) Arrays by name using the command: DTF -del_sd file.DTF Simnum Name This will delete a simulation data named Name from the simulation number Simnum in the DTF file after asking for confirmation. Using ‘-fdel_sd’ will not confirm your intention.

Deleting Particular Zonal Data Arrays: -[f]del_zd You can delete particular Zonal Data (zd) arrays from all zones in a simulation by using the command: DTF -del_zd file.DTF Simnum Name This will delete ALL zonal data of the name Name from the simulation numbered Simnum from the DTF file after asking for confirmation. Using ‘-fdel_zd’ will not confirm your intention.

482

Appendix B DTF Utility

Deleting ALL Simulation Data Arrays: -[f]del_all_sd If you are feeling really dangerous, and you want to wipe out ALL the simulation data in a file, you can use the command: DTF -del_all_sd file.DTF Simnum This will delete ALL the simulation data arrays residing in simulation Simnum in the file after asking for confirmation. Using ‘-fdel_all_sd’ will not confirm your intention.

Deleting ALL Zonal Data Arrays: -[f]del_all_zd If you feel incredibly reckless, go for it! You can wipe out the zonal data arrays in all zones in a simulation by: DTF -del_all_zd file.DTF Simnum This will delete ALL zonal data arrays in ALL zones in the simulation Simnum after asking for confirmation. Using ‘-fdel_all_zd’ will not confirm your intention.

Updating Data Compression: -rle You ensure that all of the data in a DTF file is compressed according to the latest criteria for minimizing disk usage and maximizing data access by running: DTF -rle file.DTF

Unlocking a Locked DTF File: -unlock DTF uses file locks for exclusive access to a DTF file while it is open. There have been reports of a file being left locked after the process which opened it has been killed. If you are certain there are no processes holding a locked DTF file open, you can unlock it with: DTF -unlock file.DTF

Setting the Scaling Factor: -set_scaling You can modify the scaling for a file with: DTF -set_scaling file.DTF scale

Appendix B Frequently Asked Questions How do I change the inlet velocity with the DTF utility?

You cannot change the inlet velocity with the DTF utility. The inlet velocity is contained in a boundary condition record and the DTF utility does not modify data in these records.

483

Appendix C CFD-ACE Python Scripting Appendix C Python Scripting Introduction CFD-ACE-GUI enables you to setup your problem, including setting simulation variables, volume conditions, boundary conditions, initial conditions, and point conditions (for the Spray model). This is accomplished by changing or adding the related variables in the DTF file and sending it to CFD-ACE-Solver to solve the problem. This process can be setup in CFD-ACE-GUI, but sometime it is necessary to setup the problem in the command line. The CFD-ACE-GUI Python script is used for this purpose. Generally, it is quicker to change the variable directly in the DTF file by using functions in the SDTF Python module of SimManager. But it is dangerous to setup the problem by this way because variables in the DTF file are not independent and must follow the logic defined in CFDACE-GUI. Otherwise, the CFD-ACE-Solver will not recognize your settings and may provide you with the wrong answer. Therefore, the Python script for CFD-ACE-GUI will not access the DTF file directly, but will change it by calling functions in CFD-ACE-GUI. To easily access the variables, the CFD-ACE-GUI Python script is divided into modules according to the CFD-ACE-GUI Control Panel layout: •

GuiFILE - File related operations including some functions in the RUN panel



GuiML - Functions in the Models menu including Spray, Fan Models, Momentum Resistance Models, Radiation Models, and Mixture and Species



GuiPT - Problem Types



GuiMO - Module Options



GuiVC - Volume Conditions



GuiBC - Boundary Conditions



GuiIC - Initial Conditions



GuiPC - Point Conditions



GuiOut - Output Controls



GuiSC - Solver Controls



GuiRun - Run Controls

Appendix C Usage Use the CFD-ACE-GUI Python script to fulfill most of the setup process for objects, variables, and values. In GuiMO, GuiVC, GuiBC, GuiMO, and GuiSC modules, the script provides a simple Set function. By calling this function with the appropriate variables and values, you will be able to easily setup your problem. A quick way to setup your problem for the first time is to get the script from the Journaling option. CFD-ACE-GUI will record (or journal) what you have done and save this to a Python script file. Later, you can access this script file and make changes for similar but different computations. Variables can belong to the whole simulations (simulation variables), or specific face groups/cell groups (zone variables). Variables can be a single variable or an array (1D or 2D). We provide the following functions: For simulation variables: PY_MODULE.Set("VARIABLE_IDNAME",value) PY_MODULE.SetArraySize("VARIABLE_IDNAME",value)

485

CFD-ACE_V2008.2_User_Manual

PY_MODULE.SetArray("VARIABLE_IDNAME",index, value)

For zone variables: PY_MODULE.Set(objects," VARIABLE_IDNAME ",value) PY_MODULE.SetArraySize(objects," VARIABLE_IDNAME ",value) PY_MODULE.SetArray(objects," VARIABLE_IDNAME ",index, value)

Here PY_MODULE is a PYTHON module (GuiPT, GuiMO, GuiVC, GuiIC, GuiPC, GuiSC or GuiRun). Each Python module can only access variables defined in this module. In other words, you can only set variables shown in the corresponding panel in CFD-ACE-GUI. In the GuiIC, when the global IC Setting is for all volumes, no object is needed to set variables. The SetArray function can set an array or list variables. The argument index can be an integer, a string, or a list of strings and indices. The grammar for VARIABLE_IDNAME is LEFTTABNAME/PYNAME. In genreral, for GuiMO, GuiVC, GuiBC, GuiPC, and GuiIC, LEFTTABNAME is the physical module name listed in the GuiPT (Flow, Heat, etc.). For GuiSC, LEFTTABNAME is same as the left tab shown in the CFDACE-GUI SC control panel. Nevertheless, this is not always true since version 2003. To obtain the VARIABLE_IDNAME for your variable, use the CFD-ACE-GUI Journaling option. There are some general rules for VARIABLE_IDNAME: •

If Value is boolean type (0 or 1) and value is 1.



Shared can be dropped. PY_MODULE.Set(”PYNAME”) is equivalent to PY_MODULE.Set(”Shared/PYNAME”)



No space is allowed in the PYNAME



Both PYNAME and string value are case insensitive. But it is strongly suggested to use the exact names for PYNAME in the document



Index for the array is one-based.

Objects can be a key, a list of keys, or objects returned by the following functions. Prototype GetGeomObjByName(NameList,List=None)

Description Find the objects from given names.

Inputs NameList a string or a python string list Region objects. The default value is None

Returns Objects. If the size of objects is zero, none of volume (boundary) is found.

Prototype GetGeomObjByGrpName(GrpNameList,List=None)

Description Find the objects from given group names.

486

Appendix C CFD-ACE Python Scripting

Inputs GrpNameList string or a python string list Region objects. The default value is None

Returns Objects. If the size of objects is zero, none of volumes (boundaries) is found.

Prototype GetGeomObjByZone(ZoneList, Region=None)

Description Find the objects from given zones

Inputs ZoneList a integer or a python integer list Region objects. The default value is None, which will make it search the whole simulation

Returns Objects

Prototype GetGeomObjByType(TypeList, Region=None)

Description Find the objects from volume types or boundary types.

Inputs TypeList a string or a python string list Region objects. The default value is None

Returns Objects. If the size of objects is zero, none of volume (boundary) is found.

In the BC, VC, and IC panel, you can use the following functions to group and ungroup: Prototype Group(objects,grpid="")

Description Group the given objects with group ID = grpid.

Inputs Objects - A key, key list, or objects return by pick functions.

487

CFD-ACE_V2008.2_User_Manual

grpid Given grpid. The default value is empty, if so, the grpid will be generated automatically.

Prototype Ungroup(objects)

Description Ungroup the given objects.

Inputs Objects - A key, key list, or objects return by pick functions.

Appendix C GuiFILE In this Python module, the following functions are available: Prototype GuiFILE.Open(FileName [, sim#])

Description Internally, this function will do a lot of initialization. Therefore, any simulation related Python script should begin with this function.

Prototype GuiFILE.Save()

Description Save the current DTF File.

Prototype GuiFILE.SaveAs(filename)

Description Save as a different DTF File.

Prototype GuiFILE.Submit()

Description Submit the job.

488

Appendix C CFD-ACE Python Scripting

Prototype GuiFILE.Stop()

Description Stop the job submitted.

Prototype GuiFILE.DefinePara(name)

Description Define parametrics for the current active simulation

Prototype GuiFILE.OpenMMD(filename)

Description Open the material database file. (extension: MMD)

Prototype GuiFILE.OpenSMD(filename)

Description Open the surface reaction database file. (extension: SMD)

Prototype GuiFILE.OpenRMD(filename)

Description Open the bulk reaction database file. (extension: RMD)

Prototype GuiFILE.OpenPMD(filename)

Description Open the property database file. (extension: RMD)

Prototype GuiFILE.OpenChemkinData(GasphaseFile, SurfaceChemFile,ThemoFile)

489

CFD-ACE_V2008.2_User_Manual

Description Open Chemkin database files and process them.

Inputs GasphaseFile Gas phase chemistry database file of Chemkin SurfaceChemFile Surface chemistry database file of Chemkin ThemoFile Themodynamic database of Chemkin

Prototype GuiFILE.ProcessChemkinData()

Description Process Chemkin data base file which is already given in the DTF file after you open it.

Prototype GuiFILE.SetScaling(new_scaling)

Description Set the physical scaling of the current active simulation.

Prototype GuiFILE.SetUserSharedLib(lib_name)

Description Set the user shared library of the current active simulation

Appendix C GuiML (GUI Models) Radiation Model Operations To set the radiation model using Python Scripting: 1.

Select the radiation module, GuiPT.Set("Rad"). Without this step, the following operations are meaningless.

2.

Choose a model:



DOM Model: GuiMO.Set("Rad/Model", "Discrete Ordinate Method")



STS Model: GuiMO.Set("Rad/Model", "Surface to Surface")



Monte Carlo Model: GuiMO.Set("Rad/Model", "Monte Carlo")



Only the DOM and STS models can be defined in the Radiation Model.

3. Get the radiation model python object and assign to a variable, for example, Radmodel. Radmodel=GuiML.GetRadiationModel() 4. Set the value by using the variable, Radmodel. There are a few functions available. Since the DOM and STS models have different parameters, those methods are described separately below.

490

Appendix C CFD-ACE Python Scripting

DOM Model Prototype Radmodel.SetNonGray(value)

Description Turn on (value=1) or off (value=0) the Non-Gray option.

Prototype Radmodel.SetNumberOfBands(N)

Description Set number of bands to N

Prototype Radmodel.SetNumberOfEmSets(N)

Description Set number of emissivity sets to N, default value N=1

Prototype Radmodel.SetNumberOfAbsorpCoSets(N)

Description Set number of absorp. coefficient sets to N, default value N=2

Prototype Radmodel.SetEmSetName(i, Name)

Description Set the i-th emissivity sets' name to ‘Name'.

Prototype Radmodel.SetEmissivity(i, iband,Value)

Description Set the i-th emissivity sets' emissivity to ‘Value' for the band number iband

Prototype Radmodel.SetAbsorpSetName(i, Name)

491

CFD-ACE_V2008.2_User_Manual

Description Set the i-th absorp. coefficient sets' name to 'Name'

Prototype Radmodel.SetAbsorpCoeff (i, iband,Value)

Description Set the i-th absorp. coefficient sets' coefficient to ‘Value' for the band number iband

Prototype Radmodel.SetWaveLengthEnd(iband,value)

Description Set the end of the wave length of the bank number ‘ibank'

STS Model Prototype Radmodel.SetAccuracy(level)

Description Set the accuracy to level: ‘‘Extremely high”, ‘‘High”, ‘‘Moderate”, or ‘‘Low”. Default: ‘‘Moderate”

Prototype Radmodel.SetSubiteration(num)

Description Set the subiteration number to 'num'. Default: 1

Prototype Radmodel.SetEnvT(value)

Description Set the environmental temperature to 'value'. Default: 300

Prototype Radmodel.SetSolarIrradiation(value)

Description Turn on solar irradiation (value=1) or off (value=0)

492

Appendix C CFD-ACE Python Scripting

Prototype Radmodel.SetNumberOfSources(N)

Description Set number of radiation sources to 'N'. This function is availabe only solar irradiation option is turned on

Prototype Radmodel.SetRadiationSource(i, x, y, z, density)

Description Set values of the ith radiation souce: direction (x, y, z) and density

Prototype Radmodel.SetNumberOfEmSets(N)

Description Set number of emissivity sets to N. Default: N=1

Prototype Radmodel.SetEmSetName(i, Name)

Description Set the i-th emissivity sets' name to 'Name'.

Prototype Radmodel.SetEmissivity(i, iband,Value)

Description Set the i-th emissivity sets' emissivity to 'Value' for the band number 'iband'. Note that iband =1 always since only one band exists in STS model.Absorp. coefficient sets cannot be changed in STS model

The set number index and the band number index are one-based. When you misuse these functions, warning or error messages will appear.

Examples The following script uses the DOM model and sets model parameters. GuiPT.Set("Rad") GuiMO.Set("Rad/Model","Discrete Ordinate Method") radmodel=GuiML.GetRadiationModel()

493

CFD-ACE_V2008.2_User_Manual

radmodel.SetNumberOfEmSets(40) radmodel.SetEmSetName(1,'tst') radmodel.SetAbsorpCoeff(1,1,3) radmodel.SetWaveLengthEnd(1,1)

The following script uses the STS model and sets model parameters. GuiPT.Set("Rad") GuiMO.Set("Rad/Model","Surface to Surface") radmodel=GuiML.GetRadiationModel() radmodel.SetAccuracy("High") radmodel.SetSubIteration(5) radmodel.SetEnvT(311.0) radmodel.SetSolarIrradiation(1) radmodel.SetNumberOfSources(4) radmodel.SetRadiationSource(1,1,2,3,4)

Fan Model For the fan model, build the fan model first and then add it to the simulation. To build a new fan model, use: fanmodel=GuiML.FanModel("FanName")

It returns a new fan model with the name ‘‘FanName” and default parameters. To add the newly built fan model into the simulation, use: GuiML.AddFanModel(fanmodel)

To delete an existing fan model, use: GuiML.DeleteFanModel(name)

To get an existing fan model into a simulation, use: GuiML.GetFanModel(name)

If the fan name is does not exist in the models list, None is returned. Otherwise, a FanModel object is returned. To change fan model parameters, use the following functions: Change the fan model name to the given value: fanmodel.SetName(given_name)

Set the fan model position to (x,y,z): fanmodel.SetPosition(x,y,z)

Set the fan model direction to (i,j,k): fanmodel.SetDirection(i,j,k)

Set the fan model radius to Radius: fanmodel.SetRadius(Radius)

494

Appendix C CFD-ACE Python Scripting

Set the fan model hub radius to hubRadius: fanmodel.SetHubRadius(hubRadius)

Set the fan model speed: fanmodel.SetSpeed(speed)

Set the fan thickness: fanmodel.SetThickness(thickness)

Set the fan blade angle: fanmodel.SetBladeAngle(bladeAngle)

Set the fan factor: fanmodel.SetFanFactor(fanFactor)

Examples fanmodel=GuiML.FanModel("testfan") # new a fan model fanmodel.SetPosition(1.0,2.0,2.0) fanmodel.SetDirection(1,4,5.0) fanmodel.SetRadius(7.3) fanmodel.SetHubRadius(4.3) fanmodel.SetHubRadius(4.3) fanmodel.SetSpeed(1.0) fanmodel.SetSpeed(1.0) fanmodel.SetThickness(0.1) fanmodel.SetBladeAngle(2.0) fanmodel.SetFanFactor(3.4) GuiML.AddFanModelToSim(fanmodel) #add this fan model to the simulation fan2=GuiML.FanModel("fan2") # second fan model #only set HubRadius and Speed, use default value for other options fan2.SetHubRadius(3.3) fan2.SetSpeed(1.5) GuiML.AddFanModelToSim(fan2)

Momentum Resistance Model To build your own momentum resistance model, use: model = GuiML.MomentumModel(name)

where name is the new model name. After you set the required model parameters, you can add it into the simulation by using: GuiML.AddMomentumModel(model)

You can delete the model in the simulation as long as you know the model name, by using: GuiML.DeleteMomentumModel(name)

495

CFD-ACE_V2008.2_User_Manual

For an existing momentum resistance model, you can get it by name, by using: GuiML.GetMomentumModel(name)

If the name does not exist in the models list, None is returned. Otherwise, a MomentumModel object is returned. For a MomentumModel object (named ‘‘model”), the following operation functions are available: Change the name of the model: model.SetName(name)

Change the isotropic property on tangential plane. iso=0: Non-isotropic (default), iso=1: isotropic. Note that this function is only available for 3D cases: model.SetTangentIsotropic(iso)

Change the normal direction to x, y, z. If it is 2D, only x, y is needed: model.SetNormalDirection(x,y,z=0)

Change the tangential direction to x, y, z. If it is 2D, only x, y is needed: model.SetTangentDirection(x,y,z=0)

Change the linear resistance coefficients of the normal direction, tangential direction 1 and tangential direction 2: model.SetLinearResistanceCo(value_normal, value_tang1,value_tang2=0)

Change the quadratic resistance coefficients of the normal direction, tangential direction 1 and tangential direction 2: model.SetQuadraticResistanceCo(value_normal, value_tang1,value_tang2=0)

Change the inverse resistance coefficients of the normal direction, tangential direction 1 and tangential direction 2: model.SetInverseResistanceCo(value_normal, value_tang1,value_tang2=0)

Change the porosity value: model.SetPorosity(porosity_value)

Change the minimum velocity value: model.SetMinVelocity(minVelocity_value)

Change the geometry center to x, y, z. If it is 2D, only x, y is needed: model.SetGeomCenter(x,y,z=0)

Change the thickness value. model.SetGeomThickness(thickness_value)

Set the geometry configuration. Note type = ‘‘Cylindrical” is only available to 3D case. For type = ‘‘Polyhedral”, any number of point positions to define polyhedral is given after the type. model.SetGeometry("Cylindrical",Radius_value) model.SetGeometry("Polyhedral",[x1,y1,z1],[x2,y2,z2],...)

Active Mixtures and Species For this script, there are two functions available: Set mixtures active (onoff=1) or inactive (onoff=0). mixtures can be a string or a list of strings.

496

Appendix C CFD-ACE Python Scripting

GuiML.SetMixtures(mixtures,onoff)

Set species active (onoff=1) or inactive (onoff=0). speciesnames can be a string or a list of strings. GuiML.SetSpecies(speciesnames,onoff)

Appendix C GuiPT (Problem Type) To use the Problem Type Python module, you must import it using the following script: import GuiPT

In this Python module, the only function available is: GuiPT.Set("ModuleName",Value=1)

The value can be 0 or 1. If the Value is 1, the corresponding physical module is turned on. The script can be simplified as: GuiPT.Set("ModuleName")

ModuleNames for GuiPT are: Module Name

Description

Shared

Shared Module

Flow

Flow

Heat

Heat Transfer (Heat)

Turb

Turbulence (Turb)

Chem

Chemistry

Scalar

User Scalar (Scalar)

Rad

Radiation (Rad)

Spray

Spray

VOF

Free Surfaces (VOF)

Fuid2

Two-Fluid (Fluid2)

Cav

Cavitation (Cav)

Deform

Grid Deformation (Deform)

Stress

Stress

Plasma

Plasma

Electr

Electric (Electr)

Magnet

Magnetic (Magnet)

Eplate

Electroplating (Eplate)

Kinetic

Kinetic

497

CFD-ACE_V2008.2_User_Manual

Semi

Semi Device

Appendix C GuiMO (Module Options) Prototype GuiMO.Set("ModuleName/PYNAME",Value)

Description The Modulename is same as the left tab name shown on the GUI MO panel.

For array variables: Prototype GuiMO.SetArraySize("ModuleName/PYNAME",size)

Prototype GuiMO.SetArray("ModuleName/PYNAME", index, value)

Appendix C GuiVC (Volume Conditions) Protoype GuiVC.Set("ModuleName/PYNAME",Value)

Description The ModuleName is same as the left tab name shown on the GUI VC panel. This function is used to set variables that are not associated with a volume geometry object.

Protoype GuiVC.Set(objects, "ModuleName/PYNAME",Value)

Description The ModuleName is same as the left tab name shown on the GUI VC panel. This function is used to set variables that are associated with a volume geometry object.

For variables that are a list or an array: Protoype GuiVC.SetArraySize(objects,"ModuleName/PYNAME",size)

Description Set the top dimension of an array.

498

Appendix C CFD-ACE Python Scripting

Protoype GuiVC.SetArraySize(objects,"ModuleName/PYNAME",index, size)

Description Set the dimension size of an array which has multiple dimension.

Protoype GuiVC.SetArray(objects, "ModuleName/PYNAME", index, value)

Description Set the value of an array at position given by index.

For array variables, PYNAME must be an array type. Remember that ‘‘index” can be a integer (1based), a string or a list of integers and strings. For example, for a two-dimensional array A, to set the value of A(2,3), you have to set index=[2,3]. For a one-dimensional array under a list B, you can set index=[”xyz”,3] to change the corresponding value. The objects can be a key (an integer), a list of keys (python integer list), or volume geometry objects (any of the following functions return) Protoype vcobjs=GetAllGeomObj()

Description Get all the volume geometry objects.

Protoype vcobjs = GetGeomObjByName(NameList, Region=None)

Description Find the volume geometry objects by volume names

Inputs NameList a string or a python string list Region objects object, the default value is None

Returns vcobjs Volume geometry objects. If the size of objects object is zero, none of volumes is found.

Protoype vcobjs = GetGeomObjByGrpName(GrpNameList, Region=None)

Description Find the volume geometry objects by group names

499

CFD-ACE_V2008.2_User_Manual

Inputs GrpNameList a string or a python string list Region objects object, the default value is None

Returns vcobjs Volume geometry objects. If the size of objects object is zero, none of volumes is found.

Protoype vcobjs = GetGeomObjByZone(ZoneList, Region=None) Find the volume geometry objects from given zones

Inputs ZoneList a integer or a python integer list Region objects object, the default value is None

Returns vcobjs Volume geometry objects. If the size of objects object is zero, none of volume is found.

Protoype vcobjs = GetGeomObjByType(TypeList, Region=None)

Description Find the volume geometry objects from volume types.

Inputs TypeList a string or a python string list Region objects object, the default value is None

Returns vcobjs Volume geometry objects. If the size of objects object is zero, none of volume is found.

Protoype Group(objects,grpid="")

Description Group the given volume geometry objects with group ID = grpid.

Inputs objects A key, key list, or volume geometry objects return by pick functions. grpid - Given grpid. The default value is empty, if so, the grpid will be generated automatically.

500

Appendix C CFD-ACE Python Scripting

Protoype Ungroup(objects)

Description Ungroup the given volume geometry objects.

Inputs objects A key, key list, or volume geometry objects return by pick functions.

Prototype importMaterialFromDB(inobjs,path_name)

Description If a material database file has been opened, you can set its volume properties with a material name in that database file by using:

Inputs inobjs A key, a list of keys, or volume geometry objects. path_name The full path and name of the material in the database

Appendix C GuiBC (Boundary Conditions) Prototype GuiBC.Set(objects, "Modulename/PYNAME",Value)

Description The Modulename is same as the left tab name shown on the GUI BC panel.

If variables are a list or an array: Prototype GuiBC.SetArraySize(objects,"ModuleName/PYNAME",size)

Description Set the top dimension of an array.

Prototype GuiBC.SetArraySize(objects,"ModuleName/PYNAME",index, size)

Description Set the dimension size of an array which has multiple dimension.

501

CFD-ACE_V2008.2_User_Manual

Prototype GuiBC.SetArray(objects, "ModuleName/PYNAME", index, value)

Description Set the value of an array at position given by index.

For array variables, PYNAME must be array type. Remember that ‘‘index” can be a integer (1based), a string or a list of integers and strings. For example, for a two-dimensional array A, to set the value of A(2,3), you have to set index=[2,3]; for a one-dimensional array under a list B, you can set index=[”xyz”,3] to change the corresponding value. The objects can be an integer, python integer list, or objects object (any of the following functions return). Prototype GetAllGeomObj()

Description Get all the boundary geometry objects.

Prototype GetGeomObjByName(NameList, Region=None)

Description Find the boundary geometry objects from boundary names

Inputs NameList a string or a python string list Region objects object, the default value is None

Returns objects object. If the size of objects object is zero, none of boundaries is found.

Prototype GetGeomObjByGrpName(GrpNameList, Region=None)

Description Find the boundary geometry objects from group names

Inputs GrpNameList a string or a python string list Region objects object, the default value is None

Returns Objects object. If the size of objects object is zero, none of boundaries is found.

502

Appendix C CFD-ACE Python Scripting

Prototype GetGeomObjByZone(ZoneList, Region=None) Find the boundary geometry objects from given zones Parameters: ZoneList a integer or a python integer list Region objects object, the default value is None Returns: objects object

Prototype GetGeomObjByType(TypeList, Region=None) Find the boundary geometry objects from boundary types

Inputs TypeList a string or a python string list Region objects object, the default value is None

Returns objects object. If the size of objects object is zero, none of boundaries is found.

Prototype Group(objects,grpid="")

Description Group the given boundary geometry objects with group ID = grpid. At different BCSettingMode, this function will fulfill different purposes. When BCSettingMode=”General”, this function is for the grouping

Inputs objects A key, key list, or boundary geometry objects return by pick functions. grpid Given grpid. The default value is empty, if so, the grpid will be generated automatically.

Prototype Ungroup(objects)

Description Ungroup the given boundary geometry objects.

Inputs objects A key, key list, or boundary geometry objects return by pick functions.

503

CFD-ACE_V2008.2_User_Manual

Prototype SetArbInterface(grpName1,grpName2)

Description Set the arbitrary interface of given two group

Inputs grpName1 The first group name. It is a python string type. grpName2 The second group name. It is a python string type.

Appendix C GuiIC (Initial Conditions) Prototype GuiIC.Set("Shared/PYNAME",Value)

Description For IC Setting related variables or when IC_Setting=‘‘For All Volumes”, use this prototype.

Prototype GuiIC.Set(objects,"Module/PYNAME",Value")

Description For IC_Setting=”Volume by Volume”, use this prototype. The definition of objects is the same as GuiVC.

For variables is a list or an array: Prototype GuiIC.SetArraySize(objects,"ModuleName/PYNAME",size)

Description Set the top dimension of an array.

Prototype GuiIC.SetArraySize(objects,"ModuleName/PYNAME",index, size)

Description Set the dimension size of an array which has multiple dimension.

504

Appendix C CFD-ACE Python Scripting

Prototype GuiIC.SetArray(objects, "ModuleName/PYNAME", index, value)

Description Set the value of an array at position given by index.

For array variables, PYNAME must be array type. Remember that ‘‘index” can be a integer (1based), a string or a list of integers and strings. For example, for a two-dimensional array A, to set the value of A(2,3), you have to set index=[2,3]; for a one-dimensional array under a list B, you can set index=[”xyz”,3] to change the corresponding value. Similarly, objects need to be dropped when IC_Setting=‘‘For All Volumes”. Prototype Group(objects,grpid="")

Description Group the given volume geometry objects with group ID = grpid.

Inputs objects A key, key list, or volume geometry objects return by pick functions. grpid Given grpid. The default value is empty, if so, the grpid will be generated automatically.

Prototype Ungroup(objects)

Description Ungroup the given volume geometry objects.

Inputs objects A key, key list, or volume geometry objects return by pick functions.

Appendix C GuiPC (Point Conditions) You can use GuiPC just like GuiVC, GuiBC, and GuiIC, but there are two differences between GuiPC and the other modules. The first is that a point has no key associated. Currently, the Python script accesses a point through its name. The second difference is that points can be created and deleted after the simulation is opened. New script functions are provided. In 2003, under point condition, only spray point is supported. Prototype GuiPC.AddPoint(pointnames)

Description Add a point with given name to the simulation.

505

CFD-ACE_V2008.2_User_Manual

Inputs pointnames A name, name list, or geometry objects return by pick functions.

Prototype GuiPC.DeletePoint(pointnames)

Description Delete a point with given name from the simulation.

Inputs pointnames A name, name list, or geometry objects return by pick functions.

Prototype GuiPC.Set(pointnames, "TabName/PYNAME",Value)

Description Set the variables associated with pointnames.

For array variables: Prototype GuiPC.SetArraySize(pointnames, "TabName/PYNAME",size)

Prototype GuiPC.SetArray(pointnames, "TabName/PYNAME",index, value)

Appendix C GuiOut (Output Controls) Prototype GuiOut.Set("TabName/PYNAME",Value)

For array variables: Prototype GuiOut.SetArraySize("TabName/PYNAME",size)

Prototype GuiOut.SetArray("TabName/PYNAME",index, value)

Appendix C GuiSC (Solver Controls) Prototype GuiSC.Set("TabName/PYNAME",Value)

506

Appendix C CFD-ACE Python Scripting

For array variables: Prototype GuiSC.SetArraySize("TabName/PYNAME",size)

Prototype GuiSC.SetArray("TabName/PYNAME",index, value)

Appendix C GuiRun (Run Controls) Prototype GuiRun.Set("VARIABLE_IDNAME",Value)

For array variables: Prototype GuiRun.SetArraySize("VARIABLE_IDNAME ",size)

Prototype GuiRun.SetArray("VARIABLE_IDNAME ",index, value)

507

Index

509

2 2D axisymmetric ...... 130, 134, 139, 151, 160, 194, 389, 439, 468

analyte ...................................................................... 435 analyte ...................................................................... 438 analyte ...................................................................... 439

2D Axisymmetric Reactor ......................................... 112

analyte ...................................................................... 442

2D Computational Cell .............................................. 335

analyte ...................................................................... 444

2D Grid Systems ....................................................... 118

analyte ...................................................................... 446

2D-axisymmetric ....................................................... 144

analyte ...................................................................... 447

2D-planar .................................................................. 169

analyte ...................................................................... 447

3

analyte ...................................................................... 448

3D geometry ............................................................. 200 3-D geometry ............................................................ 200

analyte ...................................................................... 448 analyte ...................................................................... 449 analyte ...................................................................... 449

9

Analyte Flux .............................................................. 449

9,BC_TYPE_S_B_INTERFACE ............................... 280

Analyte Name ................................................... 383, 449

A

Analyte Specification ........................................ 442, 444

Absorbtivity ............................................................... 200

Analyzing Heterogeneous Chemical Kinetics .. 385, 428, 472

AC Conduction .......................................................... 200

and/or ....................................................................... 188

AC electrokinetics ............................................. 387, 400

Angle ........................................................................ 200

Add Fan button ......................................................... 144

Anisotropic Resistance ............................................. 161

Add Injector ............................................................... 389

Anisotropy Material ................................................... 200

Add Injector button .................................................... 389

Annular Injector ........................................................ 389

add_source_term ...................................................... 248

API ............................................................................ 118

Additional Input ......................................................... 355

advection-diffusion .................................................... 463

Arbitrary Interface Arbitrary Interface BC . 113, 114, 115, 116, 117, 118, 119, 120, 121, 122 Arbitrary Interface Boundary Conditions .............. 442 Arbitrary Interface Grid Resolution....................... 120 Arbitrary Interface Groups.................................... 121 Arbitrary Interface Process .................................. 117 Arbitrary Interface T-junction Example................. 118

Airfoil ......................................................................... 188

Arbitrary Interface ................................................. 54, 88

Algebraic Mult-Grid ................................................... 177

Arbitrary Interface ..................................................... 113

Algebraic Multigrid Solver ........................................... 65

Arbitrary Interface ..................................................... 118

Allosteric ................................................................... 432

Arbitrary Interface ..................................................... 119

Alternating Digital Tree build ...................................................................... 188

Arbitrary Interface ..................................................... 120

Additional Output ...................................................... 393 ADT ........................................................................... 188 Advanced Settings ...................................................... 68 advection........................................................... 368, 431

Alternating Digital Tree ............................................. 188 AMG .................................................... 65, 175, 177, 352 ampholyte ......................... 111, 376, 378, 380, 383, 449 analyte evaluate ................................................................ 111 limits ..................................................................... 448 set ................................................................. 447, 448 values ................................................................... 438

Arbitrary Interface ..................................................... 121 Arbitrary Interface ..................................................... 134 Arbitrary Interface ..................................................... 138 Arbitrary Interface ..................................................... 442 arbitrary/interface BC number ................................................................. 280 arbitrary/interface BC................................................ 280

analyte ...................................................................... 111

array var_index ............................................................. 280

analyte ...................................................................... 111

array ......................................................................... 280

analyte ...................................................................... 200

arraySize .................................................................. 234

analyte ...................................................................... 367

Arrhenius .................................. 105, 112, 422, 431, 433

analyte ...................................................................... 368

ASCII Create .................................................................. 475

analyte ...................................................................... 383 analyte ...................................................................... 431 analyte ...................................................................... 432

ASCII ........................................................................ 475 Assemble .......................................................... 178, 483

510

Index

Atomic Weight ........................................................... 100

Biochemistry ............................................................. 200

Auto Save ................................................................... 22

Biochemistry Surface Reactions ................................ 96

Auto Time Step ........................................................... 44

Biochemistry Theory ................................................. 432

auto-ionization........................................................... 376

Biochemistry Units .................................................... 200

Automatic option ....................................................... 195

Biochemistry Volume Reactions ................................. 96

Availability1 ............................................................... 200

biomolecular ..................................................... 431, 433

Axisymmetric Selecting................................................................. 44

Blood Vessel Model .................................................. 359

Axisymmetric............................................................... 44

Boundary Condition Integral File .............................. 483

B

Boundary Condition Type ........................................... 87

B,C ............................................................................ 200

Boundary Condition Values ........................................ 32

Backward Rate.......................................................... 105

Boundary Conditions ................ 137, 138, 139, 178, 194

Bad Boundary Faces ................................................ 499

Boundary Face value................................................ 200

BC change .................................................................. 139 number ................................................................. 280 Returns ................................................................. 280

Boundary Faces ....................................... 133, 200, 280

BC ............................................................................. 200

Boussinesq Force ..................................................... 406

BC ............................................................................. 280

Bruggeman ....................................................... 155, 164

BC Faces Get Number .......................................................... 280

Buffer ................................................................ 383, 449

BC Faces .................................................................. 280

build-userlib libUserAce ............................................ 328

BC Nodes Get Number .......................................................... 280

build-userlib.bat ................................................ 330, 331

BC Nodes.................................................................. 280 bc_cell_index ............................................................ 280 bc_face_index ........................................................... 280 bc_node_index.......................................................... 280 bc_patch_key ............................................................ 280 bc_record_index ....................................................... 280 bc_type ..................................................................... 280 BC_TYPE_B_B_INTERFACE .................................. 280

Body Forces ............................................................... 46

Boussinesq ................................................................. 46 Boussinesq Approximation ................................. 46, 406

build-userlib ...................................... 326, 327, 328, 331

build-userlib.bat libUserAce ...................................... 331 build-userlib.mak .............................................. 330, 331 Bulk Enzyme............................................................. 449 Bulk Reaction ................................................... 440, 449 Bulk_enzyme_Reaction ............................................ 449 Bulk_Reaction .......................................................... 449 Butler-Volmer............................ 158, 422, 423, 464, 468 Butterworth-Heinemann............................................ 374

BC_TYPE_CYCLIC .................................................. 280

C

BC_TYPE_EXIT........................................................ 280

CALL get_num_cells_by_type .................................. 280

BC_TYPE_F_B_INTERFACE................................... 280

CALL get_num_faces_by_type ................................ 280

BC_TYPE_F_F_INTERFACE ................................... 280

Capillary Electrophoresis Microchip ......... 385, 428, 472

BC_TYPE_INLET ..................................................... 280

Capillary Electrophoresis Model ............................... 359

BC_TYPE_INTERFACE ........................................... 280

Capillary Zone Electrophoresis................. 385, 428, 472

BC_TYPE_S_F_INTERFACE................................... 280

Carman-Koseny........................................................ 402

BC_TYPE_S_S_INTERFACE .................................. 280

Carnot ....................................................................... 419

BC_TYPE_SYMM ..................................................... 280

Catalytic Converter ................................................... 156

BC_TYPE_THINWALL ............................................. 280

CAV_TOTAL_VOLUME_FRACTION ....................... 200

BC_TYPE_WALL ...................................................... 280

Cavitation.................................................... 98, 200, 475

BC's .................................................................. 138, 139

Cavitation Module ............................................. 175, 469

bfaces ....................................................................... 497

Cell Faces Get Number ......................................................... 280

Binary Diffusion ......................................................... 440 Binding Kinetics ........................................................ 449

Cell Faces................................................................. 280

binding/enzyme ......................................................... 449

Cell Nodes Get Number ......................................................... 280

BIO_
View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF