conservation of mass - university of notre damegtryggva/cfd-course/2011-lecture-4.pdfconservation of...

9
Computational Fluid Dynamics The Equations Governing Fluid Motion Grétar Tryggvason Spring 2011 http://www.nd.edu/~gtryggva/CFD-Course/ Computational Fluid Dynamics Derivation of the equations governing fluid flow in integral form Conservation of Mass Conservation of Momentum Conservation of Energy Differential form Summary Incompressible flows Inviscid compressible flows Outline Computational Fluid Dynamics Conservation of Mass Computational Fluid Dynamics In general, mass can be added or removed: time t The conservation law must be stated as: Original Mass Mass Added Final Mass + = Mass Removed - time t+t Conservation of Mass Computational Fluid Dynamics We now apply this statement to an arbitrary control volume in an arbitrary flow field Conservation of Mass Rate of increase of mass Net influx of mass = Computational Fluid Dynamics Control volume V Control surface S t ρ dv V The rate of change of total mass in the control volume is given by: Total mass Rate of change Conservation of Mass

Upload: vuongnhu

Post on 08-May-2018

216 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Conservation of Mass - University of Notre Damegtryggva/CFD-Course/2011-Lecture-4.pdfConservation of Mass Equation in Integral Form! Conservation of Mass! Rate of change Net inflow

Computational Fluid Dynamics

The Equations Governing Fluid Motion!

Grétar Tryggvason!Spring 2011!

http://www.nd.edu/~gtryggva/CFD-Course/!Computational Fluid Dynamics

Derivation of the equations governing fluid flow in integral form!

!Conservation of Mass!!Conservation of Momentum!!Conservation of Energy!

Differential form!Summary!Incompressible flows!Inviscid compressible flows!

Outline!

Computational Fluid Dynamics

Conservation!of!

Mass!

Computational Fluid Dynamics

In general, mass can be added or removed:!

time t!The conservation law must be stated as:!

Original!Mass!

Mass!Added!

Final!Mass! +!=! Mass!

Removed!-!

time t+∆t!

Conservation of Mass!

Computational Fluid Dynamics

We now apply this statement to an arbitrary control volume in an arbitrary flow field!

Conservation of Mass!

Rate of increase of mass!

Net influx of mass!=!

Computational Fluid Dynamics

Control volume V!Control surface S!

∂∂t

ρdvV∫

The rate of change of total mass in the control volume is given by:!

Total mass!

Rate of change!

Conservation of Mass!

Page 2: Conservation of Mass - University of Notre Damegtryggva/CFD-Course/2011-Lecture-4.pdfConservation of Mass Equation in Integral Form! Conservation of Mass! Rate of change Net inflow

Computational Fluid Dynamics

Control volume V!Control surface S!

To find the mass flux through!the control surface, letʼs examine!a small part of the surface where the velocity is normal to the surface!

Conservation of Mass!Computational Fluid Dynamics

U∆t!

∆A!

Mass flow through the boundary ∆A during ∆t is: !time t! time t+∆t!

Density ρ!Velocity Ux!

Select a small rectangle outside the boundary such that during time ∆t it flows into the CV:!

Conservation of Mass!

where Ux = -u·n!ρUxΔtΔA

Computational Fluid Dynamics

The sign of the normal component of the velocity determines whether the fluid flows in or out of the control volume. We will take the outflow to be positive:!

− ρu ⋅ndsS∫

The net in-flow through the boundary of the control volume is therefore:!

Mass flow normal to boundary!

Integral over the boundary!

Negative since this is net inflow!

u ⋅n < 0 Inflow!

Conservation of Mass!Computational Fluid Dynamics

∂∂t

ρdvV∫ = − ρu ⋅nds

S∫

Conservation of Mass Equation in Integral Form!

Conservation of Mass!

Net inflow of mass!Rate of change of mass!

Computational Fluid Dynamics

Conservation!of!

momentum!

Computational Fluid Dynamics

Rate of increase of momentum!

Net influx of momentum!

Body forces!

Surface forces!

=! +! +!

Momentum per volume: !

Momentum in control volume: !

ρu

ρu dvV∫

Conservation of momentum!

Page 3: Conservation of Mass - University of Notre Damegtryggva/CFD-Course/2011-Lecture-4.pdfConservation of Mass Equation in Integral Form! Conservation of Mass! Rate of change Net inflow

Computational Fluid Dynamics

Control volume V!Control surface S!The rate of

