MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Memory low for PDE

  • To: mathgroup at
  • Subject: [mg123163] Memory low for PDE
  • From: Sérgio Lira <sergiobodoh at>
  • Date: Fri, 25 Nov 2011 04:54:41 -0500 (EST)
  • Delivered-to:

Hello folks,

I am trying to solve some coupled partial diferential equations using
NDSolve but after 10 min of calculations the kernel shuts down and
says: "No more memory available. Mathematica kernel has shut down."

The equations are pretty huge and I have tried to change some
integration options such as AccuracyGoal, MaxStepFraction,
PrecisionGoal, MaxSteps, Method, SpatialDiscretization, but still
couldn't solve the equations.

This is the program:

<< Calculus`VectorAnalysis`

Nch[f_, x_, y_, t_] := Nch[f, x,y, t] = (Grad[f, Cartesian[x, y, z]])/
Sqrt[DotProduct[(Grad[f, Cartesian[x, y, z]]), (Grad[f, Cartesian[x,
y, z]])]];
Sch[f_, x_, y_, t_] :=Sch[f, x, y, t] = CrossProduct[Nch[f, x, y, t],
{0, 0, 1}];
K[f_, x_, y_, t_] := K[f, x, y, t] = -Div[Nch[f, x, y, t],
Cartesian[x, y, z]];
G[f_, x_, y_, t_] := G[f, x, y, t] = 2*DotProduct[Sch[f, x, y, t],
(B*Grad[K[f, x, y, t], Cartesian[x, y, z]] - {x, y, 0})];

eps = 0.1; epst = 0.2; B = 0.01;

eqn2 = NDSolve[{

epst*D[psi[x, y, t], t] == Laplacian[psi[x, y, t], Cartesian[x, y,
+ 1/(eps*Sqrt[8])*G[theta[x, y, t], x, y, t]*(1 - (theta[x, y,

eps^2*D[theta[x, y,t], t] == Laplacian[theta[x, y, t], Cartesian[x, y,
z]] + eps^2*DotProduct[{0, 0, 1}, CrossProduct[Grad[psi[x,y, t],
Cartesian[x, y, z]], Grad[theta[x, y, t], Cartesian[x, y, z]]]],

psi[x, y, 0] == 0, psi[-5, y, t] == 0, psi[5, y, t] == 0, psi[x, -5,
t] == 0, psi[x, 5, t] == 0,

theta[x, y, 0] == Tanh[(1 - Sqrt[x^2 + y^2])/(0.1*Sqrt[2])],
theta[x, -5, t] == 0, theta[x, 5, t] == 0, theta[-5, y, t] ==0,
theta[5, y, t] == 0},
{psi, theta}, {x, -5, 5}, {y, -5, 5}, {t, 0, 5}]

Should I try to decrease the integration step and grid? Is there any
method that could help?


  • Prev by Date: Not quite there with operator function for matrix
  • Next by Date: Re: Root finding needs higher accuracy
  • Previous by thread: Not quite there with operator function for matrix
  • Next by thread: Re: Memory low for PDE