Computational Fluid Dynamics in Biomedical · PDF fileComputational Fluid Dynamics is a set of...

41
Computational Fluid Dynamics in Biomedical Systems A Simple Introduction Boyd Gatlin

Transcript of Computational Fluid Dynamics in Biomedical · PDF fileComputational Fluid Dynamics is a set of...

Page 1: Computational Fluid Dynamics in Biomedical · PDF fileComputational Fluid Dynamics is a set of procedures, carried out in sequence or in parallel, by which the classical equations

Computational Fluid Dynamics in Biomedical Systems

A Simple IntroductionBoyd Gatlin

Page 2: Computational Fluid Dynamics in Biomedical · PDF fileComputational Fluid Dynamics is a set of procedures, carried out in sequence or in parallel, by which the classical equations

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

Page 3: Computational Fluid Dynamics in Biomedical · PDF fileComputational Fluid Dynamics is a set of procedures, carried out in sequence or in parallel, by which the classical equations

Examples of Biomedical CFD Applications

• Heart pumping• Vessel graft evaluation• Blood flow• Air flow in lungs• Joint lubrication• Cell-fluid interface• Tendon-sheath• Gas exchange

• Artificial organ design• Vocal tract analysis• Microbe locomotion• Perfusion in tissues• Life support systems• Nose and sinus flows• Spinal fluid flow• Cardiac valve design

Page 4: Computational Fluid Dynamics in Biomedical · PDF fileComputational Fluid Dynamics is a set of procedures, carried out in sequence or in parallel, by which the classical equations

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

Page 5: Computational Fluid Dynamics in Biomedical · PDF fileComputational Fluid Dynamics is a set of procedures, carried out in sequence or in parallel, by which the classical equations

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

ρ

Page 6: Computational Fluid Dynamics in Biomedical · PDF fileComputational Fluid Dynamics is a set of procedures, carried out in sequence or in parallel, by which the classical equations

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

Page 7: Computational Fluid Dynamics in Biomedical · PDF fileComputational Fluid Dynamics is a set of procedures, carried out in sequence or in parallel, by which the classical equations

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.

Page 8: Computational Fluid Dynamics in Biomedical · PDF fileComputational Fluid Dynamics is a set of procedures, carried out in sequence or in parallel, by which the classical equations

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

Page 9: Computational Fluid Dynamics in Biomedical · PDF fileComputational Fluid Dynamics is a set of procedures, carried out in sequence or in parallel, by which the classical equations

• 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

Page 10: Computational Fluid Dynamics in Biomedical · PDF fileComputational Fluid Dynamics is a set of procedures, carried out in sequence or in parallel, by which the classical equations

CFD by the Numbers

I. State the ProblemII. Identify Physics & ChemistryIII. Identify the Geometry DomainIV. Formulate the Mathematical StatementV. Discretize Equations & GeometryVI. Develop or Choose the Algorithm

Page 11: Computational Fluid Dynamics in Biomedical · PDF fileComputational Fluid Dynamics is a set of procedures, carried out in sequence or in parallel, by which the classical equations

CFD by the Numbers

VII. Develop or Select SoftwareVIII.Choose Computing HardwareIX. Compute the SolutionX. Analyze & Interpret Results

A. Storage and Manipulate Large Data SetsB. Post Processing and Visualization

Page 12: Computational Fluid Dynamics in Biomedical · PDF fileComputational Fluid Dynamics is a set of procedures, carried out in sequence or in parallel, by which the classical equations

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

Page 13: Computational Fluid Dynamics in Biomedical · PDF fileComputational Fluid Dynamics is a set of procedures, carried out in sequence or in parallel, by which the classical equations

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.)

Page 14: Computational Fluid Dynamics in Biomedical · PDF fileComputational Fluid Dynamics is a set of procedures, carried out in sequence or in parallel, by which the classical equations

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.)

Page 15: Computational Fluid Dynamics in Biomedical · PDF fileComputational Fluid Dynamics is a set of procedures, carried out in sequence or in parallel, by which the classical equations

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

Page 16: Computational Fluid Dynamics in Biomedical · PDF fileComputational Fluid Dynamics is a set of procedures, carried out in sequence or in parallel, by which the classical 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)

Page 17: Computational Fluid Dynamics in Biomedical · PDF fileComputational Fluid Dynamics is a set of procedures, carried out in sequence or in parallel, by which the classical equations

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 çè• Orthogonal çè• Uniform çè• Boundary fitted çè• Rectilinear çè• Fine çè

• Unstructured• Non-orthogonal• Non-uniform• Non-boundary fitted• Non-rectilinear• Coarse

Page 18: Computational Fluid Dynamics in Biomedical · PDF fileComputational Fluid Dynamics is a set of procedures, carried out in sequence or in parallel, by which the classical equations

Typical CFD Grids

Structured Unstructured