change of momentum in the control volume is given by:!

Total momentum!

Rate of change!

∂∂t

ρu dvV∫

Rate of change of momentum!Computational Fluid Dynamics

Ux∆t!

∆A!

Momentum flow through the boundary ∆A during ∆t is: !time t! time t+∆t!

Density ρ!Velocity u!

Select a small rectangle outside the boundary such that during time ∆t it flows into the CV:!

− ρuu ⋅nds∫

In/out flow of momentum!

Ux"

Ux = -u·n so the net influx of momentum per unit time (divided by ∆t ) is:!

ρu( )UxΔtΔA

Computational Fluid Dynamics

Control volume V!

Body forces, such as gravity act on the fluid in the control volume.!

Total body force!

ρ f dvV∫

f!

dv

Body force!Computational Fluid Dynamics

Control volume V!Control surface S!The viscous

force is given by the dot product of the normal with the stress tensor T!

Total stress force!

T ⋅n

S∫ dS

T•n!ds

Viscous force!

Computational Fluid Dynamics Viscous flux of momentum!

T = −p + λ∇⋅u( )I + 2µD

D =12

∇u +∇uT( )

Dij =12

∂ui∂x j

+∂uj∂xi

⎝ ⎜ ⎞

⎠ ⎟

Stress Tensor!

Deformation Tensor!

Whose components are:!

∇ ⋅u = 0

T = −pI+ 2µD

For incompressible flows!

And the stress tensor is!

Computational Fluid Dynamics

Control volume V!Control surface S!The pressure

produces a normal force on the control surface. The total force is:!

Total pressure force!

pn

S∫ dS

pn!

ds

Pressure force!

Page 4: Conservation of Mass - University of Notre Damegtryggva/CFD-Course/2011-Lecture-4.pdfConservation of Mass Equation in Integral Form! Conservation of Mass! Rate of change Net inflow

Computational Fluid Dynamics Conservation of Momentum!

∂∂t

ρudv∫ = − ρuu ⋅nds − Tn∫ ds∫ + ρ f dv∫

∂∂t

ρudv∫ = − ρuu ⋅nds − pn∫ ds∫ + 2µD∫ ⋅nds + ρ f dv∫

Gathering the terms!

Substitute for the stress tensor!

Rate of change of momentum!

Net inflow of momentum! Total

pressure!Total viscous force!

Total body force!

T = −pI+ 2µD

Computational Fluid Dynamics

Conservation!of!

energy!

Computational Fluid Dynamics

∂∂t

ρ e + 12u2⎛

⎝⎜⎞⎠⎟dv∫ = − ρ e + 1

2u2⎛

⎝⎜⎞⎠⎟u ⋅nds∫

+ u ⋅ f dv +V∫ n ⋅ (uT)ds∫ − n ⋅qds∫

Conservation of energy!

Rate of change of kinetic+internal energy!

Work done by body forces!

Net inflow of kinetic+internal energy!

Net heat flow!

Net work done by the stress tensor!

The energy equation in integral form!

Computational Fluid Dynamics

Differential Form!of!

the Governing Equations!

Computational Fluid Dynamics

The Divergence or Gauss Theorem can be used to convert surface integrals to volume integrals!

∇ ⋅aV∫ dv = a ⋅n ds

S∫

Differential form!Computational Fluid Dynamics

Start with the integral form of the mass conservation equation!∂∂t

ρdvV∫ = − ρu ⋅nds

S∫Using Gaussʼs theorem!

ρu ⋅nds =S∫ ∇ ⋅(ρu)dv

V∫The mass conservation equations becomes!

∂∂t

ρdvV∫ = − ∇ ⋅(ρu)dv

V∫

Differential form!

Page 5: Conservation of Mass - University of Notre Damegtryggva/CFD-Course/2011-Lecture-4.pdfConservation of Mass Equation in Integral Form! Conservation of Mass! Rate of change Net inflow

Computational Fluid Dynamics

Rearranging!∂∂t

ρdvV∫ + ∇⋅ (ρu)dv

V∫ = 0

∂ρ∂t

+ ∇⋅ (ρu)⎛ ⎝

⎞ ⎠ dvV∫ = 0

Since the control volume is fixed, the derivative can be moved under the integral sign!

Rearranging!

∂ρ∂tdv

V∫ + ∇⋅(ρu)dvV∫ = 0

Differential form!Computational Fluid Dynamics

∂ρ∂t

+∇ ⋅(ρu) = 0

