Huh? Strange knowledge has increased! Open the tsunami propagation model by mathematical modeling (with part of the matlab source code)

Preface

The feedback from our friends on the forest fire spread model was pretty good. Today we are modeling the tsunami mathematically.

At the beginning of the article, feed yourself a bag of salt.

The following are two matlab columns carefully compiled by the blogger, including entry to proficiency and actual combat content. Small partners who need it can subscribe according to their own needs.

MATLAB takes you from entry to master in 30 days

https://blog.csdn.net/wenyusuran/category_10614422.html

MATLAB in-depth understanding of advanced tutorial (with source code)

https://blog.csdn.net/wenyusuran/category_2239265.html

There are also application example source codes of various algorithms in the blogger's resources, and small partners who need it can pick it up.

The code addresses involved in the article are as follows:

Matlab source code collection-tsunami propagation model

https://download.csdn.net/download/wenyusuran/16237225

 

    The formation of an earthquake is the slow relative displacement of adjacent blocks of the crust under the dynamic geological action of the earth's crust, the deformation of crustal rocks, and the amount of rock strain increases with the gradual displacement of the blocks. When the rock strain is greater than the strength that the rock can withstand, the rock breaks and the rock elastic deformation quickly recovers. At this time, the elastic deformation energy stored in the rock is suddenly released, forming an earthquake. Sudden displacement of the elastically deformed crust causes disturbances in the upper water body, resulting in swells and tsunamis. Therefore, there is a close relationship between the spatial distribution and the time of occurrence of tsunamis and earthquakes, and destructive tsunamis are naturally distributed in seismic zones.

We all know well now that tsunamis are water waves that start in the deep ocean, usually because of underwater earthquakes (although tsunamis may also be caused by underwater landslides or volcanoes), and then spread to the coast. Initially, the amplitude of tsunamis was relatively small (typically around one meter), which seemed to make them as harmless as wind waves. In fact, tsunamis often pass through ships in the deep sea without even being noticed.

Tsunami propagation method

    Since the propagation speed of a tsunami wave is related to the square root of the depth of the sea, its propagation speed is reduced to tens of kilometers per hour, and the advancement is blocked, and a wave height of more than ten meters and tens of meters will be formed and rush to land. This wavelength is extremely long The extremely fast tsunami wave, once it reaches the shore from the deep sea, its advancement is blocked, and all its huge energy will become a huge destructive force, destroying everything that can be destroyed, and causing huge disasters.
 

A tsunami is an event as big as an earthquake. The wavelength of a tsunami is very large-typically 200 kilometers (contrary to wind and waves, the wavelength is usually close to 100 meters). In particular, the wavelength of a tsunami is much greater than the depth of the ocean (usually 2-3 kilometers). Therefore, even in the deep sea, the dynamics of the tsunami are basically controlled by the shallow water equation. One result of these equations is the propagation velocity of the tsunami image, which can be approximated by the formula:

image

imageIt is the depth of the ocean, it imageis gravity. Therefore, a tsunami in deep water moves very fast-for example, a speed of 500 kilometers per hour (300 miles per hour) is very typical; for example, it is possible to travel from Japan to the United States in less than a day. This is due to the incompressibility of water (and conservation of mass); the huge net pressure of very wide and deep water waves (or more accurately, the spatial variation of this pressure) forces the contours of the waves to move horizontally at great speeds. (Note that this is the phase velocity of the tsunami wave, not the velocity of the water molecules themselves. They are much slower.)

When a tsunami approaches the coast, the depth imagewill of course decrease, causing the tsunami to decelerate. The speed is proportional to the square root of the depth, as shown in (1). Unfortunately, the wave shoal then forces the amplitude imageto increase at a reverse rate controlled by Green’s Law ,

image

At least until the amplitude becomes comparable to the depth of the water (at this point, the above approximation will be destroyed; similarly, in the two (horizontal) spatial dimensions, when the tsunami spreads outward, the amplitude will be somewhat attenuated). If it is assumed that the tsunami starts and its initial amplitude is imageat depth image, use the proportional relationship to calculate the amplitude imageand depth imageto obtain the amplitude of the tsunami (and the depth of the water) image. So, for example, a tsunami with an initial amplitude of 1 meter at a depth of 2 kilometers can eventually reach a final amplitude of about 5 meters near the shore while still traveling at a speed of about 10 meters per second (35 kilometers per hour, or 22 per second). Hours and miles), we now see the possible impact when it reaches the shore.

Although tsunamis are too large to be controlled (at least in the deep sea), we can at least model them mathematically, so that we can predict their impact on various places along the coast with high accuracy. The complete equations and numerical methods used to implement such models are somewhat complicated, but through a large number of simplified assumptions, it is relatively easy to derive a rough model that has predicted the basic characteristics of tsunami propagation, such as the velocity formula (1) and the amplitude ratio method. (2). I give this (standard) derivation below. This argument is largely heuristic; in fact, many of the following steps are very interesting analysis questions, and we will not discuss them here.

 

Shallow water wave equation 

