0% found this document useful (0 votes)
214 views10 pages

Assignment CFD

The document describes three final assignment options for a computational fluid dynamics course: 1) Solving the 2D inviscid Burgers' equation using various numerical schemes and analyzing the errors. 2) Integrating the Euler equations to model Sod's shock tube problem using MUSCL and Roe's method. 3) Modeling double Mach reflection, a challenging problem involving shock reflection, using the 2D Euler equations. This is a more difficult "* assignment". Students must complete a report for their chosen assignment, demonstrate understanding during an oral exam, and deadline is December 15, 2020.

Uploaded by

Walter Marinho
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)
214 views10 pages

Assignment CFD

The document describes three final assignment options for a computational fluid dynamics course: 1) Solving the 2D inviscid Burgers' equation using various numerical schemes and analyzing the errors. 2) Integrating the Euler equations to model Sod's shock tube problem using MUSCL and Roe's method. 3) Modeling double Mach reflection, a challenging problem involving shock reflection, using the 2D Euler equations. This is a more difficult "* assignment". Students must complete a report for their chosen assignment, demonstrate understanding during an oral exam, and deadline is December 15, 2020.

Uploaded by

Walter Marinho
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/ 10

Computational Fluid Dynamics

Final Assignments and Grading


C.H. Venner & E.T.A. van der Weide

191154731 June 2020

The grading procecedure should be completed by december 15 2020.

1 Requirements
To receive credits for the CFD course all exercises given during the lectures should be completed
as well as one of the final assignments specified below. There are a few assignments related to
the hyperbolic part of the course as well as a few related to the elliptic part. Not all assignments
are of the same level. There are 2 assignments with a higher level. These are for those who
really wish to challenge themselves, and indicated by a *. Correctly solving one of these will
lead to a higher score.

The assignment can be made individually or in collaboration with a fellow student. A short
report should be written and handed in. The report should be well structured starting with
an introduction describing the problem, a description of the discretization chosen, the expected
accuracy, the numerical solution method used, demonstration of performance, and relevant
supporting theoretical results. Numerical results should be presented showing convergence of
the numerical solution process (if relevant), and convergence of the solution with decreasing
mesh size (and time step), and the influence of problem parameters. The observed performance
should be explained.

When the assignment is completed the report can be handed in. The exercise reports handed
in as well as the report of the final assignment will be checked by the teachers. When found
acceptable an appointment can be made for the oral grading exam. In this exam we evaluate
your knowledge of the material you presented in the exercise reports, as well as your knowledge
of the general theory discussed in the course material and the course lectures.

To pass the exam it is paramount that you understand your own work and at the exam you
have to show understanding of the theory that you used. This implies that you have to prepare
for the exam! Just having handed in correct exercises is not enough to pass!

For further information about the assignments: C.H. Venner Horst-N 246, c.h.venner@utwente.nl
and E.T.A. van der Weide Horst-N 225, e.t.a.vanderweide@utwente.nl.

1
2 Hyperbolic Problems
2.1 2D Inviscid Burgers’ Equation
Consider the following 2D extension of the inviscid Burgers’ equation in conservative form
∂u 1 ∂u2 ∂u
+ + = 0. (1)
∂t 2 ∂x ∂y
Two steady solutions of this equation are sought on the unit square, 0 ≤ x ≤ 1, 0 ≤ y ≤ 1. The
first solution is obtained using the boundary conditions
u(x, 0) = 1 − 43 x

u(0, y) = 1 (2)

u(1, y) = − 13
while for the second solution the following boundary conditions are used
h 3 i
u(x, 0) = 12 12 − 3 x − 21 + 4 x − 12


3 (3)
u(0, y) = 4

u(1, y) = − 14
Use the following combinations for the spatial discretization:
- Accuracy: First order upwind scheme and second order upwind scheme in combination
with the MC and Van Albada limiter. When the MUSCL reconstruction cannot be used
for the left or right state, use a second order central approximation.

- Riemann solver: Exact solution (Godunov) and Roe’s approximate solution.


