0% found this document useful (0 votes)
7 views16 pages

Computational Fluid Dynamics Paper

This document delves into the fundamentals of fluid dynamics, particularly focusing on its applications in medical instrumentation through the lens of continuum mechanics and the Navier-Stokes equations. It discusses the derivation of key equations such as the continuity equation and momentum equation, emphasizing the role of shear stress and the stress tensor in fluid behavior. The paper ultimately aims to provide a comprehensive understanding of fluid dynamics principles relevant to medical physics.

Uploaded by

cooper.eng.2023
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views16 pages

Computational Fluid Dynamics Paper

This document delves into the fundamentals of fluid dynamics, particularly focusing on its applications in medical instrumentation through the lens of continuum mechanics and the Navier-Stokes equations. It discusses the derivation of key equations such as the continuity equation and momentum equation, emphasizing the role of shear stress and the stress tensor in fluid behavior. The paper ultimately aims to provide a comprehensive understanding of fluid dynamics principles relevant to medical physics.

Uploaded by

cooper.eng.2023
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

Computational Fluid Dynamics With

Applications to Medical Physics


Jordan Cooper
1 Introduction
In this paper I will go into great depths about the fundamentals of fluid dynamics
and how fluid dynamics can be modelled and implemented in real world situa-
tions to assist the design of medical instrumentation. It is important to note that
there are two main branches of fluid dynamics, which are classified on the length
scale of interactions (i.e. what the size of the system is). For systems which are
low density, and can be modelled as a perfect gas and the size of the system is
smaller than the mean free path the equation of motion governing the system
is given by the Boltzmann equation, which falls under the class of Statistical
Mechanics. For nitrogen in the Earth’s atmosphere the mean free path is ap-
proximately 10−6 meters so a system of approximately 10−3 meters can be well
approximated by Continuum Mechanics. Continuum mechanics is what will be
discussed throughout the rest of this paper, and the derivations will all be leading
up towards the Navier-Stokes equations, the corner stone of continuum mechan-
ics. There is a dimensionless quantity called the Knudsen number which dictates
whether statistical or continuum mechanics should be used, for a knudsen num-
ber around or less than unity, you must use statistical mechanics, and otherwise
you can model the system with continuum mechanics. The Knudsen number is
given as Kn = l 0/L, where l 0 is the mean free molecular path length, and L is a
reference length.

2 Derivation of the Continuity Equation


There are two ways to go about deriving the equations [4], the Lagrangin rep-
resentation (where the state of a fluid is specified with respect to it’s original
position at a given time) and there is the Eulerian representation (where the state
of the system at every time and space is given), the following derivations will
follow the latter of the two representations. The first step in this journey is the
continuity equation, u, v, w are the x, y, z components of the fluids velocity and
ρ is the fluids density [1]

∂ ∂ ∂ ∂ρ
(ρu) + (ρv) + (ρw) = − (1)
∂x ∂y ∂z ∂t

1
The first step to deriving the continuity equation is to use the conservation of
mass, namely
∂Min ∂Mout ∂M N et
− = (2)
∂t ∂t ∂t

The rate of mass coming into a cube of volume dx, dy, dz passing through three
different sides of area dydz dxdz dxdy is given by

∂Min
= ρ|x u|x dydz + ρ|yv |ydxdz + ρ|z w |zdxdy (3)
∂t
And the rate coming out is thus given by

∂Mout
= ρ|x+dx u |x+dx dydz + ρ|y+dyv |y+dydxdz + ρ|z+dz w |z+dzdxdy (4)
∂t
And then we can say that the net mass is given by

∂M N et ∂ρ
= dxdydz (5)
∂t ∂t
Now throw all three of these together into the initial equation and divide both
sides by dxdydz

ρu|x − ρu|x+dx ρv |y − ρv |y+dy ρw |z − ρw |z+dz ∂ρ


+ + = (6)
dx dy dz ∂t

Now note that the definition of a derivative is


0 f (x + h) − f (x)
f (x) = lim (7)
h→0 h
So we can then conclude
∂(ρu) ∂(ρv) ∂(ρw) ∂ρ
+ + =− (8)
∂x ∂y ∂z ∂t

This can be equivalently written as

® · (ρV® ) = − ∂ρ
∇ (9)
∂t

2
Where V® = uiˆ + v jˆ + w k̂. One thing to note is that if a fluid is in steady flow
∂ρ
then ∂t = 0 This is simply saying that steady flow means that density is inde-
pendent of time. If it is incompressible this means that the density is constant
and therefore independent of time and space, in this case the continuity equation
for steady flow of an incompressible fluid gives
® · V® = 0
∇ (10)

