Numerical Modelling in Fortran: day 9. Paul Tackley, 2017

Size: px
Start display at page:

Download "Numerical Modelling in Fortran: day 9. Paul Tackley, 2017"

Transcription

1 Numerical Modelling in Fortran: day 9 Paul Tackley, 2017

2 Today s Goals 1. Implicit time stepping. 2. Useful libraries and other software 3. Fortran and numerical methods: Review and discussion. New features of Fortran 2003 & Projects: Define goals, identify information needed from me. Due date: 16 February 2018

3 Implicit time-stepping Diffusion equation again T t = 2 T

4 So far we have used explicit time stepping physical equation T t = 2 T explicit => calculate derivatives at old time T new T old Δt = 2 T old T new = T old + Δt 2 T old each Tnew can be calculated from already-known Told But: the value of del2(t) changes over dt

5 Implicit: calculate derivatives at new time T new T old Δt = 2 T new Put knowns on right-hand side, unknowns on LHS T new Δt 2 T new = T old More complicated to find Tnew: del2 term links all Tnew points. Why use it? Because the timestep is not limited: stable for any dt Eqn looks like Poisson s equation: we can modify existing solver

6 How about accuracy? Simple implicit and explicit methods are both first order accurate. Several related methods give second-order accuracy, including predictor-corrector, Runge- Kutta and semi-implicit. Of these, only the semi-implicit method has an unlimited time step, so let s focus on that! The semi-implicit method uses the average of derivatives at the beginning and end of the time step

7 semi-implicit diffusion T new T old Δt = 2 T new + 2 T old 2 Now generalised equation to deal with all 3 cases: explicit (beta=0), implicit (beta=1), semi-implicit (beta=0.5) T new T old Δt = β 2 T new + (1 β) 2 T old Put knowns on right-hand side, unknowns on LHS T new βδt 2 T new = T old + Δt(1 β) 2 T old

8 Rearrange to look like Poisson T new βδt 2 T new = T old + Δt(1 β) 2 T old ( 2 1 (βδt))t new = 1 βδt T old + Δt(1 β) 2 T old So, modify the Poisson solver to solve ( 2 C)T = f

9 Finite-difference modified Poisson ( 2 C)T = f T i 1, j + T i+1, j + T i, j 1 + T i, j+1 (4 + Ch 2 )T i, j h 2 = f i, j Iterative correction: R i, j = T i 1, j + T i+1, j + T i, j 1 + T i, j+1 (4 + Ch 2 )T i, j h 2 f i, j T n+1 = T n + αh 2 ( 4 + Ch 2 ) R

10 Optional 9 th homework (improves your grade if better than one of HW1-8) Modify your favourite program (either diffusion, advection-diffusion, infinite-pr convection or low- Pr convection) to include implicit diffusion Test for different values of beta (0, 0.5 and 1.0) If beta 0.5, ignore the diffusion timestep constraint! Due date: 8 January (2 working weeks from now)

11 Implementing implicit diffusion Modify your Poisson solver (iterations and multigrid) passing the constant C in as an extra argument. C=0 should give same result as before. Useful for streamfunction calculation. Add beta to the namelist inputs Modify diffusion calculation if beta>0 call multigrid, otherwise explicit like before use beta when calculating rhs term ignore diffusive timestep if beta 0.5 Run some tests with beta=0, 0.5 or 1.0 and see if you can tell the difference. It will have more effect at low Ra (or B), when diffusion dominates

12 Example: Low Pr convection Temperature equation with variable beta: T new βδt 2 T new = T old + Δt ((1 β) 2 T old ( v! T ) ) old Rearrange: ( 2 1 (βδt))t new = 1 βδt ( ) ( ) old T old + Δt (1 β) 2 T old v! T Call the new modified Poisson solver ( 2 C)u = f With (u=t) C = 1 (βδt); f = 1 βδt ( ) ( ) old T old + Δt (1 β) 2 T old v! T

13 Example: Low Pr convection (2) ω new Pr βδt 2 ω new = ω old + Δt Pr(1 β) 2 ω old v! ω Vorticity equation with variable beta: Rearrange: 2 1 Pr βδt ω new = 1 Pr βδt ω old + Δt Pr(1 β) 2 ω old v! ω ( ) old RaPr T old x ( ) old RaPr T old x Call the new modified Poisson solver ( 2 C)u = f With (u=w) C = 1 Pr βδt ; f = 1 Pr βδt ω old + Δt Pr(1 β) 2 ω old v! ω ( ) old RaPr T old x

14

15 Note about boundary conditions If your existing iteration routines assume boundary conditions are 0 all round, they need modifying for T field. T boundary conditions are 0 at top, dt/dx=0 at sides, and On fine grid: 1 at bottom On coarse grids: 0 at bottom Either pass a boundary condition switch into the iteration routines, or write different routines for S and T fields.

16 Hand in Source code Results of test case(s) run using different values of beta and (if beta>0.5) different time steps including Time step > diffusive time step

17 Useful libraries and other software For standard operations such as matrix solution of systems of linear equations, taking fast- Fourier transforms, etc., it is convenient to download suitable routines from some free library, rather than writing your own from scratch. There are also more specialised free programs available for some applications A list is at: Much is available at:

18 Some well-known libraries lapack95: common linear algebra problems: equations, least squares, eigenvalues etc. also a parallel version scalapack MPI: for running programs on multiple CPUs. 2 common versions are MPICH: Open MPI: PETSc: Portable, Extensible Toolkit for Scientific Computation:

19 Project (1 KP)

20 Project (optional, 1 KP) 1. Chosen topic, agreed upon with me (suggestions given, also ask the advisor of your MSc or PhD project). Due end of Semesterprüfung (17 Feb 2017) Decide topic by final lecture! ct.html

21 Project: general guidelines Choose something either related to your research project and/or that you are interested in Effort: 1 KP => 30 hours. About 4 days work. I can supply information about needed equations and numerical methods that we have not covered