Choose appropriate spatial resolutions to carry out a grid refinement study. The steady state
solutions can be obtained by integrating the governing equations in time using your favorite time
integration scheme until the L2 norm of the spatial residual is machine zero. Compare for y ≤ 12 ,
which is in the smooth region, the numerical solutions with the exact solutions and determine
the L2 norm of the errors. Explain the possible difference between the order of accuries found
for the two solutions.

Recommended reading
Charles Hirsch,
Numerical Computation of Internal and External Flows, Volume 2, page 467.
(When not available in the library copies of relevant pages can be made from E.T.A. van
der Weide or C.H. Venner)

2.2 Sod’s shock tube problem


Consider the 1D unsteady Euler equations in conservative form
∂U ∂F
+ = 0, (4)
∂t ∂x

2
where the state vector U and the flux vector F are given by
   
ρ ρu
U =  ρu  , F =  ρu2 + p  . (5)
ρE (ρE + p)u

The system is closed by assuming a calorically perfect gas, which relates the pressure to the
density, velocity and energy according to
 
1 2
p = (γ − 1) ρE − ρu . (6)
2
Here γ is the specific heat ratio, which is 1.4 for air.

Sod’s shock tube problem is a Riemann problem with the following initial conditions:

ρL = 1.0 ρR = 0.125
pL = 1.0 pR = 0.1 (7)
uL = 0.0 uR = 0.0

At t = 0 the interface between the two states is removed and the flow develops.
Integrate the Euler equations in time until t = 0.15 using the classical fourth order Runge-Kutta
method. Use the second order MUSCL scheme in combination with the MC limiter and Roe’s
approximate Riemann solver for the spatial discretization. The spatial domain can be taken as
− 12 ≤ x ≤ 32 . Use appropriate values for both the spatial and temporal resolution and carry out
a grid refinement study.

Recommended reading:

Charles Hirsch,
Numerical Computation of Internal and External Flows, Volume 2, page 462 - 469.
(When not available in the library copies of relevant pages can be made from E.T.A. van
der Weide or C.H. Venner).

Gary Sod,
A Survey of Several Finite Difference Methods for Systems of Nonlinear Hyperbolic Con-
servation Laws,
Journal of Computational Physics, Vol. 27, Iss. 1, pp. 1-31, 1978
Available from http://www.sciencedirect.com

2.3 Double Mach reflection (* assignment)


This problem involves a Mach 10 moving shock in air, which makes an initial angle of 60o with
a reflecting wall. The reflecting wall lies along the bottom of the domain, beginning at x = 1/6.
The shock makes a 60o angle with the x-axis and extends to the top of the domain at y = 1.
The short region from x = 0 to x = 1/6 along the bottom boundary at y = 0 is always assigned
values for the initial post-shock flow. This boundary condition forces the reflected shock to be
attached to the reflecting wall, which is not the case in reality. However, this assumption does
not influence the complicated shock reflection that happens downstream. Also, by tilting the
incident shock rather than the reflecting wall the complicated issue of how to properly model a

3
boundary oblique to the mesh is avoided. The non-dimensional conditions in front of the moving
shock wave are
ρ = γ, u = 0, v = 0, p = 1 (8)
and the conditions after the moving shock are

ρ = 8.0, u = 4.125 3, v = −4.125, p = 116.5 (9)
20
Here γ = 1.4 is the specific heat ratio. The shock itself moves with a velocity of √ 3
to the
right. These conditions exactly obey the Rankine Hugoniot shock relations for Mach = 10 (in
the frame of the moving shock) for γ = 1.4.

The governing equations are the 2D unsteady Euler equations in conservative form
∂U ∂F ∂G
+ + = 0, (10)
∂t ∂x ∂y
where the state vector U and the flux vectors F and G are given by
     
ρ ρu ρv
 ρu   ρu2 + p   ρuv 
U =  ρv  , F = 
  , G = 
 ρv 2 + p
. (11)
ρuv  
ρE (ρE + p)u (ρE + p)v

The system is closed by assuming a calorically perfect gas, which relates the pressure to the
density, velocity and energy according to
 
1 2 2