3 Newton’s Second Law


The second step is the momentum equation which comes from Newton’s second
law, (note the mass of the fluid particle will be considered to remain constant) the
first thing to note is that u = u(x, y, z, t), therefore the total change in velocity
du is given by
∂u ∂u ∂u ∂u
du = dx + dy + dz + dt (11)
∂x ∂y ∂z ∂t
Hence acceleration is thus
du ∂u dx ∂u dy ∂u dz ∂u
= + + + (12)
dt ∂x dt ∂y dt ∂z dt ∂t
And since u = dx/dt, v = dy/dt, w = dz/dt we have the acceleration
du ∂u ∂u ∂u ∂u
=u +v +w + (13)
dt ∂x ∂y ∂z ∂t
This is known as a convective derivative or a derivative following the motion.
Stress is the internal response of an object to an external force, or in other words
stress is a pressure. There are two different kinds of stress, normal and shear
stress. Normal stress is the force per unit area normal to the surface, and the
shear stress is the force per unit area tangential to the surface, these stresses
will be denoted pxx , pyy , pzz , τxy , τxz , τyz , τyx , τzy , τzx respectively. The way to read
this notation is the first subscript refers to the direction in which the stress acts
i.e. τxy is the tangential component of stress in the x direction, the second sub-
script refers to the plane in which the stress is acting in (i.e. y = constant plane
for τxy ). It can be shown that there are only 3 independent shear stresses, i.e.
τxy = τyx , τxz = τzx , τyz = τzy for a Newtonian fluid (note in this paper the only
type of fluid that will be covered are Newtonian fluids which have a linear pro-
portionality of viscous stress to the rate of strain). Next we need to consider

3
field forces which are expressed in terms of the potential function Φ, where the
potential is given as

= −∇Φ
® (14)
m
(Note the potential function Φ is a scalar, and is the potential energy of the field
per unit mass, so for example in the case of a gravitational potential we could
have Φ = дz) Next we can write the total force of the normal and shear stresses
in the x direction as
∂pxx ∂τxy ∂τxz
 
FStressx = + + dxdydz iˆ (15)
∂x ∂y ∂z
(Note this works out if you are wondering because the partial derivative of a
stress with respect to a spatial coordinate has dimensions [ mN2 ] which becomes
[ mN3 ], and the direction is also correct, it makes more sense in tensor notation).
Similar statements can be derived for the y and z directions of the stress acting
on a fluid volume dxdydz. Now we can use Newton’s second law which states

Inertia Force = Field Force + Stress Forces (16)

This can be seen as a conservation of momentum when written in the form

d(mV® )
F® = (17)
dt

du ˆ ∂Φ ∂pxx ∂τxy ∂τxz


 
ρ dxdydz i = −ρ dxdydz + + + dxdydz iˆ (18)
dt ∂x ∂x ∂y ∂z

du ˆ 1 ∂pxx ∂τxy ∂τxz ∂Φ ˆ


 
i= + + − i (19)
dt ρ ∂x ∂y ∂z ∂x
These equations as before can be replicated for the y and z directions, but if we
now put them into vector notation we have a much neater and visually appealing
equation


− 1® dV®
F Φ − ∇σ = (20)
ρ dt

Where σ is the stress tensor.

4
4 Shearing and the Stress Tensor
Shear stress τ can be written in terms of the velocity gradient and the shear
viscosity µ of the fluid. The absolute viscosity (equivalent to shear viscosity) of a
fluid is a measure of the resistance of a fluid to shearing flows, where adjacent
layers move parallel to each other at different speeds due to a gradient, think of
a rectangle being deformed into a parallelogram (although the gradient doesn’t
necessarily have to produce this distribution).

Figure 1: The Effect of Gradient Velocities on 2-D Planes of Fluids [2]

The shear stress τ is given by


d
τ =µ· (Angular Deformation) (21)
dt
∂v ∂u
 
τxy = τyx = µ + (22)
∂x ∂y

5
(Note this makes sense since there are two ways to angularly deform the fluid,
i.e. vertically or horizontally compress or stretch the flow). Similarly we have
for the other two shear components
∂w ∂v
 
τyz = τzy = µ + (23)
∂y ∂z
∂u ∂w
 
τzx = τxz = µ + (24)
∂z ∂x
Now as a bit of a background I will quickly cover the stress tensor, σij which
gives the isotropic and deviatoric parts of stress [3]. It can be shown that
 
