Computational Methods - CFD Lecture 2
Computational Methods - CFD Lecture 2
by
Dr Ceri
Computational Methods –
Morris Week 7
Conservation Laws
2020
Conservation Laws
• Conservation of Mass
o Net Mass of Fluid Entering an Element in a Time
Interval Δt Equals Amount by Which Mass of Element
Changes During Time Δt
o Mathematical Representation is known as the
Continuity Equation
Conservation Laws
• Conservation of Momentum
o Newton’s Second Law
o Sum of the External Forces Acting on a Unit Mass
Must Equal the Rate of Change of Linear Momentum
o F=ma
o Mathematical Representation is known as the
Momentum Equation
Conservation Laws
• Conservation of Energy
o First Law of Thermodynamics
o Rate of Change of Energy within Element Equals Net
Rate of Heat Entering an Element plus Rate of Work
Done on Element
o Mathematical Representation is known as the
Energy Equation
Mathematical equations
Continuity Equation
2020
Mathematical Equations
Continuity Equation 𝜌𝑢 𝑑𝑦 𝑑𝑧
dy
dz
In 𝒙 direction: dx
Mass flow into element = Mass flux through left face × area of left face
= 𝜌𝑢 𝑑𝑦 𝑑𝑧
Mass flow out of Mass flux into element + (change in flux with 𝑥 × 𝑑𝑥) × area of
=
element right face
𝜕 𝜌𝑢
= 𝜌𝑢 + 𝑑𝑥 𝑑𝑦 𝑑𝑧
𝜕𝑥
Net mass outflow 𝜕 𝜌𝑢 𝜕 𝜌𝑢
in 𝑥 direction = 𝜌𝑢 + 𝑑𝑥 𝑑𝑦 𝑑𝑧 − 𝜌𝑢 𝑑𝑦 𝑑𝑧 = 𝑑𝑥 𝑑𝑦 𝑑𝑧
𝜕𝑥 𝜕𝑥
Continuity Equation
In 𝒚 direction: In 𝒛 direction:
𝜕 𝜌𝑣 𝜕 𝜌𝑤
= 𝑑𝑥 𝑑𝑦 𝑑𝑧 = 𝑑𝑥 𝑑𝑦 𝑑𝑧
𝜕𝑦 𝜕𝑧
• Net mass flow
𝜕 𝜌𝑢 𝜕 𝜌𝑣 𝜕 𝜌𝑤
= + + 𝑑𝑥 𝑑𝑦 𝑑𝑧
𝜕𝑥 𝜕𝑦 𝜕𝑧
Mass = 𝜌 𝑑𝑥 𝑑𝑦 𝑑𝑧
• Time rate of mass change = 𝜕𝜌
𝜕𝑡
𝑑𝑥 𝑑𝑦 𝑑𝑧
𝜕𝜌
+ 𝛻 ∙ 𝜌𝐮 = 𝟎
𝜕𝑡
Continuity Equation
• Simplifications
o Steady Flows (nothing changes with
time)
𝜕𝜌 𝜕𝜌𝑢 𝜕𝜌𝑣 𝜕𝜌𝑤
=0 ∴ + + =0
𝜕𝑡 𝜕𝑥 𝜕𝑦 𝜕𝑧
Momentum Equation
2020
Momentum Equation
• F = ma
• Forces
o Body
̶ Gravity
̶ Electromagnetic
o Surface
̶ Pressure
̶ Viscous Forces
– Normal Stress
– Shear Stress
Notation
𝒅𝒛
x
z 𝒅𝒙
Body Force
𝒇𝒚
𝒇𝒙
𝒇𝒛
Surface Forces - Pressure
𝝏𝒑
𝒑+ 𝒅𝒚
𝝏𝒚
𝒑
𝝏𝒑
𝒑+ 𝒅𝒙
𝒑 𝝏𝒙
𝝏𝒑
𝒑+ 𝒅𝒛
𝝏𝒛
y
𝒑 x
z
Surface Forces - Normal Stress
𝝏𝝈𝒚𝒚
𝝈𝒚𝒚 + 𝒅𝒚
𝝏𝒚
𝝈𝒛𝒛
𝝏𝝈𝒙𝒙
𝝈𝒙𝒙 + 𝒅𝒙
𝝈𝒙𝒙 𝝏𝒙
𝝏𝝈𝒛𝒛
𝝈𝒛𝒛 + 𝒅𝒛
𝝏𝒛 y
x
𝝈𝒚𝒚 z
Surface Forces - Shear Stress
𝝏𝝉𝒚𝒛 𝝏𝝉𝒚𝒙
𝝉𝒚𝒛 + 𝒅𝒚 𝝉𝒚𝒙 + 𝒅𝒚
𝝏𝒚 𝝏𝒚
𝝏𝝉𝒙𝒚
𝝉𝒙𝒚 + 𝒅𝒙
𝝏𝒙
𝝉𝒛𝒙
𝝉𝒙𝒛
𝝉𝒛𝒚
𝝏𝝉𝒙𝒛
𝝉𝒙𝒚 𝝉𝒙𝒛 + 𝒅𝒙
𝝏𝒙
𝝉𝒚𝒙
𝝉𝒚𝒛 y
𝝏𝝉𝒛𝒚 𝝏𝝉𝒛𝒙
𝝉𝒛𝒚 + 𝒅𝒛 𝝉𝒛𝒙 + 𝒅𝒛 x
𝝏𝒛 𝝏𝒛 z
Surface Forces in x direction𝝏𝝉
𝒚𝒙
𝝉𝒚𝒙 + 𝒅𝒚 𝒅𝒙 𝒅𝒛
𝝏𝒚
𝝉𝒛𝒙 𝒅𝒙 𝒅𝒚 𝝏𝝈𝒙𝒙
𝝈𝒙𝒙 + 𝒅𝒙 𝒅𝒚 𝒅𝒛
𝝏𝒙
𝝈𝒙𝒙 𝒅𝒚 𝒅𝒛
𝒑𝒙 𝒅𝒚 𝒅𝒛 𝝏𝒑𝒙
𝒑𝒙 + 𝒅𝒙 𝒅𝒚 𝒅𝒛
𝝏𝒙
𝝉𝒚𝒙 𝒅𝒙 𝒅𝒛
y
𝝏𝝉𝒛𝒙 x
𝝉𝒛𝒙 +
𝝏𝒛
𝒅𝒛 𝒅𝒙𝒅𝒚 z
Total Forces in x direction
𝑭𝒙
𝝏𝒑 𝝏𝝈𝒙𝒙
= 𝝆𝒇𝒙 𝒅𝒙𝒅𝒚𝒅𝒛 + 𝒑𝒙 − 𝒑𝒙 + 𝒅𝒙 𝒅𝒚𝒅𝒛 + 𝝈𝒙𝒙 + 𝒅𝒙 − 𝝈𝒙𝒙 𝒅𝒚𝒅𝒛
𝝏𝒙 𝝏𝒙
𝝏𝝉𝒚𝒙 𝝏𝝉𝒛𝒙
+ 𝝉𝒚𝒙 + 𝒅𝒚 − 𝝉𝒚𝒙 𝒅𝒙𝒅𝒛 + 𝝉𝒛𝒙 + 𝒅𝒛 − 𝝉𝒛𝒙 𝒅𝒙𝒅𝒚
𝝏𝒚 𝝏𝒛
𝐷𝑢
• Acceleration in x direction = Substantive Derivative
𝐷𝑡
𝐷𝑢 𝜕𝑝 𝜕𝜎𝑥𝑥 𝜕𝜏𝑦𝑥 𝜕𝜏𝑧𝑥
𝜌 𝑑𝑥𝑑𝑦𝑑𝑧 = 𝜌𝑓𝑥 𝑑𝑥𝑑𝑦𝑑𝑧 + − + + + 𝑑𝑥𝑑𝑦𝑑𝑧
𝐷𝑡 𝜕𝑥 𝜕𝑥 𝜕𝑦 𝜕𝑧
• Momentum Equation in x direction:
𝐷𝑢 𝜕𝑝 𝜕𝜎𝑥𝑥 𝜕𝜏𝑦𝑥 𝜕𝜏𝑧𝑥
𝜌 = 𝜌𝑓𝑥 + − + + +
𝐷𝑡 𝜕𝑥 𝜕𝑥 𝜕𝑦 𝜕𝑧
o Advective Acceleration
̶ Change in flow direction
̶ Change in pipe diameter
Local Vs Advective Acceleration
• Example 2 – Tidal Estuary
o Local Acceleration
̶ Change in flow due to tidal cycle
o Advective Acceleration
̶ Flow around headland
̶ Narrowing of estuary
Momentum Equation in y & z directions
• In y direction:
𝜕(𝜌𝑣) 𝜕𝑝 𝜕𝜎𝑦𝑦 𝜕𝜏𝑥𝑦 𝜕𝜏𝑧𝑦
+ 𝛻 ∙ 𝜌𝑣𝐮 = 𝜌𝑓𝑦 + − + + +
𝜕𝑡 𝜕𝑦 𝜕𝑦 𝜕𝑥 𝜕𝑧
Local Advective Body Pressure
acceleration acceleration Force Gradient Stresses
• In z direction:
𝜕(𝜌𝑤) 𝜕𝑝 𝜕𝜎𝑧𝑧 𝜕𝜏𝑥𝑧 𝜕𝜏𝑦𝑧
+ 𝛻 ∙ 𝜌𝑤𝐮 = 𝜌𝑓𝑧 + − + + +
𝜕𝑡 𝜕𝑧 𝜕𝑧 𝜕𝑥 𝜕𝑦
Local Advective Body Pressure
acceleration acceleration Force Gradient Stresses
Questions so far?
• Derived Continuity equation based on a stationary fluid element
Navier-Stokes Equations
2020
Normal Stresses (Newtonian Fluids)
• Stresses proportional to velocity gradients
𝜕𝑢 2 𝜕𝑢 𝜕𝑣 𝜕𝑤 𝜕𝑢 2
𝜎𝑥𝑥 =𝜇 2 − + + =𝜇 2 − 𝛻∙𝐮
𝜕𝑥 3 𝜕𝑥 𝜕𝑦 𝜕𝑧 𝜕𝑥 3
𝜕𝑣 2 𝜕𝑢 𝜕𝑣 𝜕𝑤 𝜕𝑣 2
𝜎𝑦𝑦 =𝜇 2 − + + =𝜇 2 − 𝛻∙𝐮
𝜕𝑦 3 𝜕𝑥 𝜕𝑦 𝜕𝑧 𝜕𝑦 3
𝜕𝑤 2 𝜕𝑢 𝜕𝑣 𝜕𝑤 𝜕𝑤 2
𝜎𝑧𝑧 =𝜇 2 − + + =𝜇 2 − 𝛻∙𝐮
𝜕𝑧 3 𝜕𝑥 𝜕𝑦 𝜕𝑧 𝜕𝑧 3
Shear Stresses (Newtonian Fluids)
• Stresses proportional to velocity gradients
𝜕𝑢 𝜕𝑣
𝜏𝑥𝑦 = 𝜏𝑦𝑥 =𝜇 +
𝜕𝑦 𝜕𝑥
𝜕𝑢 𝜕𝑤
𝜏𝑥𝑧 = 𝜏𝑧𝑥 =𝜇 +
𝜕𝑧 𝜕𝑥
𝜕𝑣 𝜕𝑤
𝜏𝑦𝑧 = 𝜏𝑧𝑦 =𝜇 +
𝜕𝑧 𝜕𝑦
Navier-Stokes equation in x direction
𝜕(𝜌𝑢) 𝜕𝑝 𝜕𝜎𝑥𝑥 𝜕𝜏𝑦𝑥 𝜕𝜏𝑧𝑥
+ 𝛻 ∙ 𝜌𝑢𝐮 = 𝜌𝑓𝑥 + − + + +
𝜕𝑡 𝜕𝑥 𝜕𝑥 𝜕𝑦 𝜕𝑧
𝛻∙𝐮
Navier-Stokes equation in x direction
𝜕𝑝 𝜕2 𝑢 𝜕2 𝑣 𝜕2 𝑤 2 𝜕 𝜕
RHS = 𝜌𝑓𝑥 − +𝜇 + + − 𝜇 𝛻∙𝐮 + 𝜇 𝛻∙𝐮
𝜕𝑥 𝜕𝑥 2 𝜕𝑦 2 𝜕𝑧 2 3 𝜕𝑥 𝜕𝑥
(𝜌= constant),
From Continuity Equation: If incompressible (𝜌= constant) ,𝛻𝛻 ∙∙ 𝐮
𝐮== 𝟎,
𝟎,
• Next we will note the simplification for inviscid flow and the use of the
energy equation
Euler Equations
• For inviscid flow (no
no viscosity ) all of the stress terms can be ignored:
𝜕(𝜌𝑢) 𝜕𝑝
+ 𝛻 ∙ 𝜌𝑢𝐮 = 𝜌𝑓𝑥 −
𝜕𝑡 𝜕𝑥
𝜕(𝜌𝑣) 𝜕𝑝
+ 𝛻 ∙ 𝜌𝑣𝐮 = 𝜌𝑓𝑦 −
𝜕𝑡 𝜕𝑦
𝜕(𝜌𝑤) 𝜕𝑝
+ 𝛻 ∙ 𝜌𝑤𝐮 = 𝜌𝑓𝑧 −
𝜕𝑡 𝜕𝑧
• P.S: Inviscid flow is a theoretical concept since any fluid has some level of
viscosity no matter how small its value might be.
• However, there are situations where solving the inviscid Euler equations
gives good results such as the flow away from a body surface (outside of
the boundary layer)
Energy Equation
In cases when one is interested in temperature
distribution, the energy conservation equation is
also used
𝜕𝑦
𝜌 + 𝐮 ∙ 𝛻𝐮 = −𝛻𝑝 + 𝜇𝛻 2 𝐮 + 𝐟
𝜕𝑥
Mathematical Equations
• Continuity Equation Don’t need to derive equations
but need to understand what
• Momentum Equation each term means, where it
comes from and which terms
can be neglected for different
• Energy Equation types of flow
Recap
• How are the Navier-Stokes equations derived from the
momentum equations?
𝜕𝑝 𝜕2 𝑢 𝜕2 𝑢 𝜕2 𝑢 1 𝜕
• Steady 𝛻 ∙ 𝜌𝑢𝐮 = 𝜌𝑓𝑥 − 𝜕𝑥
+𝜇
𝜕𝑥 2
+
𝜕𝑦 2
+
𝜕𝑧 2
+ 𝜇
3 𝜕𝑥
𝛻∙𝐮
𝜕𝑢 1 𝜕𝑝 𝜕2 𝑢 𝜕2 𝑢 𝜕2 𝑢
• Incompressible 𝜕𝑡
+ 𝛻 ∙ 𝑢𝐮 = 𝑓𝑥 −
𝜌 𝜕𝑥
+ν
𝜕𝑥 2
+
𝜕𝑦 2
+
𝜕𝑧 2
𝜕(𝜌𝑢) 𝜕𝑝
• Inviscid 𝜕𝑡
+ 𝛻 ∙ 𝜌𝑢𝐮 = 𝜌𝑓𝑥 −
𝜕𝑥
Captions are available for this resource
• This video has been automatically captioned by a machine.
• We believe this captioning will be more than 75% accurate.
• To see the captions click on “CC” on the bottom right of the
video viewer. You can choose how these captions appear.
• When refreshing your knowledge you can skip to the
relevant section of video or captions using a key word
search.