Hydrodynamics Tutorial SS 2018 Assignment Sheet 2 1 Barometric
Total Page:16
File Type:pdf, Size:1020Kb
Hydrodynamics tutorial SS 2018 Assignment sheet 2 Hand-out 18.04.2018 Hand-in 24.04.2018 Total points: 30 Punkte Exercise 1 2 Total Points • Work in groups of 2 { 4 people. • The assignment sheet has to be handed in directly before the start of the tutorial. • For a successful participation 50 % of the points of all assignment sheets have to be reached. • You have to be able to present exercises you handed-in. Over the course you have to present at least 3 exercises on the black board. • Note all names on the assignment sheet. • Hand-in the printed assignemt sheet with the solution. • For programming exercises, send the programm (source code plus compiled exe- cutable) to the email address given on the assignmet sheet before the start of the tutorial. 1 Barometric formula [10 Points] The barometric formula, sometimes called isothermal atmosphere, is used to model how the pressure or density of air changes with altitude. 1. Write down the Euler equation considering the gravitational acceleration on Earth for the hydrostatic case. 2. Solve this equation assuming an incompressible fluid. What force acts on a swimmer resting at the bottom of a lake with depth h = 5 m, if the density of water is ρ = 1 g cm−3? 3. Now consider an ideal fluid where ρ = P and solve the hydrostatic Euler equation. kBT 5 4. Plot the pressure as a function of height if the pressure at sea level is P0 = 10 Pa and the temperature is T = 285 K. 2 Rotating fluid [10 Points] Imagine a fluid with constant density in uniform rotation around a fixed z-axis, ~v = ~! × ~r and ~! = !0 ~ez, for instance a rotating bucket of water. We assume an ideal fluid and neglect shear flows within the fluid. As an external force we only consider the gravitational acceleration along the rotation axis. Take into account that the velocity field is time- independent in uniform rotation. 1. Compute the pressure as a function of radius on top of the fluid. Hint: use vector identities. 2. Plot the solution for three different values of ! Preparations of an implementation of a 1D FV Euler solver In this tutorial we will lay the foundation for a fully operational computational fluid dynamics code. Later exercises will complete the 1D code and extend it to 2D. We will also give bonus exercises for experienced users that will contain extending the code to three- spatial dimensions, increase accuracy of the code by using reconstruction and potentially, implement an efficient parallelization that would allow you to run your code on the largest supercomputers available. Many problems in natural sciences and engineering are modeled following a simple prin- ciple: The time rate of change of a quantity of interest q in a fixed volume is equal to the flux of q across the boundary of this volume. This simple principle gives the integral form of a conservation law, d Z I q dx = − f~ · ~n ds; (1) dt Ω @Ω where the flux f~, and the normal vector ~n point outwards of the d-dimensional domain Ω ⊂ Rd. The conserved quantities of the Euler equations are the mass, energy, and momenta. If we assume that f~ is smooth (differentiable!) in space, we can apply Gauss' law to the surface integral and get d Z Z q dx = − r~ · f~ dx: (2) dt Ω Ω Since this conservation law holds for all domains Ω, we can simplify this into a partial differential equation (PDE) form, ~ ~ qt + r · f = 0; (3) where we use the subscript (·)t as an abbreviation for the temporal derivative. In one dimension, (3) simplifies to qt + fx = 0: (4) From the lecture we know that, in one dimension, the compressible Euler equations are given by 2 3 2 3 ρ ρvx 2 6ρvx7 6 ρvx + p 7 6 7 ~ 6 7 ~q = 6ρvy7 ; f = 6 ρvxvy 7 (5) 6 7 6 7 4ρvz 5 4 ρvxvz 5 1 2 γp E u( 2 ρk~vk + γ−1 ) so we can write the full system as 2 3 2 3 2 3 ρ ρvx 0 2 6ρvx7 6 ρvx + p 7 607 @ 6 7 @ 6 7 6 7 6ρvy7 + 6 ρvxvy 7 = 607 : (6) @t 6 7 @x 6 7 6 7 4ρvz 5 4 ρvxvz 5 405 1 2 γp E u( 2 ρk~vk + γ−1 ) 0 Closure of the system is done under the ideal gas assumption 1 p = (γ − 1) E − ρk~vk2 : (7) 2 3 Eigenvalues of the compressible Euler equations [10 Points] The Jacobian of the compressible Euler equations is given by @f~ A = (8) @~q 2 0 1 0 0 0 3 1 2 2 6 (γ − 1) k~vk − vx vx(3 − γ) vy(1 − γ) vz(1 − γ) γ − 17 6 2 7 = 6 −vxvy vy vx 0 0 7 6 7 4 −vxvz vz 0 vx 0 5 2 γE 1 2 2 2 γE u (γ − 1)k~vk − ρ ) 2 (3vx + vy + vz )(1 − γ) + ρ vxvy(1 − γ) vxvz(1 − γ) vxγ Fortunately, using a transformation from conservative (~q = ρ, ρ~v; E) to primitive variables (~! = ρ, ~v; p), we can make the Jacobian considerably simpler: 2u ρ 0 0 0 3 60 u 0 0 ρ−17 @f~ 6 7 A = = 60 0 u 0 0 7 (9) @~! 6 7 40 0 0 u 0 5 0 γp 0 0 u Since both matrices are similar (they describe the same physics just for a different set of quantities), the have the same eigenvalues. 1. Compute the eigenvalues of the compressible Euler equations in one dimension. 2. Interpret the eigenvalues: What do they describe? What might be their physical interpretation?.