1 1
σij = σkk δij + σij − σkk δij (25)
3 3
The term in the brackets is known as the deviatoric stress component, in the case
of a fluid at rest the deviatoric component (often denoted by sij ) must be zero, and
the first term is equivalent to −pδij , where p is the thermodynamic pressure (this
relation only holds for the static case). 13 σkk is often written as just −P which
is referred to as the mean normal stress, and δij is the kronecker delta. It then
follows that to maintain generality we have

sij = Aijkl ϵkl (26)

where for isotropy and linearity (since Newtonian fluid), since no preferred di-
rections in the fluid exist

Aijkl = µδik δ jl + µ 1δil δ jk + µ 2δij δkl (27)

Which then tells us that

sij = µϵij + µ 1ϵ ji + µ 2ϵkk δij (28)

Now we already know that sij and ϵij are symmetric tensors and that sii = 0, then
we can state the constitutive relation
 
1
sij = 2µ ϵij − ϵkk δij (29)
3
Now to eliminate the last dependency of the stress tensor on itself we can argue
that
P = p − Kϵkk (30)

6
Since P − p must also be linear in the strain ϵij because we are dealing with a
Newtonian fluid. Now we can use the following two relations for strain to solve
for the stress tensor which has only two constants µ and K
1 ∂Vi ∂Vj
 
ϵij = + (31)
2 ∂X j ∂Xi

∂Vk
 
ϵkk = (32)
∂Xk
So if we put all these stress components together into a single tensor of second
rank, we have the stress tensor
 
1
σij = −(p − Kϵkk )δij + 2µ ϵij − ϵkk δij (33)
3
Which can also be found to be written in the following form
∂Vi ∂Vj ∂Vk
   
σij (V ) = µ
® + +λ δij − pδij (34)
∂X j ∂Xi ∂Xk

Where X® is the vector position and δij is the kronecker delta, meaning for i = j
it is 1, and zero otherwise. λ is the dilation viscosity, which is a term that is
usually negligible and is often approximated as − 23 µ (it is very hard to measure
this coefficient) although technically it can have any value for 3λ + 2µ ≥ 0 (note
as well that I am now using the tensor notation for the subscripts). We can use
this relationship now to define the normal components of the stress, namely the
stress tensor gives
∂u 2 ® ®
pxx = −p + 2µ − µ(∇ · V ) (35)
∂x 3

5 The Navier Stokes Equations


Now that we have all the pieces of the puzzle we can sub (22), (24), (35) into (19)
and simplify we obtain
du 1 ∂p ∂Φ 1 ∂ ® ®
 
=− − +ψ ∇ u +
2
∇ ·V (36)
dt ρ ∂x ∂x 3 ∂x
µ
Where we have introduced ψ = ρ which is called the kinematic viscosity, similar
expressions can be derived in the other two directions and I will leave that up for

7
you if you are interested. If we follow the stress tensor form in (33), and we sub
in (31), (32), (33), (14) all into (20) we have the full form of the Navier-Stokes
equations which are for viscous, compressible and isothermal fluids

dVi ∂Φ ∂p ∂ ∂Vi ∂Vj ∂ 2 ∂Vk


    
ρ = −ρ − + µ +µ + K− µ
dt ∂Xi ∂Xi ∂X j ∂X j ∂Xi ∂Xi 3 ∂Xk

(37)
If we then neglect the dependency of µ and K on space (often a good approx-
imation, mostly dependent on temperature) then we have the following which
are referred to as the Navier-Stokes equations.

dV®
 
1 ®® ®
ρ = −∇p − ρ ∇Φ + µ∇ V + K + µ ∇∇ · V
® ® 2®
(38)
dt 3

® · (ρV® ) = − ∂ρ
∇ (39)
∂t

If we use the condition of ρ = constant, we have what is referred to as the Navier


equations, and when we apply the constraint of zero viscosity (an inviscid fluid)
to the Navier equation, we have the Euler equation.

dV® 1®
= − ∇p ®
− ∇Φ (40)
dt ρ