22 Some ideas for a project Involving solving partial differential equations on a grid (like the convection program) Wave propagation Porous flow (groundwater or partial melt) Variable-viscosity Stokes flow Shallow-water equations 3-D version of convection code Involving other techniques Spectral analysis and/or filtering Principle component analysis (multivariate data) Inversion of data for model parameters N-body gravitational interaction (orbits, formation of solar system,...) Interpolation of irregularly-sampled data onto a regular grid

23 History Fortran Review 60 years since first compiler versions 66, 77, 90, 95, 2003, 2008 Variables types: real, integer, logical, character, complex Implicit types and implicit none Initialisation parameters defined types precision (32 vs 64 bit etc.)

24 Fortran Review (2) Arrays fixed vs. automatic vs. allocatable vs. assumed shape index ranges data, reshape built-in array algebra Input/Ouput open, print, read, write, close formats iostat, rewind, status namelist binary vs. ascii, direct vs. sequential

25 Fortran Review (3) Flow control structures do loops (simple, counting, while), exit, cycle if elseif endif blocks select case forall where

26 Fortran Review (4) Functions and subroutines (procedures) Intrinsic functions: mathematical, conversion, internal (contains), external (& interface blocks), in modules array functions recursive functions and result statement named arguments optional arguments generic procedures overloading user-defined operators save

27 Fortran Review (5) Modules use public and private variables and functions => Pointers to variables, arrays, array sections, areas of memory, in defined types Optimization maximize use of cache and pipelining loops most important 90/10 rule (focus on bottlenecks) avoid branches, maximize data locality, unroll, tiling, Libraries, makefiles

28 For a more detailed review & discussion, see: 01/162125/fortran_class.pdf

29 New features of Fortran 2003 For a detailed description see: ftp://ftp.nag.co.uk/sc22wg5/n1601- N1650/N1648.pdf For a summary: ures.pdf Enhancements to derived types Parameterized derived types Improved control of accessibility Improved structure constructors Finalizers

30 New features of Fortran 2003 (2) Object-oriented programming support Type extension and inheritance Polymorphism Dynamic type allocation Type-bound procedures Data manipulation enhancements Allocatable components Deferred type parameters VOLATILE attribute Explicit type specification in array constructors & allocate statements Extended initialization expressions Enhanced intrinsic procedures

31 New features of Fortran 2003 (3) Input/output enhancements Asynchronous transfer Stream access User specified transfer ops for derived types User specified control of rounding Named constants for preconnected units FLUSH Regularization of keywords Access to error messages Procedure pointers

32 New features of Fortran 2003 (4) Support for the exceptions of the IEEE Floating Point Standard Interoperability with the C programming language Support for international characters (ISO byte characters...) Enhanced integration with host operating system Access to command line arguments,environment variables, processor error messages Plus numerous minor enhancements

33 Fortran 2008 Minor update of Fortran 2003 Brief summary (Wikipedia) Submodules additional structuring facilities for modules; supersedes ISO/IEC TR 19767:2005 Coarray Fortran a parallel execution model The DO CONCURRENT construct for loop iterations with no interdependencies The CONTIGUOUS attribute to specify storage layout restrictions The BLOCK construct can contain declarations of objects with construct scope Recursive allocatable components as an alternative to recursive pointers in derived types For more details see ftp://ftp.nag.co.uk/sc22wg5/n1801- n1850/n1828.pdf

34 Numerical methods review Approximations Concept of discretization Finite difference approximation Treatment of boundary conditions Equations diffusion equation Poisson s equation advection-diffusion equation Stokes equation and Navier-Stokes equation streamfunction and streamfunction-vorticity formulation Pr, Ra, Ek initial value vs. boundary value problems

35 Numerical methods Review (2) Timestepping stability (timestep, advection scheme) explicit vs. implicit, semi-implicit upwind advection Solvers direct iterative (relaxation), multigrid method Jacobi vs. Gauss-Seidel vs. red-black Parallelisation Domain decomposition Message-passing and MPI

36 Discussion We have focussed on one application (constant viscosity convection) Can apply same techniques to other applications / physical problems

37 Example: Darcy Equation (groundwater or partial melt flow) u = k η P gρy ˆ ( ) u=volume/area/time= Darcy velocity (really a flux) u = 0 k=permeability (related to porosity and interconnectivity) =viscosity of fluid, ρ =density of fluid, P=pressure in fluid η

38 Simplify and rearrange Take divergence: velocity is eliminated 2nd order equation for pressure Combine k and η into hydraulic resistance R u = k P + k η η gρ y ˆ = 0 k P = g η y 1 R ρk η P = g ρ y R A Poisson-like equation for pressure => easy to solve using existing methods

39 Example 2: Full elastic wave F=ma for a continuum: equation Most convenient to solve as coupled first-order PDEs Hooke s law for an isotropic material ε ij = 1 u i + u j 2 x j x i Where from equilibrium position µ λ,µ =shear modulus. constants Sometimes written Using K=bulk modulus ρ v t = σ σ ij = λδ ij ε kk + 2µε ij u=displacement of point are known as Lamé σ ij = Kε kk δ ij + 2µ(ε ij 1 3 ε kkδ ij )

40 Resulting equations to solve using finite differences Variables: 3 velocity components and 6 stress components On staggered grid (same as viscous flow modelling) t v x = 1 ρ x σ xx + y σ xy + z σ xz t σ xx = (λ + 2µ) v x x + λ v y y + v z z t v y = 1 ρ x σ xy + y σ yy + z σ zy t σ yy = (λ + 2µ) v y y + λ v x x + v z z t v z = 1 ρ x σ zx + y σ zy + z σ zz t σ zz = (λ + 2µ) v z z + λ v x x + v y y t σ xy = µ v x y + v y x t σ xz = µ v x z + v z x t σ yz = µ v y z + v z y

