The entries in tspan must strictly increase or decrease.

tInitial = 0.0038170565243983781145153955094429;
tFinal = 0.0038170565244015157956025685592749;
tspan = [tInitial tFinal];
[t,N] = ode45(@(t,N) thisObj.diffusionalGrowth(), tspan, oldDia);
Not able to figure out whats going wrong.

 採用された回答

Bjorn Gustavsson
Bjorn Gustavsson 2019 年 6 月 13 日

1 投票

What ODE are you trying to integrate over such a short period of time? What is your time-unit? tFinal-tInitial is on the order of 1e-15! In my field of I occasionally work with chemical reaction-diffusion systems but I certainly dont have time-resolutions on femto-second time-scales, even if your time is in hours that time-span would correrspond to ~1e-12 s, and not much diffusion will occur at those time-scales...
HTH

3 件のコメント

Anil Rajajapantulu
Anil Rajajapantulu 2019 年 6 月 13 日
Hello,
Time unit is sec.
These time scales are for formation of nucleation. In some cases it goes below femto sec.
Bjorn Gustavsson
Bjorn Gustavsson 2019 年 6 月 13 日
In that case you might have to scale your equations to other units perhaps to pico-seconds or femto-seconds, the ODE-functions might have hard limits on the time-steps for the integration, check the help for that. Perhaps it is enough to inform ode45 about a suitable initial step:
OPS = odeset;
OPS.initialstep = 1e-18; % Or something like that?
HTH
Anil Rajajapantulu
Anil Rajajapantulu 2019 年 6 月 15 日
Thank you.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by