6 Modelling of Fluids
It is now important for us to familiarize ourselves with three key terms in fluid
dynamics, the first is the Reynold’s number, which is a dimensionless quantity
which characterizes the effect of viscosity and can estimate the length at which a
flow may switch from laminar (streamlined) to turbulent. The Reynold’s number
ρU L
is the ratio of the inertial forces to the viscous forces and is given as Re = µ [5]
where U is the macroscopic velocity of the system (meaning that low Reynold’s

8
numbers produce laminar flow and high produce turbulent flow). The next im-
portant characterizing parameter is the Mach number, which is also a dimension-
less number, it is the ratio of the macroscopic velocity to the speed of sound a,
which is given by Ma = Ua . Finally the Froude number, is a measure of the veloc-
ity of the flow relative to the wave velocity, and is given by Fr = √UдL , where д is
the acceleration due to the external field (i.e. gravity). When the Froude number
is less than unity the flow behaves like a subcritical flow (the flow velocity is less
than the wave velocity, and it is supercritical when it is greater than unity (this
is the same as supersonic when in a gas)). Viscosity and heat conduction effects
L
are only significant on the scale when L → Kn or when t → Knt 2 .

6.1 Boundary Conditions


In order to solve differential equations like the Navier-Stokes equation bound-
ary conditions must be specified, and so I will quickly mention a few common
boundary conditions.
a) Rigid Boundaries: The fluid velocity and the boundary velocity must be the
same, for both the normal and tangential components (the restriction on
the tangential component is often referred to as the no slip condition, and
although seems non-intuitive it has been tested and proven to be accurate
of modelling reality).
b) Flexible Boundaries: The fluid and boundary velocity components must be
equal and the stress on the fluid surface must be equal to the stress on the
boundary surface.
c) Pressure Boundaries: At some boundaries it is useful to take the pressure
as constant everywhere, for example the boundary of the ocean and the
atmosphere directly above.
d) Asymptotic Boundaries: When you are far away from the motions of the
fluid, it is useful to set the boundary condition such that the velocity is zero
or a uniform flow. Or you can set conditions such that singularities can be
avoided when r → 0.

6.2 OpenFOAM Simulation


Now we will jump right into a simulation that I have created using the open
source computational fluid dynamics software called OpenFOAM. For this sim-

9
ulation we will be looking at two flows merging, the source on the bottom left
has an initial velocity of 1 m/s in the x-direction and the flow emerging from
the bottom has a velocity of 3 m/s in the y-direction, and all inside the structure
at time zero the velocity of the flow is zero. The fluid has a constant kinematic
viscosity of 0.01 [m 2 /s] and the walls all have a no slip condition and the region
at the top has a boundary condition in which the pressure is defined to be zero.
This simulation looks at a fluid which is incompressible, with single phase flow,
that is laminar and isothermal, meaning that we will be dealing with equation
(38) (without the final term since the divergence is zero for an incompressible
fluid) and equation (10). Note as well that all walls are rigid and being so they
have the zero gradient condition for their pressures. The way the solver works is
as follows, there are two for loops, one within the other in which the inner most
loop solves the pressure equation (38) and then uses this to solve for the velocity
equation (10). The loops cycle through in this fashion and updates the velocity
and pressure of the system. You can use different mesh structures to discretize
the cells of the system, and I have tested two different types, namely the triangle
and square meshes and found that the square mesh produces higher accuracy
in the flow. Below are the plots of the simulation with each plot occurring ten
seconds after the other starting from 1 to 70 seconds.

(a) T=1 (b) T=10

10
(c) T=20 (d) T=30

(e) T=40 (f) T=50

(g) T=60 (h) T=70

Figure 2: The velocity of fluid flow in an elbow geometry

11
It is clear that this type of software is very powerful, and for situations with
much more complex geometry and boundary conditions the intuitive guess strays
further and further from the calculations. For the plots above we can see two
regions where the velocity of the fluid is surprisingly low relative to the rest,
notable at the middle left and bottom right. However if we look at the pressure
plot we find some very interesting patterns which help to explain the effects seen
in the velocity. At one second the two sharp corners produce negative pressure
regions which can be seen to drive the plume as the flow moves to the region
of zero pressure. The negative pressure region on the right most corner also ap-
pears to fluctuate periodically as the flow progresses in the y direction, and is the
place of highest pressure gradient as well. Another phenomena that I saw was
a spike in pressure across the entire fluid immediately after the initial left most
negative pressure region left the domain (i.e. passed the zero pressure boundary).
If you are interested you can e-mail me and I can send you the animation I have
produced for both the velocity and the pressure of the fluid flow.

(a) T=1 (b) T=40

Figure 3: The pressure/density of the fluid flow in an elbow geometry

7 Applications to Medical Physics


Ventricular assist devices (VADs) are devices which are implanted into patients
who have had congestive heart failure. Congestive heart failure is diagnosed in
two million new patients each year in the world and it affects over 20 million
worldwide [6]. The main purpose of a VAD is to assist the heart in circulating
blood throughout the body, and there are three different types of VADs that have

12
been widely used in the field of medical physics. The first are pulsatile devices
which use plates or flexing diaphragms to move blood through the device, second
are rotary pump devices (think of one arm attached to a central shaft that rotates)
which use mechanical bearings and seals in contact with the fluid and the third is
the rotary pump device which uses magnetic or non-contacting magnetic bear-
ings. The inflow of the VADs are connected to the top of the left ventricle and the
outflow is connected to either the ascending or descending aorta. Computational
fluid dynamics is used to model pressure and velocity of blood flow through the
device, which can determine the amount of stress placed on arteries in the body,
and give information on cells health. One interesting thing to note is that there
have been papers which state that pulsatile blood flow is important for circula-
tion and organ health, and other papers which have stated that this is not true
[7]. Typically pulsatile devices don’t last as long as non-pulsatile since the repet-
itive flexing of membranes or up and down motion of plates wears down quickly,
and these devices are usually heavier and bulkier than their counterparts. The
two types of non-pulsatile VADs are centrifugal and axial, where the first is a bit
larger than the second, but more energy efficient.

Figure 4: Non-Pulsatile Centrifugal VAD [6]

So since both of these devices have different geometries computational fluid


dynamics must be brought in to minimize the energy lost in the blood flow, i.e.
make the device as energy efficient as possible so that we don’t need to replace
it’s batteries frequently. Both axial and centrifugal devices have to rotate on the
magnitude of 103 rpm to pump enough blood, and these rates have to fluctuate
throughout the day to ensure enough blood is being pumped during exercise, and
just enough when sleeping. Both devices efficiencies are dependent on the num-

13
Figure 5: Non-Pulsatile Axial VAD [6]

ber of rpm, and have an approximate efficiency of 25% and they need to pump
anywhere from 2 liters per minute to 12 liters per minute. One final considera-
tion the design team needs to take into account is that the machine has to gently
accelerate blood through the device, if rotation of the arms is too fast haemolysis
can occur. Haemolysis means that the blood cells are being damaged and they
will not be able to transfer oxygen and nutrients to the body to maintain other
organs functions.

8 Conclusion
Fluid dynamics is a very diverse field, with many specialized branches, but they
all at their heart rely on some form of continuum mechanics or statistical me-
chanics. Design of machinery and medical devices often has to utilize computa-
tional fluid dynamics to reduce adverse effects, and maximize efficiency. Many
different boundary conditions throw in extra challenges for teams, such as time
varying boundary conditions due to the rotation of VADs, and deformable mem-
branes. The diversity of types of fluids to model and different boundary configu-
rations mean that you will never run out of new and interesting setups to model
and this keeps the field so interesting.

14
References
[1] Sharpe, G.J. (1967). Fluid Flow Analysis. New York, NY: American Elsevier
Publishing Company. Print.

[2] Mircalla22. (2009, August 28). 2D Geometric Strain [Two dimensional defor-
mation of an infinitesimal material element]. Retrieved November 7, 2016,
from https://en.wikipedia.org/wiki/Infinitesimal_strain_theory#/media/File:
2D_geometric_strain.svg

[3] Patterson, A.R. (1983). A First Course in Fluid Dynamics. New York, NY: Cam-
bridge University Press. Print.

[4] Foias, C. et al. (2001). Navier-Stokes Equations and Turbulence New York, NY:
Cambridge University Press. Print.

[5] Zeytounian, R.K. (2002). Theory and Applications of Nonviscous Fluid Flows
Berlin, Germany: Springer-Verlag. Print.

[6] Wood, H.G., Throckmorton, A.L., Untaroiu, A., Song, X. "The Medical
Physics of Ventricular Assist Devices" Reports on Progress in Physics 68.3
(2005): 545-576. IOPScience Database.

[7] Allen, G., Murray, K.D., Olsen, D.B., "The Importance of Pulsatile and Non-
pulsatile Flow in the Design of Blood Pumps" The International Journal of
Artificial Organs 21.8 (1997): 922-928 Web of Science Database.

[8] Quartapelle, L. (1993). Numerical Solution of the Incompressible Navier-Stokes


Equations Berlin, Germany: Birkhauser Verlag. Print.

[9] Tezduyar, T.E. "Stabilized Finite Element Formulations for Incompressible


Flow Computations" Advances In Applied Mechanics 28 (1991): 1-44 Web of
Science Database.

15

You might also like