Computational Fluid Dynamics http://www.nd.edu/~gtryggva/CFD-Course/! Theory of! Partial Differential Equations! Computational Fluid Dynamics Outline! • Basic Properties of PDE • Quasi-linear First Order Equations! !! - Characteristics! - Linear and Nonlinear Advection Equations! • Quasi-linear Second Order Equations ! !- Classification: hyperbolic, parabolic, elliptic! - Domain of Dependence/Influence! Grétar Tryggvason! Spring 2011! Computational Fluid Dynamics Examples of equations! ∂f ∂f +U =0 ∂t ∂x ∂f ∂2 f −D 2 =0 ∂t ∂x 2 ∂ f ∂2 f − c2 2 = 0 2 ∂t ∂x ∂ f ∂ f + =0 ∂x 2 ∂y 2 2 Navier-Stokes equations! Diffusion part! Advection! Evolution in time! Diffusion! Wave propagation! 2 Laplace equation! Computational Fluid Dynamics Definitions! • • ∂u ∂u ∂u 1 ∂P µ ⎛⎜ ∂ 2 u ∂ 2 u ⎞⎟ + u +v =− + + ∂t ∂x ∂y ρ ∂x ρ ⎝ ∂x 2 ∂y 2 ⎠ Advection part! ∂u ∂v + =0 ∂x ∂y Laplace part! Computational Fluid Dynamics The order of PDE is determined by the highest derivatives! Linear if no powers or products of the unknown functions or its partial derivatives are present.! x • Computational Fluid Dynamics ∂f ∂f +y = f, ∂x ∂y ∂f ∂f + + 2 xf = 0 ∂x ∂y Quasi-linear if it is true for the partial derivatives of highest order. !! 2 f ∂ 2 f ⎛ ∂f ⎞ +⎜ ⎟ = f , ∂x 2 ⎜⎝ ∂y ⎟⎠ x2 ∂f ∂f + y2 = f2 ∂x ∂y Quasi-linear first order! partial differential equations! Computational Fluid Dynamics Consider the quasi-linear first order equation! ∂f ∂f a +b =c ∂x ∂y Computational Fluid Dynamics The solution of this equations defines a single valued surface f(x,y) in three-dimensional space:! where the coefficients are functions of x,y, and f, but not the derivatives of f: f a = a(x, y, f ) b = b(x, y, f ) c = c(x, y, f ) y f=f(x,y) x Computational Fluid Dynamics The original equation and the conditions for a small change can be rewritten as:! An arbitrary change in f is given by:! ∂f ∂f df = dx + dy ∂x ∂y f f Computational Fluid Dynamics a df ∂f ∂f +b =c ∂x ∂y df = dy ⎛ ∂f ∂f ⎞ ⎜ , ,− 1⎟ ⋅ (dx, dy, df ) = 0 ⎝ ∂x ∂y ⎠ Normal to the surface! f=f(x,y) x ⎛ ∂f ∂f ⎞ ⎜ , ,− 1⎟ ⋅ (a,b, c) = 0 ⎝ ∂x ∂y ⎠ ∂f ∂f dx + dy ⇒ ∂x ∂y dx y ⇒ Both (a,b,c) and (dx,dy,df) are in the surface!! Computational Fluid Dynamics The normal vector to the curve f=f(x,y) Computational Fluid Dynamics Picking the displacement in the direction of (a,b,c)! ⇒ 1! (dx, dy,df ) = ds (a,b, c) f=f(x,y) f -1! ∂f ∂x x Separating the components! dx dy ⇒ = a; = b; ds ds dx a = dy b Same arguments in the y-direction. Thus ⎛ ∂f ∂ f ⎞ n = ⎜ , ,−1⎟ ⎝ ∂x ∂ y ⎠ df = c; ds Computational Fluid Dynamics Computational Fluid Dynamics dx = a; ds The three equations specify lines in the x-y plane! dx = a; ds dy = b; ds df = c; ds y dy = b; ds df = c; ds x(s); y(s); f (s) Characteristics! Given the initial conditions:! x = x(s, to ); y = y(s,t o ); f = f (s,t o ); x(0); y(0); f (0) the equations can be integrated in time! slope! dx a = dy b x Computational Fluid Dynamics Consider the linear advection equation! ∂f ∂f +U =0 ∂t ∂x dx = U; ds f (x,t) = f t= 0 ( x − Ut ) Graphically: ! t f The characteristics are given by:! dt = 1; ds Computational Fluid Dynamics df = 0; ds f x or! dx = U; df = 0; dt Notice that these results are specific for: ! ∂f ∂f +U =0 ∂t ∂x Which shows that the solution moves along straight characteristics without changing its value! Computational Fluid Dynamics The solution is therefore:! f (x,t) = g( x − Ut ) where ! Discontinuous initial data! g(x) = f (x,t = 0) This can be verified by direct substitution: ! Set ! η(x,t) = x − Ut Then! ∂f ∂g ∂η ∂g = = (−U ) and! ∂t ∂η ∂t ∂η Computational Fluid Dynamics ∂f ∂g ∂η ∂g = = (1) ∂x ∂η ∂x ∂η ∂f ∂f +U =0 ∂t ∂x f (x,t) = g( x − Ut ) Since the solution propagates along characteristics completely independently of the solution at the next spatial point, there is no requirement that it is differentiable or even continuous! t f Substitute into the original equation! ∂f ∂f ∂g ∂g +U = (−U ) + U = 0 ∂t ∂x ∂η ∂η f x Computational Fluid Dynamics Add a source ! Computational Fluid Dynamics ∂f ∂f +U =−f ∂t ∂x Consider a nonlinear (quasi-linear) advection equation! ∂f ∂f +f =0 ∂t ∂x The characteristics are given by:! dt = 1; ds dx = U; ds or! dx = U; dt df =−f dt ⇒ f = f (0)e −t Moving wave with ! decaying amplitude! The characteristics are given by:! df = − f; ds dt dx df = 1; = f; = 0; ds ds ds or! t f f x Computational Fluid Dynamics dx = f; dt df = 0; The slope of the characteristics depends on the value of f(x,t). Computational Fluid Dynamics Why unphysical solutions?! t Multi-valued solution t3 - Because mathematical equation neglects ! some physical process (dissipation)! ∂f ∂f ∂2 f +f −ε 2 = 0 ∂t ∂x ∂x t2 Burgers Equation! Additional condition is required to pick out the physically! Relevant solution! t1 f x Computational Fluid Dynamics Correct solution is expected from Burgers equation with ε → 0 Entropy Condition Computational Fluid Dynamics Constructing physical solutions! ∂f ∂f + f =0 ∂t ∂x In most cases the solution is not allowed to be multiple valued and the “physical solution” must be reconstructed using conservation of f! The discontinuous solution propagates with a shock speed that is different from the slope of the characteristics on either side! Quasi-linear Second order partial differential equations! Computational Fluid Dynamics Computational Fluid Dynamics First write the second order PDE as a system of first order equations! Consider ! ∂ f ∂ f ∂ f +b +c 2 = d ∂x 2 ∂x∂y ∂y 2 a 2 2 Define! where ! v= and! w= ∂f ∂y then! a = a(x, y, f , f x , f y ) a b = b(x, y, f , f x , f y ) c = c(x, y, f , f x , f y ) ∂2 f ∂2 f ∂2 f +b +c 2 = d ∂x 2 ∂x∂y ∂y ∂2 f ∂2 f = ∂x∂y ∂y∂x Computational Fluid Dynamics Thus! a ∂v ∂v ∂w +b +c =d ∂x ∂y ∂y ∂w ∂v − =0 ∂x ∂y Computational Fluid Dynamics ∂2 f ∂2 f ∂2 f +b +c 2 = d ∂x 2 ∂x∂y ∂y a ∂v ∂v ∂w +b +c =d ∂x ∂y ∂y ∂w ∂v − =0 ∂x ∂y In matrix form! Is equivalent to:! ∂v ∂v ∂w a +b +c =d ∂x ∂y ∂y ∂w ∂v − =0 ∂x ∂y v= a The second equation is obtained from! d = d(x, y, f , f x , f y ) where! ∂f ∂x ∂f ∂x w= Any high-order PDE can be rewritten as a system of first order equations!! or! ux + Auy = s ⎛v ⎞ u=⎜ ⎟ ⎝ w⎠ Are there lines in the x-y plane, along which the solution is determined by an ordinary differential equation?! ∂f ∂y Computational Fluid Dynamics Computational Fluid Dynamics The total derivative is! dv ∂v ∂v ∂y ∂v ∂v = + = +α dx ∂x ∂y ∂x ∂x ∂y ⎛ ∂v ∂x ⎞ ⎛ b a c a⎞⎛ ∂v ∂y ⎞ ⎛ d a⎞ ⎜ ⎟+ ⎜ ⎟⎜ ⎟ =⎜ ⎟ ⎝∂w ∂x ⎠ ⎝ −1 0 ⎠⎝ ∂w ∂y ⎠ ⎝ 0 ⎠ Add the original equations:! where! ∂y α= ∂x Rate of change of v with x, along the line y=y(x)! ⎛ ∂v b ∂v c ∂w ⎞ ⎛ ∂w ∂v ⎞ d l1 ⎜ + + +l ⎜ − =l ⎝ ∂x a ∂y a ∂y ⎠ 2 ⎝ ∂x ∂y ⎠ 1 a Is this ever equal to! If there are lines (determined by α) where the solution is governed by ODEʼs, then it must be possible to rewrite the equations in such a way that the result contains only α and the total derivatives. ! ⎛ ∂v ⎛ ∂w ∂v ⎞ ∂w ⎞ d l1⎜ + α ⎟ + l2 ⎜ + α ⎟ = l1 ∂y ⎠ ∂y ⎠ a ⎝ ∂x ⎝ ∂x For some lʼs and α Computational Fluid Dynamics Compare the terms:! Computational Fluid Dynamics Characteristic lines exist if:! b − l = lα a 2 1 c l1 = l2α a ⎛ ∂v b ∂v c ∂w ⎞ ⎛ ∂w ∂v ⎞ d l1 ⎜ + + +l ⎜ − =l ⎝ ∂x a ∂y a ∂y ⎠ 2 ⎝ ∂x ∂y ⎠ 1 a ⎛ ∂v ⎛ ∂w ∂v ⎞ ∂w ⎞ d l1 ⎜ + α +l ⎜ +α =l ⎝ ∂x ∂y ⎠ 2 ⎝ ∂x ∂y ⎠ 1 a Or, in matrix form:! ⎛⎜ b a − α ⎝ ca b l1 − l2 = l1α a c l1 = l2α a Therefore, we must have:! Computational Fluid Dynamics The original equation is:! A! Rewrite! as! ⎛⎜b a −1⎞⎟⎛⎜ l1 ⎞⎟ ⎛⎜ −α 0 ⎞⎟⎛⎜ l1 ⎞⎟ ⎛⎜ 0⎞⎟ − = ⎝c a 0 ⎠⎝ l2 ⎠ ⎝ 0 −α ⎠⎝ l2 ⎠ ⎝ 0⎠ −1 ⎞ ⎛ l1 ⎞ ⎛ 0⎞ ⎜ =⎜ −α ⎠ ⎝ l2 ⎠ ⎝ 0⎠ T (A − α I )l = 0 Computational Fluid Dynamics ( −1 ⎞ ⎛ l1 ⎞ ⎛ 0 ⎞ ⎟⎜ ⎟= −α ⎟⎠ ⎜⎝ l2 ⎟⎠ ⎜⎝ 0 ⎟⎠ The determinant is:! A − αI = 0 T 1 b ± b 2 − 4ac 2a Computational Fluid Dynamics ⎛ b a −α ⎜ ⎜⎝ ca ⎛⎜ b a − α ⎝ ca α= −1 ⎞ ⎛⎜ l1 ⎞ ⎛⎜ 0⎞ = −α ⎠ ⎝ l2 ⎠ ⎝ 0⎠ The equation has a solution only if the determinant is zero! ⎛ ∂v ∂x ⎞ ⎛ b a c a⎞⎛ ∂v ∂y ⎞ ⎛ d a⎞ ⎜ ⎟+ ⎜ ⎟⎜ ⎟ =⎜ ⎟ ⎝∂w ∂x ⎠ ⎝ −1 0 ⎠⎝ ∂w ∂y ⎠ ⎝ 0 ⎠ AT! l1 ) b 2 − 4ac > 0 Two real characteristics! b 2 − 4ac = 0 One real characteristics! b 2 − 4ac < 0 No real characteristics! c ⎛b − α ⎝ − α ⎞⎠ + = 0 a a Or, solving for α ! α= ( 1 b ± b 2 − 4ac 2a ) Computational Fluid Dynamics Examples! Computational Fluid Dynamics Examples! Computational Fluid Dynamics Examples! 2 ∂2 f 2 ∂ f =0 2 −c ∂x ∂y 2 ∂2 f ∂ 2 f + =0 ∂x 2 ∂y 2 Comparing with the standard form! Comparing with the standard form! ∂2f ∂2 f ∂2f a 2 +b +c 2 = d ∂x ∂x∂y ∂y shows that! a = 1; b = 0; c = −c ; d = 0; 2 b − 4ac = 0 + 4 ⋅1⋅ c = 4c > 0 2 2 2 2 a shows that! ∂2f ∂2 f ∂2f +c 2 = d 2 +b ∂x ∂x∂y ∂y a = 1; b = 0; c = 1; d = 0; b − 4ac = 0 − 4 ⋅1⋅1 = −4 < 0 2 2 Hyperbolic! Elliptic! Computational Fluid Dynamics Examples! ∂f ∂2f =D 2 ∂x ∂y Computational Fluid Dynamics Examples! Wave equation! 2 ∂2 f 2 ∂ f =0 2 −c ∂x ∂y 2 Hyperbolic! Diffusion equation! ∂f ∂2f =D 2 ∂x ∂y Parabolic! Laplace equation! ∂2 f ∂ 2 f + =0 ∂x 2 ∂y 2 Elliptic! Comparing with the standard form! a ∂2f ∂2 f ∂2f +c 2 = d 2 +b ∂x ∂x∂y ∂y shows that! a = 0; b = 0; c = − D; d = 0; b − 4ac = 0 + 4 ⋅0 ⋅ D = 0 2 2 Parabolic! Computational Fluid Dynamics α= ∂y ∂x α= ( 1 b ± b 2 − 4ac 2a Computational Fluid Dynamics ) Wave Equation! Hyperbolic! Parabolic! Elliptic! Computational Fluid Dynamics Wave equation! Computational Fluid Dynamics Wave equation! To find the characteristics! ∂u 2 ∂v −c =0 ∂t ∂x ∂v ∂u − =0 ∂t ∂x ∂ f ∂ f − c2 2 = 0 ∂t 2 ∂x 2 2 First write the equation as a system of first order equations! Introduce! yielding! u= ∂f ∂f ; v= ; ∂t ∂x ∂u 2 ∂v −c =0 ∂t ∂x ∂v ∂u − =0 ∂t ∂x since! ∂2 f ∂2 f = ∂t∂x ∂x∂t α= −1 ⎤ 2 2 ⎥= α −c =0 −α ⎥⎦ ) We can also use! ( ) 1 b ± b 2 − 4ac with! 2a Computational Fluid Dynamics Wave equation! Two characteristic lines! ⎤ ⎡ ∂u ⎤ ⎥ ⎡ ⎢ ⎥ 2 ⎤ ⎥ + ⎢ 0 −c ⎥ ⎢ ∂ x ⎥ = 0 ⎥ ⎣ −1 0 ⎦ ⎢ ∂ v ⎥ ⎥ ⎢ ⎥ ⎦ ⎣ ∂x ⎦ ∂u ∂t ∂v ∂t ⎡ −α det A T − α I = det ⎢ 2 ⎢⎣ −c ⇒ α = ±c ( from the pde! ⎡ ⎢ ⎢ ⎢ ⎢ ⎣ ( b = 0; a = 1; c = −c 2 Computational Fluid Dynamics Wave equation! dt 1 dt 1 =+ ; =− dx c dx c t dt 1 =+ dx c P dt 1 =− dx c To find the solution we need to find the eigenvectors! ∂v ⎛ ∂u ⎞ l1 ⎜ − c2 = 0⎟ ⎝ ∂t ⎠ ∂x ⎛ ∂ v ∂u ⎞ +l2 ⎜ − = 0⎟ ⎝ ∂t ∂ x ⎠ ⇒ α = ±c ⎡ −α ⎢ 2 ⎢⎣ −c −1 −α ⎤ ⎡ l1 ⎤ ⎥=0 ⎥⎢ ⎥⎦ ⎢⎣ l2 ⎥⎦ Take l1=1! For! α = +c −c l1 − l2 = 0 ⇒ l2 = −c For! α = −c +c l1 − l2 = 0 ⇒ l2 = +c x Computational Fluid Dynamics Wave equation! For! Computational Fluid Dynamics Wave equation! α = +c l1 = 1 l2 = −c ⎛ ∂u 2 ∂v ⎞ ⎛ ∂v ∂u ⎞ 1⎜ − c = 0⎟ − c⎜ − = 0⎟ ⎝ ∂t ⎠ ⎝ ∂t ∂x ⎠ ∂x ⎛ ∂u ∂ u ⎞ ⎛ ∂v ∂v ⎞ ⎜ + c ⎟ − c⎜ + c ⎟ = 0 ⎝ ∂t ∂ x ⎠ ⎝ ∂t ∂x ⎠ du dv −c = 0 on dt dt Similarly:! For! α = −c dx = +c dt l1 = 1 l2 = +c du dv dx +c = 0 on = −c dt dt dt ) Add the equations! Relation between the total derivative on the characteristic! du dv −c = 0 on dt dt dx = +c dt du dv +c = 0 on dt dt dx = −c dt For constant c! dr1 dx = 0 on = +c where r1 = u − cv dt dt dr2 dx = 0 on = −c where r2 = u + cv dt dt r1 and r2 are called the Rieman invariants! Computational Fluid Dynamics Wave equation! Computational Fluid Dynamics Wave equation-general! The general solution can therefore be written as:! f ( x,t ) = r1 ( x − ct ) + r2 ( x + ct ) where! ⎡∂f ∂f ⎤ r1 ( x ) = ⎢ − c ⎥ ⎣ ∂t ∂x ⎦t= 0 ⎡∂f ∂f ⎤ r2 ( x ) = ⎢ + c ⎥ ⎣ ∂t ∂x ⎦t= 0 Can also be verified by direct substitution! Computational Fluid Dynamics Two characteristic lines! dt 1 dt 1 =+ ; =− dx c dx c t dt 1 =+ dx c P dt 1 =− dx c x Computational Fluid Dynamics Why is the classification Important?! Summary! Computational Fluid Dynamics Summary! 1. Initial and boundary conditions! 2. Different physics! 3. Different numerical method apply! Computational Fluid Dynamics Summary! Navier-Stokes equations! Parabolic part! ∂u ∂u ∂u 1 ∂P µ ⎛⎜ ∂ 2 u ∂ 2 u ⎞⎟ + u +v =− + + ∂t ∂x ∂y ρ ∂x ρ ⎝ ∂x 2 ∂y 2 ⎠ The Navier-Stokes equations contain three equation types that have their own characteristic behavior! Depending on the governing parameters, one behavior can be dominant! The different equation types require different solution techniques! Hyperbolic part! ∂u ∂v + =0 ∂x ∂y Elliptic equation! For inviscid compressible flows, only the hyperbolic part survives! Computational Fluid Dynamics Summary! In the next several lectures we will discuss numerical solutions techniques for each class:! Advection and Hyperbolic equations, including ! solutions of the Euler equations! Parabolic equations! Elliptic equations! Then we will consider advection/diffusion equations and the special considerations needed there.! Finally we will return to the full Navier-Stokes equations!
© Copyright 2026 Paperzz