Message Boards Message Boards

What is the best accuracy available, of PDE solving?

Posted 8 months ago

Hi, I need to obtain numerical solutions to a certain nonlinear evolutionary PDE (one-dimensional reaction diffusion PDE on finite spatial and finite temporal intervals). I have no experience with using MATHEMATICA for this. The trouble is I would need the best possible accuracy. Ideally, the relative errors should be at the level of 10^(-19). Is there any built-in method available, which would be so accurate and able to produce results in a time not exceeding 72 hours?
Leslaw

POSTED BY: Leslaw Bieniasz
2 Replies
Posted 8 months ago

Perhaps Piecewise:

tmax = 25;
xmax = 6*Sqrt[tmax];
ic[t_?NumericQ] := Piecewise[{{-1, t > 0}}, 0];
sol = NDSolve[{D[c[x, t], t] == D[c[x, t], {x, 2}] - c[x, t]^2, 
   c[x, 0] == 0, Derivative[1, 0][c][0, t] == ic[t], c[xmax, t] == 0},
   c, {x, 0, xmax}, {t, 0, tmax}]
Plot3D[Evaluate[c[x, t] /. sol], {x, 0, xmax}, {t, 0, tmax}, 
 PlotRange -> All]

Or Interpolation[]:

ic = Interpolation[{{{0.}, 0.}, {{0.001}, -1., 0., 0.}, {{100.}, -1.}}];
(* other code stays the same *)
POSTED BY: Updating Name
Posted 8 months ago

Hello again, To be more specific, here is the problem I have been willing to solve with a high accuracy:

tmax=25;
xmax=6*Sqrt[tmax];
sol=NDSolve[{D[c[x,t],t]==D[c[x,t],{x,2}]-c[x,t]^2,c[x,0]==0,Derivative[1,0][c][0,t]==-1,c[xmax,t]==0},c,{x,0,xmax},{t,0,tmax}]
Plot3D[Evaluate[c[x,t]/.sol],{x,0,xmax},{t,0,tmax}]

Unfortunately, this code fails with a message that initial/boundary conditions are inconsistent, and the plot shows just a zero solution, implying that the relative error is 100%. From searching internet I see that I am not the first person who encounters this difficulty, but the workarounds suggested here and there are rather incomprehensible to me. Can anybody suggest how to effectively handle this problem? I have to comment that the apparent limitation of MATHEMATICA to PDEs accompanied by consistent initial/boundary conditions is highly over-restrictive, in my opinion. In the area I have been working for nearly 40 years now, actually all PDE-based models are of this sort, but people obtain useful solutions using finite difference or finite element methods. So, it would be beneficial if MATHEMATICA did not impose such restrictions, or at least allowed one to optionally remove them. Leslaw

POSTED BY: Leslaw Bieniasz
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract