Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'NDSolve - insufficient no. of boundary conditions' topicStudent Support Forum > General > "NDSolve - insufficient no. of boundary conditions"

Help | Reply To Topic
Author Comment/Response
freeone
03/16/12 08:33am

I have a nonlinear partial system of differential equations.
In latex code it would be something like:

$\left[\left( a + b x \right) \frac {\vardelta}{\vardelta x} + b \frac{\vardelta}{\vardelta z}\right]E_h = i d \left( \beta_h E_h + \sum_{l=-5}^5 \chi_{h-l}E_l \right)$
Initial conditions are given by:
$E_{h,h\neq 0}=0, E_{0}=1$

h runs from -5 to 5, so there are eleven equations in total. The system is indeed complex.

I tried the following code to set up the equations:
ElEf[x_, z_] = Table[Subscript[Ef, h][x, z], {h, -n, n}];
ElEfi[x_, z_] = Table[h*Subscript[Ef, h][x, z], {h, -n, n}];
ElEfbeta[x_, z_] =
Table[beta[h, x]*Subscript[Ef, h][x, z], {h, -n, n}];
ElEfsum[x_, z_] =
Table[Sum[chi[h - l]*Subscript[Ef, l][x, z], {l, -n, n}], {h, -n,
n}];
factor1 = Table[b*x, {h, -n, n}];

initc = Thread[ElEf[x, 0] == Table[0, {n*2 + 1}]];
initc[[5 + 1]] = Subscript[Ef, 0][x, 0] == 1;

eqns = Thread[(a + factor1)*D[ElEf[x, z], x] + c*D[ElEf[x, z], z] ==
I*d*(ElEfbeta[x, z] + ElEfsum[x, z])];

lines = NDSolve[{eqns, initc},
ElEf[x, z], {x, 0, 0.000020}, {z, 0, 0.000020}]

However I do get the error message
NDSolve::bcart: Warning: An insufficient number of boundary conditions have been specified for the direction of independent variable x. Artificial boundary effects may be present in the solution. >>
imidiattely after starting the calculation. In addition it aborts with
Warning: Scaled local spatial error estimate of 390.52398072751544` \
at z = 0.0001` in the direction of independent variable x is much \
greater than prescribed error tolerance.

Is there a general flaw in my code I am not seeing? Any help would be appriciated. :)
Thanks!

URL: ,
Help | Reply To Topic