Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #6714 > unrolled thread
| Started by | Sérgio Lira <sergiobodoh@gmail.com> |
|---|---|
| First post | 2011-11-25 09:57 +0000 |
| Last post | 2011-11-29 12:41 +0000 |
| Articles | 3 — 2 participants |
Back to article view | Back to comp.soft-sys.math.mathematica
Memory low for PDE Sérgio Lira <sergiobodoh@gmail.com> - 2011-11-25 09:57 +0000
Re: Memory low for PDE Grischika <Grischika@mail.ru> - 2011-11-27 09:15 +0000
Re: Memory low for PDE Sérgio Lira <sergiobodoh@gmail.com> - 2011-11-29 12:41 +0000
| From | Sérgio Lira <sergiobodoh@gmail.com> |
|---|---|
| Date | 2011-11-25 09:57 +0000 |
| Subject | Memory low for PDE |
| Message-ID | <janopr$atu$1@smc.vnet.net> |
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,
z]]
+ 1/(eps*Sqrt[8])*G[theta[x, y, t], x, y, t]*(1 - (theta[x, y,
t])^2),
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?
Cheers,
Sergio
[toc] | [next] | [standalone]
| From | Grischika <Grischika@mail.ru> |
|---|---|
| Date | 2011-11-27 09:15 +0000 |
| Message-ID | <jasv31$758$1@smc.vnet.net> |
| In reply to | #6714 |
If you want to get result at the end of time interval you can just
reduce last NDSolve parameter for example
{t,4.9,5}
It suppresses data storage on all time interval but it stores solution
only at the end. So this should reduce memory usage.
[toc] | [prev] | [next] | [standalone]
| From | Sérgio Lira <sergiobodoh@gmail.com> |
|---|---|
| Date | 2011-11-29 12:41 +0000 |
| Message-ID | <jb2jtc$67v$1@smc.vnet.net> |
| In reply to | #6775 |
Hi Grischika,
I have tried this, but it didn't work =/
Tx,
Sergio
On 27 nov, 06:15, Grischika <Grisch...@mail.ru> wrote:
> If you want to get result at the end of time interval you can just
> reduce last NDSolve parameter for example
> {t,4.9,5}
>
> It suppresses data storage on all time interval but it stores solution
> only at the end. So this should reduce memory usage.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web