The Euler Equations! Advection! λ 1. λ 2. λ 3. ρ ρu. c 2 = γp/ρ. E = e + u 2 /2 H = h + u 2 /2; h = e + p/ρ. 0 u 1/ρ. u p. t + A f.

Similar documents
( ) κ ( f j +1. ( ) 1 + κ ( f j +2. ( ) j +1/ 2 ) = Uf j +1/ 2. = r j +1/ 2. Ψ( r) = r + r 1 + r. Ψ( r) = minmod(r,1) j 1/ 2 ( F n +1/ 2 F n

Lecture 5.7 Compressible Euler Equations

CapSel Euler The Euler equations. conservation laws for 1D dynamics of compressible gas. = 0 m t + (m v + p) x

Solving the Euler Equations!

AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS

International Engineering Research Journal

The RAMSES code and related techniques I. Hydro solvers

CapSel Roe Roe solver.

MAS. Modelling, Analysis and Simulation. Modelling, Analysis and Simulation. Building your own shock tube. J. Naber

Shock Waves. 1 Steepening of sound waves. We have the result that the velocity of a sound wave in an arbitrary reference frame is given by: kˆ.

The one-dimensional equations for the fluid dynamics of a gas can be written in conservation form as follows:

AA210A Fundamentals of Compressible Flow. Chapter 13 - Unsteady Waves in Compressible Flow

AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS

A Central Rankine Hugoniot Solver for Hyperbolic Conservation Laws

0.3.4 Burgers Equation and Nonlinear Wave

A General Technique for Eliminating Spurious Oscillations in Conservative Schemes for Multiphase and Multispecies Euler Equations

Answers to Problem Set Number 04 for MIT (Spring 2008)

Research Article A New Flux Splitting Scheme Based on Toro-Vazquez and HLL Schemes for the Euler Equations

ALGEBRAIC FLUX CORRECTION FOR FINITE ELEMENT DISCRETIZATIONS OF COUPLED SYSTEMS

POSITIVITY PROPERTY OF SECOND-ORDER FLUX-SPLITTING SCHEMES FOR THE COMPRESSIBLE EULER EQUATIONS. Cheng Wang. Jian-Guo Liu

Drag of a thin wing and optimal shape to minimize it

Hyperbolic Systems of Conservation Laws. in One Space Dimension. I - Basic concepts. Alberto Bressan. Department of Mathematics, Penn State University

AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS

Notes: Outline. Shock formation. Notes: Notes: Shocks in traffic flow

Radiative & Magnetohydrodynamic Shocks

Numerical Hydrodynamics: A Primer. Wilhelm Kley Institut für Astronomie & Astrophysik & Kepler Center for Astro and Particle Physics Tübingen

Conservation of Mass. Computational Fluid Dynamics. The Equations Governing Fluid Motion

K. Ambika and R. Radha

DEVELOPMENT AND APPLICATION OF GENERALIZED MUSTA SCHEMES

Physical Diffusion Cures the Carbuncle Phenomenon

PHYS 643 Week 4: Compressible fluids Sound waves and shocks

Comparison of Approximate Riemann Solvers

Gas Dynamics Equations: Computation

Isentropic Duct Flows

AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS

Numerical Solutions for Hyperbolic Systems of Conservation Laws: from Godunov Method to Adaptive Mesh Refinement

Large Time Step Scheme Behaviour with Different Entropy Fix

Introduction to Gas Dynamics All Lecture Slides

A Finite Volume Code for 1D Gas Dynamics

Art Checklist. Journal Code: Article No: 6959

Computational Astrophysics

Sung-Ik Sohn and Jun Yong Shin

Fluid Dynamics. Part 2. Massimo Ricotti. University of Maryland. Fluid Dynamics p.1/17

SELF-SIMILAR SOLUTIONS FOR THE TRIPLE POINT PARADOX IN GASDYNAMICS

The RAMSES code and related techniques 2- MHD solvers

Riemann Solvers and Numerical Methods for Fluid Dynamics

Chp 4: Non-linear Conservation Laws; the Scalar Case. By Prof. Dinshaw S. Balsara

Numerical Methods for Hyperbolic Conservation Laws Lecture 4

To study the motion of a perfect gas, the conservation equations of continuity

Applying Asymptotic Approximations to the Full Two-Fluid Plasma System to Study Reduced Fluid Models

Journal of Computational Physics

Two-Dimensional Riemann Solver for Euler Equations of Gas Dynamics

Notes: Outline. Shallow water equations. Notes: Shallow water equations. Notes:

Fundamentals of compressible and viscous flow analysis - Part II

Numerical Methods for Conservation Laws WPI, January 2006 C. Ringhofer C2 b 2

Computational Astrophysics 7 Hydrodynamics with source terms

Projection Dynamics in Godunov-Type Schemes

A RIEMANN PROBLEM FOR THE ISENTROPIC GAS DYNAMICS EQUATIONS

1. (20 pts total 2pts each) - Circle the most correct answer for the following questions.

Computational Analysis of an Imploding Gas:

CORBIS: Code Raréfié Bidimensionnel Implicite Stationnaire

Shock and Expansion Waves

Approximate Harten-Lax-Van Leer (HLL) Riemann Solvers for Relativistic hydrodynamics and MHD

Chapter 1. Introduction

Introduction to Aerodynamics. Dr. Guven Aerospace Engineer (P.hD)

Gravity Waves Gravity Waves

Numerical Solution Techniques in Mechanical and Aerospace Engineering

Deforming Composite Grids for Fluid Structure Interactions

On a class of numerical schemes. for compressible flows

E = where γ > 1 is a constant spesific to the gas. For air, γ 1.4. Solving for p, we get. 2 ρv2 + (γ 1)E t

Unsteady Wave Motion Shock Tube Problem - Shock Reflection

Detonation Simulations with a Fifth-Order TENO Scheme

Numerical resolution of a two-component compressible fluid model with interfaces

Waves in a Shock Tube

AMath 574 February 11, 2011

( ) A i,j. Appendices. A. Sensitivity of the Van Leer Fluxes The flux Jacobians of the inviscid flux vector in Eq.(3.2), and the Van Leer fluxes in

Non-linear Scalar Equations

THE numerical simulation of the creation and evolution

VISCOUS FLUX LIMITERS

Notes: Outline. Diffusive flux. Notes: Notes: Advection-diffusion

The RAMSES code and related techniques 4. Source terms

Computational Fluid Dynamics. PHY 688: Numerical Methods for (Astro)Physics

Department of Mathematics University of California Santa Barbara, Santa Barbara, California,

A wave propagation method for compressible multicomponent problems on quadrilateral grids

Investigation of an implicit solver for the simulation of bubble oscillations using Basilisk

Shock and Rarefaction Waves in a Hyperbolic Model of Incompressible Fluids

NUMERICAL SOLUTION OF HYPERBOLIC PARTIAL DIFFERENTIAL EQUATIONS

A finite-volume algorithm for all speed flows

Math 660-Lecture 23: Gudonov s method and some theories for FVM schemes

Wave propagation methods for hyperbolic problems on mapped grids

A Linearised Riemann Solver for Godunov-Type Methods. E.F.Toro

Inverse Lax-Wendroff Procedure for Numerical Boundary Conditions of. Conservation Laws 1. Abstract

Eulerian interface-sharpening methods for hyperbolic problems

Simple waves and a characteristic decomposition of the two dimensional compressible Euler equations

COMPUTATIONAL METHODS AND ALGORITHMS Vol II - Computational Methods for Compressible Flow Problems - Remi Abgrall

Quasi-linear first order equations. Consider the nonlinear transport equation

ICES REPORT A Multilevel-WENO Technique for Solving Nonlinear Conservation Laws

Linear Hyperbolic Systems

Angular momentum preserving CFD on general grids

A method for avoiding the acoustic time step restriction in compressible flow

Transcription:

http://www.nd.edu/~gtryggva/cfd-course/! Advection! Grétar Tryggvason! Spring! The Euler equations for D flow:! where! Define! Ideal Gas:! ρ ρu ρu + ρu + p = x ( / ) ρe ρu E + p ρ E = e + u / H = h + u /; h = e + p/ρ p = ρrt; e = e( T ); c v = de /dt h = h( T); c p = dh /dt R = c p c v ; = c p /c v ; p = ( )ρe ρ ρu ρu + ρu + p = x ( / ) ρe ρu E + p ρ p = ( )ρe c = p/ρ Expanding the derivative and rearranging the equations! ρ u ρ ρ u + u /ρ u p ρc x = + A or! x = u p The Characteristics for the Euler Equations are found by finding the eigenvalues for A T! det(a T λi) = Find! det(a T λi) = or:! or! (( ) c ) = ( u λ) u λ ( u λ) = λ = u (( u λ) c ) = u λ = ±c λ = u ± c u λ det ρ u λ ρc = /ρ u λ Therefore! λ = u c; λ = u + c; λ 3 = u The Rankine-Hugoniot conditions! For a hyperbolic system! + F x = The speed of a discontinuity (shock) is found by moving to a frame where a shock moving with speed s is stationary!! s x + F x = Integrating across the shock yields! [ ] = [ F] s f

For the Euler equations:! ρ ρu ρu + ρu + p = x ( / ) ρe ρu E + p ρ The Rankine-Hugoniot conditions are:! s( ρ L ρ R ) = (( ρu) L ( ρu) R ) s( ( ρu) L ( ρu) R ) = (( ρu + p) ρu + p L ( ) R ) s( ( ρe ) L ρe ) = (( ρu(e + p/ρ) ) L ρu(e + p/ρ) ) ( ) R ( ) R The Shock-Tube Problem! Exact Solution! The shock tube problem! u L,, ρ L! u R,, ρ R! Density! L! 5! 3!! R! Pressure! Expansion Fan! Contact! Shock! Expansion Fan! Contact! Shock!! 3!! given:!, ρ L, u L,, ρ R, u R α = +! 3!! given:!, ρ L, u L,, ρ R, u R c L = ρ L c R = ρ R Consider the case > :!!Shock separates R and!!contact discontinuity separates and 3!!Expansion fan separates 3 and L! The Rankine-Hugoniot conditions give a nonlinear P = p relation for the pressure ump across the shock! P = p L ( ) ( c R / c L )(P ) ( + ( + ) ( P ) ) which can be solved by iteration! /( )

The speed of the shock is! + ( +)P s shock = u R + c R /! 3!! x shock = x + s shock t The speed of the contact is! s contact = u 3 = u = u L + c L P p R x contact = x + s contact t The left hand side of the fan moves with speed! s fl = c L x fl = x + s fl t The right hand side of the fan moves with speed! s fr = u c L x fr = x + s fr t Left uniform state! given:!, ρ L, u L, c L = ρ L! 3!! In the expansion fan ()! + (s x) ρ = ρ c L α t u = u L + s x + t + (s x) p = p c L α t Behind the contact (3)! p 3 = p u 3 = u ρ 3 = ρ L P p R / Behind the contact (3)! p 3 = p u 3 = u ρ 3 = ρ L P p R /! 3!! Behind the shock ()! ρ = + αp α + P ρ R p = P u = u L + c L P p R α = + Right uniform state! given:!, ρ R, u R c R = ρ R The speed of sound is given by! c = p ρ The Mach number is defined as the ratio of the local velocity over the speed of sound! Ma = u c Ma < subsonic! Ma > supersonic! Test case:! Shocktube problem of G.A. Sod, JCP 7:, 97! = 5 ; ρ L =.; u L = = ; ρ R =.5; u R = t final =.5 x =.5 Subsonic case!.... x 3 5 velocity 3 5 3.... t=.5! Velocity! Pressure! Density! Mach number 3 5 Mach Number!.... 3 5 5 3 5 5 velocity x pressure 3 5.9..7..5..3.. Mach number 3 5 3 5 3 5

Test case:! Pressure! Shocktube problem of G.A. Sod, JCP 7:, 97! = 5 ; ρ L =.; u L = = ; ρ R =.; u R = t final =.5 x =.5 Supersonic case! Velocity! Mach Number! Density! Solve using second order Lax-Wendroff! For the fluid-dynamic system of equations (Euler equations):! ρ ρu ρu + ρu + p = x ( / ) ρe ρu E + p ρ where! E = e + u / ; Add the artificial viscosity to RHS:! = αh x ρ u u x x u p = ( ) ρe * f + Solutions of the D Euler equation using Lax-Wendroff! ( ).5 Δt n n ( F ) =.5 f n n + f + ( ) n f + = f n Δt h F * * + F F' = F αh ρ u h F + With an artificial viscosity term added to the corrector step! u u x x Test case:! Effect of α! Shocktube problem of G.A. Sod, JCP 7:, 97! = 5 ; ρ L =.; u L = = ; ρ R =.5; u R = Final time:.5!.... nx=; α =.5.... nx=; α =.5 α =. α =.5 α =.5 x pressure α =.5 α =. α =.5 α =.5............

nx=; nx=; nx=5; time=.5 x pressure.... Effect of resolution! α =.5........ Outline of L-W program! for istep=:! for i=:nx,p(i)=..; for i=:nx-!!!%prediction step! rh(i)=..! ruh(i)=..! reh(i)=..! for i=:nx,ph(i)=..; for i=:nx-!!!%correction step! r(i)=..! ru(i)=..! re(i)=..! for i=:nx,u(i)=ru(i)/r(i); for i=:nx-!!!%artificial viscosity! ru(i)=..! re(i)=..! time=time+dt,istep! nx=9; artvisc=.5;! hold off! %gg=.;p_left=;p_right=;r_left=;r_right=.;! gg=.;p_left=;p_right=;r_left=;r_right=.5;! xl=.;h=xl/(nx-);time=;! r=zeros(,nx);ru=zeros(,nx);re=zeros(,nx);p=zeros(,nx);! rh=zeros(,nx);ruh=zeros(,nx);reh=zeros(,nx);ph=zeros(,nx);! for i=:nx,r(i)=r_right;ru(i)=.;re(i)=p_right/(gg-); for i=:nx/; r(i)=r_left; re(i)=p_left/(gg-); rh=r;ruh=ru;reh=re;ph=p;! dt=.5*h/sqrt(.*max([7+p_right/r_right,7+p_left/r_left]) )! for istep=:! for i=:nx,p(i)=(gg-)*(re(i)-.5*(ru(i)*ru(i)/r(i))); for i=:nx-!!%prediction step! rh(i)=.5*(r(i)+r(i+))-(.5*dt/h)*(ru(i+)-ru(i));! ruh(i)=.5*(ru(i)+ru(i+))-(.5*dt/h)*((ru(i+)^/r(i+))+p(i+)-(ru(i)^/r(i))-p(i));! reh(i)=.5*(re(i)+re(i+))-...!!(.5*dt/h)*((re(i+)*ru(i+)/r(i+))+(ru(i+)*p(i+)/r(i+))...!!! -(re(i)* ru(i) /r(i))- (ru(i) *p(i) /r(i)));! for i=:nx,ph(i)=(gg-)*(reh(i)-.5*(ruh(i)*ruh(i)/rh(i))); for i=:nx-!!%correction step! r(i)=r(i)-(dt/h)*(ruh(i)-ruh(i-));! ru(i)=ru(i)-(dt/h)*((ruh(i)^/rh(i))-(ruh(i-)^/rh(i-))+ph(i)-ph(i-));! re(i)=re(i)-(dt/h)*((reh(i)*ruh(i)/rh(i))-(reh(i-)*ruh(i-)/rh(i-))+...!!(ruh(i)*ph(i)/rh(i))-(ruh(i-)*ph(i-)/rh(i-)));! for i=:nx,u(i)=ru(i)/r(i); Flux Vector Splitting! for i=:nx-!!%artificial viscosity! ru(i)=ru(i)+artvisc*(.5*dt/h)*( (r(i)+r(i+))*(u(i+)-u(i))*abs(u(i+)-u(i))...! -(r(i)+r(i-))*(u(i)-u(i-))*abs(u(i)-u(i-)) );! re(i)=re(i)+artvisc*(.5*dt/h)*...! ( (u(i+)+u(i))*(r(i)+r(i+))*(u(i+)-u(i))*abs(u(i+)-u(i))...! -(u(i)+u(i-))*(r(i)+r(i-))*(u(i)-u(i-))*abs(u(i)-u(i-)) );! time=time+dt,istep! plot(p,'b','linewidth',),title('pressure'); pause! if(time >.5)break, For upwind schemes, it is necessary to determine the upstream direction. For systems with many characteristics running both left and right, there is not one upstream direction! Upwind Scheme - Revisited! Generalized Upwind Scheme (for both U > and U < )! Define! f f UΔt n n ( f f ), h U > UΔt n n ( f f ), h U < n+ n = f n+ n = f + U + = ( U + U ), U = ( U U ) The two cases can be combined into a single expression:! [ ] n f + = f n Δt h U + ( f n f n ) + U ( f n + f n )

A system of hyperbolic equations! For a system of equations there are generally waves running in both directions. To apply upwinding, the fluxes must be decomposed into left and right running waves! + F x = can be written in the form! + [ A] x = ; The system is hyperbolic if! Steger-Warming (979)! [ A] = F [ T ] [ A] [ T] = [ λ]; [ T ] = T q T q N F = [ A]f = T The matrix of eigenvalues Hence! [ A] = A + [ ][ λ] [ T] f [ λ] [ λ] = [ λ + ] + [ λ ] [ ] + [ A ] = [ T ][ λ + ] T is divided into two matrices! [ ] T [ ] + [ T] λ [ ] ( ) Define! F = F + + F F + = [ A + ]f, F = [ A ]f Conservation law becomes! + F + x + F x = Example: -D Hyperbolic Equation! Leading to! v t w t + c f c f x = v x w x = f = v w ; F = c w v ; v = ; w = x [ A] = F = c [ T ] = q T = c T λ + q c ; [ ] = c [ A + ] = [ T ] [ λ + ][ T] ; [ A ] = [ T] [ λ ][ T ] F + = [ A + ]f; F = [ A ]f Leading to:! F + = cv c w ; F = cv c w v + cw v cw c [ λ ] = Solve using first order upwinding with flux splitting! For a nonlinear system of equations such as the Euler equations, there is some arbitrariness in how the system is split!

Here we solve the one-dimensional Euler equation using the van Leer vector flux splitting! Van Leer! F + = ρ (u + c) c ( )u + c ( )u + c ( ) F = ρ (u c) c ( )u c c ( )u ( ) van Leer vector flux splitting! ρu ρu + p = ρ ρu(e + p c ρ ) (u + c) For example, the mass flux:! ρ c (u + c) ρ (u c) c ( )u + c ( )u + c ( ) ρ (u c) c ( ) = ρ c = ρ c u + uc + c u + uc c ( )u c c ( )u ( ) uc = ρu Steger-Warming! F + = ρ Several other splitting schemes are possible, such as:! ( )u + c ( )u + (u + c) ( )u 3 + (u + c)3 + 3 (u + c)c ( ) F = ρ (u c) u c (u c) + 3 c F + = ρ (u + c) c Rewrite the flux terms in terms of Mach number:! ( )u + c ( )u + c ( ) = ρc u c + c + u c c + u c = ρc ( M + ) c + M c + M + F + x + F - x = ρ ρu + ρc ρe x ( M + c ) + M + x ρc ( M c ) + M = c + M c M + F+ x + F- x = Solve by! f n+ = f n Δt h F + + F - Where! ( ) n Δt ( ) n - - h F + F F + = ρc ( M + c ) + M ; F = ρc ( M c ) + M c + M c M

for istep=:maxstep for i=:nx,c(i)=sqrt( gg*(gg-)*(re(i)-.5*(ru(i)^/r(i)))/r(i) );end for i=:nx,u(i)=ru(i)/r(i);end; for i=:nx,m(i)=u(i)/c(i);end for i=:nx- %upwind rn(i)=r(i)-(dt/h)*(... (.5*r(i)*c(i)*(m(i)+)^) - (.5*r(i-)*c(i-)*(m(i-)+)^)+... (-.5*r(i+)*c(i+)*(m(i+)-)^) - (-.5*r(i)*c(i)*(m(i)-)^) ); run(i)=ru(i)-(dt/h)*(... (.5*r(i)*c(i) *(m(i)+)^) *(( +.5*(gg-)*m(i)) **c(i) /gg) -... (.5*r(i-)*c(i-)*(m(i-)+)^)*(( +.5*(gg-)*m(i-))**c(i-)/gg) +... (-.5*r(i+)*c(i+)*(m(i+)-)^)*((-+.5*(gg-)*m(i+))**c(i+)/gg) -... (-.5*r(i)*c(i) *(m(i)-)^) *((-+.5*(gg-)*m(i)) **c(i) /gg) ); ren(i)=re(i)-(dt/h)*(... (.5*r(i)*c(i) *(m(i)+)^) *((+.5*(gg-)*m(i))^ **c(i)^ /(gg^-)) -... (.5*r(i-)*c(i-)*(m(i-)+)^)*((+.5*(gg-)*m(i-))^**c(i-)^/(gg^-)) +... (-.5*r(i+)*c(i+)*(m(i+)-)^)*((-.5*(gg-)*m(i+))^**c(i+)^/(gg^-)) -... (-.5*r(i)*c(i) *(m(i)-)^) *((-.5*(gg-)*m(i))^ **c(i)^ /(gg^-)) ); end Effect of resolution! Shocktube problem of G.A. = 5 ; ρ L =.; u L = Sod, JCP 7:, 97! = ; ρ R =.5; u R = x Pressure nx=; maxstep=3! nx=5; maxstep=! Final time:.5! Density... nx=; maxstep=3! nx=; maxstep=!. nx=5; maxstep=! nx=5; maxstep=5! Summary! Numerical solutions of the onedimensional Euler equations! Upwind/flux splitting! Lax-Wendroff/artificial viscosity!