DEPARTMENT of INFORMATICS Visualization for Rational

DEPARTMENT of INFORMATICS Visualization for Rational

DEPARTMENT OF INFORMATICS TECHNISCHE UNIVERSITÄT MÜNCHEN Bachelor’s Thesis in Informatics Visualization for Rational Approximations of Complex-valued Functions Finn Capelle DEPARTMENT OF INFORMATICS TECHNISCHE UNIVERSITÄT MÜNCHEN Bachelor’s Thesis in Informatics Visualization for Rational Approximations of Complex-valued Functions Visualisierung für Rationale Approximationen von Komplexwertigen Funktionen Author: Finn Capelle Supervisor: Prof. Martin Schulz Advisor: Dr. Martin Schreiber Submission Date: 14.08.2020 I confirm that this bachelor’s thesis in informatics is my own work and I have docu- mented all sources and material used. Munich, 14.08.2020 Finn Capelle Acknowledgments First and foremost I would like to thank my advisor Dr. Martin Schreiber for giving me the opportunity to write my bachelor thesis with him. His help and advice was always available and made this thesis possible in the first place. Furthermore, I would like to thank Prof. Dr. Martin Schulz for enabling me to write this thesis at his chair. Abstract Simulations often rely on numerical methods that consist of linear time differentials, which are hard to solve, and numerical solutions not always exist. They can be approximated using time-stepping methods, which often results in a lot of computation. When solving differential equations the solution function often contains an expo- nential integrator. This term can be approximated using REXI methods, which allows approximations for long time steps and parallelized solving. Each method has a high dimensional parameter space that makes comparing them challenging. This project was created to implement a user interface in which the parameters can be entered, and that displays the resulting error from the approximation. In the first part, the background of the thesis is discussed in more detail and the mathematical basics are explained. ODEs and PDEs will be roughly discussed as well as the theory behind rational approximations and the different REXI methods. The next section will go into more detail on how the software is built up, the functionality and installation will be explained, and a small example provided. iv Contents Acknowledgments iii Abstract iv 1 Introduction 1 2 ODE and PDE Basics 3 2.1 ODE Example . .3 2.2 PDE Example . .4 2.3 Solvers for differential equations . .7 3 REXI Methods 10 3.1 Problem Formulation . 10 3.2 TREXI . 11 3.3 CIREXI . 13 3.4 BREXI and ELREXI . 14 3.5 Difficulties in comparing the methods . 14 4 Software 15 4.1 Required Functionality . 15 4.2 Terminology . 15 4.3 Graphical User Interface . 16 4.3.1 Framework . 16 4.4 Architecture . 16 4.4.1 Class Diagram . 16 4.4.2 Dynamic Model . 18 4.4.3 Event Handling . 18 4.5 User Documentation . 19 4.5.1 Explanation of Functionality . 19 4.5.2 Installation and Example . 25 4.5.3 Third-party components . 31 5 Summary and Conclusion 32 v Contents Bibliography 33 vi Figure 1.1 Mean sea level pressure and wind speed at 850 hPa for Europe; Wednesday 5 Aug, 12 UTC T+216 [20] 1 Introduction Weather forecasts play a big role in our daily life. An estimated 80 percent of companies are weather dependent, most importantly agriculture, construction, and the insurance industry [16]. It was first tried by Lewis Fry Richardson in the 1920s to predict the weather for the next 6 hours. He had to calculate everything by hand and the results were described by himself as "a fairly correct deduction from a somewhat unnatural initial distribution". It was not until the 1960s with the advent of computers for the first realistic weather forecasts [19]. Today most predictions are done using numerical methods of the atmosphere and the ocean. Current weather observations are used as inputs that are relayed from radiosondes, weather satellites, and other observing systems [21]. These numerical methods often consist of linear differential equations, which are computationally expensive to solve, and analytical solutions not always exist. They 1 1 Introduction can be approximated using time-stepping methods, but for the approximations to be accurate, often small time-steps are required. This results in a lot of computation for long climate and weather predictions. Some of the time integration problems are solvable by rewriting them into the form U(t) = eLtU(0). The exponential integrator part of this term can be approximated for long time steps using REXI methods. REXI approximations allow parallelized approximations, which results in a huge performance benefit. Four different REXI methods exist TREXI [15], CIREXI [30, 29], BREXI [9, 7], and ELREXI 1. Evaluating how these methods perform against each other is nearly impossible because of high dimensional parameter spaces. One way to simplify the comparison is a user interface where the error of the approximation is visualized and the parameters can be entered quickly. 1Developed by Pedro S. Peixoto but not yet published 2 2 ODE and PDE Basics Differential equations can be split into two subclasses, Ordinary Differential Equations (ODE) and Partial Differential Equations (PDE). In both cases, an unknown function is given but ODEs contain differentials with respect to one independent variable, whereas PDEs contain differentials with respect to more than one independent variable [34]. 2.1 ODE Example This part is oriented towards these lecture notes [1]. An ODE typically consists of three parts du(t) = lu(t) + N(u(t)) + f (t, u(t)), dt | {z } | {z } | {z } linear term nonlinear term forcing term where m, l 2 C and N : C ! C. The linear term accounts for purely non-chaotic linear behavior and the nonlinear term describes non-linear interactions for chaotic effects for example. The forcing term can be used for external effects for example. A simple example for an ODE is a radioactive decay rate given as du(t) = −lu(t) . dt | {z } linear term u(t) is the amount of radioactive material and l is a positive real valued constant depending on the radioactive material. The minus sign in-front of l stands for the decreases in radioactive material over time. 3 2 ODE and PDE Basics Figure 2.1 Nuclear Radiation Rate using equation 2.1 U(0) = 1000, l = 1.23, t = [0; 10] An analytical solution can be constructed for this ODE du = lu dt du = dt lu Z u 1 Z t dh = (t − t0) dt u0 lh t0 1 (ln u − ln u ) = t − t l 0 0 u(t) ( − ) = el t t0 u0 l(t−t0) u(t) = ±u0e and assumed t0 = 0 the final solution is u(t) = eltu(0). (2.1) The result of the ODE is visualized in Figure 2.1. 2.2 PDE Example The following example is oriented towards [14]. 4 2 ODE and PDE Basics Imagine a 1D rode made out of metal with a different heat distribution throughout. The goal is to find out how the heat distribution changes over time. This can be done using the heat equation ¶u ¶2u (x, t) = a (x, t). (2.2) ¶t ¶x2 The equation consists of two parts ¶u ¶u (x, t), (x, t), ¶x ¶t The left part describes how the temperature changes along the rod and the right part describes how the temperature changes at a certain point on the rod over time. a is known as the thermal diffusivity. It measures the rate of transfer of heat from the cold to the warm end. Consider that the rod has length l with insulated sides and a start temperature distribution f (x) degree C, for 0 < x < l. The task is to find u(x, t) at t > 0, when the ends of the rod are kept at 0◦C. To start, the initial condition (IC) and boundary condition (BC), have to be found and to make the solution simpler physical constants are made dimensionless. Please refer to [14] pages 3-4 for a detailed explanation. PDE : ut = uxx (2.3) IC : u(x, 0) = f (x) (2.4) BC : u(0, t) = u(1, t) = 0 t > 0 (2.5) The solution that has to be found can then be written as, u(x, t) = T(t)X(x) (2.6) 00 uxx = T(t)X (x) (2.7) 0 ut = T (t)X(x) (2.8) and the PDE becomes T0(t) X00(x) = . (2.9) T(t) X(x) If t varies and x is held fixed the right hand side has to be constant and following the left hand side as well. This constant is set to −l. T0(t) X00(x) = = −l (2.10) T(t) X(x) 5 2 ODE and PDE Basics Solving for X(x) Using 2.10, X00(x) + −lX(x) = 0, 0 < x < 1, (2.11) X(0) = X(1) = 0. (2.12) 2.11 is called the Sturm-Liouville problem, in which l can take on 3 cases l < 0, l = 0, l > 0. l < 0 and l = 0 can be discarded, for the explaination please refer to [14] pages 5-6. For l > 0 2.11 is a harmonic equation p p X(x) = A cos( lx) + B sin( lx). p The BC 2.5 implies that 0 = X(0) = A and B sin( l) = 0. B can not be 0, because then u would also be 0, which would be the trivial solution, therefore p sin( l) = 0. p 2 2 Thus, l = pn where n 2 Nnf0g. The ln = p n values are the eigenvalues of the Sturm-Liouville problem and the corresponding solutions of 2.11 are called the eigenfunctions. Xn(x) = bn sin(npx) n = 1, 2, 3 (2.13) Solving for T(t) In the previous section it was shown, that l = p2n2, so using 2.10 T0(t) = −p2n2T(t) (2.14) and with respect to n the solution is −p2n2t Tn = cne (2.15) where cn is the constant from integration.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    42 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us