Lecture 2: Fundamentals 2/3: Navier-Stokes Equation + Basics of Discretization

Similar documents
Rhie-Chow interpolation in OpenFOAM 1

Magnetic induction and electric potential solvers for incompressible MHD flows

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

Solving PDEs with OpenFOAM

OpenFOAM selected solver

CFD with OpenSource software

An Overview of CFD Tools and Comparison of a 2D Testcase

Numerical solving of non-linear Schrödinger equation

ME 144: Heat Transfer Introduction to Convection. J. M. Meyers

The Simulation of Wraparound Fins Aerodynamic Characteristics

Porous Media in OpenFOAM

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

Lecture 1: Newton s Cooling Law, Fourier s Law and Heat Conduction

High-level programming in OpenFOAM and a first glance at C++

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

High-level programming in OpenFOAM and a first glance at C++

Coupled calculations in OpenFOAM -

CFD with OpenSource software A course at Chalmers University of Technology Taught by HÅKAN NILSSON. Project work: intersettlingfoam

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

Large Scale Fluid-Structure Interaction by coupling OpenFOAM with external codes

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

Transient flow simulations

Description of poroussimplefoam and adding the Brinkmann model to the porous models Developed for OpenFOAM-2.2.x

Introduction. Haukur Elvar Hafsteinsson. OpenFOAM - Porous Media 1. The Governing Equations. The Class. The solver. Porous media as a flow control

Turbulence Modeling I!

OpenFOAM Course Final Assignment: Tutorial for Natural Convection Boundary Layer

Week 6 Notes, Math 865, Tanveer

Chapter 9: Differential Analysis

SOE3213/4: CFD Lecture 1

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

Basic concepts in viscous flow

Solving PDEs with OpenFOAM

CFD Analysis of Forced Convection Flow and Heat Transfer in Semi-Circular Cross-Sectioned Micro-Channel

Differential relations for fluid flow

TABLE OF CONTENTS CHAPTER TITLE PAGE

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

A Simple Turbulence Closure Model

viscousheatingsolver Martin Becker

A Simple Turbulence Closure Model. Atmospheric Sciences 6150

Large-eddy simulations for wind turbine blade: rotational augmentation and dynamic stall

A Meshless Radial Basis Function Method for Fluid Flow with Heat Transfer

2. FLUID-FLOW EQUATIONS SPRING 2019

CHAPTER 7 NUMERICAL MODELLING OF A SPIRAL HEAT EXCHANGER USING CFD TECHNIQUE

n i,j+1/2 q i,j * qi+1,j * S i+1/2,j

Computational Fluid Dynamics Overview, Scope and Relevance

SIMULATION OF FLUID-STRUCTURAL INTERACTION

Chapter 9: Differential Analysis of Fluid Flow

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

Supporting information to

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

Viscoelastic Fluid Simulation with OpenFOAM

A solver for Boussinesq shallow water equations

An Overview of Fluid Animation. Christopher Batty March 11, 2014

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

Study of Forced and Free convection in Lid driven cavity problem

3. FORMS OF GOVERNING EQUATIONS IN CFD

International Engineering Research Journal Comparative Study of Sloshing Phenomenon in a Tank Using CFD

The behaviour of high Reynolds flows in a driven cavity

CFD in Heat Transfer Equipment Professor Bengt Sunden Division of Heat Transfer Department of Energy Sciences Lund University

VALIDATION OF REYNOLDS AVERAGED MODEL AND LARGE EDDY SIMULATION IN ACTUAL FLOOR HEATING ROOM. Hiroki Ono 1 and Koji Sakai 1

LARGE EDDY SIMULATION OF MASS TRANSFER ACROSS AN AIR-WATER INTERFACE AT HIGH SCHMIDT NUMBERS

Simplified flow around a propeller for the course CFD with OpenSource Software

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

Due Tuesday, November 23 nd, 12:00 midnight

