f

#### No more memory available... when using ExplicitEuler method for Diffusion equations in Mathematica NDSolve

```Hi,

This is my first message to the math group, and I am really new to Mathematica
as well. I would really appreciate if someone could help me with this, as I
did not find much help in the documentation or the forum regarding my problem.
Here are the details:

I have these three diffusion equations that I need to solve using the NDSolve
function.

solution = {r, a, s} /. First[NDSolve[{D[r[x,t], t] == -r[x,t] + �[(s[x,t] -
a[x,t] + g[x,t] - Subscript[c, r])/Subscript[b, r]],
Subscript[�,a]*D[a[x,t],t] == D[a[x,t], x, x] - a[x,t] + �*�[(s[x, t] - a[x,
t] + g[x,t] - Subscript[c, a])/Subscript[b, a]],
Subscript[�,s]*D[s[x,t],t] == ep^2*D[s[x, t],x,x] - s[x,t] + r[x,t],
r[-5,t] == 0, r[x,0] == 0, r[5,t] == 0, a[-5,t] == 0, a[x,0] == 0, a[5,t] ==
0, s[-5,t] == 0, s[x,0] == 0, s[5,t] == 0},
{r,a,s}, {x,-5,5}, {t,0,150}, MaxStepSize -> {0.025,0.05}, PrecisionGoal ->
5]];

The above line works in Mathematica and I am able to generate plots (within
seconds). However, I want to solve the above equations using the ExplicitEuler
technique (Method->"ExplicitEuler"). The moment I add this to my NDSolve, it
starts giving me "No more memory available ...". My PC configuration is
Pentium 4, 3 GHz processor, 1 GB RAM. In a desperate attempt, I even tried to
reduce the time range to 0-5, with no results. Is there a way I can solve this
problem?

The initializations required for the above equations are:
�[(i_)?Negative] := 0;
�[(i_)?Positive] := i^2/(1 + i^2);
g[x_, t_] := Evaluate[(Subscript[g, 0]*(1 - E^(-(t/Subscript[�,
g]))))/E^(x^2/Subscript[x, 0]^2)];
Subscript[c, a] = 0.5;
Subscript[c, r] = 0.4;
Subscript[b, r] = 0.2;
Subscript[b, a] = 0.05;
� = 1.6;
Subscript[�, s] = 0.1;
Subscript[�, a] = 1;
ep = 0.1;
Subscript[g, 0] = 1;
Subscript[x, 0] = 3;
Subscript[�, g] = 40;

The code to display the plots is:
ContourPlot[solution[] [x, t], {x, -5, 5}, {t, 0, 150}, PlotLabel ->
"Rhomboid"];
Plot3D[solution[] [x, t], {x, -5, 5}, {t, 0, 150}, PlotLabel -> "Argos"];
Plot3D[solution[] [x, t], {x, -5, 5}, {t, 0, 150}, PlotLabel -> "Spitz"];

Also, Is there a way I can use different techniques to solve different
differential equations in the same NDSolve? You might want to convert the
above code into Standard or Traditional form for an easier view.

Thanking you in anticipation.

Dharmesh.

``` 0 4/11/2004 8:56:03 AM comp.soft-sys.math.mathematica  28821 articles. 0 followers. 0 Replies 644 Views Similar Articles

[PageSpeed] 52