Courant and all that Consistency, Convergence Stability Numerical Dispersion Computational grids and numerical anisotropy The goal of this lecture is to.

Slides:



Advertisements
Similar presentations
Finite Difference Discretization of Hyperbolic Equations: Linear Problems Lectures 8, 9 and 10.
Advertisements

Formal Computational Skills
Partial Differential Equations
CSE245: Computer-Aided Circuit Simulation and Verification Lecture Note 5 Numerical Integration Prof. Chung-Kuan Cheng 1.
Numerical Uncertainty Assessment Reference: P.J. Roache, Verification and Validation in Computational Science and Engineering, Hermosa Press, Albuquerque.
Lecture 18 - Numerical Differentiation
Session: Computational Wave Propagation: Basic Theory Igel H., Fichtner A., Käser M., Virieux J., Seriani G., Capdeville Y., Moczo P.  The finite-difference.
Numerical Integration of Partial Differential Equations (PDEs)
Total Recall Math, Part 2 Ordinary diff. equations First order ODE, one boundary/initial condition: Second order ODE.
CSE245: Computer-Aided Circuit Simulation and Verification Lecture Note 5 Numerical Integration Spring 2010 Prof. Chung-Kuan Cheng 1.
Atms 4320 Lab 2 Anthony R. Lupo. Lab 2 -Methodologies for evaluating the total derviatives in the fundamental equations of hydrodynamics  Recall that.
Computer-Aided Analysis on Energy and Thermofluid Sciences Y.C. Shih Fall 2011 Chapter 6: Basics of Finite Difference Chapter 6 Basics of Finite Difference.
Chapter 1 Introduction The solutions of engineering problems can be obtained using analytical methods or numerical methods. Analytical differentiation.
Introduction to Numerical Methods I
Numerical Solutions of Ordinary Differential Equations
Finite Difference Time Domain Method (FDTD)
CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4: KFUPM.
Numerical solution of Differential and Integral Equations PSCi702 October 19, 2005.
Numerical Solutions to ODEs Nancy Griffeth January 14, 2014 Funding for this workshop was provided by the program “Computational Modeling and Analysis.
Lecture 35 Numerical Analysis. Chapter 7 Ordinary Differential Equations.
Tutorial 5: Numerical methods - buildings Q1. Identify three principal differences between a response function method and a numerical method when both.
Time integration methods for the Heat Equation Solution u for t= Tobias Köppl TUM.
Finite Differences Finite Difference Approximations  Simple geophysical partial differential equations  Finite differences - definitions  Finite-difference.
Autumn 2008 EEE8013 Revision lecture 1 Ordinary Differential Equations.
CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4: KFUPM CISE301_Topic1.
CISE301_Topic11 CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4:
Lecture 3.
1 EEE 431 Computational Methods in Electrodynamics Lecture 4 By Dr. Rasime Uyguroglu
Lecture Objectives: Analyze the unsteady-state heat transfer Conduction Introduce numerical calculation methods Explicit – Implicit methods.
Scientific Computing Numerical Solution Of Ordinary Differential Equations - Euler’s Method.
To Dream the Impossible Scheme Part 1 Approximating Derivatives on Non-Uniform, Skewed and Random Grid Schemes Part 2 Applying Rectangular Finite Difference.
+ Numerical Integration Techniques A Brief Introduction By Kai Zhao January, 2011.
MA/CS 375 Fall MA/CS 375 Fall 2002 Lecture 12.
Mathe III Lecture 5 Mathe III Lecture 5 Mathe III Lecture 5 Mathe III Lecture 5.
Finite Difference Methods Definitions. Finite Difference Methods Approximate derivatives ** difference between exact derivative and its approximation.
Today’s class Numerical Differentiation Finite Difference Methods Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 1.
Engineering Analysis – Computational Fluid Dynamics –
HW2 Due date Next Tuesday (October 14). Lecture Objectives: Unsteady-state heat transfer - conduction Solve unsteady state heat transfer equation for.
MECN 3500 Inter - Bayamon Lecture 9 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
CIS888.11V/EE894R/ME894V A Case Study in Computational Science & Engineering We will apply several numerical methods to find a steady state solution of.
Circuits Theory Examples Newton-Raphson Method. Formula for one-dimensional case: Series of successive solutions: If the iteration process is converged,
Introduction to the Runge-Kutta algorithm for approximating derivatives PHYS 361 Spring, 2011.
Suppose we are given a differential equation and initial condition: Then we can approximate the solution to the differential equation by its linearization.
Elliptic PDEs and Solvers
Lecture 40 Numerical Analysis. Chapter 7 Ordinary Differential Equations.
The story so far… ATM 562 Fovell Fall, Convergence We will deploy finite difference (FD) approximations to our model partial differential equations.
Lecture 2. Finite Difference (FD) Methods Conservation Law: 1D Linear Differential Equation:
Lecture 2: Mathematical Modeling Copyright © Thomas Marlin 2013 The copyright holder provides a royalty-free license for use of this material at non-profit.
Computational Fluid Dynamics Lecture II Numerical Methods and Criteria for CFD Dr. Ugur GUVEN Professor of Aerospace Engineering.
EEE 431 Computational Methods in Electrodynamics
Finite Difference Methods
Introduction to Numerical Methods I
Chapter 30.
ივანე ჯავახიშვილის სახელობის
Advanced Numerical Methods (S. A. Sahu) Code: AMC 51151
Announcement MATHCAD for solving system of equation for HW1b
Taylor series in numerical computations (review, cont.)
CSE245: Computer-Aided Circuit Simulation and Verification
Announcement MATHCAD for solving system of equation for HW1b
CSE 245: Computer Aided Circuit Simulation and Verification
Finite Volume Method for Unsteady Flows
ME/AE 339 Computational Fluid Dynamics K. M. Isaac Topic2_PDE
Ordinary differential equaltions:
Scientific Computing Partial Differential Equations Implicit Solution of Heat Equation.
CSE245: Computer-Aided Circuit Simulation and Verification
Numerical Analysis Lecture 38.
MATH 175: Numerical Analysis II
EE 616 Computer Aided Analysis of Electronic Networks Lecture 12
Derivatives and Gradients
Presentation transcript:

Courant and all that Consistency, Convergence Stability Numerical Dispersion Computational grids and numerical anisotropy The goal of this lecture is to understand how to find suitable parameters (i.e., grid spacing dx and time increment dt) for a numerical simulation and knowing what can go wrong. 1

Courant and all that A simple example: Newtonian Cooling Numerical solution to first order ordinary differential equation We can not simply integrate this equation. We have to solve it numerically! First we need to discretise time: and for Temperature T

Courant and all that A finite-difference approximation Let us try a forward difference:... which leads to the following explicit scheme : This allows us to calculate the Temperature T as a function of time and the forcing inhomogeneity f(T,t). Note that there will be an error O(dt) which will accumulate over time.

Courant and all that Coffee? Lets try to apply this to the Newtonian cooling problem: T Air T Cappucino How does the temperature of the liquid evolve as a function of time and temperature difference to the air?

Courant and all that Newtonian Cooling The rate of cooling (dT/dt) will depend on the temperature difference (T cap -T air ) and some constant (thermal conductivity). This is called Newtonian Cooling. With T= T cap -T air being the temperature difference and the time scale of cooling then f(T,t)=-T/ and the differential equation describing the system is with initial condition T=T i at t=0 and >0.

Courant and all that Analytical solution This equation has a simple analytical solution: How good is our finite-difference appoximation? For what choices of dt will we obtain a stable solution? Our FD approximation is:

Courant and all that FD Algorithm 1. Does this equation approximation converge for dt -> 0? 2. Does it behave like the analytical solution? With the initial condition T=T 0 at t=0: leading to :

Courant and all that Understanding the numerical approximation Let us use dt=t j /j where t j is the total time up to time step j: This can be expanded using the binomial theorem

Courant and all that... where we are interested in the case that dt-> 0 which is equivalent to j-> as a result

Courant and all that substituted into the series for T j we obtain: which leads to... which is the Taylor expansion for

Courant and all that So we conclude: For the Newtonian Cooling problem, the numerical solution converges to the exact solution when the time step dt gets smaller. How does the numerical solution behave? The analytical solution decays monotonically! What are the conditions so that T j+1 <T j ?

Courant and all that Convergence Convergence means that if we decrease time and/or space increment in our numerical algorithm we get closer to the true solution.

Courant and all that Stability T j+1 <T j requires or The numerical solution decays only montonically for a limited range of values for dt! Again we seem to have a conditional stability.

Courant and all that if then the solution oscillates but converges as |1-dt/ |<1 if then 1-dt/ <-1 and the solution oscillates and diverges... now let us see how the solution looks like....

Courant and all that Matlab solution % Matlab Program - Newtonian Cooling % initialise values nt=10; t0=1. tau=.7; dt=1. % initial condition T=t0; % time extrapolation for i=1:nt, T(i+1)=T(i)-dt/tau*T(i); end % plotting plot(T)

Courant and all that Example 1 Blue – numerical Red - analytical

Courant and all that Example 2 Blue – numerical Red - analytical

Courant and all that Example 3 Blue – numerical Red - analytical

Courant and all that Example 4 Blue – numerical Red - analytical

Courant and all that Stability Stability of a numerical algorithm means that the numerical solution does not tend to infinite (or zero) while the true solution is finite. In many case we obtain algoriths with conditional stability. That means that the solution is stable for values in well-defined intervals.

Courant and all that Grid anisotropy In which direction is the solution most accurate and why?

Courant and all that Grid anisotropy with ac2d.m

Courant and all that … and more … a Greens function …

Courant and all that Grids Cubed sphere Hexahedral grid Spectral element implementation Tetrahedral grid Discontinuous Galerkin method

Courant and all that Grid anisotropy

Courant and all that Grid anisotropy Grid anisotropy is the directional dependence of the accuracy of your numerical solution if you do not use enough points per wavelength. Grid anisotropy depends on the actual grid you are using. Cubic grids display anisotropy, hexagonal grids in 2D do not. In 3D there are no grid with isotropic properties! Numerical solutions on unstructured grids usually do not have this problem because of averaging effects, but they need more points per wavelength!

Courant and all that Real problems 36 km 30 km Alluvial Basin V S = 300m/s f max = 3Hz min = V S /f max = 100m Bedrock V S = 3200m/s f max = 3Hz min = V S /f max = m

Courant and all that Hexahedral Grid Generation

Courant and all that Courant … Largest velocity Smallest grid size Time step

Courant and all that Courant and all that … - Summary Any numerical solution has to be checked if it converges to the correct solution (as we have seen there are different options when using FD and not all do converge!) The number of grid points per wavelength is a central concept to all numerical solutions to wave like problems. This desired frequency for a simulation imposes the necessary space increment. The Courant criterion, the smallest grid increment and the largest velocity determine the (global or local) time step of the simulation Examples on the exercise sheet.