α 2 )(k x ũ(t, η) + k z W (t, η)

1 Introduction to Governing Equations 2 1a Methodology... 2

NUMERICAL SIMULATION ON RECTANGULAR CONVERGENT AND DIVERGENT RIBBED CHANNELS

Implementing Vortex Lattice Representation of Propeller Sections

Spatial discretization scheme for incompressible viscous flows

Fluid Animation. Christopher Batty November 17, 2011

Computation Fluid Dynamics Prof. Dr. Suman Chakraborty Department of Mechanical Engineering Indian Institute of Technology, Kharagpur

DNS of the Taylor-Green vortex at Re=1600

Stratified scavenging in two-stroke engines using OpenFOAM

Description and validation of the rotordisksource class for propeller performance estimation

Description of AdjointShapeOptimizationFoam and how to implement new cost functions

International Journal of Modern Trends in Engineering and Research e-issn No.: , Date: April, 2016

Tutorial 11. Use of User-Defined Scalars and User-Defined Memories for Modeling Ohmic Heating

SOE3213/4: CFD Lecture 3

AN UNCERTAINTY ESTIMATION EXAMPLE FOR BACKWARD FACING STEP CFD SIMULATION. Abstract

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

Implementation of Turbulent Viscosity from EARSM for Two Equation Turbulence Model

Hybrid LES RANS Method Based on an Explicit Algebraic Reynolds Stress Model

Numerical Methods in Aerodynamics. Turbulence Modeling. Lecture 5: Turbulence modeling

Heat Transfer Simulation by CFD from Fins of an Air Cooled Motorcycle Engine under Varying Climatic Conditions

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

Info. No lecture on Thursday in a week (March 17) PSet back tonight

Implementation of HLLC-AUSM low-mach scheme in a density-based compressible solver in FOAM-extend

Large-Eddy Simulation of Subsonic Jets

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

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

An evaluation of a conservative fourth order DNS code in turbulent channel flow

Dam break free surface flow

FLOWS IN LIQUID FOAMS

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

CFD Modelling with OpenFOAM

FVM for Fluid-Structure Interaction with Large Structural Displacements

Adding electric conduction and Joule heating to chtmultiregionfoam Niklas Järvstråt

1-4 M BH10A1600 Energy Technology Project Work INT 16-INT 17

Implementation of 3D Incompressible N-S Equations. Mikhail Sekachev

Transcription:

Lecture 2: Fundamentals 2/3: Navier-Stokes Equation Basics of Discretization V.Vuorinen Aalto University School of Engineering CFD Course, Spring 2018 January 15th 2018, Otaniemi ville.vuorinen@aalto.fi

Overview First glimpse to OpenFOAM Navier-Stokes equation Finite difference discretization of NS-eqn About homework 1

Part 1: First Glimpse to OpenFOAM: No More Engineers Who Just Click Buttons

OpenFOAM (Open Source Field Operation and Manipulation) is a free software for CFD simulations with popularity comparable to the commercial code Ansys Fluent

CFD: From Geometry Model to Post-Processing 3) Flow model (governing eqs) - Navier-Stokes? - inflow/outflow/wall boundary conditions - initial conditions 2) 3d volume mesh - fill the space with small volume elements 1) Surface model CAD software Example: The MotorBike tutorial from the OpenFOAM code showing usage of SnappyHexMesh cell-splitting utility 4) CFD simulation - turbulence approach (RANS/LES/DNS) - numerical methods (linear solvers, discretization, timestep etc) - the flow model influences the above 5) Post-processing - visualization (e.g. velocity vectors) - numeric quantities (e.g. Cd) - time-averaged quantities and time series - statistical analysis