∂ρ∂t

+ ∇⋅ (ρu)⎛ ⎝

⎞ ⎠ dvV∫ = 0

This equation must hold for ANY control volume, no matte what shape and size. Therefore the integrand must be equal to zero!

Differential form!

Computational Fluid Dynamics

DρDt

+ ρ∇ ⋅u = 0

∇ ⋅ (ρu) = u ⋅ ∇ρ + ρ∇ ⋅u

The mass conservation equation becomes:!

Expanding the divergence term:!

∂ρ∂t

+ ∇ ⋅ (ρu) = ∂ρ∂t

+ u ⋅ ∇ρ + ρ∇ ⋅u

or!

where!

D()Dt

= ∂()∂t

+ u ⋅ ∇() Convective derivative!

Differential form!Computational Fluid Dynamics Differential form!

∂∂t

ρu dv∫ = ρ f dv∫ + (nT− ρu(u ⋅n))ds∫

The differential form of the momentum equation is derived in the same way:!Start with!

Rewrite as:!

∂∂t

ρu dv∫ = ρ f dv∫ + ∇ ⋅∫ T− ρuu( )dv

To get:!∂ρu∂t

= ρ f +∇⋅(T − ρuu)

Computational Fluid Dynamics

Using the mass conservation equation the advection part can be rewritten:!

∂ρu∂t

+ ∇ ⋅ ρuu =

u ∂ρ∂t

+ u∇ ⋅uρ + ρ ∂u∂t

+ ρu ⋅ ∇u =

u ∂ρ∂t

+ ∇ ⋅uρ⎛ ⎝ ⎜

⎞ ⎠ ⎟ + ρ Du

Dt= ρ Du

Dt

Differential form!

=0, by mass conservation!

Computational Fluid Dynamics

The momentum equation equation!

∂ρu∂t

= ρ f +∇ ⋅ (T − ρuu)

ρDuDt

= ρ f + ∇⋅T

Can therefore be rewritten as!

Differential form!

where!

ρ DuDt

= ρ ∂u∂t

+ u ⋅ ∇u⎛ ⎝ ⎜

⎞ ⎠ ⎟

Page 6: Conservation of Mass - University of Notre Damegtryggva/CFD-Course/2011-Lecture-4.pdfConservation of Mass Equation in Integral Form! Conservation of Mass! Rate of change Net inflow

Computational Fluid Dynamics

The energy equation equation can be converted to a differential form in the same way. It is usually simplified by subtracting the “mechanical energy” !

Differential form!Computational Fluid Dynamics

The “mechanical energy equation” is obtained by taking the dot product of the momentum equation and the velocity:!

ρ∂∂t

u2

2⎛ ⎝ ⎜ ⎞

⎠ ⎟ = −ρu ⋅ ∇ u2

2⎛ ⎝ ⎜ ⎞

⎠ ⎟ + ρu ⋅ fb + u ⋅ ∇ ⋅T( )

The result is:!

The “mechanical energy equation”!

u ⋅ ρ ∂u∂t

+ ρu ⋅ ∇u = ρ f + ∇⋅T⎛ ⎝

⎞ ⎠

Differential form!

Computational Fluid Dynamics

The final result is!

ρDeDt

− T ⋅ ∇u +∇ ⋅q = 0

Subtract the “mechanical energy equation” from the energy equation!

Using the constitutive relation presented earlier for the stress tensor and Fourieʼs law for the heat conduction:!

q = −k∇T

T = −p + λ∇⋅u( )I + 2µD

Differential form!Computational Fluid Dynamics

The final result is!

ρDeDt

+ p∇⋅u =Φ+∇ ⋅ k∇T

is the dissipation function and is the rate at which work is converted into heat.!

µ, λ, k

p = p(e,ρ); T = T (e,ρ);

where!

Φ = λ(∇⋅u)2 + 2µD ⋅D

Generally we also need:!

and equations for !

Differential form!

Computational Fluid Dynamics

Summary!of!

governing equations!

Computational Fluid Dynamics

∂∂t

ρdvV∫ = − ρu ⋅nds

S∫

∂∂t

ρudv∫ = ρ f dv∫ + (nT − ρu(u ⋅n))ds∫

∂∂t

ρ(e + 12u2 )dv∫ = u ⋅ ρ f dv∫ + n ⋅ (uT − ρ(e + 1

2u2 ) − q)ds∫

Integral Form!