Of course, the ocean is a three-dimensional fluid, but in order to simplify the analysis, we will consider a two-dimensional model in which the only spatial variables are the horizontal variable imageand the vertical variable image, among which imageis the equilibrium sea level. We use curves to simulate the seabed

image

So the location of the ocean depth measurement image. At any time imageand location image, the height of the water (compared to sea level image) will be imagegiven by an unknown height function ; therefore, at any time image, the ocean occupies the area

image

Now, we simulate the movement of water in the ocean by assigning a velocity vector at each time imageand imageat each point in the ocean

 

image

We made the basic assumption of incompressibility , so imagethe density of water is always constant image.

According to Newton's second law image, speed changes with time. To apply this law to fluids, we consider an infinitesimal amount of water flowing along the velocity field image. Therefore, in time image, we assume that this amount of water occupies some infinitely small area imageand a certain position that we haveimage

image

Due to the incompressibility, this area imageremains unchanged, and the mass of this infinitely small portion of water is image. There will be two forces on this body of water; the force of gravity and the imagepressure field, imagegiven by the pressure field image. On the length and time scale of the tsunami, we can ignore the influence of other forces, such as viscosity or surface tension. Then Newton's law givesimage

image

This simplifies the incompressible Euler equation

image

Currently, no pressure is given. However, we can simplify things by assuming (vertical) hydrostatic balance, that is image, the vertical effect of pressure cancels out the effect of imagegravity. We also assume that imagethe pressure on the water surface is zero. In short, these two assumptions force the pressure to become hydrostatic pressure

image

This reflects the intuitive and reasonable fact that the pressure at the next point in the ocean should be determined by the weight of the water above that point.

The incompressible Euler equation is now simplified to

image

Next, we approximate shallow water to indicate that the wavelength of water is much greater than the depth of water. In particular, we do not expect imagesignificant changes in the velocity field in the variables, thus making ansatz possible

image

(This ansatz should use a grain of salt, especially when applied to the speed imagecomponent image, it must actually fluctuate to adapt to the changes in the ocean depth and height function. However, the main component is that the speed is a horizontal component image. In an actual tsunami, this is indeed Appears to be vertical insensitive.)

Take imagethe component (4), and abbreviate it imageas image, we get the first shallow water wave equation

image

 

This is simplified after Taylor extended to the second shallow water wave equation

image

image

Equations (6) and (7) are nonlinear in the unknown image. However, by assuming that the amplitude of the waves is small compared to the depth of the water, they can be approximately linearized:

image

This assumption is quite accurate for a tsunami in the deep sea, even a mid-depth tsunami, but once the tsunami reaches the coast (the dynamic model is more difficult to simulate), of course it is unreasonable.

Assumption (11) has been simplified (7) to (approximately)

image

As for (6), we think that the second word on the left can be ignored, resulting in

image

In order to explain why it is a heuristic, we hope that this is the situation. Let us do a pseudo- assuming imageand imagehave amplitudes image, imagenamely the propagation phase velocity imageand the wavelength image; let us also make a (reasonable) assumption that the spatial imagechange is imageslower than the change Much (ie imageroughly constant in the wavelength range image), so we can (for the first approximation) replace it imagewith image. Then we have

 

image

Then combine equations (12)

image

From (11) we expect image, therefore image; the propagation speed of the wave is much faster than the speed of the fluid. In particular, we expect the imageratio to be much imagesmaller, which explains why we hope to reduce the second term in (6) to obtain (13).

If we now insert the above ansatz into (13), we get

image

Combining it with (14), we have got the speed relationship (1).

In order to get the relationship (2), we must analyze ansatz more carefully. First, we combine (13) and (12) into a single equation of the height function image. In fact, distinguish (12) in time and substitute in (13) and (1)

image

To solve this wave equation, we use a standard sine curve

image

imageIt is a slowly changing function and imagea small parameter. Inserting this ansatz and extracting the terms image, we have the eikonal equation

image

And the Hamilton-Jacobi equation

image

From the eikonal equation we see that it propagates imageat speed image. Assuming to propagate to the right, we did this

image

For the Hamilton-Jacobi equation, we use the characteristic method to solve it. Multiplying by the equation image, we get

image

Insert (15) and image, get

image

This simplifies to

image

Therefore, we see that it imageis unchanged in characteristics. On the other hand, in the distinction (15) image, we see

image

Therefore, it imageis also a constant feature. We see that this imageis an unchanging feature that leads to a proportional relationship

image

Given (2).

Source code

%Steven McHale
%Tsunami Model
%Shallow-Water Wave Equation
%Crank-Nicholson Discretization

clear;
clf;
clc;

% Constants
g  = 9.81;
u0 = 0;                               
v0 = 0;
b  = 0;                               
h0 = 5030;                             

% Define the x domain
ni = 151;                               
xmax = 100000;                      
dx = xmax/(ni-1);
x  = [0:dx:xmax];

% Define the y domain
nj = 151;                              
ymax = 100000;                      
dy = ymax/(nj-1);
y  = [0:dy:ymax];

% Define the wavespeed
wavespeed = u0 + sqrt(g*(h0 - b));

% Define time-domain
dt = 0.68*dx/wavespeed;
tmax = 1500;
%t = [0:dt:tdomain];
t=[1:dt:tmax];
courant = wavespeed*dt/dx;

