Nonlinear Reaction Diffusion Equations: Multiple

0 downloads 0 Views 370KB Size Report
In this notebook we study the solution space for a nonlinear reaction diffusion ... 0 < x < L. (5) where the "reaction" term F (u; r, q) is given by. F (u; r, q) = ru 1 - u q.
�������������������������������

���������������������������������������� �������������������������������������������� ������������ In this notebook we study the solution space for a nonlinear reaction diffusion equation in n . Reaction diffusion equations in n often arise in the study of population dynamics of a species subject to a predator. We will study and analyze (both theoretical and numerically) the solution space of a well known phenomenological model that describes logistic growth of a species in the presence of a predator. The PDE that describes the dynamical behavior of the species can be derived as follows. First, we consider a species CA subject to logistic growth. That is, the growth rate of species CA is comprised of two parts: ,  a part that depends linearly on its number density N x t = K which gives rise to exponential growth,   and a part that depends non-linearly on N x, t to reflect the available sustaining resources of its environment. A simple model that describes such a growth rate is: N growth rate = rB N 1 K

(1)

Here rB is the linear birth rate and K is the carrying capacity of the environment. For example, if species CA consumes foliage from trees, then K would relate to the foliage density on the trees. Thus with increasing population, Eq. (1) predicts that the growth rate will initially increase, reach a maximum, and ,  then decrease, eventually becoming zero when N x t = K. At that point the environment can no longer support the population. Now suppose that species CA is subject to a predator that consumes it. If the number density of species CA is small, it is reasonable to expect that predators will seek food elsewhere ( i. e., the predators will attempt to balance effort versus reward, implying that the predator's consumption rate will depend nonlinear on the number density of species CA ). On the other hand, if the number density N is sufficiently high the predation rate will eventually saturate, implying there is enough food to satisfy the predator’s needs. A simple model that captures this behavior is predation rate = -

B N2 A2 + N 2

(2)

where A and B are positive constants. If we suppose further that species CA can migrate in its environment with a certain dispersal efficiency, then a balance law that describes the species population number density as a function of time and space is ∂N N B N2 ∂2 N N 1 +  = r B  2 K A2 + N 2 ∂x ∂t

(3)

Here  is the diffusion constant for the species and is a measure of its dispersal efficiency in the environment. If L is a characteristic length scale for the spatial domain, we can simplify the governing equation by introducing the following dimensionless variables:

2 ���

MultipleSteadyStates_2016.nb

u=

N A

, r=

A rB B

, q=

K A

, t=

 Bt A

, x=

 x L

, =

A B L2

(4)

The balance law (3) for the species number density u in dimensionless form becomes ∂u = ∂t

∂2 u ∂x2

+ F (u; r, q),

0 np. ��������

grid = Range[z1, z2, h]; np = Length[grid];

In the Mathematica program the variable uk+1 - uk that we will solve for at each iteration step is called delta. We use the function Array to define the elements of delta, which we call d={d[1],d[2],...d[np]}. Since the boundary conditions determine d[1] and d[np], we eliminate those variables from our array. We also create an array of initial values for the unknowns which we will use as our initial guess: initial = {u0[1],u0[2],...u0[np]}. Finally, we need to set up an array for our unknown nodal values (u1 , u2 , …, uN ) . This array is called vars and has elements {u[1],u[2],...u[np]}. We have chosen values of r and q such that there are 4 steady states when diffusion is absent. As our first initial guess we take f1[x] = 0.5, where f1[x] is the initial guess of our solution ��������

delta = Delete[Array[d, np], {{1}, {- 1}}]; initial = Array[u0, np]; vars = Array[u, np]; u[1] = 0.; u[np] = 0.; f1[x_] := .5

The next statement sets each element of u0[i] equal to the value of f1[xi ] at the node point on the grid. This is done by first creating a list of replacement rules u0[i] -> f1[xi ] which are then converted into u0[i] = f1[xi ] . The boundary conditions are specified by requiring the nodal points at the boundaries u0[1] and u0[np] be zero. ��������

Map[Apply[Set, #] &, Thread[initial -> Map[f1[#] &, grid]]]; u0[1] = 0.; u0[np] = 0.;

The next section of the program is used to specify the nonlinear function F(u; r,q)-> F[u_[i_]] and the finite difference equations given by (15) -> f[u_[i_]]. These equations are functions of the nodal values {u[1],u[2],...u[np]}. We use the function Table to generate the equations and store them in a list called eqns. Finally, we calculate the Jacobian analytically, and store the elements of the Jacobian in a list called jac. The variable test is initialized for later used in the Newton method. ��������

F[u_[i_]] := r u[i] 1 - u[i]  q - u[i]2  1 + u[i]2  f[u_[i_]] := u[i - 1] - 2 u[i] + u[i + 1] + F[u[i]] h2   eqns = Table[f[u[j]], {j, 2, np - 1}]; test = 1; jac = Outer[D, eqns, Take[vars, {2, - 2}]];

MultipleSteadyStates_2016.nb

���

9

We are now ready to construct the iteration scheme. At each iteration we have to solve a (N - 2⨯N - 2) system of linear equations. Since the Jacobian must be updated at each iteration, we evaluate it within the iteration loop. The Jacobian and the RHS of (21) are first initialized with the list initial. The output from the function Solve gives the solution in terms of delta, which is then used to determine a new initial guess. The calculations are repeated until the largest element of soln called test is less that a specified value. ��������

Whiletest > 10-5 , jac1 = jac /. Thread[vars -> initial]; RHS = eqns /. Thread[vars -> initial]; soln = Solve[jac1.delta == - RHS, delta]; test = Max[Abs[delta /. soln]]; initial = Insert[ Insert[Take[initial, {2, - 2}] + Flatten[delta /. soln], u0[1], 1], u0[np], - 1]

Here is a plot of the solution. ��������

ListPlot[Transpose[{grid, initial}], PlotRange → All, AxesOrigin → {0, 0}, Joined → True, PlotStyle → Thick, Frame → True, FrameLabel → {Style["x", 18], Style["u(x)", 18]}] 0.6 0.5

u(x)

0.4 0.3

��������

0.2 0.1 0.0 0.0

0.2

0.4

0.6

0.8

1.0

x The above plot shows the spatial distribution of species U0 (x) in the domain 0 ≤ x ≤ 1. Recall our initial guess was a uniform distribution. This guess was sufficiently close to the calculated solution for Newton’s method to converge to it. There are, however, 3 other steady solutions for this set of parameters. We did not converge to the other solutions because our initial guess was not close enough for Newton’s method to converge. The reader is urged to change the initial guess for f1[x] and examine what happens. Use the results in Section 1 to determine possible initial guesses.

������������� One issue we have not addressed in these notes is how to determine all the steady state solutions for a nonlinear BVP. Although there is not a conclusive answer to this question, one method is to track a particular solution through parameter space, using what are referred to as continuation methods, and the seek bifurcation points along the solution curve. In addition, we need to addressed the stability of the steady state solutions calculated. Both these topics will be addressed in a subsequent tutorial.

10 ���

MultipleSteadyStates_2016.nb

���������� The topics discussed in this notebook are covered in more detail in the following references. The texts by Seydel and Drazin have a comprehensive account of bifurcation at an intermediate level, while the texts by Hale & Koçak and Hubbard and West are at a more advanced level. ◼ Drazin, P.G. Nonlinear Systems. Cambridge University Press, 1992 ◼ Hale, J. & Koçak, H. Dynamics and Bifurcations, Springer-Verlag, 1991 ◼ Hubbard, J. H. & West, B. H. Differential Equations: A dynamical Systems Approach. SpringerVerlag, 1995 ◼ Seydel, R. From equilibrium to Chaos. Practical Bifurcation and Stability Analysis, Elsevier, 1988