p = (γ − 1) ρE − ρ u + v . (12)
2
Integrate the 2D Euler equations in time from t = 0.0 to t = 0.2 using the 3-stage Strongly
Stability Preserving Runge-Kutta method (SSP-RK3). Use the second order MUSCL scheme
in combination with the MC limiter and Roe’s approximate Riemann solver   for the spatial
discretization. Apply the limiter to the variables (p, u, v, s), where s = ln ρpγ . This set of
variables mimics the characteristic variables as closely as possible, while maintaining stability
for the very strong shock. The spatial domain can be taken as 0 ≤ x ≤ 4, 0 ≤ y ≤ 1. Use a
uniform grid resolution for simplicity and use an appropriate grid spacing. It is recommended,
but not required, to use the cell centered variant of the Finite Volume method, because this
is easier for implementing the inviscid wall boundary conditions. Note that very fine grids are
necessary and it is highly recommended to use C, C++ or Fortran as programming language.
Matlab and Python are too slow when a sufficient resolution is used.

An impression of the flow field at t = 0.2 is given in the figures (1) and (2). For a movie, see
e.g. https://www.youtube.com/watch?v=xecIZylotSE

Recommended reading:
Charles Hirsch,
Numerical Computation of Internal and External Flows, Volume 2, page 462 - 469.
(When not available in the library copies of relevant pages can be made from E.T.A. van
der Weide or C.H. Venner).

4
Figure 1: Density isolines of the full flow
field at t = 0.2.
Figure 2: Density isolines in the interaction
region at t = 0.2.

Paul Woodward and Philip Colella,


The Numerical Simulation of Two-Dimensional Fluid Flow with Strong Shocks,
Journal of Computational Physics, Vol. 54, pp. 115-173, 1984
Available from http://www.sciencedirect.com or ask E.T.A. van der Weide

Sigal Gottlieb, Chi-Wang Shu and Eitan Tadmor,


Strong Stability-Preserving High-Order Time Discretization Methods,
SIAM Review, Vol. 43, Issue 1, pp. 89-112, 2001
Ask E.T.A. van der Weide for a copy.

3 Elliptic Problems
3.1 Full Multigrid Solver for the 2D Poisson problem
The objective is to built a numerical solver for the 2D Poisson problem using Multigrid Tech-
niques. The problem is defined by:

∂2u ∂2u
+ 2 = f (x, y) (13)
∂x2 ∂y

on the domain (x, y) ∈ [0, 1] × [0, 1]. The boundary condition is u = 0 on the boundary of the
domain. For educational purposes the right hand side f (x, y) should be chosen such that an
analytical solution exists. For example using

f (x, y) = −8π 2 sin(2πx) sin(2πy) (14)

gives the analytic solution u(x, y) = sin(2πx) sin(2πy) which satisfies the boundary condition.
This analytic solution can be used to illustrate convergence with decreasing mesh size.

• The first step is formed by programming a Gauss-Seidel relaxation for the problem. This
has already been done as one of the exercises giving during the course.

5
• The next steps involve making a working course grid correction cycle that indeed gives the
convergence rates predicted by the local mode analysis, first for the case of two gridlevels,
and then for the case of multiple levels. Demonstrate a grid independent convergence rate.

• Implement the Full Approximation scheme as if the problem were non-linear and demon-
strate that its performance is exactly the same as for the linear case

• Implement the FMG algorithm and use the approximate error norm (see notes, chapter 3)
that the FMG process with one or two V (2, 1) cycles per refinement is sufficient to yield
a solution with an error that is small compared to the discretization error.

• Advanced, optional Investigate the use of τ extrapolation. This is a very trivial modification
to the MG algorithm that enables increasing the order of accuracy from second to fourth
order. Details can be found in A. Brandt, ”Guide to Multigrid Techniqes,” available from
C.H. Venner.

All relevant information for this assignment can be found in the chapters 2 and 3 of the book
”Multilevel Methods in Lubrication” which are available as pdf files on Canvas.

The student has the option to program the entire solver him/her self. Alternatively use can
be made of a framework program ”poisson2d-s.c”. This is a c program that has a special
datastructure for easy multigrid programming.

3.2 Numerical Solution of the Stokes Equations (* assignment)


