0% found this document useful (0 votes)
61 views

Non Viscous Flows: Course On Numerical Methods in Heat Transfer and Fluid Dynamics

This document provides an overview of numerical methods for solving potential flows in heat transfer and fluid dynamics. It discusses two approaches: 1) Using the stream function formulation for steady 2D flows, which relates the stream function to the velocity components and satisfies the mass conservation equation. 2) Using the velocity potential formulation for irrotational flows, which allows for unsteady or 3D flows. The document also covers Stokes' theorem, discretization methods for the stream function and velocity potential, and the blocking-off method for treating solid-fluid interfaces in complex geometries.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
61 views

Non Viscous Flows: Course On Numerical Methods in Heat Transfer and Fluid Dynamics

This document provides an overview of numerical methods for solving potential flows in heat transfer and fluid dynamics. It discusses two approaches: 1) Using the stream function formulation for steady 2D flows, which relates the stream function to the velocity components and satisfies the mass conservation equation. 2) Using the velocity potential formulation for irrotational flows, which allows for unsteady or 3D flows. The document also covers Stokes' theorem, discretization methods for the stream function and velocity potential, and the blocking-off method for treating solid-fluid interfaces in complex geometries.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

Course on Numerical Methods in Heat Transfer and 

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):

𝛻 𝑣⃗ 𝑑𝑆 𝑣⃗ · 𝑑ℓ

Orientation of the surface integral and the curvilinear integral


are related by the right hand rule.

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

For 2D cases (𝑥, 𝑦), positive 𝑧 orientation


means counterclock‐wise integration

• For the internal CV (see notation)


indicated in the figure, circulation is*:
Γ 𝑣 ∆𝑦 𝑣 ∆𝑥 𝑣 ∆𝑦 𝑣 ∆𝑥 0

• Introducing the stream function definition:


𝜌 𝜕𝜓 𝜌 𝜕𝜓 𝜌 𝜕𝜓 𝜌 𝜕𝜓
∆𝑦 ∆𝑥 ∆𝑦 ∆𝑥 0
𝜌 𝜕𝑥 𝜌 𝜕𝑦 𝜌 𝜕𝑥 𝜌 𝜕𝑦
(*) Second‐order approximation of the integrals
Non‐viscous flows 7
Course on Numerical Methods in Heat Transfer and Fluid Dynamics ESEIAAT/CTTC/UPC

Stream function discretization (2/3)
• Finally, approximating the differentials in 𝑥 and 𝑦 directions*:
𝜌 𝜓 𝜓 𝜌 𝜓 𝜓 𝜌 𝜓 𝜓 𝜌 𝜓 𝜓
∆𝑦 ∆𝑥 ∆𝑦 ∆𝑥
𝜌 𝑑 𝜌 𝑑 𝜌 𝑑 𝜌 𝑑
0

• Therefore, the following discretization equation is obtained for


all the internal nodes:
𝑎 𝜓 𝑎 𝜓 𝑎 𝜓 𝑎 𝜓 𝑎 𝜓 𝑏

∆ ∆ ∆ ∆
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.
𝜌 𝑑
𝜌 𝑑 𝑑
𝜌 /𝜌 𝜌 /𝜌

• If node P is solid and node E is fluid: 𝜌 0 and 𝜌 𝜌 ,


and then, 𝜌 /𝜌 𝜌 /𝜌 𝑑 /𝑑 .
• In case of fluid‐fluid, 𝜌 /𝜌 is averaged between fluid nodal
densities. If solid‐solid, 𝜌 / 𝜌 0.
Non‐viscous flows 12
Course on Numerical Methods in Heat Transfer and Fluid Dynamics ESEIAAT/CTTC/UPC

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.

3. Estimate initial values (all nodes): 𝑝∗ , 𝑇 ∗ , 𝜌∗ 𝑝∗ /𝑅𝑇 ∗ (gases)


4. Solve the set of discretized equations in all the domain to get 𝜓 . Solver: Gauss‐
Seidel, line‐by‐line, conjugate‐gradient, multigrid, etc.
5. Obtain the velocities at the faces and the nodal velocity:  𝑣 , 𝑣
, 𝑣 , 𝑣 , 𝑣 𝑣 𝑣
6. Total energy is conserved. Then, ℎ 𝑒 ℎ 𝑒 . Therefore, 𝑇 𝑇
𝑣 𝑣 /2𝑐̅
/
7. Isentropic relation: 𝑝 𝑝 𝑇 /𝑇
8. Density is then calculated: 𝜌 𝑝 /𝑅𝑇 (gases)
9. Is 𝑚𝑎𝑥 𝜙 𝜙∗ 𝛿? (𝜙 𝑇, 𝑝, 𝜌). In case of yes go to 10. If no, update values 
and go to 4
10. Final calculations (Γ, 𝐶 , 𝐶 , 𝐶 , 𝑒𝑡𝑐. , print results and end
13
(*) 𝜓 inside the solid body is assumed to be known or its value should be estimated iteratively.
Course on Numerical Methods in Heat Transfer and Fluid Dynamics ESEIAAT/CTTC/UPC

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

You might also like