Page 19: Computational Fluid Dynamics in Biomedical · PDF fileComputational Fluid Dynamics is a set of procedures, carried out in sequence or in parallel, by which the classical equations

Grids Before Descartes

Page 20: Computational Fluid Dynamics in Biomedical · PDF fileComputational Fluid Dynamics is a set of procedures, carried out in sequence or in parallel, by which the classical equations

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

Page 21: Computational Fluid Dynamics in Biomedical · PDF fileComputational Fluid Dynamics is a set of procedures, carried out in sequence or in parallel, by which the classical equations
Page 22: Computational Fluid Dynamics in Biomedical · PDF fileComputational Fluid Dynamics is a set of procedures, carried out in sequence or in parallel, by which the classical equations

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

Page 23: Computational Fluid Dynamics in Biomedical · PDF fileComputational Fluid Dynamics is a set of procedures, carried out in sequence or in parallel, by which the classical equations

Simple Finite Difference Approximation of a Derivative

( 1) ( )( 1) ( )

u u u i u ix x x i x i

∂ ∆ + −∂ ∆ + −

; ;

Page 24: Computational Fluid Dynamics in Biomedical · PDF fileComputational Fluid Dynamics is a set of procedures, carried out in sequence or in parallel, by which the classical equations

Finite Control Volume

Mass, energy, momentum stored

Net mass, energy and momentum entering the volume is forced to balance that leaving and that stored in the FV

Mass, energy,momentum inflow/outflow

Page 25: Computational Fluid Dynamics in Biomedical · PDF fileComputational Fluid Dynamics is a set of procedures, carried out in sequence or in parallel, by which the classical equations

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

Page 26: Computational Fluid Dynamics in Biomedical · PDF fileComputational Fluid Dynamics is a set of procedures, carried out in sequence or in parallel, by which the classical equations

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

Page 27: Computational Fluid Dynamics in Biomedical · PDF fileComputational Fluid Dynamics is a set of procedures, carried out in sequence or in parallel, by which the classical equations

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

Page 28: Computational Fluid Dynamics in Biomedical · PDF fileComputational Fluid Dynamics is a set of procedures, carried out in sequence or in parallel, by which the classical equations

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

Page 29: Computational Fluid Dynamics in Biomedical · PDF fileComputational Fluid Dynamics is a set of procedures, carried out in sequence or in parallel, by which the classical equations

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

Page 30: Computational Fluid Dynamics in Biomedical · PDF fileComputational Fluid Dynamics is a set of procedures, carried out in sequence or in parallel, by which the classical equations

Respiratory Flow in A Bifurcation: A Case Study

Page 31: Computational Fluid Dynamics in Biomedical · PDF fileComputational Fluid Dynamics is a set of procedures, carried out in sequence or in parallel, by which the classical equations

Problem Statement

Flow development in airways of the lung is not understood well enough by medical science and cannot be satisfactorily measured.

Page 32: Computational Fluid Dynamics in Biomedical · PDF fileComputational Fluid Dynamics is a set of procedures, carried out in sequence or in parallel, by which the classical equations

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

Page 33: Computational Fluid Dynamics in Biomedical · PDF fileComputational Fluid Dynamics is a set of procedures, carried out in sequence or in parallel, by which the classical equations
Page 34: Computational Fluid Dynamics in Biomedical · PDF fileComputational Fluid Dynamics is a set of procedures, carried out in sequence or in parallel, by which the classical equations

Geometric Domain

• Airway tree is hopelessly complex• Branching pattern is not reproducible

Page 35: Computational Fluid Dynamics in Biomedical · PDF fileComputational Fluid Dynamics is a set of procedures, carried out in sequence or in parallel, by which the classical equations

Surfaces of Selected Model

Page 36: Computational Fluid Dynamics in Biomedical · PDF fileComputational Fluid Dynamics is a set of procedures, carried out in sequence or in parallel, by which the classical equations

Discretization of Geometry

Structured, finite-volume grid

Page 37: Computational Fluid Dynamics in Biomedical · PDF fileComputational Fluid Dynamics is a set of procedures, carried out in sequence or in parallel, by which the classical equations

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

Page 38: Computational Fluid Dynamics in Biomedical · PDF fileComputational Fluid Dynamics is a set of procedures, carried out in sequence or in parallel, by which the classical equations

Visualization of Results

Page 39: Computational Fluid Dynamics in Biomedical · PDF fileComputational Fluid Dynamics is a set of procedures, carried out in sequence or in parallel, by which the classical equations
Page 40: Computational Fluid Dynamics in Biomedical · PDF fileComputational Fluid Dynamics is a set of procedures, carried out in sequence or in parallel, by which the classical equations

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

Page 41: Computational Fluid Dynamics in Biomedical · PDF fileComputational Fluid Dynamics is a set of procedures, carried out in sequence or in parallel, by which the classical equations

• 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.

Oscillatory Flow in a Lung-Like Bifurcation