Download presentation
Presentation is loading. Please wait.
Published byLinette Porter Modified over 9 years ago
1
1 LECTURE 4 PDEs in the Real World
2
2 Aim of Lecture Recap of finite difference method & Neumann boundary conditions The finite difference method for non standard cases Accuracy & errors of the finite difference method Historical milestones in the solution of PDEs Commercial software for the solution of PDEs Use of numerical computational tools in industry Hardware technology for PDE solvers
3
3 Example – Tutorial 4, Q1 u(5,y) =25 u(0,y) =25 MODEL Insulated 25 o C (0,0) (5,5) REAL WORLD Finite Difference MODEL h = k = 0.5 i = 1 to 11 j = 1 to 11 25 o C
4
4 Finite Difference Equations Consider the Poisson equation. When h = k we have: Insulated 25 o C (0,0) (5,5) 25 o C
5
5 Including Boundary Conditions Dirichlet easily implemented: –at sides of domain –at bottom of domain Insulated 25 o C (0,0) (10,5) 25 o C i = 1 2 10 11 j = 1 2 10 11
6
6 Including Boundary Conditions Neumann Boundary Condition FD equation at top boundary (i = 2 to 10) 25 o C (0,0) (5,5) Virtual Nodes outside the domain 25 o C i i+1 i-1 j=11 j=12 j=10 h h
7
7 Including Boundary Conditions Use central difference formula. At top boundary. Therefore Neumann top boundary condition (i = 2, …, 10). 25 o C (0,0) (5,5) 25 o C
8
8 Results & Demo g = 5 g = –5
9
9 Using Excel – summary/list of tasks Set up the parameters of problem such as FLAG, h, k, g –NB when solving a Laplace equation it is better to set up Excel to solve Poisson and then just set g = 0 Set up the domain (size, x/y values) Fill in the known (Dirichlet) boundary values Work out the general FD formula and copy it across all cells with unknown values Work out FD formulas for all unknown (Neumann) boundary values and copy to relevant cells – next week There should be no cells inside the domain that reference cells outside the domain (apart from parameters like g or h) –Double click each boundary cell to check
10
10 Extensions to finite difference method Now have a set of tools which we can apply to non-standard cases –Non-square geometries (easy … provided they are composed of rectangular objects) –Non-standard equations –Non-standard boundary conditions Most real-life cases are non-standard!
11
11 Non-standard equations Example (the coefficient 3 makes this non-standard but Laplace like) But can substitute difference equations just as before. Difference formula for each node: When h = k we have:
12
12 Non-standard boundary conditions Example (the –u term makes this non-standard) But can use central difference as before Here we need to discretise u as so that (once again this introduces artificial nodes,, outside the boundary) u i,j i i+1i -1 j - 2 j -1 j
13
13 Accuracy The finite difference method is based on truncated Taylor series - Central difference So the errors in this approximation are of the order x 2. Similar for the derivative in y. But x & y are just the mesh spacing in x & y directions. Therefore a finer mesh will have lower discretisation errors. Increase in Accuracy
14
14 Accuracy Example: if x = y = 0.1 then the error is of the order 0.1 2 = 0.01 Suppose we double the number of mesh points in x & y directions This halves the mesh spacing x = y = 0.05 So the error is now of the order 0.05 2 = 0.0025 Much more accurate. Increase in Accuracy
15
15 Accuracy To test for accuracy we could just keep halving the mesh spacing If the solution doesn’t change when we do this, we can assume that the truncation error is insignificant and the discretisation is accurate. However as the mesh spacing tends to zero, the number of grid points (and hence the solution time) tend to infinity. This is not a problem for the simple examples with just a few grid points that we look at in this course, but in real-life cases, with millions of grid points, it can be a major headache. Increase in Accuracy Increase in solution time
16
Quality of Numerical Solutions Consistency Discretisation method should become exact as mesh spacing tends to zero. Therefore truncation error becomes zero as mesh spacing tends to zero. Stability Numerical solution is stable if it does not magnify errors that appear during the course of solution. For example with iterative methods the solution does not diverge. Conservation The numerical scheme used ensures that the dependent variable, for example temperature, is conserved. (i.e energy is not created nor destroyed). Boundedness Numerical solution should lie within specific bounds. For example temperature should be within boundary conditions or temperature cannot be less than -273 Kelvin. 16
17
Errors in PDEs Modelling Errors These are the difference between the mathematical model and the real world it is trying to represent. Discretisation Errors Difference between the exact solution to the mathematical model and the discretised equations used to approximate it. Convergence Errors Difference between the iterative solution results and the exact solution to the discretised equations. Other ErrorsOther errors, such as rounding errors and overflow errors, can creep in if the programmer is not careful. 17
18
18 Examples of costly error Modelling error: The wobbling of the Millenium Bridge, London, meant that on June 12, 2000 (just two days after opening) it had to be closed and re-engineered. Overflow error: The explosion of the Ariane 5 rocket, valued at $500 million, just after lift-off on its maiden voyage off French Guiana, on June 4, 1996, was the consequence of a simple overflow. Discretisation error: The sinking of the Sleipner A offshore platform in Gandsfjorden near Stavanger, Norway, on August 23, 1991, resulted in a loss of nearly $1,000,000,000. (see http://www.ima.umn.edu/~arnold/disastershttp://www.ima.umn.edu/~arnold/disasters and http://www.arup.com/MilleniumBridge)http://www.arup.com/MilleniumBridge
19
19 Software for solution of PDEs
20
20 Background – Historical Milestones Modelling started with the Greeks (1000BC) Major Breakthrough – Calculus –Newton, Liebnitz (17 th Century) Governing PDE equations of physics –Heat Transfer – Fourier (18 th Century) –Fluid Flow – Bernouli, Navier-Stokes (19 th Century) –Stress Analysis – Hooke, Navier (18 th Century) –Electromagnetics – Maxwell (19 th Century) Only analytical solutions feasible.
21
21 Finite differences used to analyze the Aswan dam - Egypt. - “L.F Richardson; Trans. Roy. Soc. A, 210, 307-357 (1910)”. - used students to compute system of equations !! Numerical Methods for solution of equations 19 th -20 th Centuries Computers arrive 1950…… Birth of Computational Solutions to PDEs – 1950s – 1960s Finite Element first used for the analysis of aircraft structures - “M J Turner et al; J. Aeronautical Sciences, 23, 805-823 (1956)” - Method based on variational approach - linear stress (Bars, Beams) Background – Historical Milestones
22
22 Finite Elements applied to field problems – Heat Transfer - “O. Zienkiewicz; The Engineer, 24, 507-510, (1965)” Finite Volume Methods first used (Computational Fluid Dynamics) - “A Wilmslow; J Comp Physics, 1, 149-172, 1966” -Navier-Stokes flow: “Patankar, Spalding; Int J Heat Mass Trans, 15, 1787-1806 (1972). 2000 onwards – computational Modelling now used in all areas of science and engineering. Background – Historical Milestones
23
23 Steps in Analysis CAD – MESHING – ANALYSIS - VISUALISATION CAD MESH ANALYSIS VISUALISATION DESIGN ITERATIONS
24
24 Meshing – Structured and Unstructured Data referenced using i,j grid lines Poor on complex shapes. Finite Difference Methods. Good for complex geometry Topology representation - Points - Faces - Elements Mixed element types. Finite Element and Finite Volume Methods
25
25 CAD + Meshing Software CATIA –http://www.catia.comhttp://www.catia.com Mentor Graphics –http://www.mentor.comhttp://www.mentor.com FEMSYS –http://www.tnodiana.comhttp://www.tnodiana.com
26
26 Commercial Software – Fluid Flow Resources at : http://www.cfd-online.comhttp://www.cfd-online.com Fluent –http://www.fluent.comhttp://www.fluent.com FLOTHERM –http://www.flomerics.comhttp://www.flomerics.com PHOENICS –http://www.cham.co.ukhttp://www.cham.co.uk PHYSICA –http://www.physica.co.ukhttp://www.physica.co.uk
27
27 Commercial Software – Stress Analysis Resources at : http://homepage.usask.ca/~ijm451/finite/fe_resources/fe_resources.html http://homepage.usask.ca/~ijm451/finite/fe_resources/fe_resources.html ANSYS –http://www.ansys.comhttp://www.ansys.com MSC Software (NASTRAN, MARC) –http://www.mscsoftware.comhttp://www.mscsoftware.com
28
28 Visualisation Software Most analysis codes will have some visualisation capabilities. Leading-edge visualisation codes: –AVS http://www.avs.com –Ensight http://www.ensight.com –Flomotion http://www.flomerics.com
29
29 Hardware 1940-50s : ENIAC, Collosuss –Vacuum Tubes –<1000’s operations per second 1960s Birth of the Transistor –IBM 360 –DEC PDP-8 –Languages : Fortran –Punch Cards All the above expensive. Humble scientists limited to the slide rule. IBM System 360 Collosuss Slide Rule
30
30 Measuring Performance Computer speed is often measured in flops This is the number of floating point operations (e.g. add, subtract, multiply, divide) that can be performed in 1 second –1 Megaflop = 1 x 10 6 Flops (1,000,000) –1 Gigaflop = 1 x 10 9 Flops (1,000,000,000) –1 Teraflop = 1 x 10 12 Flops (1,000,000,000,000) –1 Petaflop = 1 x 10 15 Flops (1,000,000,000,000,000)
31
31 Hardware 1970s Integrated Circuits –Cray-1 –DEC PDP-11 –Vector Processing, –Punch cards –Speed: 1-100 Million Flops 1980s : Microprocessors –IBM-PC –Multiprocessor machines –Distributed and Shared Memory –Visualisation software –Speed: 1 Billion Flops (Gigaflop) Cray - 1 IBM-PC
32
32 Parallel Processing. Despite fantastic improvements in computational power, scientists still want to solve problems that take too long (weather simulations, etc) Why use only one processor when we can use many? Traditional (serial) approach Parallel Processing Approach Simulation Code Computer Processor Requires rewriting software to allow communication calls. Advantage is ability to solve larger problems in shorter time.
33
33 Issues Bandwidth –Rate at which data can be transferred. Latency –The time between a process being ready to transmit data and the time at which it is transmitted (often arises due to synchronisation issues). Speed up –How fast a parallel simulation is compared to a serial one, i.e. serial runtime/parallel runtime. Scalability –How large a system can be made before performance starts to drop off.
34
34 Example Solution of PDEs for modelling Oil Reservoirs. Hundreds of thousands of elements. Near perfect speed up for small numbers of processors + PC-based cluster using MYRINET
35
35 Hardware 1990s –PC’s catch up with workstations –C, JAVA, Fortran 90, HPF –Internet –Parallel computers (e.g. ASCI) –Speed: TeraFlops 2000s –Ultra fast processors –Dual core/quad core machines on desktop –Gigabyte communication bandwidth –Computational Grids (e.g. parallel computers in Chicago & Stuttgart collaborating on same problem!) –Towards PetaFlop Computing and PetaByte Storage ASCI - White
36
36 Worlds Fastest Computers – Nov 2006 http://www.top500.org Based on LINPACK Benchmarks
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.