Hi, I am using the central difference method to solve a diffusion-based partial differential equation. However, my code now will not run because the time step has to be so large that Matlab cannot handle it. The large time step is due to the stability of(adsbygoogle = window.adsbygoogle || []).push({});

Where my space matrix goes from 0 to X with spacings of dx as determined by the number of space nodes (numx) asCode (Text):

stability:

Diffusion coefficient*time step/(space step^2) < .5

my time matrix goes from 0 to t with spacings of dt as determined by the number of time nodes (numt) asCode (Text):

dx = x/numx-1

The diffusion coefficient is fixed, my space steps are essentially fixed because I need to have a certain amount of space nodes in my mesh so I cannot reduce them. My total time cannot go below a certain value either for my code to make sense, so the only thing I can do is increase the number of time steps to make dt as small as possible. However this number is unreasonably large that Matlab cannot handle it and runs out of memory.Code (Text):

dt = t/numt-1

Is there any other solution method which is essentially independent of time stepping; as there is no stability that requires on the size of the time step. Any computer differential equation solution packages? Thank you.

**Physics Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Solution scheme for solution to PDE independent of time step

**Physics Forums | Science Articles, Homework Help, Discussion**