Page 7: Conservation of Mass - University of Notre Damegtryggva/CFD-Course/2011-Lecture-4.pdfConservation of Mass Equation in Integral Form! Conservation of Mass! Rate of change Net inflow

Computational Fluid Dynamics

∂ρ∂t

+ ∇ ⋅ (ρu) = 0

∂ρu∂t

= ρ f + ∇ ⋅ (T− ρuu)

∂∂t

ρ(e + 12u2)=

∇ ⋅ ρ(e + 12u2)u −uT+q

⎛ ⎝ ⎜

⎞ ⎠ ⎟

Conservative Form!

DρDt

+ ρ∇⋅u = 0

ρDuDt

= ρ f +∇ ⋅T

ρDeDt

= T∇⋅u − ∇⋅q

Convective Form!

Computational Fluid Dynamics

Special Cases!Compressible inviscid flows!Incompressible flows!

!Stokes flow!!Potential flows! Not in this course!!

Computational Fluid Dynamics

Inviscid compressible flows!

Computational Fluid Dynamics

Inviscid, compressible flows!

DρDt

+ ρ∇⋅u = 0

ρDuDt

= ρ f −∇p

ρDeDt

= −p∇⋅u

T = −p + λ∇⋅u( )I + 2µD

T = −pI

µ = 0 and λ = 0

Computational Fluid Dynamics

∂U∂t

+∂E∂x

+∂F∂y

+∂G∂z

= 0

U =

ρρu

ρv

ρw

ρE

⎜⎜⎜⎜⎜⎜⎜⎜

⎟⎟⎟⎟⎟⎟⎟⎟

E =

ρuρu2 + p

ρuv

ρuw

ρE + p( )u

⎜⎜⎜⎜⎜⎜⎜⎜

⎟⎟⎟⎟⎟⎟⎟⎟

F =

ρvρuv

ρv2 + p

ρvw

ρE + p( )v

⎜⎜⎜⎜⎜⎜⎜⎜

⎟⎟⎟⎟⎟⎟⎟⎟

G =

ρuρuw

ρvw

ρw2 + p

ρE + p( )u

⎜⎜⎜⎜⎜⎜⎜⎜

⎟⎟⎟⎟⎟⎟⎟⎟

p = ρRT; e = cvT; h = c pT; γ = c p /cv

cv =R

γ −1; p = (γ −1)ρe; T =

(γ −1)eR

;

Computational Fluid Dynamics

Incompressible flow!

Page 8: Conservation of Mass - University of Notre Damegtryggva/CFD-Course/2011-Lecture-4.pdfConservation of Mass Equation in Integral Form! Conservation of Mass! Rate of change Net inflow

Computational Fluid Dynamics

Incompressible flows:!

Navier-Stokes equations (conservation of momentum)!

DρDt

= 0DρDt

+ ρ∇⋅u = 0

∇ ⋅u = 0

∂∂tρu = −∇⋅ ρuu-∇P + ρ fb +∇⋅µ ∇u + ∇Tu( )

ρ∂∂tu + ρu ⋅ ∇u = -∇P + ρ fb + µ∇ 2u

For constant viscosity!

Computational Fluid Dynamics Objectives:!

∂u∂t

+ u ∂u∂x

+ v∂u∂y

= −1ρ∂P∂x

+µρ

∂ 2u∂x2

+∂ 2u∂y2

⎛ ⎝ ⎜ ⎞

∂u∂x

+∂v∂y

= 0

∂v∂t

+ u ∂v∂x

+ v∂v∂y

= −1ρ∂P∂y

+µρ

∂ 2v∂x2

+∂ 2v∂y2

⎛ ⎝ ⎜ ⎞

The 2D Navier-Stokes Equations for incompressible, !homogeneous flow:!

Computational Fluid Dynamics

u ⋅nds = 0S∫

∂∂t

udVV∫ = − uu ⋅n

S∫ dS +ν ∇u ⋅nS∫ dS − 1

ρ pnxS∫ dS

∂∂t

vdVV∫ = − vu ⋅n

S∫ dS +ν ∇v ⋅nS∫ dS − 1

ρ pnyS∫ dS

Incompressibility (conservation of mass)!

Navier-Stokes equations (conservation of momentum)!

Computational Fluid Dynamics

Needed to accelerate/decelerate a fluid particle: Easy to use if viscous forces are small!

Needed to prevent accumulation/depletion of fluid particles: Use if there are strong viscous forces!

The role of pressure:!

Pressure and Advection!

