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

Similar documents
Numerical methods for the Navier- Stokes equations

FEniCS Course. Lecture 0: Introduction to FEM. Contributors Anders Logg, Kent-Andre Mardal

Efficient Augmented Lagrangian-type Preconditioning for the Oseen Problem using Grad-Div Stabilization

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

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

Preconditioners for the incompressible Navier Stokes equations

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

Fast Solvers for Unsteady Incompressible Flow

Parabolic Flow in Parallel Plate Channel ME 412 Project 4

OpenFOAM selected solver

fluid mechanics as a prominent discipline of application for numerical

Chapter 2. General concepts. 2.1 The Navier-Stokes equations

PDE Solvers for Fluid Flow

Vector and scalar penalty-projection methods

20. A Dual-Primal FETI Method for solving Stokes/Navier-Stokes Equations

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

HIGHER-ORDER LINEARLY IMPLICIT ONE-STEP METHODS FOR THREE-DIMENSIONAL INCOMPRESSIBLE NAVIER-STOKES EQUATIONS

An advanced ILU preconditioner for the incompressible Navier-Stokes equations

ON USING ARTIFICIAL COMPRESSIBILITY METHOD FOR SOLVING TURBULENT FLOWS

Laminar Boundary Layers. Answers to problem sheet 1: Navier-Stokes equations

A Review of Solution Techniques for Unsteady Incompressible Flow

PALADINS: Scalable Time-Adaptive Algebraic Splitting and Preconditioners for the Navier-Stokes Equations

Discrete Projection Methods for Incompressible Fluid Flow Problems and Application to a Fluid-Structure Interaction

A numerical study of heat transfer and fluid flow over an in-line tube bank

Newton-Multigrid Least-Squares FEM for S-V-P Formulation of the Navier-Stokes Equations

Numerical Simulations of the Fluid-Structure Coupling in Physiological Vessels Mini-Workshop I

Adaptive C1 Macroelements for Fourth Order and Divergence-Free Problems

Turbulence Modeling I!

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

Fast Iterative Solution of Saddle Point Problems

A Review of Preconditioning Techniques for Steady Incompressible Flow

IMPLEMENTATION OF A PARALLEL AMG SOLVER

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

Fast solvers for steady incompressible flow

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

On a class of numerical schemes. for compressible flows

Cranfield University, Cranfield, Bedfordshire, MK43 0AL, United Kingdom. Cranfield University, Cranfield, Bedfordshire, MK43 0AL, United Kingdom

AE/ME 339. K. M. Isaac. 9/22/2005 Topic 6 FluidFlowEquations_Introduction. Computational Fluid Dynamics (AE/ME 339) MAEEM Dept.

Heat and Mass Transfer Prof. S.P. Sukhatme Department of Mechanical Engineering Indian Institute of Technology, Bombay

Explicit algebraic Reynolds stress models for boundary layer flows

Bridging the Gap: Harnessing advanced Computational Libraries for coupled multi-physics problems

Hybrid Discontinuous Galerkin methods for incompressible flow problems

Efficient FEM-multigrid solver for granular material

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

7.4 The Saddle Point Stokes Problem

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

Module 2 : Convection. Lecture 12 : Derivation of conservation of energy

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

Computation of Incompressible Flows: SIMPLE and related Algorithms

A monolithic FEM solver for fluid structure

JMBC Computational Fluid Dynamics I Exercises by A.E.P. Veldman

Lecture 30 Review of Fluid Flow and Heat Transfer

Basic hydrodynamics. David Gurarie. 1 Newtonian fluids: Euler and Navier-Stokes equations

10. Buoyancy-driven flow

Efficient Solvers for the Navier Stokes Equations in Rotation Form

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

Assessment of a vorticity based solver for the Navier-Stokes equations

AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS

Finite Element Decompositions for Stable Time Integration of Flow Equations

Algebraic Flux Correction III

( ) II. Why statistics? SIO 221B, Rudnick adapted from Davis!1

