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

Similar documents
Multiphysics Modeling

Peristaltic Pump. Introduction. Model Definition

Mass Transfer in a Stirred Batch Reactor

Finite Element Modules for Enhancing Undergraduate Transport Courses: Application to Fuel Cell Fundamentals

Shape, Convection and Convergence

Generator. Introduction. Modeling in COMSOL Multiphysics

Example Resistive Heating

DUE: WEDS MARCH 26TH 2018

Parabolic Flow in Parallel Plate Channel ME 412 Project 4

Dimerization in a Tubular Reactor

Physics to PDE. Tutorial

Fluid Animation. Christopher Batty November 17, 2011

Scientific Computing I

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

Elmer :Heat transfert with phase change solid-solid in transient problem Application to silicon properties. SIF file : phasechange solid-solid

1 Exercise: Linear, incompressible Stokes flow with FE

Transient flow and heat equations - the Rayleigh-Benard instability

Chapter 9: Differential Analysis

Mixing in Flow Devices:

Integrated Square-Shaped Spiral Inductor

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

Electromagnetic Forces on Parallel Current-

ME 431A/538A/538B Homework 22 October 2018 Advanced Fluid Mechanics

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

Chapter 9: Differential Analysis of Fluid Flow

Getting started: CFD notation

Nicholas Cox, Pawel Drapala, and Bruce F. Finlayson Department of Chemical Engineering, University of Washington, Seattle, WA, USA.

Taylor Dispersion Created by Robert P. Hesketh, Chemical Engineering, Rowan University Fall 2005

Due Tuesday, November 23 nd, 12:00 midnight

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

UNIVERSITY of LIMERICK

PDE Solvers for Fluid Flow

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

MOMENTUM PRINCIPLE. Review: Last time, we derived the Reynolds Transport Theorem: Chapter 6. where B is any extensive property (proportional to mass),

Turbulent Boundary Layers & Turbulence Models. Lecture 09

DIRECT NUMERICAL SIMULATION OF SPATIALLY DEVELOPING TURBULENT BOUNDARY LAYER FOR SKIN FRICTION DRAG REDUCTION BY WALL SURFACE-HEATING OR COOLING

fluid mechanics as a prominent discipline of application for numerical

Numerical methods for the Navier- Stokes equations

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

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

Turbulence - Theory and Modelling GROUP-STUDIES:

2. FLUID-FLOW EQUATIONS SPRING 2019

Tutorial for the supercritical pressure pipe with STAR-CCM+

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

Probability density function (PDF) methods 1,2 belong to the broader family of statistical approaches

Fundamentals of Fluid Dynamics: Elementary Viscous Flow

Analysis of Mixing Chambers for the Processing of Two-Component Adhesives for Transport Applications

Wall Effects in Convective Heat Transfer from a Sphere to Power Law Fluids in Tubes

6. Expressions for Describing Steady Shear Non-Newtonian Flow

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

Entropic Evaluation of Dean Flow Micromixers

Comparison of Heat and Mass Transport at the Micro-Scale

Turbulence Modeling I!

Homework #4 Solution. μ 1. μ 2

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

An Overview of Impellers, Velocity Profile and Reactor Design

The dependence of the cross-sectional shape on the hydraulic resistance of microchannels

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

Viscous Fluids. Amanda Meier. December 14th, 2011

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

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

CHAPTER 4 ANALYTICAL SOLUTIONS OF COUPLE STRESS FLUID FLOWS THROUGH POROUS MEDIUM BETWEEN PARALLEL PLATES WITH SLIP BOUNDARY CONDITIONS

The JHU Turbulence Databases (JHTDB)

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

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

Helical Coil Flow: a Case Study

Two Dimensional Orbital Mixing for a Fluid. Written by Shawn Lillie Supervised by Dr. Bruce Finlayson

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

BOUNDARY LAYER ANALYSIS WITH NAVIER-STOKES EQUATION IN 2D CHANNEL FLOW

Numerical investigation of multiple slot jets in air knife coating

