I would like to solve a PDE system reaction-diffusion type (2D spatial + 1 temporal) coupled as described below. Another question of this same system was solved here:
Also, initial conditions is assumed with a noise.
The system is shown below:
The code:
L = 5;(*length of square*)
pts = 100;
T = 300;(*Time integration*)
α = 1.5;
k = 0.1;
ρ = 18.5;
a = 92;
b = 64;
d = 10;
γ = 9;
(*system of nonlinear PDE*)
pde = {D[u[t, x, y],
t] == (D[u[t, x, y], x, x] +
D[u[t, x, y], y, y]) + γ (α -
u[t, x, y] - (ρ u[t, x, y] v[t, x, y])/(
1 + u[t, x, y] + k u[t, x, y] u[t, x, y])),
D[v[t, x, y], t] ==
d (D[v[t, x, y], x, x] +
D[v[t, x, y], y,
y]) + γ (α (b - v[t, x, y]) - (ρ u [t, x,
y] v[t, x, y])/(1 + u[t, x, y] + k u[t, x, y] u[t, x, y]))};
(*Newman boundary condition*)
bc = {(D[u[t, x, y], x] /. x -> 0) ==
0, (D[u[t, x, y], x] /. x -> 2 L) == 0,
u[t, x, 0] == u[t, x, 2 L] , (D[v[t, x, y], x] /. x -> 0) ==
0, (D[v[t, x, y], x] /. x -> 2 L) == 0,
v[t, x, 0] == v[t, x, 2 L]};
(*initial condition*)
ic = {u[0, x, y] ==
Interpolation[
Flatten[Table[{x, y, RandomReal[{0.01, 1}]}, {x, 0, 2 L,
2/pts}, {y, 0, 2 L, 2/pts}], 1]][x, y],
v[0, x, y] ==
Interpolation[
Flatten[Table[{x, y, RandomReal[{0.01, 1}]}, {x, 0, 2 L,
2/pts}, {y, 0, 2 L, 2/pts}], 1]][x, y]};
eqns = Flatten@{pde, bc, ic};
sol = NDSolve[eqns, {u, v}, {t, 0, T}, {x, 0, 2 L}, {y, 0, 2 L},
Method -> {"MethodOfLines",
"SpatialDiscretization" -> {"TensorProductGrid",
"MinPoints" -> pts, "MaxPoints" -> pts}}];
But, there are errors:
NDSolve::ibcinc: Warning: boundary and initial conditions are inconsistent. NDSolve::eerri: Warning: estimated initial error on the specified spatial grid in the direction of independent variable x exceeds prescribed error tolerance. NDSolve::eerri: Warning: estimated initial error on the specified spatial grid in the direction of independent variable y exceeds prescribed error tolerance.
Can anybody help me?
eerri
warning is often a benign warning. (Just search in this site. )ibcinc
is indeed a problem in your case, for more info check this: mathematica.stackexchange.com/a/127411/1871 $\endgroup$ibcinc
warning is also benign in this case, because any inconsistencies will be immediately smoothed out by diffusion att==0
. $\endgroup$NSolve[{0 == \[Gamma] (\[Alpha] - u - (\[Rho] u v)/(1 + u + k u u)), 0 == (\[Alpha] (b - v) - (\[Rho] u v)/(1 + u + k u u))}, {u, v}]
which is{u -> 0.00128753, v -> 63.0009}
. $\endgroup$ScaleFactor
sub-option a bit. (See the discussion in the post linked in my last comment. ) $\endgroup$