Overview of OpenFOAM CFD Code Structure (Source: OpenFOAM User's Manual)

Overview of OpenFOAM CFD Code Structure (Source: OpenFOAM User's Manual) lity: i t u ple m a y Ex t i c ti vor and m m o the c rsion e v own r u o n g. y w. e O s : ple ent m d a u x t E ms a o F ico lvers o s ible e s h s t e pr m ple: m o m c a a n o i x h F E Mes : the pimple k e l c p o bl Exam oam or F ico nd a m com

Simulation Input: Rough Overview of OpenFOAM Lid Driven Cavity Case Folder Structure Give velocity and /0/ U p controldict /cavity/ /system/ fvschemes fvsolution blockmeshdict /constant/ /polymesh/ pressure BC's and IC's here Give simulation duration, timestep, print-out interval etc here Give time/space discretization and interpolation schemes Give e.g. linear solver settings here Simple block-structured meshes can be generated in text file format Created mesh storage transportproperties Viscosity...

Info<< "\nstarting time loop\n" << endl; while (runtime.loop()) { Info<< "Time = "<<runtime.timename()<< nl <<endl; Example: Top-level OpenFOAM icofoam incompressible solver code syntax taken from file icofoam.c #include "CourantNo.H" // Momentum predictor fvvectormatrix UEqn ( fvm::ddt(u) fvm::div(phi, U) -fvm::laplacian(nu,u) );... if (piso.momentumpredictor()) { solve(ueqn == -fvc::grad(p));} // --- PISO loop while (piso.correct()) { volscalarfield rau(1.0/ueqn.a()); volvectorfield HbyA("HbyA", U); HbyA = rau*ueqn.h(); surfacescalarfield phihbya ( "phihbya", (fvc::interpolate(hbya) & mesh.sf()) No fvc::interpolate(rau)*fvc::ddtcorr(u, phi) more engineers who just click buttons you can read the code ); lines above and relate them to CFD theory tell how simulation methods affect simulation quality Discuss in the class room what the bold faced lines could mean. Which lines can you understand, which not?

Part 2: Navier-Stokes Equation

Incompressible fluid flows can be described by NavierStokes equation Note: Typically incompressible refers to liquid or low speed gas (Mach number < 0.3) ϕ1 ( u ϕ1)= (ν 1 ϕ1 ) ϕ2 ( u ϕ2)= ( ν2 ϕ2) Navier-Stokes equation u uu=- p ν Δ u Continuity equation u=0 ρ=constant

Navier-Stokes Equation (Conservation of Momentum) Pressure gradient: ensures mass conservation u uu=- p ν Δ u Velocity vector changes in time in a given position Velocity changes in space because of molecular diffusivity 2nd derivatives Velocity changes in space because of velocity field itself 1st derivatives ν=kinematic viscosity, [ν]=m2/s u=fluid velocity

Recap of Notation and Opening Up the Differential Operators The gradient is a vector operator: = i j k x y z Used short-hand notation for multiplying vectors uu If we define u as 3 by 1 vector then how can we multiply two vectors? The used short-hand can be understood as matrix product u u=u ut In the present notation uu defines a 3 by 3 matrix, also called, tensor u u=[u i u j ] 3 3 Row index Column index

Recap of Notation Divergence of a vector is a scalar: u1 u2 u3 u= x y z Divergence of a tensor is a vector: uu=c Thus: we can think that taking divergence reduces the dimensionality of the object.

Index Notation and Einstein Summation Convention Einstein summation convention: if index appears twice, sum over the index Divergence of vector: u= ui 3 ui =Σ i=1 xi xi Divergence of tensor: ui u j ui u j uu= =u j u xj xj i xj uj ui =u u i xj ui uj =0 xj (incompressibility) Divergence of gradient of vector is a vector (why?): (ν u)=ν u=ν Δ u ν u=δ u=ν 2 ui x 2 ν 2 ui y 2 ν 2 ui z 2

Navier-Stokes in Index Notation Note that component i of velocity is the transported quantity 2 ui ui u j ui p =ν 2 xj xi xj Note that the j velocities convect the i velocity component i i Note: NS is essentially the CD equation form ϕ ϕ u j 2 ϕ =ν 2 x j xj

The Navier-Stokes Equation ϕ ( u ϕ)= ( ν ϕ) u uu=- pν Δ u u=0 NS-eqs vector form ρ=constant NS-eqs all terms opened u u u uv uw p 2 u 2 u 2 u =ν 2 ν 2 ν 2 x y z x x y z Note: we embed density into pressure because it is assumed to be a constant v v u vv vw p 2 v 2 v 2 v =ν 2 ν 2 ν 2 x y z y x y z 2 2 2 w w u wv ww p w w w =ν 2 ν ν 2 2 x y z z x y z Note: because the flow is divergence-free (incompressible) u uu=- p ν Δ u equivalence u u u=- p ν Δ u

Part 3: Lid Driven Cavity Note: Related to Homework 1

Example: the Lid driven cavity benchmark case At the moving lid the flow velocity matches the lid velocity u=( U, 0) At static walls we use the no-slip boundary condition Reynolds number Ud Re= ν u uu=- pν Δ u u=0 At static walls we use the zero-gradient boundary condition for pressure p n=0 u=( 0,0) But how do we get velocity and pressure?!

The grid and the simple grid generation of this structured grid Snapshot from the OpenFOAM mesh generation dictionary cavity/system/blockmeshdict converttometers 0.1; vertices ( (0 0 0) (1 0 0) (1 1 0) (0 1 0) (0 0 0.1) (1 0 0.1) (1 1 0.1) (0 1 0.1) ); blocks ( hex (0 1 2 3 4 5 6 7) (20 20 1) simplegrading (1 1 1) );...

Comparison of lid-driven cavity simulation with literature data Simulation by V. Vuorinen using OpenFOAM

Part 4: The very 1st basic idea of numerical solution of NS-equation Note: This is a brief first look and we will go more into detail later on.

Basic idea of numerical solution of NS-eqs The projection method (Hirsch Ch. 12) Step 1: find velocity increment in each grid point Step 2: find new velocity which must be divergence free i, j u n1 * Δ un=δ u n P u uu=- pν Δ u u =PD C Cell (i,j) Δu =P n D n C n Δt Δ u=δ t (D n C n P n ) u n1=un Δ un i, j un

Comments: - convection and diffusion terms can be easily calculated with carefully chosen finite difference methods on each timestep - pressure correction method is needed in order to find pressure - in incompressible flows pressure can not be expressed with a simple equation of state but finding pressure requires solution of linear system of Eqs - you will use pressure correction method called PISO (Pressure Implicit Splitting of Operators) which is the standard approach in OpenFOAM - the pressure correction approach we teach in the lectures is called projection method which is most typically used in modern LES/DNS simulations - Projection method is simple to learn and PISO essentially does the same job: pressure is needed to keep velocity field divergence free (incompressible)

Thank you for your attention!