Advection:!

!Newtonʼs law of motion: In the absence of forces, a fluid particle will move in a straight line!

Computational Fluid Dynamics

The pressure opposes local accumulation of fluid. For compressible flow, the pressure increases if the density increases. For incompressible flows, the pressure takes on whatever value necessary to prevent local accumulation:!

High Pressure! Low Pressure!

∇ ⋅u < 0

∇ ⋅u > 0

Pressure!Computational Fluid Dynamics

Increasing pressure slows the fluid down and decreasing pressure accelerates it!

Pressure increases!

Pressure decreases!

Slowing down! Speeding up!

Pressure!

Page 9: Conservation of Mass - University of Notre Damegtryggva/CFD-Course/2011-Lecture-4.pdfConservation of Mass Equation in Integral Form! Conservation of Mass! Rate of change Net inflow

Computational Fluid Dynamics

Diffusion of fluid momentum is the result of friction between fluid particles moving at uneven speed. The velocity of fluid particles initially moving with different velocities will gradually become the same. Due to friction, more and more of the fluid next to a solid wall will move with the wall velocity.!

Viscosity!Computational Fluid Dynamics

Nondimensional Numbers—the Reynolds number!

Computational Fluid Dynamics Nondimensional Numbers!

∂u∂t

+ u ∂u∂x

+ v∂u∂y

= −1ρ∂P∂x

+µρ

∂ 2u∂x2

+∂ 2u∂y2

⎛ ⎝ ⎜ ⎞

˜ u , ˜ v =u,vU

; ˜ x , ˜ y =x, yL

; ˜ t =UtL

U 2

L∂ ˜ u ∂˜ t

+ ˜ u ∂ ˜ u ∂˜ x

+ ˜ v ∂˜ u ∂˜ y

⎛ ⎝ ⎜ ⎞

⎠ = −

1Lρ

∂P∂˜ x

+UL2

µρ

∂ 2 ˜ u ∂˜ x 2

+∂ 2 ˜ u ∂˜ y 2

⎛ ⎝ ⎜ ⎞

⎠ ⎟

∂˜ u ∂˜ t

+ ˜ u ∂ ˜ u ∂˜ x

+ ˜ v ∂˜ u ∂˜ y

= −L

U 21

Lρ∂P∂˜ x

+L

U 2UL2

µρ

∂ 2 ˜ u ∂˜ x 2

+∂ 2 ˜ u ∂˜ y 2

⎛ ⎝ ⎜ ⎞

⎠ ⎟

Computational Fluid Dynamics

∂˜ u ∂˜ t

+ ˜ u ∂ ˜ u ∂˜ x

+ ˜ v ∂˜ u ∂˜ y

= −L

U 21

Lρ∂P∂˜ x

+L

U 2UL2

µρ

∂ 2 ˜ u ∂˜ x 2

+∂ 2 ˜ u ∂˜ y 2

⎛ ⎝ ⎜ ⎞

⎠ ⎟

LU 2

1Lρ

∂P∂˜ x

=1

ρU 2∂P∂˜ x

=∂ ˜ P ∂˜ x

LU 2

UL2

µρ

ULρ=1Re

˜ P =P

ρU 2

Re =ρUL

µ

where!

where!

Nondimensional Numbers!

Computational Fluid Dynamics

∂˜ u ∂˜ t

+ ˜ u ∂ ˜ u ∂˜ x

+ ˜ v ∂˜ u ∂˜ y

= −∂ ˜ P ∂˜ x

+1

Re∂ 2 ˜ u ∂˜ x 2

+∂ 2 ˜ u ∂˜ y 2

⎛ ⎝ ⎜ ⎞

⎠ ⎟

∂˜ v ∂˜ t

+ ˜ u ∂˜ v ∂˜ x

+ ˜ v ∂ ˜ v ∂˜ y

= −∂ ˜ P ∂˜ y

+1Re

∂ 2 ˜ v ∂˜ x 2

+∂ 2 ˜ v ∂ ˜ y 2

⎛ ⎝ ⎜ ⎞

⎠ ⎟

The momentum equations are:!

∂ u∂ x

+∂ v∂ y

= 0

The continuity equation is unchanged!

Nondimensional Numbers!Computational Fluid Dynamics

Derivation of the equations governing fluid flow in integral form!

!Conservation of Mass!!Conservation of Momentum!!Conservation of Energy!

Differential form!Summary!Incompressible flows!Inviscid compressible flows!

Outline!