Space-time XFEM for two-phase mass transport

Numerical Methods for Problems with Moving Fronts Orthogonal Collocation on Finite Elements

Numerical Methods for Incompressible Viscous Flow

2 Equations of Motion

Vector Penalty-Projection Methods for the Solution of Unsteady Incompressible Flows

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

FEniCS Course. Lecture 1: Introduction to FEniCS. Contributors Anders Logg André Massing

The solution of the discretized incompressible Navier-Stokes equations with iterative methods

FREE BOUNDARY PROBLEMS IN FLUID MECHANICS

Implicit Solution of Viscous Aerodynamic Flows using the Discontinuous Galerkin Method

FEniCS Course. Lecture 1: Introduction to FEniCS. Contributors Anders Logg André Massing

Introduction to Heat and Mass Transfer. Week 9

Numerical Modelling in Fortran: day 10. Paul Tackley, 2016

A Fast, Parallel Potential Flow Solver

1 Introduction. J.-L. GUERMOND and L. QUARTAPELLE 1 On incremental projection methods

Transport processes. 7. Semester Chemical Engineering Civil Engineering

Numerical Simulation of Newtonian and Non-Newtonian Flows in Bypass

15 The coffee cup J Nonlinear Dynamics II: Continuum Systems Lecture 15 Spring 2015

Une méthode de pénalisation par face pour l approximation des équations de Navier-Stokes à nombre de Reynolds élevé

Computational Fluid Dynamics 2

DELFT UNIVERSITY OF TECHNOLOGY

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

Fluid-Particles Interaction Models Asymptotics, Theory and Numerics I

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

A TAXONOMY AND COMPARISON OF PARALLEL BLOCK MULTI-LEVEL PRECONDITIONERS FOR THE INCOMPRESSIBLE NAVIER STOKES EQUATIONS

Block-Structured Adaptive Mesh Refinement

Implementing a k-ε Turbulence Model in the FEniCS Finite Element Programming Environment

Chapter 9: Differential Analysis

Entropy 2011, 13, ; doi: /e OPEN ACCESS. Entropy Generation at Natural Convection in an Inclined Rectangular Cavity

Colloquium FLUID DYNAMICS 2012 Institute of Thermomechanics AS CR, v.v.i., Prague, October 24-26, 2012 p.

6.2 Governing Equations for Natural Convection

MATHEMATICAL MODELING AND NUMERICAL SOLUTION OF 3D ATMOSPHERIC BOUNDARY LAYER

Vector penalty-projection methods for outflow boundary conditions with optimal second-order accuracy

2. FLUID-FLOW EQUATIONS SPRING 2019

Design and Modeling of Fluid Power Systems ME 597/ABE Lecture 7

Partitioned Methods for Multifield Problems

Coupling Stokes and Darcy equations: modeling and numerical methods

Pressure corrected SPH for fluid animation

OUTLINE ffl CFD: elliptic pde's! Ax = b ffl Basic iterative methods ffl Krylov subspace methods ffl Preconditioning techniques: Iterative methods ILU

Transcription:

FEniCS Course Lecture 6: Incompressible Navier Stokes Contributors Anders Logg André Massing 1 / 11

The incompressible Navier Stokes equations u + u u ν u + p = f in Ω (0, T ] u = 0 in Ω (0, T ] u = g D on Γ D (0, T ] ν u n pn = g N on Γ N (0, T ] u(, 0) = u 0 in Ω u is the fluid velocity and p is the pressure divided by the density ρ ν = µ/ρ is the kinematic viscosity, µ dynamic viscosity f is a given body force per unit mass g D is a given boundary flow g N is a given boundary function for the natural boundary condition u 0 is a given initial velocity 2 / 11