The assignment is to develop a single grid numerical solution algorithm for Stokes equations on
a step-wise domain (x, y) ∈ [0, 1] × [0, 1] with the part (x, y) ∈ [0.5, 1] × [0, 0.5] excluded. The
equations to be solved are:
∂p ∂ 2 u ∂ 2 u
− − 2 =0 (15)
∂x ∂x2 ∂y
∂p ∂2v ∂2v
− 2 − 2 =0 (16)
∂x ∂x ∂y
∂u ∂v
+ =0 (17)
∂x ∂y
The boundary conditions are u = v = 0 on upper and lower boundary (x, y = 1), (0 ≤ x ≤
0.5, y = 0), (x = 0.5, 0 ≤ y ≤ 0.5), and (0.5 ≤ x ≤ 1, y = 0.5). The boundary condition on the
inlet (x = 0, 0 ≤ y ≤ 1) is v = 0 and u = y(1−y) and on the outlet boundary (x = 1, 0.5 ≤ y ≤ 1)
a parabolic profile in y should be chosen such that the total outflow equals the inflow. Deriving
this profile is part of the assignment.

• The equations should be discretized with second order accuracy using a staggered grid
arrangement. A description of the approach to be taken can be found in A. Brandt’s
”Guide to Multigrid Techniques” of which the relevant pages can be copied from C.H.
Venner.

6
• Solve the discrete equations using an iterative solver can be developed or a direct matrix
solver can be used. For iterative solution Distributive Gauss-Seidel as described by Brandt
is an option. Alternative is a collective relaxation scheme. This is up to the student to
choose. Show convergence of the relaxation process using graphs of the residual as function
of the number of sweeps

• Demonstrate convergence of the solution with decreasing mesh size, by comparing solutions
obtained on grids with different mesh sizes.

• Advanced optional Include the non-linear advection terms and show there effect on the
solution.

• Advanced optional Extend the solver to a coarse grid cycle solver (or even FMG)

Additional instruction and information in writing (handouts) about this problem can be obtained
from C.H.venner.

3.3 Numerical Solution of the 2D Elastic Equations


The third model problem for elliptic equation solving is slightly off topic, as it does not concern
a fluid dynamics problem but a structural mechanics problem. For students that would like
to test the relevance of the material presented in the CFD course to other fields an interesting
assignment is to develop a numerical solution algorithm for the equations of linear elasticity
(Navier-Cauchy). For the two-dimensional case the equations to be solved are:
 2
∂ u ∂2u
  
∂ ∂u ∂v
(λ + µ) + +µ + 2 =0 (18)
∂x ∂x ∂y ∂x2 ∂y
 2
∂2v
  
∂ ∂v ∂u ∂ v
(λ + µ) + +µ + =0 (19)
∂y ∂y ∂x ∂y 2 ∂x2
where u and v are the displacements in x and y direction respectively. λ and µ are the Lamé
parameters defined as:
Eν E
λ= µ= (20)
(1 + ν)(1 − 2ν) 2(1 + ν)
Assume a rectangular domain Ω = [0, 1] × [0, 1], and use a uniform grid with mesh size h. As a
starting point consider the case where f (x, y) and g(x, y) are given so that the analytic solution
is known as u = sin(2πx) ∗ sin(2πy) and v = sin(2πy). Consider the case λ = µ = 1.

• Discretize the equations using second order finite differences.

• Develop an iterative procedure, for example Gauss-Seidel relaxation for each equation
separately, or collective Gauss-Seidel relaxation can be used.

• Show that the relaxation converges and that, with decreasing mesh size, the solution
converges to the prescribed analytic solution. Use grids with nx = 4, 8, 16, 32, 64, etc.
points in each direction to show this.

7
When the displacements are known the stresses can be computed from:
 
∂u ∂u ∂v
σxx = 2µ +λ + (21)
∂x ∂x ∂y
 
∂v ∂u ∂v
σyy = 2µ +λ + (22)
∂y ∂x ∂y
 
1 ∂u ∂v
σxy = 2µ + (23)
2 ∂y ∂x
• Derive second order accurate approximations for these equations in the interior points,
and show that the computed stress field also converges to the analytical solution of the
stress field.

