[MUSIC] Let's say we want to simulate phenomena in nature. There are always spatial scales involved. For example, think about ocean waves circulating the Earth. Think about seismic waves propagating around the Earth, and you see these phenomena actually behind me on the screen. Seismic waves propagating around the Earth, if you want to understand these phenomena, you need to discretize these waves in an appropriate way to make the simulations accurate. Now, let's make an example. Seismic waves are actually observed for earthquakes that are far away with frequencies up to 1 Hz. The speed with which these waves are propagating is at least on the order of 3 km/s. Think about what that means, that means actually this is about 10,000 km/h, which is actually quite fast. It's about the speed with which satellites go around the Earth or rockets go to planetary objects. Now, to understand the wavelengths involved, we need a very fundamental equation that we use all over the course. And that's the relation between velocity, frequency and wavelength. So c is the propagation velocity, it is equal to lambda the wavelength times the frequency. Now given these numbers, we've said 3 kilometers per second at 1 hertz, that's a very simple problem. The wavelength of the wave will actually be 3 kilometers. So if we want to discretize such a wave, and we now make a simplification, let's assume this is a monochromatic wave, a sinusoidal wave. We would like to discretize this wave with about 10 grid points per wavelength, and you see this here. What I mean by that. And again, that's an extremely fundamental concept, how many points or cells we need to discretize such a wave. In this point it's 10 grid points per wavelength. And now we ask the question, well, how would we have to discretize the entire Earth if we would like to simulate waves at this frequency, with this wave speed propagating through the Earth. Let's do that. So we said the propagation speed of 3 kilometers 10 grid points per wavelengths, that means 0.3 kilometer grid spacing, or grid distance. Or actually side of a cube, the side of a cubic element that we need to discretize our phenomenon. Now what does that mean if we want to discretize the entire Earth. The radius of the Earth is 6,371 kilometers, and the volume of the Earth would be, 4/ 3 pi times r to the power of 3. Now that's a very big number as you can imagine. And we need to divide the entire volume of the Earth by the volume of our unit cell, the smallest grid cell, your computational cell if you want. And that's 0.3 kilometers in brackets to the power of 3. Now if you make the calculation, we get the very large number that's actually 4 x 10 to the power of 13. And if you multiply that with 8 bytes, as a double precision number, that's the memory space you need for one number, you get 420 terabyte memory for one field, for example for the density model or a velocity model of the Earth. Wow, that's a large number, that's a very big number. And that immediately makes it obvious that this is nothing you can simulate on your smartphone, even on your laptop. This is something that's even too big to run on the largest supercomputers. Or let's say we re just around the corner where something might be possible with these kind of memory requirements. So that's the reason why we also need to talk a little bit about parallel computing, even though that's important to know that in this course. We'll focus on 1D at best two dimensional, 2D solutions. Because otherwise we would have to have a course that goes much beyond nine weeks. So a few words on dimensionality, I mentioned that in this course, actually, we focuse on providing or developing solutions for the one-dimensional case, one dimensional wave equation, which of course then is defined on a line. We also develop some - at least for the finite difference of pseudospectral methods, two-dimensional solutions, that's an example shown here. In the x-z plane we have a full coordinate axis here, a full coordinate system. And that has some consequences that we discuss later during the course. But of course the world is three dimensional. And you can see that here. If you're in three dimensions, you have to discretize all, the whole entire three dimensional domain. Now let's look at some concepts of meshes here, in one dimension that's of course very, very simple. So let's look at it in two dimensions, you can see here, a regular grid. So you have equal grid spacing In the x and the z direction. That's an x,z grid. It's a two-dimensional regular grid and there's already a problem. For example think about a, for example, a structural discontinuity. Could be a layer inside the Earth, that's actually curvilinear and follows the grid. And in the top you see there is no way out, basically that you then have a blocky representation of that interface. This could be fixed by, for example, making use of a triangular grid that you see in the bottom. So in that case, you can actually honor the discontinuity, but from a mathematical, computational point of view, actually that's an overhead, which we will also see later. Another approach that helps in this situation, so we want to discretize around a curvilinear discontinuity is this so called octree approach. And you see an example here, is that you basically refine your mesh in the area of interest, in that case the interface. And that's another very elegant way of solving the problem of internal complex geometries. In three dimensions I just give you an example here, you see a mesh that's actually discretizing a volcano, in that case this is the Merapi volcano in Indonesia, which has a very complex topography. In that case it's actually discretized with the so called tetrahedra. So it's a tetrahedral grid that has some advantages concerning the mesh generation Other possibilities are discretizing with hexahedral elements, which is a little more complicated, but we're not going to deal with this here. But what I would like to mention is that, in many situations if you have complex geometries and this might apply to, for example, also in engineering, if you would like to understand, for example, the airflow around the wing of an airplane or a rocket, that's very complicated, it requires to generate a complicated computation mesh, and that also can be quite difficult. But that's not something we're going to deal with here. So eventually we want to discretize propagating waves, probably away from a source point. They might be far way, so they're almost planar waves, in 1D actually they will always be plane waves. And we need to find ways of discretizing those wave-like phenomena. They might be sinusoidal, they might have an arbitrary waveform. And let's just look at some fundamental ways of achieving that. We've actually encountered one before, and that's simply thinking about the finite difference method that we encounter next week, is simply we employ a certain number of grip points per wavelength. Here you can see a sinusoidal wave discretized with a couple of points. And again, the question on how many points per wavelength we require for a particular method will be extremely important. So this is something we call a grid, a grid method where we actually simply divide, take a number of grid points for a particular characteristic wavelengths of the wave field. Another approach that we will encounter, is the pseudospectral method, as illustrated in this figure here. Is that we actually describe the wave field, or here it's a Gaussian shaped function that might propagate away from the source by a superposition of some basis functions. And if we employ Fourier type methods, these spaces functions are of course sine or cosine functions, and you can see those in the dashed lines. These are basically the basis functions appropriately weighted and summed up. They actually will lead to the Gaussian shaped wave form that you see in this figure. The finite element type discretization is yet different in the sense that you're dividing up the spatial domain, as indicated here, into elements. And then actually inside these elements, you approximate the function with, in this case, linear basis functions. And so actually in this case then the approximate wave field is known at all points. Which is different to the finite difference method, where you know the function only, in the numerical approximation, only at these specific grid points. So in the linear finite-element method, as the name says, inside the elements, you have only a linear description of your physical phenomenon, in this case, the wave field. Now the spectral-element method, that will be the last method we will encounter in this course, will be actually a combination of the concepts that we just described for the pseudospectral method and the finite-element method actually, but we'll look at this later. The superposition of basis functions will happen inside each element, very elegant. So we will see this later. So these are some fundamental ways of describing, or discretizing, wave like functions that we will employ with the various methods that we will encounter.