Variational problem Multiply the momentum equation by a test function v and integrate by parts: ( u + u u) v dx + ν u : u dx p v dx Ω Ω Ω = f v dx + g N v ds Ω Γ N Short-hand notation: ( u + u u, v) + ν( u, v) (p, v) = (f, v) + (g N, v) ΓN Multiply the continuity equation by a test function q and sum up: find (u, p) V such that ( u + u u, v) + ν( u, v) (p, v) (q, u) = (f, v) + (g N, v) ΓN for all (v, q) ˆV 3 / 11

Discrete variational problem Time-discretization leads to a saddle-point problem on each time step: [ ] [ ] [ ] M + ta + tn(u) tb U b tb = 0 P 0 Efficient solution of the saddle-point problem relies on the efficiency of special-purpose preconditioners (Uzawa iteration, Schur complement preconditioners,... ) We will use another approach (simpler and often more efficient) 4 / 11

The classical Chorin-Teman projection method Step 1: Compute tentative velocity u solving u u n ν u + (u )u = f n+1 t u = g D u n = 0 in Ω on Ω D on Ω N Step 2: Compute a corrected velocity u n+1 and a updated pressure p n+1 solving u n+1 u + p n+1 = 0 t in Ω u n+1 = 0 in Ω u n+1 n = 0 on Ω 5 / 11

Computing the tentative velocity In principle, the term (u )u can be approximated in several ways Explicit: u = u = u n diffusion-reaction equation Semi-implicit u = u n and u = u n+1 convection-diffusion-reaction equation Fully-implicit u = u = u n retaining the basic non-linearity in the Navier-Stokes equations The natural outflow condition ν n u pn = 0 is artificially enforced by requiring n u = 0 on Ω N in step 1 p n+1 = 0 on Ω N in step 2 6 / 11

Solving the projection step Applying to un+1 u + p n+1 = 0 and using requirement t u n+1 = 0 yields p n+1 = 1 t u in Ω We already required p = 0 on Ω N Multiplying un+1 u + p n+1 = 0 with n and restricting to t Ω D gives Compute u n+1 by p n+1 n = 0 on Ω D u n+1 = u t p n+1 including boundary conditions for u at t = t n+1 7 / 11

Chorin-Teman projection method Summary 1 Compute tentative velocity u by ( u u n, v) + ((u )u, v) + ν( u, v) (f, v) = 0 t including boundary conditions for the velocity. 2 Compute new pressure p n+1 by ( p n+1, q) + 1 t ( u, q) = 0 including boundary conditions for the pressure. 3 Compute corrected velocity by (u n+1 u, v) + t( p n+1, v) = 0 including boundary conditions for the velocity. 8 / 11

Useful FEniCS tools (I) Note vs. : dot ( grad (u), u) dot (u, nabla_grad (u)) Solving linear systems: solve (A, x, b) solve (A, x, b, " gmres ", " ilu ") solve (A, x, b, "cg", " amg ") Defining a and L based on residual formulation: F1 = ( (1/k)* inner (u - u0,v) + inner ( grad ( u0)*u0,v) + nu* inner ( grad (u), grad (v)) - inner (f,v) )* dx a1 = lhs ( F1) L1 = rhs ( F1) 9 / 11

The FEniCS challenge! Implement a famous benchmark simulating a laminar flow around a cylinder. The geometry is described by Set the kinematic viscosity ν = 0.001 m 2 /s and ρ = 1.0 kg/m 3. A do-nothing boundary condition is assumed at the outlet. Defining U m = 1.5 m/s, the time-dependent inflow condition is given by U = 4U m y(h y) sin(πt/8)/h 2, V = 0. Schäfer/Turek, Benchmark Computations of Laminar Flow Around a Cylinder (1996) 10 / 11

The FEniCS challenge! The inflow boundary lies at x = 0.2 and the outflow boundary at x = 2.0. Compute the flow on the time interval [0, 8] with time-step dt = 0.001. Test your implementation first for a larger time-step dt = 0.01 and the same channel problem but with the cylinder removed. If everything goes fine you should get something like Happy coding! Schäfer/Turek, Benchmark Computations of Laminar Flow Around a Cylinder (1996) 11 / 11