% Build empty u, v, b matrices
u=zeros(length(x), length(y), length(t));
v=zeros(length(x), length(y), length(t));
b=zeros(length(x), length(y));

% Define h
h=zeros(length(x), length(y), length(t)); 
h(:,:,1) = 5000;                              
h((45000/100000*(length(x)-1)+1):floor(55000/100000*(length(x)-1)+1),(45000/100000*(length(y)-1)+1):floor(55000/100000*(length(y)-1)+1),1) = 5030;

%Define b
for i = 1:length(x)
    if x(i) > 20001
        b(:,i) = 0;
    elseif x(i) < 20000
        b(:,i) = 5000/20000*(20000-x(i));
    end
end

% Employ Lax
for n=1:(length(t)-1)
    for i=2:(ni-1)
        for j=2:(nj-1)    
            u(i,j,n+1) = ((u(i+1,j,n) + u(i-1,j,n) + u(i,j+1,n) + u(i,j-1,n))/4)...
                - 0.5*(dt/dx)*((u(i+1,j,n)^2)/2 - (u(i-1,j,n)^2)/2)...
                - 0.5*(dt/dy)*(v(i,j,n))*(u(i,j+1,n) - u(i,j-1,n)) - 0.5*g*(dt/dx)*(h(i+1,j,n)-h(i-1,j,n));
            
            v(i,j,n+1) = ((v(i+1,j,n) + v(i-1,j,n) + v(i,j+1,n) + v(i,j-1,n))/4)...
                - 0.5*(dt/dy)*((v(i,j+1,n)^2)/2 - (v(i,j+1,n)^2)/2)...
                - 0.5*(dt/dx)*(u(i,j,n))*(v(i+1,j,n) - v(i-1,j,n)) - 0.5*g*(dt/dy)*(h(i,j+1,n)-h(i,j-1,n));
            
            h(i,j,n+1) = ((h(i+1,j,n) + h(i-1,j,n) + h(i,j+1,n) + h(i,j-1,n))/4)...
                - 0.5*(dt/dx)*(u(i,j,n))*((h(i+1,j,n)-b(i+1,j)) - (h(i-1,j,n)-b(i-1,j)))...
                - 0.5*(dt/dy)*(v(i,j,n))*((h(i,j+1,n)-b(i,j+1)) - (h(i,j-1,n)-b(i,j-1)))...
                - 0.5*(dt/dx)*(h(i,j,n)-b(i,j))*(u(i+1,j,n)- u(i-1,j,n))...
                - 0.5*(dt/dy)*(h(i,j,n)-b(i,j))*(v(i,j+1,n) - v(i,j-1,n));

        end
    end

    % Define Boundary Conditions
    u(1,:,n+1) = 2.5*u(2,:,n+1) - 2*u(3,:,n+1) + 0.5*u(4,:,n+1);
    u(length(x),:,n+1) = 2.5*u(ni-1,:,n+1) - 2*u(ni-2,:,n+1) + 0.5*u(ni-3,:,n+1);
    u(:,1,n+1) = 2.5*u(:,2,n+1) - 2*u(:,3,n+1) + 0.5*u(:,4,n+1);
    u(:,length(y),n+1) = 2.5*u(:,nj-1,n+1) - 2*u(:,nj-2,n+1) + 0.5*u(:,nj-3,n+1);

    v(1,:,n+1) = 2.5*v(2,:,n+1) - 2*v(3,:,n+1) + 0.5*v(4,:,n+1);
    v(length(x),:,n+1) = 2.5*v(ni-1,:,n+1) - 2*v(ni-2,:,n+1) + 0.5*v(ni-3,:,n+1);
    v(:,1,n+1) = 2.5*v(:,2,n+1) - 2*v(:,3,n+1) + 0.5*v(:,4,n+1);
    v(:,length(y),n+1) = 2.5*v(:,nj-1,n+1) - 2*v(:,nj-2,n+1) + 0.5*v(:,nj-3,n+1);

    h(1,:,n+1) = 2.5*h(2,:,n+1) - 2*h(3,:,n+1) + 0.5*h(4,:,n+1);
    h(length(x),:,n+1) = 2.5*h(ni-1,:,n+1) - 2*h(ni-2,:,n+1) + 0.5*h(ni-3,:,n+1);
    h(:,1,n+1) = 2.5*h(:,2,n+1) - 2*h(:,3,n+1) + 0.5*h(:,4,n+1);
    h(:,length(y),n+1) = 2.5*h(:,nj-1,n+1) - 2*h(:,nj-2,n+1) + 0.5*h(:,nj-3,n+1);

end

figure(1)

%Animation of H wave propogating
for index=1:length(t)
    mesh(x,y,h(:,:,index))
    axis ([0 100000 0 100000 4990 5010])
    title ('AERSP 423 Computer Project Part II')
    xlabel('X Domain [m]')
    ylabel('Y Domain [m]')
    zlabel('Height [m]')
    pause(0.02)
end

 

Guess you like

Origin blog.csdn.net/wenyusuran/article/details/113879482