Next, consider a realistic problem with f (x, y) = g(x, y) = 0. Assume the displacements u and
v are zero everywhere on the boundary, except for the boundary y = 1, 0 < x < 1. Assume a
compressive stress is prescribed σyy = −Ps (x), and σxx = σxy = 0. Take Ps (x) = x ∗ (1 − x).

• Derive expressions (differential equations) for u and v at this boundary.

• Discretize the boundary condition and solve the problem on a sufficiently accurate grid.
Show graphs of the displacement and stress fields and discuss the results.

• Possible extension: vary the value of λ, i.e. 1 ≤ λ ≤ 1.5 and comment upon the effect on
the solution.

4 Integral Transforms/Particle Problems (* assignment)


Let u(y) be given on domain Ω ∈ Rd with y = (y1 , .., yd ). Consider the integral transform v(x)
¯
defined on Ω̄ ∈ Rd : Z
v(x) = G(x, y)u(y)dy (24)
y

These integral transforms appear in many scientific problems, e.g. in fluid mechanics, structural
mechanics, acoustics, potential field theory, etc. often the ”kernel function” G(x, y) is a potential
function, i.e. G = 1/|x − y|. The evaluation of the integral transform may be a task by itself, or
appear as sub-task in solving an integral equation (Fredholm). When discretized the transform
yields a discrete multi-summation of the form:
X
v( xi ) = Ḡ(xi , yj )ū(yj ) (25)
j

where xi are the discrete points in Ωd where the integral transform needs to be known. ū is a
summation quantity directly related to ū its specific form depending on the type of discrezation,
and will be given in the points and yj . Ḡ(xi , yj ) is a function that also ”inherits” its properties
from the ”kernel function” G(x, y) with the details depending on the discretization. When there
are n points xi and n̄ points yj the evaluation of (25) requires O(nn̄ operations. This discrete
transform also appears as the evaluation of a matrix vector multiplication for the case of a dense
matrix, and in the case of particle problems determining the force exerted on one particle by all

8
others (coulombic molecular interaction). Multigrid/Multilevel methods can also be used for the
fast evaluation of discrete integral transforms. Study and actually building a working algorithm
for a model problem of this type is also one of the possibilities as final assignment for the course.
In this case contact C.H. Venner for more details.

5 Transonic turbulent flow over the RAE-2822 airfoil


This is a more practical assignment in which the transonic turbulent flow over the RAE-2822 is
investigated using the open source CFD solver SU2, see https://su2code.github.io. The corre-
sponding grids can be generated either with the open source software GMSH, https://gmsh.info,
or with the commercial software Pointwise, https://www.pointwise.com. Both grid generation
tools have the possibility to write the grid in a format that can be used by SU2.

The flow to be investigated is the classical test case for the RAE-2822 airfoil, namely Mach
number is 0.729, Reynolds number is 6.5 · 106 and angle of attack is 2.31o . For these conditions
the flow is assumed to be fully turbulent and a shock wave is present on the suction side of the
airfoil, see figure (3).

Figure 3: Mach number isolines for the transonic flow over the RAE-2822 airfoil using the SST
turbulence model. The visualization is carried out with paraview.

Generate a set of suitable grids to carry out the grid refinement study. For this case you
can either use fully structured grids or an unstructured grid in combination with an inflation
layer to capture the turbulent boundary layer. For the later case it is recommended to use
quadrilateral cells in the boundary layer. Make sure that the farfield is at least 100 chords away
from the airfoil and the y + resolution is appropriate. Keep in mind that SU2 does not have the
option of wall functions yet (work in progress), hence the viscous sublayer needs to be resolved.
Investigate several discretization options as well as the Spalart-Allmaras and SST turbulence

9
models. Your report should contain the skin friction coefficient and pressure distribution on the
surface of the airfoil. Comparison with experimental data is appreciated. The numerical solution
can be visualized with the open source software paraview, see https://www.paraview.org.

For more details as well as the geometry definition of the RAE-2822 contact E.T.A. van der
Weide.

10

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy