The Poisson equa-on in projec-on methods for incompressible flows. Bérengère Podvin, Yann Fraigneau LIMSI- CNRS

Similar documents
Accelerating incompressible fluid flow simulations on hybrid CPU/GPU systems

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

Chapter 5. Methods for Solving Elliptic Equations

Differential relations for fluid flow

fluid mechanics as a prominent discipline of application for numerical

( ) Notes. Fluid mechanics. Inviscid Euler model. Lagrangian viewpoint. " = " x,t,#, #

LES of turbulent shear flow and pressure driven flow on shallow continental shelves.

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

Numerical methods for the Navier- Stokes equations

Open boundary conditions in numerical simulations of unsteady incompressible flow

Towards a Numerical Benchmark for 3D Low Mach Number Mixed Flows in a Rectangular Channel Heated from Below

Chapter 2: Fluid Dynamics Review

Exercise 5: Exact Solutions to the Navier-Stokes Equations I

ME469. Computational Methods in Fluid Mechanics. Handout #11 GI - W2015

Block-Structured Adaptive Mesh Refinement

Getting started: CFD notation

Computer Fluid Dynamics E181107

ME Computational Fluid Mechanics Lecture 5

On a class of numerical schemes. for compressible flows

Direct Numerical Simulations of converging-diverging channel flow

2. FLUID-FLOW EQUATIONS SPRING 2019

Spatial discretization scheme for incompressible viscous flows

Experience with DNS of particulate flow using a variant of the immersed boundary method

- Marine Hydrodynamics. Lecture 4. Knowns Equations # Unknowns # (conservation of mass) (conservation of momentum)

Math background. Physics. Simulation. Related phenomena. Frontiers in graphics. Rigid fluids

FEniCS Course. Lecture 6: Incompressible Navier Stokes. Contributors Anders Logg André Massing

A unifying model for fluid flow and elastic solid deformation: a novel approach for fluid-structure interaction and wave propagation

Project 4: Navier-Stokes Solution to Driven Cavity and Channel Flow Conditions

Candidates must show on each answer book the type of calculator used. Log Tables, Statistical Tables and Graph Paper are available on request.

Improvements of Unsteady Simulations for Compressible Navier Stokes Based on a RK/Implicit Smoother Scheme

Convergence of the MAC scheme for incompressible flows

Vector and scalar penalty-projection methods

Diffusion / Parabolic Equations. PHY 688: Numerical Methods for (Astro)Physics

A Study on Numerical Solution to the Incompressible Navier-Stokes Equation

Chapter 5. The Differential Forms of the Fundamental Laws

Courant Institute of Mathematical Sciences, New York University, New York, NY 10012,

Computers and Mathematics with Applications. Investigation of the LES WALE turbulence model within the lattice Boltzmann framework

Numerical Solution Techniques in Mechanical and Aerospace Engineering

Direct Numerical Simulation of fractal-generated turbulence

Multipole-Based Preconditioners for Sparse Linear Systems.

LEAST-SQUARES FINITE ELEMENT MODELS

SIMPLE Algorithm for Two-Dimensional Channel Flow. Fluid Flow and Heat Transfer

Chapter 9: Differential Analysis

Multigrid Methods and their application in CFD


Kasetsart University Workshop. Multigrid methods: An introduction

Flow simulation on moving boundary-fitted grids and application to fluid-structure interaction problems

The Shallow Water Equations

Numerical Heat and Mass Transfer

A Momentum Exchange-based Immersed Boundary-Lattice. Boltzmann Method for Fluid Structure Interaction

A Robust Preconditioned Iterative Method for the Navier-Stokes Equations with High Reynolds Numbers

Chapter 9: Differential Analysis of Fluid Flow

Modelling of turbulent flows: RANS and LES

Simulation of T-junction using LBM and VOF ENERGY 224 Final Project Yifan Wang,

Numerical Simulation of Newtonian and Non-Newtonian Flows in Bypass

1 The Stokes System. ρ + (ρv) = ρ g(x), and the conservation of momentum has the form. ρ v (λ 1 + µ 1 ) ( v) µ 1 v + p = ρ f(x) in Ω.

Lattice Boltzmann Method for Moving Boundaries

Part IV: Numerical schemes for the phase-filed model

Game Physics. Game and Media Technology Master Program - Utrecht University. Dr. Nicolas Pronost

A combined application of the integral wall model and the rough wall rescaling-recycling method

Turbulence Modeling I!

The lattice Boltzmann method for contact line dynamics

Math 575-Lecture Viscous Newtonian fluid and the Navier-Stokes equations

Fast solvers for steady incompressible flow

A parallel solver for incompressible fluid flows

STEADY AND UNSTEADY 2D NUMERICAL SOLUTION OF GENERALIZED NEWTONIAN FLUIDS FLOW. Radka Keslerová, Karel Kozel

Homework 4 in 5C1212; Part A: Incompressible Navier- Stokes, Finite Volume Methods

Soft Bodies. Good approximation for hard ones. approximation breaks when objects break, or deform. Generalization: soft (deformable) bodies

V (r,t) = i ˆ u( x, y,z,t) + ˆ j v( x, y,z,t) + k ˆ w( x, y, z,t)

Numerical Methods in Geophysics. Introduction

Engineering. Spring Department of Fluid Mechanics, Budapest University of Technology and Economics. Large-Eddy Simulation in Mechanical


Study of Forced and Free convection in Lid driven cavity problem

A high-order discontinuous Galerkin solver for 3D aerodynamic turbulent flows

ON USING ARTIFICIAL COMPRESSIBILITY METHOD FOR SOLVING TURBULENT FLOWS

Application of the Immersed Boundary Method to particle-laden and bubbly flows

An arbitrary lagrangian eulerian discontinuous galerkin approach to fluid-structure interaction and its application to cardiovascular problem

Pressure-velocity correction method Finite Volume solution of Navier-Stokes equations Exercise: Finish solving the Navier Stokes equations

Free energy concept Free energy approach LBM implementation Parameters

A Scalable, Parallel Implementation of Weighted, Non-Linear Compact Schemes

2.20 Fall 2018 Math Review

PDE Solvers for Fluid Flow

CHAPTER 7 SEVERAL FORMS OF THE EQUATIONS OF MOTION

A Finite-Element based Navier-Stokes Solver for LES

Two-Dimensional Unsteady Flow in a Lid Driven Cavity with Constant Density and Viscosity ME 412 Project 5

Computation for the Backward Facing Step Test Case with an Open Source Code

LATTICE BOLTZMANN MODELLING OF PULSATILE FLOW USING MOMENT BOUNDARY CONDITIONS

.u= 0 ρ( u t +(u. )u)= ρ g p+.[µ( u+ t u)]

Computational Fluid Dynamics 2

Splitting based Implicit solvers for compressible fluid models

Scientific Computing I

Finite Volume Method

RANS Equations in Curvilinear Coordinates

Turbulence and its modelling. Outline. Department of Fluid Mechanics, Budapest University of Technology and Economics.

Implicit numerical scheme based on SMAC method for unsteady incompressible Navier-Stokes equations

Micro-Scale Gas Transport Modeling

arxiv: v4 [physics.comp-ph] 21 Jan 2019

Kadath: a spectral solver and its application to black hole spacetimes

Elliptic Problems / Multigrid. PHY 604: Computational Methods for Physics and Astrophysics II

SIMPLE Algorithm for Two-Dimensional Flow - Fluid Flow and Heat Transfer

Transcription:

The Poisson equa-on in projec-on methods for incompressible flows Bérengère Podvin, Yann Fraigneau LIMSI- CNRS 1

Overview Origin of the Poisson equa-on for pressure Resolu-on methods for the Poisson equa-on Applica-on to the code SUNFLUIDH (Y. Fraigneau, LIMSI) 2

Conserva-on Equa-ons for Fluid Mechanics Mass Momentum Energy ρ t +.(ρu) = 0 (ρu) +.(ρuu) = p +.τ + ρ f t (ρe) t +.(ρeu) = ( pu) +.(τ.u) + ρ f.u.. q + r Density ρ Velocity u Total energy e Pressure p + equa-ons of state to close the problem Heat flux q = k T Stress tensor Newtonian fluid τ = µ[ 1 2 ( u + ut ) (.u)i) 3

What is an incompressible flow? Incompressibility: The density of a fluid par-cle does not change over -me Mass conserva-on Incompressibility ρ t +.(ρu) = 0 dρ dt = ρ t + u. ρ = 0.u = 0 Characterizes flow (not fluid) When can the flow be assumed to be incompressible? The rate of change of the density of a fluid par-cle is very small compared to the inverse of the other -me scales of the flow u l << 1 τ a costic u c 2 <<1 Acous-c -me scale small Mach number small 4

The incompressible flow Assuming constant- density, Newtonian fluid.u = 0 u t +.(uu) = p + Δu + ρ f Equa-ons for u are ellip-c in space: boundary condi-ons need to be known over en-re physical boundary. Pressure has no thermodynamic significance. It is directly related to the zero divergence constraint. There is no boundary condi-ons for pressure (in general). 5

How do we solve for pressure? Take divergence of equa-on u + u..u = p + Δu + f t.( f u..u) = Δp (.u = 0)!Ellip-c equa-on requires boundary condi-ons! Pressure is defined in a smaller space than velocity (dual of velocity divergence):!spurious pressure modes in kernel of discrete gradient! 6

The direct approach (Uzawa) All operators are discre-zed (including boundary condi-ons) Hu + p = S.u = 0 u = H Uzawa operator 1 (S p).h 1 p =.H 1 S p = (.H 1 ) 1 (.H 1 S) u = H 1 (S p) In some cases, the discre-zed Poisson operator can be inverted, leading to a simultaneous update of the velocity and the pressure field. Spectral or finite- element approach, mostly used in 2D. 7

The projec-on method (I) Separate (frac-onal) updates of velocity and pressure.u = 0 u + p Δu = f t u bc = γ (1+ε) u n +1 2ε u n (1 ε)u n 1 Δt u n +1 = γ Original equa-ons + λ 1 p n Δ(θ u n +1 + (1 θ)u n ) = θ f n +1 + (1 θ) f n 1 st step: predic-on (1+ε) un +1 u n +1 2Δt.u n +1 = 0 + λ 2 p n +1 + λ 3 p n = 0 u bc n +1.n = γ n p bc n +1 = 0 2 nd step: projec-on or pressure correc-on Neuman boundary condi-ons for pressure 8

The projec-on method (II) Combined expression (1+ε)u n +1 2ε u n (1 ε)u n 1 Δt + λ 2 p n +1 + (λ 1 + λ 3 ) p n 2θΔt 1+ε Δ(λ 2 pn +1 + λ 3 p n ) Δ(θ u n +1 + (1 θ)u n ) = θ f n +1 + (1 θ) f n λ 1 + λ 2 + λ 3 =1 ε 2 = θ =1 (λ 1 + λ 3 ) θ 1+ε (λ 2 + λ 3 ) = 0 O(Δt) O(Δt 2 ) 9

Domain decomposi-on Γ 1 2 Fic--ous cell.u = 0 u + p Δu = f t u bc = γ.u 1 = 0 = u 1 + p 1 Δu 1 = f t u 1 bc = γ.u 2 = 0 u 2 + + p 2 Δu 2 = f + t u 2 bc = γ Schur complement: X=(u,p) Interface Γ u 1 2 Γ = u Γ 1 u Γ n p1 n = u 2 Γ n p2 n A 11 X 1 + A 1Γ X Γ = S 1 X 1 = A 1 11 (S 1 A 1Γ X Γ ) A 22 X 2 + A 2Γ X Γ = S 2 X 2 = A 1 22 (S 2 A 2Γ X Γ ) A Γ1 X 1 + A Γ2 X 2 + A ΓΓ X Γ = S Γ (A ΓΓ A Γ1 A 1 11 A 1Γ A Γ2 A 1 22 A 2Γ )X Γ = S Γ A Γ1 A 1 11 S 1 A Γ2 A 22 1 S 2 10

Resolu-on of Navier- Stokes equa-ons in SUNFLUIDH Incompressible flow (constant- property fluid, ν=1) Second- order accurate temporal discre-za-on! BDF2 Spa-al Discre-za-on Finite- volume approach Second- order centered scheme Viscous terms treated implicitly for stability reasons 11

Applica-on of the predic-on- projec-on method Incompressible, constant- property, fluid V! t +!.(t V V! ) = P +! 2 V. V! = 0 Incremental predic6on projec6on method Predic6on : Resolu6on N- S eqs 3V i * 4V i n +V i n 1 2Δt +.(V n i.v n j ) x j = P n + 2 * V i Projec6on : Resolu6on Poisson Update V et P 2 φ =.! V * Δt P n +1 = P n + 3 2 φ +. V! *! V n +1 = V! * Δt φ 12

Staggered mesh (MAC scheme) v(i,j+1/2) Define metric: P, φ(i,j) u(i+1/2,j) Structured staggered meshes with a Cartesian topology Center of cells l (i,j) : defini-on of scalar(p,φ, T) Staggered meshes (i+1/2,j) et (i,j+1/2) en 2D: defini-on of the velocity compoments Consistence in the defini-on of the different discrete (2 nd - order) operators! div(grad) = laplacian Discre-za-on of the Poisson equa-on: Avoid genera-on of spurious pressure modes Div(V) = 0 is enfocred without roundoff error Need to define operators in the center and on the faces of the cells Discre-za-on of operators depends on the variable (irregular mesh) 13

Computa-onal Domain Computa6on Domain defined with respect to main cartesian mesh (i,j) Fluid Domain Fic--ous cells around the fluid domain Handling boundary condi-ons on the fron-er of the domain Defini-on of a phase func-on Localiza-on of the immersed boundary (masks on mesh) Defini-on of the boundary condi-ons for the simula-on fluid inlet outlet boundary (walls) 14

Predic-on step (I) Resolu-on of Navier- Stokes equa-ons! V * velocity field at t n+1 Second- order -me and space discre-za-on of equa-ons Viscous terms treated implicity (stability wrt -me step) 3V i * 4V i n +V i n 1 2.Δt + 2.(V n i.v n j ) x j.(v n 1 n i.v 1 j ) x j = P n + 2 * V i!helmholtz Equa-ons (Ι 2Δt 3 2 )(V * i V n i ) = S - Resolu-on using ADI (Alterna-ng Direc-on Implicit method) (Ι 2Δt 3 2 ) (Ι 2Δt 3 x 2 )(Ι 2Δt 3 y 2 )(Ι 2Δt 3 z 2 ) +O Δt 2 ( ) System 3D! 3 tridiagonal 1- D systems (direct resolu6on using Thomas algorithm) 15

Predic-on step (II) Approxima-on of the 3D operator using 1- D operators! Successive resolu6on of 3 1- D systems Spa-al discre-za-on of viscous fluxes! Tridiagonal systems 16

Projec-on Step: Poisson equa-on (I) Direct Method: Par6al diagonaliza6on of Laplacian L Principle Solving for ϕ : Lφ =.V * = S ( L x + L y + L z )φ = S ( Λ x + Λ y + L z )φ'= S' Λ x = P x 1 L x P x (diag. w.r.t x) ; Λ y = P y 1 L y P y (diag. w.r.t y) S'= P x 1 P y 1 S ; φ'= P x 1 P y 1 φ Project source term onto the eigenspaces of operators in X and Y Integrate 1- D Helmholtz- like equa-on (tridiagonal system) Use Thomas algorithm for direct solu-on Inverse Projec-on φ! ϕ Need problem to be separable i.e: Homogeneous boundary condi-ons Discre-za-on of operator can be done in one direc-on, independently from other direc-ons (tensoriza-on possible) 17

Paralleliza-on on distributed memory architecture: Resolu-on of tridiagonal systems with direct methods Paralleliza-on on distributed memory architecture: Domain decomposi-on method: each processor corresponds to 1 sub- domain Direct methods for domain decomposi-on Resolu-on of tridiagonal systems (Helmholtz 1D)! Schur complement method: Consider the tridiagonal system 1. Solve A k X k,o = S k 2. Compute X iu using Schur complement ( tridiagonal system) 3. Solve on each proc. A k X k = S k - A ki X I ; X I condi-ons at interfaces! At each step direct resolu-on (Thomas algorithm) 18

