Non Viscous Flows: Course On Numerical Methods in Heat Transfer and Fluid Dynamics
Non Viscous Flows: Course On Numerical Methods in Heat Transfer and Fluid Dynamics
Fluid Dynamics
Non‐viscous flows
Potential flows (v1.1d)
Escola Superior d’Enginyeries Industrial, Aeronàutica i Audiovisual de Terrassa (ESEIAAT)
Centre Tecnològic de Transferència de Calor (CTTC)
Universitat Politècnica de Catalunya (UPC)
Course on Numerical Methods in Heat Transfer and Fluid Dynamics ESEIAAT/CTTC/UPC
Contents
• Introduction
• Stream function formulation
• Stoke’s theorem
• Stream function discretization
• Blocking‐off method
• Isentropic potential flow. Algorithm
• Proposal of exercises
• Velocity potential
• Velocity potential discretization
• Velocity potential boundary conditions
• Summary
• Bibliography
Non‐viscous flows 2
Course on Numerical Methods in Heat Transfer and Fluid Dynamics ESEIAAT/CTTC/UPC
Introduction (1/2)
• Main regions of the flow around aerodynamic objects
• boundary layers: next to the solid walls; small thickness; high gradients
of velocities and temperatures, i.e. friction and heat transfer.
• non‐viscous region (rest of the domain): effects of friction and heat
transfer can be neglected.
• Non‐viscous region is determined by the Euler equations:
𝜕𝜌
𝛻 · 𝜌𝑣⃗ 0
𝜕𝑡
𝜕𝜌𝑣⃗
𝛻 · 𝜌𝑣⃗𝑣⃗ 𝛻𝑝
𝜕𝑡
𝜕𝐸
𝛻 · 𝐸𝑣⃗ 𝛻 · 𝑝𝑣⃗
𝜕𝑡
where 𝐸 represents the total energy (internal + kinetic) per unit volume.
Non‐viscous flows 3
Course on Numerical Methods in Heat Transfer and Fluid Dynamics ESEIAAT/CTTC/UPC
Introduction (2/2)
• Full resolution of the Euler equations (and also Navier‐Stokes
equations) will be considered later on in this course
• Here the objective is to solve situations where the non‐viscous
regions can be considered irrotational, i.e. 𝛻 𝑣⃗ 0
• Two approaches will be considered:
• Mathematical formulation is based on the stream function
definition. This approach is valid for steady and 2D flows.
However, the condition of irrotationality is not compulsory
• Mathematical formulation based on the velocity potential
definition. This formulation is only valid for irrotational
flows. However, the flow can be unsteady and/or 3D
Non‐viscous flows 4
Course on Numerical Methods in Heat Transfer and Fluid Dynamics ESEIAAT/CTTC/UPC
Stream function formulation
• Definition of the stream function in steady and 2D flows:
𝜌 𝜕𝜓 𝜌 𝜕𝜓
𝑣 ; 𝑣
𝜌 𝜕𝑦 𝜌 𝜕𝑥
where 𝜌 is the density at reference conditions (𝑝 ,𝑇 )
• It can easily be shown that stream function verifies the mass
conservation equation (steady and 2D): 𝛻 · 𝜌𝑣⃗ 0
• If the vorticity 𝜔 𝛻 𝑣⃗ is known, the stream function
equation can be obtained:
𝜕 𝜌 𝜕𝜓 𝜕 𝜌 𝜕𝜓
𝜔
𝜕𝑥 𝜌 𝜕𝑥 𝜕𝑦 𝜌 𝜕𝑦
• In case of irrotational flow:
𝜕 𝜌 𝜕𝜓 𝜕 𝜌 𝜕𝜓
Non‐viscous flows 0 5
𝜕𝑥 𝜌 𝜕𝑥 𝜕𝑦 𝜌 𝜕𝑦
Course on Numerical Methods in Heat Transfer and Fluid Dynamics ESEIAAT/CTTC/UPC
Stokes’ theorem
• This important theorem relates the surface integral of the rota‐
tional of a vector, e.g. the velocity, with its circulation along the
curve (C) which enclosed the surface (S):
𝛻 𝑣⃗ 𝑑𝑆 𝑣⃗ · 𝑑ℓ
Non‐viscous flows 6
Course on Numerical Methods in Heat Transfer and Fluid Dynamics ESEIAAT/CTTC/UPC
Stream function discretization (1/3)
• Stoke’s theorem assuming irrotational flow: Γ ∮ 𝑣⃗. 𝑑ℓ 0
Stream function discretization (2/3)
• Finally, approximating the differentials in 𝑥 and 𝑦 directions*:
𝜌 𝜓 𝜓 𝜌 𝜓 𝜓 𝜌 𝜓 𝜓 𝜌 𝜓 𝜓
∆𝑦 ∆𝑥 ∆𝑦 ∆𝑥
𝜌 𝑑 𝜌 𝑑 𝜌 𝑑 𝜌 𝑑
0
∆ ∆ ∆ ∆
where: 𝑎 ; 𝑎 ; 𝑎 ; 𝑎 ; 𝑎
𝑎 𝑎 𝑎 𝑎 ; 𝑏 0
(*) Second‐order approximation of the derivatives
8
Non‐viscous flows
Course on Numerical Methods in Heat Transfer and Fluid Dynamics ESEIAAT/CTTC/UPC
Stream function discretization (3/3)
• Boundary conditions:
• Inflow and lateral boundary conditions can be easily
introduced because they are Dirichlet condition: 𝜓 =𝜓 .
• At the outflow region, in the tangential direction to the
surface the velocity is zero (assuming parallel flow). Then,
gradient at normal direction is zero:
𝑣 0 → 𝜕𝜓/𝜕𝑛 0→𝜓 𝜓
where 𝐹 represents the nearest grid point to 𝑃.
9
Non‐viscous flows
Course on Numerical Methods in Heat Transfer and Fluid Dynamics ESEIAAT/CTTC/UPC
Blocking‐off method (1/3)
• When the discretized domain involves regions of fluid and
regions of solids (e.g. a blade surrounded by an air flow), the
blocking‐off technique can be applied allowing an easy
treatment of complex geometries.
• The domain is discretized in such a way that each CV belongs to
the fluid region or to the solid region according to a establish
criteria (e.g. fluid if the centroid is in the fluid region or solid in
case the centroid is in solid region).
For instance, in the following discreti‐
zation of the flow along a cylinder all
the nodes correspond to fluid CVs ex‐
cept the ones indicated by x.
Non‐viscous flows 10
Course on Numerical Methods in Heat Transfer and Fluid Dynamics ESEIAAT/CTTC/UPC
Blocking‐off method (2/3)
• Consider the east face. The circulation is approximated as
previously:
𝜌 𝜕𝜓
Γ 𝑣 ∆𝑦 ∆𝑦
𝜌 𝜕𝑥
• In case of solid‐fluid interface, it is clear the continuity of the 𝜓
function but not its derivative. However:
𝑣 𝑣 𝑣
𝜌 𝜕𝜓 𝜌 𝜕𝜓
𝑣
𝜌 𝜕𝑥 𝜌 𝜕𝑥
𝜌 𝜓 𝜓 𝜌 𝜓 𝜓
𝑣
𝜌 𝑑 𝜌 𝑑
Non‐viscous flows
11
Course on Numerical Methods in Heat Transfer and Fluid Dynamics ESEIAAT/CTTC/UPC
Blocking‐off method (3/3)
• From the previous equation, it is easily obtained:
𝜌 𝜓 𝜓
𝑣
𝜌 𝑑
where 𝜌 /𝜌 is calculated as a harmonic mean of the nodal
values, i.e.
𝜌 𝑑
𝜌 𝑑 𝑑
𝜌 /𝜌 𝜌 /𝜌
Isentropic potential flow. Algorithm (1/2)
1. Input data
2. Previous calculations: mesh generation, identification of solid and fluid CVs,
evaluation of the geometry, initial flow conditions, 𝜓 *, etc.
Isentropic potential flow. Algorithm (2/2)
Additional comments:
• Reference values (𝜌 , 𝑝 , 𝑇 , 𝑣 ) can be selected arbitrarily. E.g. if we have
inlet uniform condition at the inlet, 𝑣 𝑣 ,𝑝 𝑝 ,𝑇 𝑇 , 𝜌 𝜌 .
• If the stream function corresponding to the immersed solid is known, 𝜓 , its
value can be directly introduced to all the internal nodes corresponding to the solid,
i.e. 𝜓 𝜓 .
• In case that this value is not known but a some condition (see next point), 𝜓
should be iteratively introduced until the condition is accomplished.
• Examples of these conditions can be:
• The circulation around the body is known (e.g. Γ 0 or any other value). In this
case, the correct 𝜓 is the one that verifies the imposed value of the
circulation.
• Kutta‐Joukowski condition. In case of objects with sharp corners (e.g. the
trailing edge of airfoils), the velocity must be zero, i.e. 𝑣 0 at the CV
corresponding to the identified point.
• At solid boundaries only the normal velocity must be zero (tangential velocity is not
zero because viscosity is not taken into account) 14
Course on Numerical Methods in Heat Transfer and Fluid Dynamics ESEIAAT/CTTC/UPC
Proposal of exercises
1. Start with a very simple case: flow in a channel.
2. Extend the code to solve a uniform flow along a static
cylinder assuming incompressible regime (𝑀 0.2). The
algorithm in this case is much simpler than the general
one (density is a known constant value). Furthermore,
analytical solution is known (it is a superposition of a
uniform flow and a doublet). Evaluate the circulation, the
drag, the lift and the pressure coefficient.
Encyclopaedia Britannica
2. Generalize the previous case considering compressible
flow (𝑀 0.2).
3. Consider the case of a rotating cylinder. Note: under the
incompressible flow assumption analytical solution exits
(it is a superposition of a uniform flow, a doublet and a
vortex).
4. Solve the flow along an airfoil (see NACA profiles) consi‐
dering different angles of attack.
15
Course on Numerical Methods in Heat Transfer and Fluid Dynamics ESEIAAT/CTTC/UPC
A different approach: velocity potential
• In case of potential flows, a velocity potential can de defined
as:
𝑣⃗ 𝛻𝜙
i.e. 𝑣 𝜕𝜙/𝜕𝑥, 𝑣 𝜕𝜙/𝜕𝑦, 𝑣 𝜕𝜙/𝜕𝑧
• The irrotationality is obviously verified by the above definition,
i.e. 𝛻 𝑣⃗ 𝛻 𝛻𝜙 ≡ 0
• The equation of the velocity potential is then obtained from the
mass conservation equation: 𝛻 · 𝜌𝑣⃗ 0 . For steady 2D
flows:
𝜕 𝜕𝜓 𝜕 𝜕𝜓
𝜌 𝜌 0
𝜕𝑥 𝜕𝑥 𝜕𝑦 𝜕𝑦
Non‐viscous flows 16
Course on Numerical Methods in Heat Transfer and Fluid Dynamics ESEIAAT/CTTC/UPC
Velocity potential discretization (1/3)
• The mass balance equation in an internal CV can be written as
(steady 2D):
𝑚 𝑚 𝑚 𝑚 0
where 𝑚 represents the mass flow rate at the face 𝑓
• Mass flow rates are approximated in terms of 𝜙. E.g. at the east
face,
𝜕𝜙 𝜙 𝜙
𝑚 𝜌𝑣 𝑑𝑆 𝜌 𝑆 𝜌 𝑆
𝜕𝑥 𝑑
where 𝑆 indicates the east surface of the CV, 𝑆 𝑊∆𝑦
being 𝑊 the depth of the volume
Non‐viscous flows 17
Course on Numerical Methods in Heat Transfer and Fluid Dynamics ESEIAAT/CTTC/UPC
Velocity potential discretization (2/3)
• The discretized equation is then obtained substituting the mass
fluxes into the mass balance equation:
𝑎 𝜙 𝑎 𝜙 𝑎 𝜙 𝑎 𝜙 𝑎 𝜙 𝑏
where,
𝜌 𝑆 𝜌 𝑆 𝜌 𝑆 𝜌𝑆
𝑎 ,𝑎 ,𝑎 ,𝑎 ,𝑎
𝑑 𝑑 𝑑 𝑑
𝑎 𝑎 𝑎 𝑎 ; 𝑏 0
• In case of solid‐fluid CVs, the blocking‐off analysis is similar to
the one developed for the stream function. E.g. for the east
face,
𝜕𝜙 𝜕𝜙
𝑚 𝜌 𝑆 𝜌 𝑆
𝜕𝑥 𝜕𝑥
Non‐viscous flows 18
Course on Numerical Methods in Heat Transfer and Fluid Dynamics ESEIAAT/CTTC/UPC
Velocity potential discretization (3/3)
• Approximating the densities and derivatives:
𝜙 𝜙 𝜙 𝜙
𝑚 𝜌 𝑆𝑒 𝜌 𝑆𝑒
𝑑 𝑑
• From these equations:
𝜙 𝜙
𝑚 𝜌 𝑆𝑒
𝑑
where,
𝑑
𝜌
𝑑 𝑑
𝜌 𝜌
• For the CVs containing fluid, 𝜌 is the harmonic mean of nodal
densities. For CVs containing solids, 𝜌 0 and, therefore,
𝜌 0 and 𝑚 0.
Non‐viscous flows 19
Course on Numerical Methods in Heat Transfer and Fluid Dynamics ESEIAAT/CTTC/UPC
Velocity potential. Boundary conditions
• Unlike stream function formulation, with the velocity potential
most of the boundary conditions are of the Neumann type.
• Inlet conditions with known velocity profiles allow to determine
the velocity potential.
• Solid boundary conditions needs to prescribe a zero mass flow
through the boundary. Then,
𝜕𝜙/𝜕𝑛 0
where 𝑛 represents the normal direction to the boundary
• Outflow regions under parallel flow, 𝜕𝜙/𝜕𝑠 0 (where 𝑠
represents the tangential direction to the boundary).
Non‐viscous flows 20
Course on Numerical Methods in Heat Transfer and Fluid Dynamics ESEIAAT/CTTC/UPC
Summary
• Compressible potential flows are solved using stream function or
velocity potential formulation.
• Stream function allows to consider rotational flows but is limited
to steady 2D cases. Velocity potential allows to consider unsteady
and 3D flows but is restricted to irrotational flows.
• Numerical methodology is based on second‐order finite volume
methods.
• Complex geometries are approximated using the blocking‐off
technique and harmonic mean approach for the diffusion
coefficient (𝜌 /𝜌 or 𝜌 depending on the formulation, i.e. stream
function or velocity potential respectively).
• Before trying to solve airfoil geometries, the potential flow along a
cylinder is a good exercise with analytical solution when 𝑀 0.2.
Compressible Flow I 21
Course on Numerical Methods in Heat Transfer and Fluid Dynamics ESEIAAT/CTTC/UPC
Bibliography
• Analytical solutions of the incompressible potential flow along static or
rotating cylinders can be found in most of the basic books of fluid
mechanics. E.g. I.H.Shames, Mechanics of Fluids, McGrawHill, 1982.
• C.V. Patankar, Numerical Heat Transfer and Fluid Flow, Hemisphere
Publishing Corporation, Washington, 1980).
• Ferziger, J. H.; Peric, M. Computational methods for fluid dynamics. 3rd
rev. ed. Berlin, Springer, 2002.
• A.H. Shapiro, Compressible Fluid Flow, The Ronald Press Comp., New York,
1953.
Compressible Flow I 22