41 Mathematical classification of 2nd-order PDEs: Elliptical, hyperbolic, parabolic Elliptical 2 φ = f e.g., Poisson Parabolic φ t 2 φ e.g., diffusion Hyperbolic 2 φ 1 2 φ V 2 t 2 e.g., wave eqn. We ve done them all!

42 Waves: 2 P t 2 = v2 2 P Fluids: 1 v Pr t + v v = P + η v i + v j x j x i T t + v T = k T ( ) Percolation: k P = g η y ρk η + 1 Ek Ω v + Ra.T ˆ g v = 0 note the many similar terms! N-body: d 2 x i dt 2 = a i a i = G n,j i m j x j x. ( 2 j=1 i x j x i ) x j x i

43

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

Numerical Modelling in Fortran: day 10. Paul Tackley, 2016 Numerical Modelling in Fortran: day 10 Paul Tackley, 2016 Today s Goals 1. Useful libraries and other software 2. Implicit time stepping 3. Projects: Agree on topic (by final lecture) (No lecture next

More information

Numerical Modelling in Fortran: day 8. Paul Tackley, 2017

Numerical Modelling in Fortran: day 8. Paul Tackley, 2017 Numerical Modelling in Fortran: day 8 Paul Tackley, 2017 Today s Goals 1. Introduction to parallel computing (applicable to Fortran or C; examples are in Fortran) 2. Finite Prandtl number convection Motivation:

More information

PDE Solvers for Fluid Flow

PDE Solvers for Fluid Flow PDE Solvers for Fluid Flow issues and algorithms for the Streaming Supercomputer Eran Guendelman February 5, 2002 Topics Equations for incompressible fluid flow 3 model PDEs: Hyperbolic, Elliptic, Parabolic

More information

NDT&E Methods: UT. VJ Technologies CAVITY INSPECTION. Nondestructive Testing & Evaluation TPU Lecture Course 2015/16.

NDT&E Methods: UT. VJ Technologies CAVITY INSPECTION. Nondestructive Testing & Evaluation TPU Lecture Course 2015/16. CAVITY INSPECTION NDT&E Methods: UT VJ Technologies NDT&E Methods: UT 6. NDT&E: Introduction to Methods 6.1. Ultrasonic Testing: Basics of Elasto-Dynamics 6.2. Principles of Measurement 6.3. The Pulse-Echo

More information

Lecture 8: Tissue Mechanics

Lecture 8: Tissue Mechanics Computational Biology Group (CoBi), D-BSSE, ETHZ Lecture 8: Tissue Mechanics Prof Dagmar Iber, PhD DPhil MSc Computational Biology 2015/16 7. Mai 2016 2 / 57 Contents 1 Introduction to Elastic Materials

More information

Partial Differential Equations

Partial Differential Equations Partial Differential Equations Introduction Deng Li Discretization Methods Chunfang Chen, Danny Thorne, Adam Zornes CS521 Feb.,7, 2006 What do You Stand For? A PDE is a Partial Differential Equation This

More information

Chapter 5. Methods for Solving Elliptic Equations

Chapter 5. Methods for Solving Elliptic Equations Chapter 5. Methods for Solving Elliptic Equations References: Tannehill et al Section 4.3. Fulton et al (1986 MWR). Recommended reading: Chapter 7, Numerical Methods for Engineering Application. J. H.

More information

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

Diffusion / Parabolic Equations. PHY 688: Numerical Methods for (Astro)Physics Diffusion / Parabolic Equations Summary of PDEs (so far...) Hyperbolic Think: advection Real, finite speed(s) at which information propagates carries changes in the solution Second-order explicit methods

More information

Computational Seismology: An Introduction

Computational Seismology: An Introduction Computational Seismology: An Introduction Aim of lecture: Understand why we need numerical methods to understand our world Learn about various numerical methods (finite differences, pseudospectal methods,

More information

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

A Study on Numerical Solution to the Incompressible Navier-Stokes Equation A Study on Numerical Solution to the Incompressible Navier-Stokes Equation Zipeng Zhao May 2014 1 Introduction 1.1 Motivation One of the most important applications of finite differences lies in the field

More information

Chapter 9: Differential Analysis of Fluid Flow

Chapter 9: Differential Analysis of Fluid Flow of Fluid Flow Objectives 1. Understand how the differential equations of mass and momentum conservation are derived. 2. Calculate the stream function and pressure field, and plot streamlines for a known

More information

Discretization of PDEs and Tools for the Parallel Solution of the Resulting Systems

Discretization of PDEs and Tools for the Parallel Solution of the Resulting Systems Discretization of PDEs and Tools for the Parallel Solution of the Resulting Systems Stan Tomov Innovative Computing Laboratory Computer Science Department The University of Tennessee Wednesday April 4,

More information

Chapter 9: Differential Analysis

Chapter 9: Differential Analysis 9-1 Introduction 9-2 Conservation of Mass 9-3 The Stream Function 9-4 Conservation of Linear Momentum 9-5 Navier Stokes Equation 9-6 Differential Analysis Problems Recall 9-1 Introduction (1) Chap 5: Control

More information

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

Elliptic Problems / Multigrid. PHY 604: Computational Methods for Physics and Astrophysics II Elliptic Problems / Multigrid Summary of Hyperbolic PDEs We looked at a simple linear and a nonlinear scalar hyperbolic PDE There is a speed associated with the change of the solution Explicit methods

More information

Excel for Scientists and Engineers Numerical Method s. E. Joseph Billo

Excel for Scientists and Engineers Numerical Method s. E. Joseph Billo Excel for Scientists and Engineers Numerical Method s E. Joseph Billo Detailed Table of Contents Preface Acknowledgments About the Author Chapter 1 Introducing Visual Basic for Applications 1 Chapter

More information

Chapter 5. The Differential Forms of the Fundamental Laws

Chapter 5. The Differential Forms of the Fundamental Laws Chapter 5 The Differential Forms of the Fundamental Laws 1 5.1 Introduction Two primary methods in deriving the differential forms of fundamental laws: Gauss s Theorem: Allows area integrals of the equations

More information

Numerical Methods in Geophysics. Introduction

Numerical Methods in Geophysics. Introduction : Why numerical methods? simple geometries analytical solutions complex geometries numerical solutions Applications in geophysics seismology geodynamics electromagnetism... in all domains History of computers

More information

Multigrid Methods and their application in CFD

Multigrid Methods and their application in CFD Multigrid Methods and their application in CFD Michael Wurst TU München 16.06.2009 1 Multigrid Methods Definition Multigrid (MG) methods in numerical analysis are a group of algorithms for solving differential

More information

A Finite-Element based Navier-Stokes Solver for LES

A Finite-Element based Navier-Stokes Solver for LES A Finite-Element based Navier-Stokes Solver for LES W. Wienken a, J. Stiller b and U. Fladrich c. a Technische Universität Dresden, Institute of Fluid Mechanics (ISM) b Technische Universität Dresden,

More information

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

JMBC Computational Fluid Dynamics I Exercises by A.E.P. Veldman JMBC Computational Fluid Dynamics I Exercises by A.E.P. Veldman The exercises will be carried out on PC s in the practicum rooms. Several (Matlab and Fortran) files are required. How these can be obtained

More information

WRF Modeling System Overview

WRF Modeling System Overview WRF Modeling System Overview Jimy Dudhia What is WRF? WRF: Weather Research and Forecasting Model Used for both research and operational forecasting It is a supported community model, i.e. a free and shared

More information

16. Solution of elliptic partial differential equation

16. Solution of elliptic partial differential equation 16. Solution of elliptic partial differential equation Recall in the first lecture of this course. Assume you know how to use a computer to compute; but have not done any serious numerical computations

More information

Block-Structured Adaptive Mesh Refinement

Block-Structured Adaptive Mesh Refinement Block-Structured Adaptive Mesh Refinement Lecture 2 Incompressible Navier-Stokes Equations Fractional Step Scheme 1-D AMR for classical PDE s hyperbolic elliptic parabolic Accuracy considerations Bell

More information

NUMERICAL METHODS FOR ENGINEERING APPLICATION

NUMERICAL METHODS FOR ENGINEERING APPLICATION NUMERICAL METHODS FOR ENGINEERING APPLICATION Second Edition JOEL H. FERZIGER A Wiley-Interscience Publication JOHN WILEY & SONS, INC. New York / Chichester / Weinheim / Brisbane / Singapore / Toronto

More information

Solving PDEs with CUDA Jonathan Cohen

Solving PDEs with CUDA Jonathan Cohen Solving PDEs with CUDA Jonathan Cohen jocohen@nvidia.com NVIDIA Research PDEs (Partial Differential Equations) Big topic Some common strategies Focus on one type of PDE in this talk Poisson Equation Linear

More information

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

Pressure-velocity correction method Finite Volume solution of Navier-Stokes equations Exercise: Finish solving the Navier Stokes equations Today's Lecture 2D grid colocated arrangement staggered arrangement Exercise: Make a Fortran program which solves a system of linear equations using an iterative method SIMPLE algorithm Pressure-velocity

More information

6. Iterative Methods for Linear Systems. The stepwise approach to the solution...

6. Iterative Methods for Linear Systems. The stepwise approach to the solution... 6 Iterative Methods for Linear Systems The stepwise approach to the solution Miriam Mehl: 6 Iterative Methods for Linear Systems The stepwise approach to the solution, January 18, 2013 1 61 Large Sparse

More information

Numerical modelling of phase change processes in clouds. Challenges and Approaches. Martin Reitzle Bernard Weigand

Numerical modelling of phase change processes in clouds. Challenges and Approaches. Martin Reitzle Bernard Weigand Institute of Aerospace Thermodynamics Numerical modelling of phase change processes in clouds Challenges and Approaches Martin Reitzle Bernard Weigand Introduction Institute of Aerospace Thermodynamics

More information

Basic Equations of Elasticity

Basic Equations of Elasticity A Basic Equations of Elasticity A.1 STRESS The state of stress at any point in a loaded bo is defined completely in terms of the nine components of stress: σ xx,σ yy,σ zz,σ xy,σ yx,σ yz,σ zy,σ zx,andσ

More information

Rheology of Soft Materials. Rheology

Rheology of Soft Materials. Rheology Τ Thomas G. Mason Department of Chemistry and Biochemistry Department of Physics and Astronomy California NanoSystems Institute Τ γ 26 by Thomas G. Mason All rights reserved. γ (t) τ (t) γ τ Δt 2π t γ

More information

Introduction to Heat and Mass Transfer. Week 9

Introduction to Heat and Mass Transfer. Week 9 Introduction to Heat and Mass Transfer Week 9 補充! Multidimensional Effects Transient problems with heat transfer in two or three dimensions can be considered using the solutions obtained for one dimensional

More information

MATLAB Solution of Flow and Heat Transfer through a Porous Cooling Channel and the Conjugate Heat Transfer in the Surrounding Wall

MATLAB Solution of Flow and Heat Transfer through a Porous Cooling Channel and the Conjugate Heat Transfer in the Surrounding Wall MATLAB Solution of Flow and Heat Transfer through a Porous Cooling Channel and the Conjugate Heat Transfer in the Surrounding Wall James Cherry, Mehmet Sözen Grand Valley State University, cherryj1@gmail.com,

More information

A Space-Time Expansion Discontinuous Galerkin Scheme with Local Time-Stepping for the Ideal and Viscous MHD Equations

A Space-Time Expansion Discontinuous Galerkin Scheme with Local Time-Stepping for the Ideal and Viscous MHD Equations A Space-Time Expansion Discontinuous Galerkin Scheme with Local Time-Stepping for the Ideal and Viscous MHD Equations Ch. Altmann, G. Gassner, F. Lörcher, C.-D. Munz Numerical Flow Models for Controlled

More information

Partial Differential Equations II

Partial Differential Equations II Partial Differential Equations II CS 205A: Mathematical Methods for Robotics, Vision, and Graphics Justin Solomon CS 205A: Mathematical Methods Partial Differential Equations II 1 / 28 Almost Done! Homework

More information

Multigrid solvers for equations arising in implicit MHD simulations

Multigrid solvers for equations arising in implicit MHD simulations Multigrid solvers for equations arising in implicit MHD simulations smoothing Finest Grid Mark F. Adams Department of Applied Physics & Applied Mathematics Columbia University Ravi Samtaney PPPL Achi Brandt

More information

Lecture 8: Fast Linear Solvers (Part 7)

Lecture 8: Fast Linear Solvers (Part 7) Lecture 8: Fast Linear Solvers (Part 7) 1 Modified Gram-Schmidt Process with Reorthogonalization Test Reorthogonalization If Av k 2 + δ v k+1 2 = Av k 2 to working precision. δ = 10 3 2 Householder Arnoldi

More information

The Shallow Water Equations

The Shallow Water Equations If you have not already done so, you are strongly encouraged to read the companion file on the non-divergent barotropic vorticity equation, before proceeding to this shallow water case. We do not repeat

More information

Numerically Solving Partial Differential Equations

Numerically Solving Partial Differential Equations Numerically Solving Partial Differential Equations Michael Lavell Department of Applied Mathematics and Statistics Abstract The physics describing the fundamental principles of fluid dynamics can be written

More information

AIMS Exercise Set # 1

AIMS Exercise Set # 1 AIMS Exercise Set #. Determine the form of the single precision floating point arithmetic used in the computers at AIMS. What is the largest number that can be accurately represented? What is the smallest

More information

Time-Parallel Algorithms for Weather Prediction and Climate Simulation

Time-Parallel Algorithms for Weather Prediction and Climate Simulation Time-Parallel Algorithms for Weather Prediction and Climate Simulation Jean Côté Adjunct Prof. ESCER Centre (Étude et la Simulation du Climat à l Échelle Régionale) Sciences de la Terre & de l Atmosphère

More information

Local Time Step for a Finite Volume Scheme I.Faille F.Nataf*, F.Willien, S.Wolf**

Local Time Step for a Finite Volume Scheme I.Faille F.Nataf*, F.Willien, S.Wolf** Controlled CO 2 Diversified fuels Fuel-efficient vehicles Clean refining Extended reserves Local Time Step for a Finite Volume Scheme I.Faille F.Nataf*, F.Willien, S.Wolf** *: Laboratoire J.L.Lions **:Université

More information

Introduction to Environment System Modeling

Introduction to Environment System Modeling Introduction to Environment System Modeling (3 rd week:modeling with differential equation) Department of Environment Systems, Graduate School of Frontier Sciences, the University of Tokyo Masaatsu AICHI

More information

Stabilization and Acceleration of Algebraic Multigrid Method

Stabilization and Acceleration of Algebraic Multigrid Method Stabilization and Acceleration of Algebraic Multigrid Method Recursive Projection Algorithm A. Jemcov J.P. Maruszewski Fluent Inc. October 24, 2006 Outline 1 Need for Algorithm Stabilization and Acceleration

More information

1 Exercise: Linear, incompressible Stokes flow with FE

1 Exercise: Linear, incompressible Stokes flow with FE Figure 1: Pressure and velocity solution for a sinking, fluid slab impinging on viscosity contrast problem. 1 Exercise: Linear, incompressible Stokes flow with FE Reading Hughes (2000), sec. 4.2-4.4 Dabrowski

More information

Time-Parallel Algorithms for Weather Prediction and Climate Simulation

Time-Parallel Algorithms for Weather Prediction and Climate Simulation Time-Parallel Algorithms for Weather Prediction and Climate Simulation Jean Côté Adjunct Prof. ESCER Centre (Étude et la Simulation du Climat à l Échelle Régionale) Sciences de la Terre & de l Atmosphère

More information

Solution of Matrix Eigenvalue Problem

Solution of Matrix Eigenvalue Problem Outlines October 12, 2004 Outlines Part I: Review of Previous Lecture Part II: Review of Previous Lecture Outlines Part I: Review of Previous Lecture Part II: Standard Matrix Eigenvalue Problem Other Forms

More information

Additive Manufacturing Module 8

Additive Manufacturing Module 8 Additive Manufacturing Module 8 Spring 2015 Wenchao Zhou zhouw@uark.edu (479) 575-7250 The Department of Mechanical Engineering University of Arkansas, Fayetteville 1 Evaluating design https://www.youtube.com/watch?v=p

More information

2.29 Numerical Fluid Mechanics Fall 2011 Lecture 7

2.29 Numerical Fluid Mechanics Fall 2011 Lecture 7 Numerical Fluid Mechanics Fall 2011 Lecture 7 REVIEW of Lecture 6 Material covered in class: Differential forms of conservation laws Material Derivative (substantial/total derivative) Conservation of Mass

More information

Rock Rheology GEOL 5700 Physics and Chemistry of the Solid Earth

Rock Rheology GEOL 5700 Physics and Chemistry of the Solid Earth Rock Rheology GEOL 5700 Physics and Chemistry of the Solid Earth References: Turcotte and Schubert, Geodynamics, Sections 2.1,-2.4, 2.7, 3.1-3.8, 6.1, 6.2, 6.8, 7.1-7.4. Jaeger and Cook, Fundamentals of

More information

Numerical Methods for PDEs

Numerical Methods for PDEs Numerical Methods for PDEs Partial Differential Equations (Lecture 1, Week 1) Markus Schmuck Department of Mathematics and Maxwell Institute for Mathematical Sciences Heriot-Watt University, Edinburgh

More information

Dan s Morris s Notes on Stable Fluids (Jos Stam, SIGGRAPH 1999)

Dan s Morris s Notes on Stable Fluids (Jos Stam, SIGGRAPH 1999) Dan s Morris s Notes on Stable Fluids (Jos Stam, SIGGRAPH 1999) This is intended to be a detailed by fairly-low-math explanation of Stam s Stable Fluids, one of the key papers in a recent series of advances

More information

Sparse Linear Systems. Iterative Methods for Sparse Linear Systems. Motivation for Studying Sparse Linear Systems. Partial Differential Equations

Sparse Linear Systems. Iterative Methods for Sparse Linear Systems. Motivation for Studying Sparse Linear Systems. Partial Differential Equations Sparse Linear Systems Iterative Methods for Sparse Linear Systems Matrix Computations and Applications, Lecture C11 Fredrik Bengzon, Robert Söderlund We consider the problem of solving the linear system

More information

Macroscopic theory Rock as 'elastic continuum'

Macroscopic theory Rock as 'elastic continuum' Elasticity and Seismic Waves Macroscopic theory Rock as 'elastic continuum' Elastic body is deformed in response to stress Two types of deformation: Change in volume and shape Equations of motion Wave

More information

AE/ME 339. K. M. Isaac Professor of Aerospace Engineering. 12/21/01 topic7_ns_equations 1

AE/ME 339. K. M. Isaac Professor of Aerospace Engineering. 12/21/01 topic7_ns_equations 1 AE/ME 339 Professor of Aerospace Engineering 12/21/01 topic7_ns_equations 1 Continuity equation Governing equation summary Non-conservation form D Dt. V 0.(2.29) Conservation form ( V ) 0...(2.33) t 12/21/01

More information

Open boundary conditions in numerical simulations of unsteady incompressible flow

Open boundary conditions in numerical simulations of unsteady incompressible flow Open boundary conditions in numerical simulations of unsteady incompressible flow M. P. Kirkpatrick S. W. Armfield Abstract In numerical simulations of unsteady incompressible flow, mass conservation can

More information

The Ongoing Development of CSDP

The Ongoing Development of CSDP The Ongoing Development of CSDP Brian Borchers Department of Mathematics New Mexico Tech Socorro, NM 87801 borchers@nmt.edu Joseph Young Department of Mathematics New Mexico Tech (Now at Rice University)

More information

Advanced parallel Fortran

Advanced parallel Fortran 1/44 Advanced parallel Fortran A. Shterenlikht Mech Eng Dept, The University of Bristol Bristol BS8 1TR, UK, Email: mexas@bristol.ac.uk coarrays.sf.net 12th November 2017 2/44 Fortran 2003 i n t e g e

More information

Solving PDEs with Multigrid Methods p.1

Solving PDEs with Multigrid Methods p.1 Solving PDEs with Multigrid Methods Scott MacLachlan maclachl@colorado.edu Department of Applied Mathematics, University of Colorado at Boulder Solving PDEs with Multigrid Methods p.1 Support and Collaboration

More information

B-Spline Interpolation on Lattices

B-Spline Interpolation on Lattices B-Spline Interpolation on Lattices David Eberly, Geometric Tools, Redmond WA 98052 https://www.geometrictools.com/ This work is licensed under the Creative Commons Attribution 4.0 International License.

More information

Department of Mathematics California State University, Los Angeles Master s Degree Comprehensive Examination in. NUMERICAL ANALYSIS Spring 2015

Department of Mathematics California State University, Los Angeles Master s Degree Comprehensive Examination in. NUMERICAL ANALYSIS Spring 2015 Department of Mathematics California State University, Los Angeles Master s Degree Comprehensive Examination in NUMERICAL ANALYSIS Spring 2015 Instructions: Do exactly two problems from Part A AND two

More information

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

Project 4: Navier-Stokes Solution to Driven Cavity and Channel Flow Conditions Project 4: Navier-Stokes Solution to Driven Cavity and Channel Flow Conditions R. S. Sellers MAE 5440, Computational Fluid Dynamics Utah State University, Department of Mechanical and Aerospace Engineering

More information

Answers to Exercises Computational Fluid Dynamics

Answers to Exercises Computational Fluid Dynamics Answers to Exercises Computational Fluid Dynamics Exercise - Artificial diffusion upwind computations.9 k=. exact.8 k=..7 k=..6 k=..5.4.3.2...2.3.4.5.6.7.8.9 x For k =.,. and., and for N = 2, the discrete

More information

2.29 Numerical Fluid Mechanics Spring 2015 Lecture 9

2.29 Numerical Fluid Mechanics Spring 2015 Lecture 9 Spring 2015 Lecture 9 REVIEW Lecture 8: Direct Methods for solving (linear) algebraic equations Gauss Elimination LU decomposition/factorization Error Analysis for Linear Systems and Condition Numbers

More information

Faster Kinetics: Accelerate Your Finite-Rate Combustion Simulation with GPUs

Faster Kinetics: Accelerate Your Finite-Rate Combustion Simulation with GPUs Faster Kinetics: Accelerate Your Finite-Rate Combustion Simulation with GPUs Christopher P. Stone, Ph.D. Computational Science and Engineering, LLC Kyle Niemeyer, Ph.D. Oregon State University 2 Outline

More information

ME Computational Fluid Mechanics Lecture 5

ME Computational Fluid Mechanics Lecture 5 ME - 733 Computational Fluid Mechanics Lecture 5 Dr./ Ahmed Nagib Elmekawy Dec. 20, 2018 Elliptic PDEs: Finite Difference Formulation Using central difference formulation, the so called five-point formula

More information

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF MATHEMATICS ACADEMIC YEAR / EVEN SEMESTER QUESTION BANK

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF MATHEMATICS ACADEMIC YEAR / EVEN SEMESTER QUESTION BANK KINGS COLLEGE OF ENGINEERING MA5-NUMERICAL METHODS DEPARTMENT OF MATHEMATICS ACADEMIC YEAR 00-0 / EVEN SEMESTER QUESTION BANK SUBJECT NAME: NUMERICAL METHODS YEAR/SEM: II / IV UNIT - I SOLUTION OF EQUATIONS

More information

AM 205: lecture 14. Last time: Boundary value problems Today: Numerical solution of PDEs

AM 205: lecture 14. Last time: Boundary value problems Today: Numerical solution of PDEs AM 205: lecture 14 Last time: Boundary value problems Today: Numerical solution of PDEs ODE BVPs A more general approach is to formulate a coupled system of equations for the BVP based on a finite difference

More information

Chapter 2 CONTINUUM MECHANICS PROBLEMS

Chapter 2 CONTINUUM MECHANICS PROBLEMS Chapter 2 CONTINUUM MECHANICS PROBLEMS The concept of treating solids and fluids as though they are continuous media, rather thancomposedofdiscretemolecules, is one that is widely used in most branches

More information

Content. Department of Mathematics University of Oslo

Content. Department of Mathematics University of Oslo Chapter: 1 MEK4560 The Finite Element Method in Solid Mechanics II (January 25, 2008) (E-post:torgeiru@math.uio.no) Page 1 of 14 Content 1 Introduction to MEK4560 3 1.1 Minimum Potential energy..............................

More information

The behaviour of high Reynolds flows in a driven cavity

The behaviour of high Reynolds flows in a driven cavity The behaviour of high Reynolds flows in a driven cavity Charles-Henri BRUNEAU and Mazen SAAD Mathématiques Appliquées de Bordeaux, Université Bordeaux 1 CNRS UMR 5466, INRIA team MC 351 cours de la Libération,

More information

Applied Mathematics Methods Stream

Applied Mathematics Methods Stream Applied Mathematics Methods Stream Irene Kyza Discipline of Mathematics School of Science and Engineering University of Dundee September 2016 Overview: what are methods (for)? Most mathematical models

More information

NUMERICAL COMPUTATION IN SCIENCE AND ENGINEERING

NUMERICAL COMPUTATION IN SCIENCE AND ENGINEERING NUMERICAL COMPUTATION IN SCIENCE AND ENGINEERING C. Pozrikidis University of California, San Diego New York Oxford OXFORD UNIVERSITY PRESS 1998 CONTENTS Preface ix Pseudocode Language Commands xi 1 Numerical

More information

Length Learning Objectives Learning Objectives Assessment

Length Learning Objectives Learning Objectives Assessment Universidade Federal Fluminense PGMEC Course: Advanced Computational Fluid Dynamics Coordinator: Vassilis Theofilis Academic Year: 2018, 2 nd Semester Length: 60hrs (48hrs classroom and 12hrs tutorials)

More information

CHAPTER 7 SEVERAL FORMS OF THE EQUATIONS OF MOTION

CHAPTER 7 SEVERAL FORMS OF THE EQUATIONS OF MOTION CHAPTER 7 SEVERAL FORMS OF THE EQUATIONS OF MOTION 7.1 THE NAVIER-STOKES EQUATIONS Under the assumption of a Newtonian stress-rate-of-strain constitutive equation and a linear, thermally conductive medium,

More information

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

Computation Fluid Dynamics Prof. Dr. Suman Chakraborty Department of Mechanical Engineering Indian Institute of Technology, Kharagpur Computation Fluid Dynamics Prof. Dr. Suman Chakraborty Department of Mechanical Engineering Indian Institute of Technology, Kharagpur Lecture No. # 40 What is there in implementing a CFD Code So far, we

More information

Integration of PETSc for Nonlinear Solves

Integration of PETSc for Nonlinear Solves Integration of PETSc for Nonlinear Solves Ben Jamroz, Travis Austin, Srinath Vadlamani, Scott Kruger Tech-X Corporation jamroz@txcorp.com http://www.txcorp.com NIMROD Meeting: Aug 10, 2010 Boulder, CO

More information

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

An Overview of Fluid Animation. Christopher Batty March 11, 2014 An Overview of Fluid Animation Christopher Batty March 11, 2014 What distinguishes fluids? What distinguishes fluids? No preferred shape. Always flows when force is applied. Deforms to fit its container.

More information

Introduction to Seismology Spring 2008

Introduction to Seismology Spring 2008 MIT OpenCourseWare http://ocw.mit.edu 12.510 Introduction to Seismology Spring 2008 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms. Stress and Strain

More information

Active Flux for Advection Diffusion

Active Flux for Advection Diffusion Active Flux for Advection Diffusion A Miracle in CFD Hiroaki Nishikawa National Institute of Aerospace! NIA CFD Seminar! August 25, 2015 In collaboration with the University of Michigan Supported by NASA

More information

1 Hooke s law, stiffness, and compliance

1 Hooke s law, stiffness, and compliance Non-quilibrium Continuum Physics TA session #5 TA: Yohai Bar Sinai 3.04.206 Linear elasticity I This TA session is the first of three at least, maybe more) in which we ll dive deep deep into linear elasticity

More information

Introduction to Partial Differential Equations

Introduction to Partial Differential Equations Introduction to Partial Differential Equations Partial differential equations arise in a number of physical problems, such as fluid flow, heat transfer, solid mechanics and biological processes. These

More information

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

Math background. Physics. Simulation. Related phenomena. Frontiers in graphics. Rigid fluids Fluid dynamics Math background Physics Simulation Related phenomena Frontiers in graphics Rigid fluids Fields Domain Ω R2 Scalar field f :Ω R Vector field f : Ω R2 Types of derivatives Derivatives measure

More information

Chapter 9 Implicit integration, incompressible flows

Chapter 9 Implicit integration, incompressible flows Chapter 9 Implicit integration, incompressible flows The methods we discussed so far work well for problems of hydrodynamics in which the flow speeds of interest are not orders of magnitude smaller than

More information

Kasetsart University Workshop. Multigrid methods: An introduction

Kasetsart University Workshop. Multigrid methods: An introduction Kasetsart University Workshop Multigrid methods: An introduction Dr. Anand Pardhanani Mathematics Department Earlham College Richmond, Indiana USA pardhan@earlham.edu A copy of these slides is available

More information

Numerical Modelling in Geosciences. Lecture 1 Introduction and basic mathematics for PDEs

Numerical Modelling in Geosciences. Lecture 1 Introduction and basic mathematics for PDEs Numerical Modelling in Geosciences Lecture 1 Introduction and basic mathematics for PDEs Useful information Slides and exercises: download at my homepage: http://www.geoscienze.unipd.it/users/faccenda-manuele

More information

Modeling, Simulating and Rendering Fluids. Thanks to Ron Fediw et al, Jos Stam, Henrik Jensen, Ryan

Modeling, Simulating and Rendering Fluids. Thanks to Ron Fediw et al, Jos Stam, Henrik Jensen, Ryan Modeling, Simulating and Rendering Fluids Thanks to Ron Fediw et al, Jos Stam, Henrik Jensen, Ryan Applications Mostly Hollywood Shrek Antz Terminator 3 Many others Games Engineering Animating Fluids is

More information

Solving Ax = b, an overview. Program

Solving Ax = b, an overview. Program Numerical Linear Algebra Improving iterative solvers: preconditioning, deflation, numerical software and parallelisation Gerard Sleijpen and Martin van Gijzen November 29, 27 Solving Ax = b, an overview

More information

TAU Solver Improvement [Implicit methods]

TAU Solver Improvement [Implicit methods] TAU Solver Improvement [Implicit methods] Richard Dwight Megadesign 23-24 May 2007 Folie 1 > Vortrag > Autor Outline Motivation (convergence acceleration to steady state, fast unsteady) Implicit methods

More information

PEAT SEISMOLOGY Lecture 2: Continuum mechanics

PEAT SEISMOLOGY Lecture 2: Continuum mechanics PEAT8002 - SEISMOLOGY Lecture 2: Continuum mechanics Nick Rawlinson Research School of Earth Sciences Australian National University Strain Strain is the formal description of the change in shape of a

More information

Modeling Myths. Modeling Facts

Modeling Myths. Modeling Facts Spiegelman: Columbia University, February 8, 22 Modeling Myths Modeling is Difficult Numerical models can do everything Numerical models will solve your problems Modeling Facts Modeling is simple book-keeping

More information

Continuum Mechanics. Continuum Mechanics and Constitutive Equations

Continuum Mechanics. Continuum Mechanics and Constitutive Equations Continuum Mechanics Continuum Mechanics and Constitutive Equations Continuum mechanics pertains to the description of mechanical behavior of materials under the assumption that the material is a uniform

More information

HW4, Math 228A. Multigrid Solver. Fall 2010

HW4, Math 228A. Multigrid Solver. Fall 2010 HW4, Math 228A. Multigrid Solver Date due 11/30/2010 UC Davis, California Fall 2010 Nasser M. Abbasi Fall 2010 Compiled on January 20, 2019 at 4:13am [public] Contents 1 Problem 1 3 1.1 Restriction and

More information

Numerical Heat and Mass Transfer

Numerical Heat and Mass Transfer Master Degree in Mechanical Engineering Numerical Heat and Mass Transfer 15-Convective Heat Transfer Fausto Arpino f.arpino@unicas.it Introduction In conduction problems the convection entered the analysis

More information

IMPLEMENTATION OF A PARALLEL AMG SOLVER

IMPLEMENTATION OF A PARALLEL AMG SOLVER IMPLEMENTATION OF A PARALLEL AMG SOLVER Tony Saad May 2005 http://tsaad.utsi.edu - tsaad@utsi.edu PLAN INTRODUCTION 2 min. MULTIGRID METHODS.. 3 min. PARALLEL IMPLEMENTATION PARTITIONING. 1 min. RENUMBERING...

More information

Modelling and implementation of algorithms in applied mathematics using MPI

Modelling and implementation of algorithms in applied mathematics using MPI Modelling and implementation of algorithms in applied mathematics using MPI Lecture 3: Linear Systems: Simple Iterative Methods and their parallelization, Programming MPI G. Rapin Brazil March 2011 Outline

More information

Streamline calculations. Lecture note 2

Streamline calculations. Lecture note 2 Streamline calculations. Lecture note 2 February 26, 2007 1 Recapitulation from previous lecture Definition of a streamline x(τ) = s(τ), dx(τ) dτ = v(x,t), x(0) = x 0 (1) Divergence free, irrotational

More information

G6943y: Myths and Methods in Modeling (M&M s in M)

G6943y: Myths and Methods in Modeling (M&M s in M) 1 G6943y: Myths and Methods in Modeling (M&M s in M) Instructor Marc Spiegelman, (mspieg@ldeo.columbia.edu, xtn 8425 (LDEO), 212 854 4918 (DAPAM/Columbia)) Teaching Assistant TBA Dates and Times Spring

More information

WRF Modeling System Overview

WRF Modeling System Overview WRF Modeling System Overview Jimy Dudhia What is WRF? WRF: Weather Research and Forecasting Model Used for both research and operational forecasting It is a supported community model, i.e. a free and shared

More information

STCE. Adjoint Code Design Patterns. Uwe Naumann. RWTH Aachen University, Germany. QuanTech Conference, London, April 2016

STCE. Adjoint Code Design Patterns. Uwe Naumann. RWTH Aachen University, Germany. QuanTech Conference, London, April 2016 Adjoint Code Design Patterns Uwe Naumann RWTH Aachen University, Germany QuanTech Conference, London, April 2016 Outline Why Adjoints? What Are Adjoints? Software Tool Support: dco/c++ Adjoint Code Design

More information

The Advanced Research WRF (ARW) Dynamics Solver

The Advanced Research WRF (ARW) Dynamics Solver Dynamics: Introduction The Advanced Research WRF (ARW) Dynamics Solver 1. What is a dynamics solver? 2. Variables and coordinates 3. Equations 4. Time integration scheme 5. Grid staggering 6. Advection

More information