Projec-on Step: Poisson equa-on (II) Itera6ve Method: Relaxed Gauss- Seidel (SOR) + Mul6grid SOR algorithm applied to the system LX= S At k- th itera-on Convergence obtained at k- th itera-on if LX k+1 S < ε Domain decomposi-on: Boundary condi-ons handled using overlaps between subdomains Boundary condi-ons update at each itera-on 19

Projec-on Step: Poisson equa-on (III) Mul-grid method: mo-va-on and principle SOR Slow convergence of low- frequency eror SOR coupled with a V- cycle mul6grid method Increase convergence Mul6grid method N grid levels with factor of 2 between grid resolu-ons On each grid level n > 1 Error es-mated on level n- 1 Grid levels n Low- frequency error decreases faster over coarser grids n= 1, Δx=h n= 2, Δx=2h n= N, Δx=2 (N- 1) h 20

SOR Algorithm + Mul-grid Resolu-on procedure for nv- cycle mul-grid Restric6ng from the finest grid (n=1) to the coarsest grid (n= N) Solve LX (1) =S on fine grid (n=1) => Approximate solu-on X (1) Compute residue R (1) = S- LX (1) Restrict residue to coarser grid : R (2) = f(r (1) ) Solve on grid n=2 LX (2) =R (2). Repeat procedure down to n=n For n > 1, each solu-on X (n)! error es-mate on the solu-on X (n- 1) Interpola6ng from coarsest grid to the finest grids Extension : Es-mate error E (n- 1) from X (n): E (n- 1) = f(x (n) ) Es-mate corrected solu-on on the grid at level n- 1 : X (n- 1) =X (n- 1) +E (n- 1) Eliminate errors by extending correc-on on grid n- 1 Addi-onal itera-ons of the SOR algorithm from the ini-al X (n- 1) LX (n- 1) = R (n- 1) ; Si n= 1 LX (1) = S Recursive procedure up to n= 1. If the convergence criterion ( R (1) < ε) is not sa6sfied!new cycle n=1 n=n 21

Discre-za-on of the Poisson equa-on Spa6al discre6za6on: 2nd order centered scheme 2D Laplacian In x : x 2 φ αφ i+1, j (α + β)φ i, j + βφ i 1, j avec α = In y : y 2 φ αφ i, j +1 (α + β)φ i, j + βφ i, j 1 avec α = Source term : div(v*) ν ΔX i+1/ 2.ΔX i et β = ν ΔY j +1/ 2.ΔY j et β = ν ΔX i 1/ 2.ΔX i ν ΔY ji 1/ 2.ΔY j Pressure Gradient (2D) In x : P x i+1/ 2, j P i+1, j P i, j ΔX i+1/ 2 In y : P y i, j +1/ 2 P i, j +1 P i, j ΔY i+1/ 2 Staggered mesh: Pressure gradient is defined at same loca-on as velocity components 22

Essen6als of SUNFLUIDH Incompressible flows or Low Mach approxima6on Projec-on method for the resolu-on of Navier- Stokes Second- order accuracy in -me and space: Finite- Volume approach with MAC scheme Viscous terms treated implicitly => Helmholtz- type system solved with ADI method Projec-on method => Resolu-on of a Poisson equa-on for pressure Direct method: Par-al diagonaliza-on of Laplacian (separable problem) Itera-ve method: SOR + Mul-grid (Next step: HYPRE) Paralleliza6on Mul-threading «fine grain» (OpenMP) Domain decomposi-on (MPI implementa-on) Domain Hybrid paralleliza-on (ongoing work) MPI+ GPU : thèse LRI/LIMSI (project Digitéo CALIPHA) 23

Code performance ( IBM SP6 - IDRIS) Paralleliza-on MPI Paralleliza-on OpenMP s Bo leneck: communica-on between processors 24

R τ = u τ h ν = 980 Example: Channel flow (512) 3 cells 64 processors: 4x4x4 Cost: 6.0 10-8 s/step/node Frac-on spent in Poisson resolu-on: 30-60% Streamwise velocity isosurfaces u=10, u=15 25