Supplementary Information for Engineering and Analysis of Surface Interactions in a Microfluidic Herringbone Micromixer

Basic Fluid Mechanics

GENERALISATION OF THE TWO-SCALE MOMENTUM THEORY FOR COUPLED WIND TURBINE/FARM OPTIMISATION

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

Tutorial for the heated pipe with constant fluid properties in STAR-CCM+

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

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

Application of Solution Mapping to Reduce Computational Time in Actively Cooled Power Electronics

6.2 Governing Equations for Natural Convection

A multiscale framework for lubrication analysis of bearings with textured surface

Validation 3. Laminar Flow Around a Circular Cylinder

Spatial discretization scheme for incompressible viscous flows

Fluid Mechanics II Viscosity and shear stresses

FALLING FILM FLOW ALONG VERTICAL PLATE WITH TEMPERATURE DEPENDENT PROPERTIES

WALL RESOLUTION STUDY FOR DIRECT NUMERICAL SIMULATION OF TURBULENT CHANNEL FLOW USING A MULTIDOMAIN CHEBYSHEV GRID

CHAPTER 7 SEVERAL FORMS OF THE EQUATIONS OF MOTION

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

Computation of turbulent Prandtl number for mixed convection around a heated cylinder

Marching on the BL equations

CFD STUDY OF MASS TRANSFER IN SPACER FILLED MEMBRANE MODULE

CONVECTIVE HEAT TRANSFER

LEAST-SQUARES FINITE ELEMENT MODELS

Velocity Fluctuations in a Particle-Laden Turbulent Flow over a Backward-Facing Step

Application of COMSOL Multiphysics in Transport Phenomena Educational Processes

Investigation of laminar boundary layers with and without pressure gradients

Shell Balances in Fluid Mechanics

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

Modeling of Humidification in Comsol Multiphysics 4.4

Numerical analysis of fluid flow and heat transfer in 2D sinusoidal wavy channel

Effect on heat transfer for laminar flow over Backward Facing Step with square cylinder placed inside using Higher Order Compact Scheme

Transcription:

Homework 4 in 5C11; Part A: Incompressible Navier- Stokes, Finite Volume Methods Consider the incompressible Navier Stokes in two dimensions u x + v y = 0 u t + (u ) x + (uv) y + p x = 1 Re u + f (1) v t + (uv) x + (v ) y + p y = 1 v + g, Re where u and v are the velocity components in x and y direction, p is the pressure, Re is the Reynolds number and f and g are given source functions. Assume that the equations are solved with boundary conditions periodic boundary conditions in x-direction normal derivative of the pressure p y = 0 at y = H no-slip condition on the velocity at y = 0 and y = H Suppose the equations are discretized in space by the finite volume approximation on a staggered grid. The discretized equations are solved in time by the Marker and Cell (MAC) method: u n+1 = u n dt [ (u n ) x + (u n v n ] dt ) y + Re un + f n }{{} F n ] dt + v n+1 = v n dt [ (u n v n ) x + (v n ) y Re vn + g n }{{} G n dtp n+1 x dtp n+1 y By substituting the velocities at t n+1 into the continuity equation, show that the pressure at this time is given by the Poisson equation () p n+1 = 1 dt (F n x + G n y ) (3) Now the procedure to compute the velocities at t n+1 can be given by; 1) Compute F n and G n. ) Solve the Poisson equation for the pressure. 3) Compute u n+1 and v n+1. The second task is to add the energy equation, a temperature dependent density and source functions to simulate natural convection of an ideal gas, see handouts from Numerical Simulations in Fluid Dynamics by Griebel, Dornseifer and Neunhoeffer (GDN). The final form of the equations to be solved numerically is u x + v y = 0 u t + (u ) x + (uv) y + p x = 1 Re u + T T g x v t + (uv) x + (v ) y + p y = 1 Re v + T T g y T t + (ut ) x + (vt ) y = 1 T + Q, Re P r (4)

