10.5 Exercises 329
if( (i-1)*(h/2.0) < X_0 ){
lambda[i] = G*H_0; // lambda dependsonlyon x
}else{
lambda[i] = G*(H_0 - ((i-1)*(h/2.0)-X_0)*0.0174550649282176);
}
}
HereX 0 is the point where the sea bed changes (with respect to shore). Your tasks are as
follows:
- Develop an algorithm for solving the new wave equation and write a program which imple-
ments it. Pay in particular attention to the implementationof the boundary conditions and
the initial conditions. Figure out how to deal with the fictitious values in time and space
for the discretized functions. You need also to find the functional form ofH(x,y) =H(x).
Be careful to scale the equations properly. With the depth of5000 m, extensionsσx= 80
km andσy= 200 km you need to figure out the proper dimensions of the gridL×L. Scale
the equations so that you can use dimensionless quantities.
With the above parameters, initial values and boundary conditions, study the temporal
evolution of the wave towards the coastline. Comment your results. It can be useful to
make animations of the results (a simple recipe with gnuplotand python for this is available
under the project link for project 4 at the webpage).
It also important that you keep in mind the stability condition
∆t≤
1
√
maxλ(x,y)
(
1
∆x^2
+
1
∆y^2
)− 1 / 2
- We keep now the same shape of the sea bottom and the same parameters as in d), but we
shift the center of the earthquake to the right with 40 km. Which one of the two earth-
quakes will produce the largest impact (wave elevation) at the coastline? Comment your
results.
10.3.Consider a condensator with parallel plates separated at a distanceLresulting in the
voltage differencesu(x, 0 ) = 100 sin( 2 πx/L)andu(x, 1 ) =− 100 sin( 2 πx/L). These are our bound-
ary conditions. Write a program which obtains the voltageubetween the plates using both the
Jacobi method and the Gauss-Seidel method. Parallelize your program as detailed in chapter
6 and study the stability of your solutions as functions of the number of mesh points. How
does your parallel code scale?
10.4.The dominant way of transporting signals between neurons (nerve cells) in the brain
is by means of diffusion of particular signal molecules calledneurotransmittersacross the
synaptic cleft separating the cell membranes of the two cells. A drawing of a synapse is given
in Fig. 10.6.
Following the arrival of an action potential in the axon terminal a process is initiated in
which (i) vesicles inside the axon terminal (filled with neurotransmitter molecules) merge
with the presynaptic (axon) membrane and (ii) release neurotransmitters into the synaptic
cleft. These neurotransmitters diffuse across the synaptic cleft to receptors on the postsy-
naptic side which “receives” the signal. A schematic illustration of this process is shown in
Fig. 10.7(left). Since the transport process in the synaptic cleft is governed by diffusion, we
can describe it mathematically by
∂u
∂t
=D∇^2 u, (10.22)
whereuais the concentration of the particular neurotransmitter, ̆ andDis the diffusion coeffi-
cient of the neurotransmitter in this particular environment (solvent in synaptic cleft).