VIEWS: 17 PAGES: 41 POSTED ON: 8/9/2011
Computational Fluid Dynamics in Biomedical Systems A Simple Introduction Boyd Gatlin What I Hope To Do Today • Define some common terms • Identify some applications of CFD in biology and medicine • Describe the steps and processes of CFD • Outline a physically intuitive development of sets of CFD equations • Present a typical case in medical biology Examples of Biomedical CFD Applications • Heart pumping • Artificial organ design • Vessel graft evaluation • Vocal tract analysis • Blood flow • Microbe locomotion • Air flow in lungs • Perfusion in tissues • Joint lubrication • Life support systems • Cell-fluid interface • Nose and sinus flows • Tendon-sheath • Spinal fluid flow • Gas exchange • Cardiac valve design What is a fluid? • A fluid is any substance which deforms continuously under a shearing stress • Includes liquids and gasses • Classified as Newtonian or non-Newtonian – Water and most gasses are Newtonian – Whole blood, synovia, mucus, ketchup, toothpaste, etc., are not What are some fluid properties? • Mass density—if this remains constant in a flow, the fluid is incompressible • Viscosity—a measure of resistance to flow – varies with temperature for Newtonian fluids – varies with local flow conditions (strain and shear) for non-Newtonian What are some properties of the flow itself? • Laminar, transitional, or turbulent • Compressible or incompressible • Confined (contained in a conduit), partially confined (open channel), or unconfined (flow over an object in the open) • Subsonic, supersonic, hypersonic • Reacting or non-reacting • Single-phase or multi-phase What is CFD? Computational Fluid Dynamics is a set of procedures, carried out in sequence or in parallel, by which the classical equations of fluid motion, plus any auxiliary relations, are approximated by large sets of algebraic equations which are then solve numerically on computers. How does CFD differ from ‘numerical modeling’? • CFD is simply the process of obtaining numerical solutions to accepted classical equations (Navier-Stokes, ca 1827) • Numerical modeling usually involves the development of equations of assumed form and containing free constants derived from experimental data • CFD is the application of ‘first principles’ of fluid physics • ‘Modeling’ is required within CFD to: – Compute fluid properties from empirical relationships – Represent the effects of turbulence on the flow – Include phenomena which cannot reasonably be computed directly from first principles – Account for chemical reactions and phase changes • Both computational simulation and modeling involve the numerical solution of very large sets of equations on computers CFD by the Numbers I. State the Problem II. Identify Physics & Chemistry III. Identify the Geometry Domain IV. Formulate the Mathematical Statement V. Discretize Equations & Geometry VI. Develop or Choose the Algorithm CFD by the Numbers VII. Develop or Select Software VIII.Choose Computing Hardware IX. Compute the Solution X. Analyze & Interpret Results A. Storage and Manipulate Large Data Sets B. Post Processing and Visualization Statement of Problem • Clearly identified (What is the shearing stress on an artery graft during systole?) • Separated from irrelevant, extraneous or non-essential issues • Constrained so that key parameters and variables can be isolated so much as possible Identification of Physics • Physical principles related to the problem • Statement of physical principles in mathematical form • Reduction of complexity to make amenable to computation • Identification of auxiliary relations (turbulence model, non-Newtonian effects, property variations, etc.) Problem Geometry • Set the physical boundaries; define the domain • Obtain data by measurement, digitized scans, etc. • Observe boundary conditions of physics • Generate bounding surfaces (sets of cross sections, algebraic models, etc.) Mathematical Statement • Generally, Navier-Stokes equations, or some subset • Equation of state (e.g., ideal gas law) • Relationship between fluid and surfaces, and between different fluids (mucus, porosity) • Appropriate boundary and initial conditions • Turbulence model • Fluid property models and reaction equations Discretization • Divide the problem domain into a very large number of very small regions using a grid • Replace the classical differential equations with sets of finite difference or finite volume equations • Balance accuracy needs with computing capacity (3-D is very much bigger than 2-D) A grid (mesh) is a system of uniquely identifiable and indexed points in space upon who continuous functions may be approximated through some method of discretization. • Structured • Unstructured • Orthogonal • Non-orthogonal • Uniform • Non-uniform • Boundary fitted • Non-boundary fitted • Rectilinear • Non-rectilinear • Fine • Coarse Typical CFD Grids Structured Unstructured Grids Before Descartes Discretization of Mathematics • Finite difference approximation---replace derivatives with ratios of differences at each grid point – Mathematically intuitive – Physics less obvious • Finite volume formulation---apply physical ‘conservation laws’ to each small volume formed by grid lines – Mathematically simple, if not naïve – Physically intuitive • Finite element methods---a family of techniques that are generally not physically intuitive Discretization of Mathematics • Finite difference approximation---replace derivatives with ratios of differences at each grid point – Mathematically intuitive – Physics less obvious • Finite volume formulation---apply physical ‘conservation laws’ to each small volume formed by grid lines – Mathematically simple, if not naïve – Physically intuitive • Finite element methods---a family of techniques that are generally not physically intuitive Simple Finite Difference Approximation of a Derivative u u u (i 1) u (i ) ; ; x x x(i 1) x(i ) Finite Control Volume Mass, energy,momentum Mass, inflow/outflow energy, momentum stored Net mass, energy and momentum entering the volume is forced to balance that leaving and that stored in the FV Algorithm • Method by which the large system of equations will be solved • Choose based on mathematical character, method of discretization; there is no ‘one size fits all’ available • Poor choices, based on available hardware & software, may lead to failure Software • Software translates algorithm statements into computer operations • Ample CFD software available, much unsuited for biomedical applications • Poor choices may lead to complete failure of the computational simulation Computing Hardware • PC vs workstation vs supercomputer • Serial vs parallel platform • Considerations – Physical size of problem (number of grid points) – Whether problem is steady or unsteady – Time scales involved – Availability Solution • Goal is to obtain solution to the problem not just to the mathematical statement • Expect false starts, adjustment of boundary & initial conditions • Monitor intermediate results for reasonableness • Validate solution method on problem for which solution is known Analysis & Interpretation • Post process solution data – Calculate derivative variables (pressure gradients, shear stresses, etc.) – Compare with data or similar solutions • Use visualization tools – Examine distributions, look for trends – Animate in time or space Respiratory Flow in A Bifurcation: A Case Study Problem Statement Flow development in airways of the lung is not understood well enough by medical science and cannot be satisfactorily measured. Mathematical Model • Air flow at low speeds is well predicted by the incompressible form of the Navier- Stokes Equations • Air at low speeds is a constant-property, Newtonian fluid • Flow is mostly laminar in small airways • Rigid walls are a valid first approximation Geometric Domain • Airway tree is hopelessly complex • Branching pattern is not reproducible Surfaces of Selected Model Discretization of Geometry Structured, finite-volume grid Discretizaton & Algorithm • Finite volume formulation (enforce conservation laws) • Implicit time stepping (solution is computed at new time level) – Inherently stable because closer to physics – Larger time steps possible • Newton iteration to converge each time step Visualization of Results Animation of Simulation of Flow in an Asymmetric Bifurcation • Lung airways do not branch symmetrically • Effects of axial curvature important • Real flow does not enter smoothly • Inlet & outlet conditions unknown Oscillatory Flow in a Lung-Like Bifurcation • Colors represent fluid speed • Skewness due to friction and curvature • Details not available from experiment Colored profiles act like porous membranes which stretch in proportion to the local fluid speed.