where g x and g y are the components of the gravitational acceleration, T is the temperature in the gas, P r is the Prandtl number and Q is a heat source. Here we have assumed that the Boussinesq approximation is valid; the density is constant except in the buoyancy terms (source terms in NS). Boundary conditions for the temperature are: 1) periodic in x-direction. ) T y = α(t T wall,u ) on at y = H and T y = α(t T wall,l ) at y = 0. Here α = h/κ with h being the termal heat transfer coefficient and κ the coefficient of heat conduction. Setting h = 0 gives an adiabatic wall, i.e. no heat is exchanged across the wall. If the temperature is defined in the same grid points as the pressure (in the middle of the cell), see the sample MATLAB files NSmain.m and Heatflx.m for a grid description. Show that the discretization of the last equation in (4) becomes T n+1 = T n dt ( u n+1 T n + T i+1j n u n+1 Ti 1j n + T n ) i 1j dx dt ( v n+1 T n + T +1 n v n+1 T 1 n + T n ) 1 dy + dt ( T n i+1j T n + T i 1j Re P r dx + T +1 n T n + T ) 1 dy PS: Note that you are not required to do any simulations in this part of the homework. The aim of the homework is to understand the time updating and the staggered discretization. (5) Homework 4 in 5C11; Part B: COMSOL lab, Finite Element Methods This homework is intended to give a brief introduction to the use of finite element packages for fluids problems. The main parts which should be learnt are the work flow with the GUI and to always check simple flow cases before going on to big complicated geometries. As such, this homework will give you an insight to how the problem is typically set up; from the drawing of the geometry, to the meshing and the set up of the equations and the boundary conditions. Note that a large part of a CFD practitioner s work time is spent meshing. The flow case We are solving the incompressible Navier Stokes for a two-dimensional channel confined by rigid walls at the top and bottom (infinite in the third direction). The equations are solved in dimensional form over a domain of [x y] [0, L 0, h], where L = 1[m] and h = 0.1[m]. We consider air at 0 C, so that the density is ρ = 1.1[kg/m 3 ] and a dynamic viscosity of µ = 1.810 5 [Ns/m ]. A triangle streamwise velocity profile is prescribed at the inflow boundary u(y) = U in h y, y < h/, (6) U in h h y, y h/,

where U in decides the peak of the profile. At the top and bottom boundaries no slip is enforced and a pressure boundary condition at outflow simulates a free boundary (outflow boundary). As the flow developes downstream we expect a parabolic profile to gradually form. The parabolic profile given a pressure gradient dp/dx is of the form u a (y) = dp/dx def y(h y) = 4U max µ h y(h y), (7) so that U max is the peak value of the velocity in the middle of the channel, i.e. at y = h/. The flow rate is defined as Q = h 0 u a dy = 4U max h [ 1 y h 1 ] h 3 y3 = 0 3 U maxh. (8) For an incompressible flow the quantity Q is conserved. The shear stress of the flow is given by so that at the lower wall it can be written as τ 1 = τ 1 = µ u a y = 4U max h (h y) (9) τ w = τ 1 (0) = 4U max h (10) Exercise 1: A simple warm up on basic fluid dynamics Given the triangle inflow (6) and the fact that Q given by (8) is conserved, calculate the relationship between U in the peak velocity at inflow and U max. How is the Reynolds number defined and what is its value for U in = 0.01[m/s]? Getting Started With COMSOL You can start COMSOL by typing bash> comsol & in your terminal. Depending on your system perhaps you might need to first do bash> module add comsol. You will now have a window called MODEL NAVIGATOR. Under the tab NEW you choose SPACE DIMENSION D and click COMSOL MULTIPHYSICS FLUID DY- NAMICS INCOMPRESSIBLE NAVIER STOKES. Click ok. Now you see that you are solving for u, v and p, with quadratic Lagrange elements. We will here mostly consider LAGRANGE LINEAR elements. Note that in general you could start with the general PDE mode and set up your own problem, but here we already have a module for fluid dynamics. We will here consider STATIONARY analysis where COMSOL uses an iterative procedure to obtain a steady state. From this steady state all the analysis will be performed.

