Initial and Boundary Conditions for Viscous-Flow Problems
Zhaoyuan Wang and Fred Stern
IIHR—Hydroscience & Engineering C. Maxwell Stanley Hydraulics Laboratory
The University of Iowa
ME6260 (058:260) Viscous Flow
http://user.engineering.uiowa.edu/~me_260/Viscous_flow_main.htm
Feb. 1, 2021
2
Why are ICs and BCs needed?
• Solutions to ODEs are usually not unique (integration constants exist), which is also a problem for PDE’s.
• PDE’s are usually specified through a set of ICs and BCs.
• A BC expresses the behavior of a function on the
boundary of the domain. An IC specifies the value of the function in time direction, at time t = 0.0.
• The GDEs to be discussed next constitute an IBVP for a
system of 2nd order nonlinear PDE, which require IC and
BC for their solutions, depending on physical problem and
appropriate approximations.
Initial Conditions
• Initial conditions (ICS, steady/unsteady flows)
o ICs should not affect final results and only affect convergence path, i.e. number of
iterations (steady) or time steps (unsteady) need to reach converged solutions.
o More reasonable guess can speed up the convergence
o For complicated unsteady flow problems, CFD codes are usually run in the steady
mode for a few iterations for getting a better
initial conditions
4
Boundary Conditions
Types of BCs: can be defined/categorized mathematically, physically, and numerically.
• Mathematical definitions
• For flow variables
o Kinematic BCs: motion without regard for the cause o Dynamic BCs: the causes of motion
Name Form
Dirichlet 𝜙 = 𝑓
Neumann 𝜕𝜙
𝜕𝑛 = 𝑓 Robin
𝐶0𝜙 + 𝐶1𝜕𝜙
𝜕𝑛 = 𝑓
Mixed 𝜙 = 𝑓 , 𝐶0𝜙 + 𝐶1𝜕𝜙
𝜕𝑛 = 𝑓
Cauchy 𝜙 = 𝑓 and 𝐶0 𝜕𝜙
𝜕𝑛 = 𝑔
Boundary Conditions
• Physical domain boundaries:
o Solid Surface
Fixed, moving wall, Deforming wall, FSI
Permeable Interface, Porous Surface o Free Surface, Wave Boundary
o Two-Phase Interface Internal Jump conditions o Inlet/exit/outer
o Fairfield/Open
5
-52 44
0 x/H
z/H Inlet
Non-slip Wall Slip Wall
Jump Conditions Outlet
6
Boundary Conditions
• For grid and numerical treatment:
o Symmetric BC o Periodic BC
o Numerical beach, absorbing BC
o Multiblock/Overset overlapping grid BC o Convection BC
o Pole BC (singularity)
o Global mass conservation enforcing BC
Overset and patched multiblock grids for airfoil.
Symmetric BC Pole BC
Examples of Boundary conditions
1. Solid Surface
Fixed, moving wall
Permeable interface, porous surface
Deforming wall, FSI
2. Single phase flows: Free surface BCs 3. Multiphase flows: Two-phase interface
jump conditions 4. Inlet/exit/outer
Free surface flow: droplet
Two-phase interfacial flow: bubble Pipe flow with no-slip (A) and slip (B) boundary conditions. (Berg et al., 2021).
8
Examples of Boundary conditions
1. Solid Surface
No-slip BCs: No-slip BC widely used for most macroscopic flows without loss of accuracy
• ℓ = mean free path of a moving molecular
particle << fluid motion; therefore, macroscopic view is “no slip” condition, i.e. no relative motion or temperature difference between liquid and solid.
• Exception for gas and contact line problem
liquid solid
V V T
liquid T
solidSmooth wall:
Specular reflection
Conservation of tangential momentum
uw=0=fluid velocity at wall
Rough wall:
Diffuse reflection. Lack of reflected tangential momentum balanced by uw
Examples of Boundary conditions
Slip-wall BCs:
w
w
dy
l du
u
10
Examples of Boundary conditions
Contact line problem:
Contact angles for a droplet
• No-slip BCs used for most macroscopic flows without loss of accuracy but pose a problem in viscous flows at contact lines.
• For small scale flows, slip BC with a finite slip length is usually used: 𝑢0 = 𝑏 𝜕𝑢
𝜕𝑦 . The contact line movement is also dependent to the contact angle, but the mechanism is not fully understood.
• For large scale flows with high Reynolds numbers, very small grid spacing is usually used near the wall in order to resolve the boundary layer.
• In CFDShip-Iowa, a blanking distance (𝑏) is used for the interface functions, which is chosen based on the 𝑦+. The recommended value is 𝑦+ >30 (outside of the turbulence buffer region ), and 𝑦+ = 100 is usually used for most simulations of ship flows according to the numerical experiments.
Wave blanking in CFDShip-Iowa
Examples of Boundary conditions
Permeable interface, porous surface:
Suction or Injection 𝑢 = 0, 𝑛𝑜 𝑠𝑙𝑖𝑝
𝑣 = 𝑣
𝑠or 𝑣 = 𝑣
𝑖, 𝑓𝑙𝑜𝑤 𝑡ℎ𝑟𝑜𝑢𝑔ℎ 𝑡ℎ𝑒 𝑤𝑎𝑙𝑙
𝑇
𝑓𝑙𝑢𝑖𝑑= 𝑇
𝑤𝑎𝑙𝑙, no temperature jump
𝑞
𝑤= ℎ𝑇
𝑦|
𝑤= 𝜌
𝑖𝑣
𝑖𝑐
𝑝(𝑇
𝑤− 𝑇
𝑖), energy at the
wall
12
Examples of Boundary conditions
Fluid Structure Interaction (FSI) BCs:
Kinematic continuity between the fluid and the structure is ensured by the non-slip wall condition:
𝑢𝑤 = 𝜕𝑥
𝜕𝑡, 𝑣𝑤 =𝜕𝑦
𝜕𝑡 , 𝑤𝑤 = 𝜕𝑧
𝜕𝑡
where 𝒖𝑤 = {𝑢𝑤, 𝑣𝑤, 𝑤𝑤}is the velocity of the fluid particle and 𝒙 = {𝑥, 𝑦, 𝑧}are the coordinates of the solid wall.
The continuity of the momentum is ensured by the continuity of the stress across the fluid-structure interface:
𝜏𝑖𝑗∙ 𝑛𝑖|𝑤 = 𝜏𝑖𝑗 ∙ 𝑛𝑖|𝑠 The energy conservation, considering the first law of thermodynamics
𝛿𝑄 − 𝛿𝑊 = 𝑑𝐸 The energy equation for adiabatic CV,
−𝛿𝑊
𝑑𝑡 =𝑑𝐸
𝑑𝑡 = 𝜕
𝜕𝑡𝑉 𝑡 𝑒𝜌 𝑑𝑉 + 𝑆 𝑡 𝑒𝜌 𝒖 ∙ ො𝑛 𝑑𝑆
𝑒 = 𝑘𝑒 + 𝑝𝑒𝜀 + 𝑝𝑒𝑔. 𝑘𝑒 , 𝑝𝑒𝜀 and 𝑝𝑒𝑔 are the kinetic and elastic and gravitational potential energies.
The work rate flows are exchanged between the water CV and the structure CV.
ሶ𝑊 = ሶ𝑊𝑠ℎ𝑎𝑓𝑡
𝑝𝑢𝑚𝑝/𝑡𝑢𝑟𝑏𝑖𝑛𝑒
+ 𝑊ดሶ𝑝
𝑝𝑟𝑒𝑠𝑠𝑢𝑟𝑒
+ 𝑊ดሶ𝜈
𝑣𝑖𝑠𝑐𝑜𝑢𝑠
ሶ𝑊𝑝 and ሶ𝑊𝑣 are the pressure and viscous work rates done by the CV.
Within the fluid CV, 𝑊ሶ𝑠ℎ𝑎𝑓𝑡 = 0. Within the structure CV, 𝑊ሶ𝑠ℎ𝑎𝑓𝑡 is the work rate done by the plate’s mount on the system and is hereafter named 𝑊ሶ𝑀.
The pressure and viscous work done on solid = pressure and viscous work done on fluid and vice versa, which are equivalent to separate dE/dt for solid which includes 𝑒 = 𝑘𝑒 + 𝑝𝑒𝜀 + 𝑝𝑒𝑔 and fluid which only includes 𝑒 = 𝑘𝑒 + 𝑝𝑒𝑔. In most cases net outflux of energy from the CV is zero.
Thus for the fluid 𝑑𝐸
𝑑𝑡 = 𝜕
𝜕𝑡𝑉
𝑤𝜌𝑤 𝑔𝑧 + 𝒖𝑤 2
2 𝑑𝑉𝑤 And for the solid 𝑑𝐸
𝑑𝑡 = 𝜕
𝜕𝑡𝑉 𝑡 𝑒𝜌 𝑑𝑉
Examples of Boundary conditions
Single flow free surface BCs:
•
Free surface problems since interface is unknown and part of the solution, but effect gas on liquid idealized.•
Assume the upper fluid (air) is an “atmosphere” that merely exerts pressure on the lower fluid (water), with shear and heat conduction negligible.•
Kinematic FSBC: free surface is stream surface•
Dynamic FSBC: stress continuous across free surface (similar for mass and heat flux)Approximations:
𝑝 ≈ 𝑝𝑎 = 0, neglect air viscosity and surface tension 𝜉𝑥~𝜉𝑥~0, small slope
𝑤𝑥~𝑤𝑦~𝑤𝑧 = 0, 𝜕𝑢
𝜕𝑧 = 𝜕𝑣
𝜕𝑧 = 0 small normal velocity gradient
14
Examples of Boundary conditions
Two-phase interface jump conditions:
The velocity fields in fluids 1 and 2 are continuous across the interface if there is no phase change and mass transfer across the interface,
𝐮𝟏 = 𝐮𝟐 (1)
where 𝐮 is the velocity vector. The interface velocity 𝑉𝐼 is the normal velocity and is the same on both sides of the interface:
𝑉𝐼 = 𝐮𝟏 ∙ 𝐧 = 𝐮𝟐 ∙ 𝐧 (kinematic condition) (2) where n is the unit normal vector.
The continuity of the tangential velocities is analogous to the no-slip boundary condition on a wall,
𝐮𝟏 − 𝐮𝟏 ∙ 𝐧 𝐧 = 𝐮𝟐 − 𝐮𝟐 ∙ 𝐧 𝐧 (continuity of the tangential velocity) (3)
n Fluid 1
Fluid 2
σ u1
u2 T2 T1
Examples of Boundary conditions
Stress conditions:
The stress tensor is defined in terms of the local fluid pressure and velocity field as
𝐓 = −𝑝𝐈 + 𝛕 = −𝑝𝐈 + 𝜇[∇𝐮 + ∇𝐮 𝑇] (4)
where𝐈 is the unit tensor, 𝛕 is viscous stress tensor, 𝑝 is pressure, and 𝜇 is the dynamic viscosity. The stress vector, the force (per unit area) exerted by the fluid on the interface, is defined as,
𝐭 𝐧 = 𝐧 ∙ 𝐓 (5)
Note that the tress vector in the above equation generally includes both the normal and tangential stress components.
The exact interface stress condition is given in the stress balance equation below:
𝐧 ∙ 𝐓𝟏 − 𝐧 ∙ 𝐓𝟐 = σ𝐧 ∇ ∙ 𝐧 − ∇σ (6)
where ∇σ is tangential stress associated with gradients of the surface tension. The divergence of the unit normal is related to the mean curvature:
𝛁 ∙ 𝐧 = 𝜅 (7)
The stress jump condition can be rewritten as
𝐧 ∙ (𝐓𝟏 − 𝐓𝟐) = σ𝜅𝐧 − ∇σ (8)
16
Examples of Boundary conditions
Note that both normal and tangential stresses must be balanced at the interface. The condition can be written separately as the “normal stress balance” and “tangential stress balance”.
Normal stress balance
Projection of Eq. (8) along the unit normal n obtains,
𝐧 ∙ 𝐓𝟏 − 𝐓𝟐 ∙ 𝐧 = σ𝜅𝐧 ∙ 𝐧 = σ𝜅 (9)
Tangential stress balance
Taking dot product of Eq. (8) with any unit tangential vector t yields the tangential stress balance,
𝐧 ∙ (𝐓𝟏 − 𝐓𝟐) ∙ 𝐭 = ∇σ ∙ 𝐭 (10a)
The surface tension σ depends on temperature and composition of the interface, which can be treated as a constant. The gradient of surface tension will vanish and the tangential stress is continuous across the interface.
𝐧 ∙ (𝐓𝟏 − 𝐓𝟐) ∙ 𝐭 = 0 (10b)
Examples of Boundary conditions
Numerical approximation of the jump conditions The viscous stress tensor 𝛕 can be written as,
𝛕 = 𝜇 ∇𝐮 + ∇𝐮 𝑇 = 𝜇
𝛁𝑢
∇𝑣
∇𝑤
+ 𝜇
∇𝑢
∇𝑣
∇𝑤
𝑇
(11)
Using the jump notation 𝑥 = 𝑥1 − 𝑥2, and 𝐭𝐼 and 𝐭𝐼𝐼 the orthogonal unit tangential vectors, the stress jump conditions Eqs. (9) and (10b) can be rewritten as three separate jump conditions,
[𝑝 − 2𝜇(∇𝑢 ∙ 𝐧, ∇𝑣 ∙ 𝐧, ∇𝑤 ∙ 𝐧) ∙ 𝐧] = 𝜎𝜅 (12) 𝜇 ∇𝑢 ∙ 𝐧, ∇𝑣 ∙ 𝐧, ∇𝑤 ∙ 𝐧 ∙ 𝐭𝐼 + 𝜇 ∇𝑢 ∙ 𝐭𝐼, ∇𝑣 ∙ 𝐭𝐼, ∇𝑤 ∙ 𝐭𝐼 ∙ 𝐧 = 0 (13) 𝜇 ∇𝑢 ∙ 𝐧, ∇𝑣 ∙ 𝐧, ∇𝑤 ∙ 𝐧 ∙ 𝐭𝐼𝐼 + 𝜇 ∇𝑢 ∙ 𝐭𝐼𝐼, ∇𝑣 ∙ 𝐭𝐼𝐼, ∇𝑤 ∙ 𝐭𝐼𝐼 ∙ 𝐧 = 0 (14) The velocity is continuous and the tangential velocity derivatives are also continuous,
[∇𝐮 ∙ 𝐭𝐼𝑇] = 0 or ∇𝑢 ∙ 𝐭𝐼 = ∇𝑣 ∙ 𝐭𝐼 = ∇𝑤 ∙ 𝐭𝐼 = 0 (15) [∇𝐮 ∙ 𝐭𝐼𝐼𝑇] = 0 or ∇𝑢 ∙ 𝐭𝐼𝐼 = ∇𝑣 ∙ 𝐭𝐼𝐼 = ∇𝑤 ∙ 𝐭𝐼𝐼 = 0 (16)
18
Examples of Boundary conditions
Numerical approximation of the jump conditions
The normal stress condition can be written as,
[𝑝] − 2[𝜇](∇𝑢 ∙ 𝐧, ∇𝑣 ∙ 𝐧, ∇𝑤 ∙ 𝐧) ∙ 𝐧 = 𝜎𝜅 (17) The tangential jump conditions
[𝜇∇𝐮] = [𝜇](∇𝐮) 𝟎 𝐭𝐼 𝐭𝐼𝐼
𝑇 𝟎
𝐭𝐼 𝐭𝐼𝐼
+ 𝜇 𝐧𝑻𝐧(∇𝐮)𝐧𝑻𝐧 − [𝜇]
𝟎 𝐭𝐼 𝐭𝐼𝐼
𝑇 𝟎
𝐭𝐼 𝐭𝐼𝐼
∇𝐮 𝑇𝐧𝑻𝐧 (18)
Note that the right-hand side of the above equation only involves velocity derivatives that are continuous across the interface. If 𝜇 = 0, then ∇𝐮 = 𝟎.
If the viscosity is smoothed to be continuous across the interface, the normal jump condition
[𝑝] = σ𝜅 (19)
The tangential viscous stress jump condition,
∇𝐮 ∙ 𝐧𝑇 ∙ 𝐭𝐼] + [ ∇𝐮 ∙ 𝐭𝐼𝑇 ∙ 𝐧 = 0 (20) According to Eq. (18), with a constant viscosity, all the velocity derivatives will be continuous across the interface which implies that both jump terms on the left hand side of the above equation are zero.
Examples of Boundary conditions
Vorticity condition across the interface
The vorticity in the normal direction is written as,
𝐧 ∙ 𝛚 = 𝐧 ∙ ∇ × 𝐮 = (𝐭𝐼 × 𝐭𝐼𝐼) ∙ ∇ × 𝐮 (21) Using the identity 𝐚 × 𝐛 ∙ 𝐜 × 𝐝 = 𝐚 ∙ 𝐜 𝐛 ∙ 𝐝 − 𝐚 ∙ 𝐝 𝐛 ∙ 𝐜 , Eq. (21) can be rewritten as,
𝐧 ∙ 𝛚 = 𝐭𝐼 ∙ ∇ 𝐭𝐼𝐼 ∙ 𝐮 − 𝐭𝐼 ∙ 𝐮 𝐭𝐼𝐼 ∙ ∇ (22) which is continuous across the interface since the right hand side of the above equation only involves tangential derivatives of the velocity.
The vorticity in the tangential directions,
𝐭𝐼 ∙ 𝛚 = 𝐭𝐼 ∙ ∇ × 𝐮 = 𝐭𝐼𝐼 × 𝐧 ∙ ∇ × 𝐮 = 𝐭𝐼𝐼 ∙ ∇ 𝐧 ∙ 𝐮 − 𝐭𝐼𝐼 ∙ 𝐮 𝐧 ∙ ∇ (23) 𝐭𝐼𝐼 ∙ 𝛚 = 𝐭𝐼𝐼 ∙ ∇ × 𝐮 = 𝐧 × 𝐭𝐼 ∙ ∇ × 𝐮 = 𝐧 ∙ ∇ 𝐭𝐼 ∙ 𝐮 − 𝐧 ∙ 𝐮 𝐭𝐼 ∙ ∇ (24) The tangential vorticities are generally not continuous across the interface since the normal derivatives, 𝐭𝐼𝐼 ∙ 𝐮 𝐧 ∙ ∇ and 𝐧 ∙ ∇ 𝐭𝐼 ∙ 𝐮 , are involved in the above equations, respectively.
However, as shown in Eq. (20), all the velocity derivatives will be continuous if the viscosity jump 𝜇 = 0, then tangential vorticities will also be continuous.
20
Examples of Boundary conditions
For two immiscible fluids with different density and viscosity:
Velocity, velocity gradient, viscosity, and shear stress distribution
Velocity, Uz, viscosity, and Taw profile for a layered two fluid flow.
Examples of Boundary conditions
Inlet/outlet/exit/outer/far-field BCs:
•
Inlet: V, p, T, specified, e.g., constant values are used, 𝑉 = 𝑉𝑖𝑛, 𝑝 = 0, 𝑇 = 𝑇𝑖𝑛,0•
Outer or far-field: V, p, T, specified similarly as inlet•
Exit: depends on the problems, but
often use Uxx = 0 and 𝜕𝑝𝜕𝑛 = 0.
For external flow, zero stream wise diffusion
For fully developed internal flow and wave problem, periodic BCs can be used
For unsteady internal flow, global mass conservation enforcement may be needed: 𝑈𝑜𝑢𝑡 = 𝑈𝑜𝑢𝑡 𝑄𝑖𝑛𝑄𝑜𝑢𝑡, where𝑄𝑖𝑛 and 𝑄𝑜𝑢𝑡 is the total inlet and outlet and flux, respectively.
Periodic Periodic
22
BCs in CFDShip-Iowa
BCs in CFDShip-Iowa
24
Simulation Examples using CFDShip-Iowa
Wave breaking in bump flow simulation: 2.2 billion grid points
Movie Plunging wave breaking:
• Inlet:
𝑢 = 𝑐𝑜𝑛𝑠𝑡𝑎𝑛𝑡, 𝑣 = 𝑤 = 0
• Exit:
𝜕𝑢
𝜕𝑛
=
𝜕𝑣𝜕𝑛
=
𝜕𝑤𝜕𝑛
= 0
• For pressure,
𝜕𝑝𝜕𝑛
= 0 for all the boundaries.
• Mass balance needed at
the outlet.
Simulation Examples using CFDShip-Iowa
Wedge flow simulation, 1 billion grid points
Movie Wedge flow:
• The 𝑗
𝑚𝑎𝑥boundary is split into two parts: inlet and exit.
• Inlet:
𝑢 = 𝑐𝑜𝑛𝑠𝑡𝑎𝑛𝑡, 𝑣 = 𝑤 = 0
• Exit:
𝜕𝑢
𝜕𝑛
=
𝜕𝑣𝜕𝑛
=
𝜕𝑤𝜕𝑛
= 0
• Slip BCs at both top and bottom.
• For pressure,
𝜕𝑝𝜕𝑛
= 0 for all the boundaries.
• Mass balance needed at the outlet.
Inlet Exit
Symmetric
No-Slip
26
Simulation Examples using CFDShip-Iowa
Stokes wave breaking: 3.2-12 Billion Grid Points
Movie Stokes wave breaking
Slip wall BCs at top and bottom
Periodic BCs at inlet, exit, and two sides.
Simulation Examples using CFDShip-Iowa
NSWC15E Planing Hull
Movies: bottom view side view
• Water is moving, ship-fixed system
• Inlet (10):
𝑢 = 𝑢
𝑖𝑛𝑓𝑙𝑜𝑤, 𝑣 = 𝑤 = 0
• Exit(11):
𝜕2𝑈𝜕𝑛2
= 0,
𝜕𝑝𝜕𝑛
= 0
28