2.fluid Mechanics Overview Part II
2.fluid Mechanics Overview Part II
Lian-Ping Wang
July 5, 2017
Poor man’s experiments in the office:
(1) Two layers of water sandwich an air layer
(2) A hanging drop below a wired water surface!
A pendant drop
A pendant drop
Pitts E, Inst. Maths Applies (1976) 17, 387-397. "The Stability of a Drop
Hanging from a Tube"; cited in "The chaotic dripping faucet." P. Coullet, L.
Mahadevan and C. Riera who give a nice dimensionless ODE for the shape
- Growth of micro-organisms
- Wire mesh is used to seal the water in a faucet when closing
Physical assumptions:
(1) Assume no flow;
(2) Surface tension is constant – consistent with (1);
(3) Axisymmetric;
(4) Neglect pressure change in the air;
Code it
……
6
Example 3: The hanging droplet problem
z !
g
p0
θ x
! z=η(r)
n p0
! x$ ! y$
#ηr & #η x & 1 2
! ∂ " r% ∂ " r% ∂ 1
ηrr + ηr (ηr ) ηrr
κ = −∇ ⋅ n = + − = r −
∂x 1+ η 2 ∂y 1+ η 2 ∂z 3/ 2
1+ ηr2 1+ ηr2
r r (1+ η ) 2
r
! 1$ 2
1 1
" r% ( 2
#ηrr + ηr & 1+ ηr − ηr ) ( )η rr ηrr + ηr
r
+ ηr ( )
3
r η xx
= =
3/ 2 3/ 2 3/ 2
(1+ ηr2 ) (1+ ηr2 ) (
1+ η x2 )
ηrr + ηr
1
+ ηr ( )
3 1 axisymmetric planar
Δpair − ρW gη = γ r r
3/ 2
(1+ η )
2
r
Boundary conditions
ηr ( r = Rmax ) = tan (θ ) , η ( r = 0) = 0
In general, this nonlinear system has to be solved numerically.
Observations Rmax = The maximum radius on the top
1 3 1 hmax the overall height of the hanging droplet
ηrr + ηr
r
+ ηr ( ) r
Δpair − ρW gη = γ
3/ 2
R0 = the local radius of curvature at the bottom
(
1+ ηr2 )
Boundary conditions
ηr ( r = Rmax ) = tan (θ ) , ηr ( r = 0) = 0
In general, this nonlinear system has to be solved numerically.
2
At the tip region, we have !" R0 − η r − η0 #$ + r 2 ≈ R02
( () )
! $
1 r2 1 r4 & 1 r2
η r = η0 + R0 − R02 − r 2 ≈ η0 + R0 − R0 #1−
() − ≈ η0 +
# 2 R 2 8 R 4 &% 2R
" 0 0 0
1 r 1 1 31 1
⇒ ηr = 0, ηr =
r R r R
= , ηr
r
= 0, ηrr =
R
( )
0 0 0
1 3 1
ηrr + ηr
r
+ ηr ( ) r = η +η 1 + η 3 1 1 1 2
3/ 2 rr r
r r ( ) =
r R
+
R0
+0 =
R0
expected from physics!
( 1+ ηr2 ) 0
2γ 2γ 2γ − Δpair R0
⇒ Δpair − ρW gη = , Δpair + ρW ghmax = , hmax =
R0 R0 ρW gR0
Numerical solution (I)
2γ
Δpair + ρW ghmax =
R0
ρW ghnew = Δpair + ρW ghmax
del(Pair) does not
1 3 1
have net effect so I Δpair − ρW gη = γ
ηrr + ηr
r
+ ηr ( ) r
set to zero from (
1+ ηr2 )
3/ 2
dr r
+
γ
(
(h0 − ζ ) 1+ H ( r ) )
dζ
dr
=H r ()
()
dζ r
() ()
3 march with very small dr, till ζ r = hmax , record the contact angle θ = arctan
dr
The final algorithm Code inputs:
dH r ( ) = −1 H ρW g hmax and physical parameters
( r ) − 1r H ( r )
3 1.5
dr r
+
γ
(
(h0 − ζ ) 1+ H ( r ) )
Code outputs:
dζ
=H r () (1) Shape
dr
(2) Base diameter
As a matching problem in r from r = 0: (3) Base Contact angle
2γ
()
1 assume hmax → R0 =
ρW ghmax
1 1 1 3 1
(2) start matching with ζ ( r = 0) = 0, (
H r = 0 = 0, ) r
H r =()
R0
,
r
()
H r = 0, ζ rr =
R0
1 1
( )
H r0 = 0,
r
H r0 =( )
R0
r = ri + 0.5dr
&
( 1 1 3 ρ g 1.5 *
(
H ri+1 = H ri + dr '− H ri − !" H ri #$ + W
( ) ( ) ( )h0 − ζ ( ) ( )(
1+ H ri ( )) +
( r
) r γ (
,
1 !
ζ ( ri+1 ) = ζ ( ri ) + dr " H ri+1 + H ri #$
( ) ( )
2
()
dζ r
() ()
3 march with very small dr, till ζ r = hmax , record the contact angle θ = arctan
dr
A demo Fortran code: shape.f About 60 lines long
pi = 4.*atan(1.0) ! pi=3.14159.... 101 continue ! The Marching steps
g=9.8 ! gravity term1 = hh0/r
rho = 1000.0 ! water density term2 = hh0**3/r
gamma = 0.072 ! surface tension in N/m hh1 = hh0 + dr*( - term1 - term2
hmax = 0.005 ! in m . + g*rho/gamma*(hmax-zeta0)*(1.+hh0)**1.5 )
Rtip = 2.0*gamma/(rho*g*hmax) zeta1 = zeta0 + 0.5*dr*(hh0+hh1)
zeta0 = 0.0 write(10,*)r,zeta1,hh1,term1,term2
hh0 = 0.0 if(zeta1.gt.hmax)then
dr = 0.000001 theta = atan( (zeta1-zeta0)/dr )/pi*180.
c The first step go to 100
r0 = 0.0 end if
term1 = 1./Rtip r = r + dr
term2 = 0.0 r0 = r
hh1 = hh0 + dr*( - term1 - term2 hh0 = hh1
. + g*rho/gamma*(hmax-zeta0) ) zeta0 = zeta1
zeta1 = zeta0 + 0.5*dr*(hh0+hh1) go to 101
r = r0 + dr 100 continue
write(10,*)r,zeta1,hh1,term1,term2 write(10,*)'the base diameter in mm:', 2.0*r0*1000.
r0 = r write(*,*) 'the base diameter in mm:', 2.0*r0*1000.
hh0 = hh1 write(10,*)'theta in degree = ',theta
zeta0 = zeta1 write(*,*)'theta in degree = ',theta
c stop
end
Compile, run, and check the results:
A demo Fortran code: shape.f90 101 continue ! The Marching steps
term1 = hh0/r
real pi, g, rhi, gamma, hmax, Rtip, zeta0, dr term2 = hh0**3/r
real r0, term1, term2, hh0, hh1, zeta1, r, theta hh1 = hh0 + dr*( - term1 - term2 &
+ g*rho/gamma*(hmax-zeta0)*(1.+hh0)**1.5 )
pi = 4.*atan(1.0) ! pi=3.14159.... zeta1 = zeta0 + 0.5*dr*(hh0+hh1)
g=9.8 ! gravity write(10,*)r,zeta1,hh1,term1,term2
rho = 1000.0 ! water density if(zeta1.gt.hmax)then
gamma = 0.072 ! surface tension in N/m theta = atan( (zeta1-zeta0)/dr )/pi*180.
hmax = 0.005 ! in m go to 100
Rtip = 2.0*gamma/(rho*g*hmax) end if
zeta0 = 0.0 r = r + dr
hh0 = 0.0 r0 = r
dr = 0.000001 hh0 = hh1
! The first step zeta0 = zeta1
r0 = 0.0 go to 101
term1 = 1./Rtip 100 continue
term2 = 0.0
hh1 = hh0 + dr*( - term1 - term2 & write(10,*)'the base diameter in mm:', 2.0*r0*1000.
+ g*rho/gamma*(hmax-zeta0) ) write(*,*) 'the base diameter in mm:', 2.0*r0*1000.
zeta1 = zeta0 + 0.5*dr*(hh0+hh1) write(10,*)'theta in degree = ',theta
r = r0 + dr write(*,*)'theta in degree = ',theta
write(10,*)r,zeta1,hh1,term1,term2
stop
r0 = r end
hh0 = hh1
(1) All variables must be assigned a type
zeta0 = zeta1
(2) All explanation lines start with a !
(3) The line before the continuation line ends with a &
(4) More freedoms in placing the code on each line
Compile, run, and check the results:
https://www.star.le.ac.uk/~cgp/f90course/f90.html
Fortran77
Fortran90
Fortran95
Fortran2000
Fortran77 vs Fortran90 What's New in Fortran90
What was wrong with Fortran77? • Free-format source code and many other
simple improvements.
• There are no dynamic storage facilities at all.
• Arrays as first-class objects, whole-array
• There are no user-defined data types or data
structures (except the COMMON block). expressions, assignments, and functions.
• It was too easy to make mistakes which the • Dynamic memory allocation; pointers to allow
compiler could not detect, especially when calling complex dynamic data structures to be
constructed.
procedures (subroutines or functions). A study of
• User-defined data types; existing operators
some 4 million lines of professional Fortran showed
» 17% of procedure interfaces were defective. can be overloaded (re-defined) or new ones
• Programs are less than 100% portable because of defined.
a few remaining platform-dependent features. • The MODULE - a new program unit which can
encapsulate data and a related set of
• Control structures are poor, so it hard to avoid
procedures (subroutines or functions). Can
using GOTOs and labels, often leading to spaghetti
code. implement classes and member functions for
• Archaic features left over from the punched-card object-oriented programming.
era: • New control structures: SELECT CASE,
CYCLE, and EXIT so labels and explicit jumps
Ø fixed-format lines,
are rarely needed.
Ø statements all in upper-case,
Ø variable names limited to 6-characters. • Recursive functions, generic names for
• In practice programmers are driven to use procedures, optional arguments, calls with
extensions to Fortran77 Standard - which reduce keywords, and many other procedure call
options.
portability.
https://www.star.le.ac.uk/~cgp/f90course/f90.html
Choice of programming language?
Fortran. [ gfortran ]
C [ cc ]
I have all of them on my laptop.
Python
Java
Physics / assumptions
The wire mesh can alter local contact angle and affect the drop size.
The diameter of the drop scales with sqrt(4 gamma / rho g), which gives 5mm diameter. 5 mm is the
typical largest size of rain drops. In our experiment, we can alter gamma, rho, g to alter the size.
The air film pressure can effectively reduce the gravitational acceleration (namely, the differential
hydrostatic pressure is proportional to the density difference), one can try to design such a device.
This can be a little invention that can be used to produce larger drops, or control the size of drops.
Interface-resolving simulations for flows laden with liquid / gas particles
Initial conditions
23
A more efficient formulation: single-field or one-fluid formulation
[Sharp-interface one-fluid description] !
Identify each fluid by a marker function H ( x, t)
[Heaviside function]
!1 in fluid 1
H ="
# 0 Otherwise
The marker moves with the fluid
∂H !
+ U ⋅ ∇H = 0
∂t Tryggvason et al. JCP 169, 708-759
Define on-fluid fields: There are some subtle details
U" j = HU j + (1− H )Û j , P" = HP + (1− H )P̂ concerning the numerical realization
ρ" j = H ρ j + (1− H ) ρ! j , µ! j = H µ j + (1− H )µ̂ j of Heaviside and delta functions.
A single field equation is solved
[assume incompressible fluid, and constant surface tension γ ]
∂U! j
∂x j
=0 But sharp-interface cannot
be numerically resolved!
∂U! i ! ∂U! i ∂P! ∂ . ( ∂U! i ∂U! j +1 ! ! ! !
ρ!
∂t
!
+ ρU j
∂x j
!
= ρ gi − + 0µ! **
∂xi ∂x j /0 ) ∂x j
+ --3 + ∫ γ n (−∇ ⋅ n ) δ ( x − x f ) ds
∂xi ,32 S (t )
Then the details of delta
fcn implementation are
S(t) is the bounding contour of a differential interface
important.
This is the starting point for several numerical methods, including MAC
(marker-and-cell), VOF, level sets, and front tracking 24
Properties of the one-fluid formulation
25
Fundamental forces in multiphase flow
Volume forces: e.g., inertial force, buoyancy force, gravity force ~ L3
inertial force ρ LU 2
Weber number W e = =
surface tension force γ
buoyancy force Δρ gL2
Eotvos number Eo = =
surface tension force γ
= Bo Bond number
viscous force µU ρνU
Capillary number Ca = = =
surface tension force γ γ
ρd
density ratio Γ ρ =
ρc
µd
viscosity ratio Γ ρ =
µc Δρ
Velocity scale due to buoyancy ~ gL
ρ0
[e.g., rise velocity of a gas bubble]
Water droplets in air
Assume sphere
Drag ≈ weight
!1 ! 2$
2 $# π D & 1
C D # ρaW & ≈ ρW π D 3g
"2 % #" 4 &% 6
ρW 4 ! WD $
W ≈ Dg C D ~ 0.44 #103 < Re p = < 105 &
ρa 3C D " υ %
ρW 4 g ρW
W ≈ Dg , ρa = 0.0012 , = 840, υ = 0.15cm / s, g = 980cm / s 2
ρa 1.32 3 ρa
cm
kg.m / s 2
γ = 0.072 = 72g / s 2
m
0.0012.DW 2
D W Re p We =
Only estimates 72g / s 2 spherical
0.1mm 157cm/s 10.46 0.004
1mm 499.3cm/s 333 0.42
10mm 1579cm/s 10,527 41.55
deformed
We <1
We >1