Assume that the inflow velocity peak is U in = 0.01[m/s]. To make it easy the geometry can be loaded from www.mech.kth.se/~espena/5c11/channel_3..mph Since COMSOL solves the equations in dimensional form you need to set the constants in the program: OPTIONS CONSTANTS. This includes ρ, µ, the height of the channel h and U in. In addition you should set the scalar expressions that depend on these constants, such as U max and the Reynolds number Re. This is especially important concerning U max, which is used for setting the global nalytical velocity profile necessary to perform a check of the validity of the solution. Now you can use the rightmost seven buttons at the toolbar in the main window. Normally you start from left to right with the DRAW MODE followed by the POINT MODE, BOUNDARY MODE, SUBDOMAIN MODE and the MESH MODE. The DRAW MODE is meant for drawing a geometry, but you have already loaded the geometry. There is no need for setting POINT MODE values for this case. The BOUNDARY MODE settings

are predefined for your convenience, so all you need to do is to check and understand why they are set as they are. It is here the boundary conditions are set. In the SUBDO- MAIN MODE you need to set the values for the density ρ and the dynamic viscosity η (what we have defined as µ) at the PHYSICS tab. For geometries of this size it would perhaps be smart to use a structured grid, but we will use the generic unstructured grid which works for any geometry. A clean way of changing the resolution is to set the maximum allowed element size in MESH->FREE MESH PARAMETERS (MESH- >MESH PARAMETERS in older versions of COMSOL ). In that window you click the tab SUBDOMAIN where you can set the MAXIMUM ELEMENT SIZE. Choose a suitable value, for instance 0.01. Click REMESH. Exercise : Comparing solution to the analytic expressions Run this flow case for different resolutions, i.e starting with MAXIMUM ELEMENT SIZE 0.01 or/and 0.0. You can run the SOLVER by pressing the = (equals) button or click SOLVE - SOLVE PROBLEM. Produce plots of both the centerline velocity (at y = h/) x [0, 1] and the wall shear stress at y = 0 and x [0, 1] for a couple of different resolutions. At which resolution has it converged and at what x position do we have fully developed channel flow? Is the v velocity zero? Help: You can plot these quantities in POSTPROCESSING - CROSS-SECTION PLOT PARAMETERS. Go to the tab LINE-EXTRUSION and as Y-DATA you type in u-uanalytic (remember that uanalytic was predefined in OPTIONS-EXPRESSIONS). Below select x as X-DATA and select suitable ranges for the coordinates. The procedure is similar for the wall shear stress. Exercise 3: A real convergence study Plots as such give you the insight to the physics and the behaviour of the code, and one should always play around and visualize the different quantities from different views using both one and two-dimensional plots. However for a real verification of the code one needs to compare scalar expressions. A possible quantity to look at is the L -norm of the outflow streamwise velocity error h E = 0 (u u a ) dy. (11) Note that in general one should be careful in analysing quantities at outflow boundaries, but in this case the flow is quite simple yielding it relevant to analyse convergence here. The integration can be done in POSTPROCESSING-BOUNDARY INTEGRATION. Here mark the outflow boundary and in EXPRESSION type (u-uanalytic)^), the square root can be taken afterwards. Redo this for at least four different resolution using LAGRANGE LINEAR elements. The output can be plotted in a log log scale with the number of elements on the x-axis and the error on the y-axis. The plotting can be done in the COMSOL SCRIPT found under FILE -> COMSOL SCRIPT, which has a similar behaviour as a MATLAB-window. Fitting a straight line to these points will approximately provide the convergence rate r, with r being the slope of the curve.

To realize this note that we should have the error decaying as E (1/n) r, where n is the number of elements. Applying log to both sides yields log(e) = r log(n). Provide a plot of the error versus the number of elements and give an estimate of r. What value of r is expected for LAGRANGE LINEAR elements? Try to redo this for LAGRANGE P-P1 elements (quadratic). Why can you not gain any clear insight to the convergence rate when using these elements?