Ode solvers implementation

Ode solvers implementation - Messages

#1 Posted: 11/29/2018 7:09:04 PM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1674 posts.

Group: User

Hi. I can't reproduce this in SMath.

Clipboard01.gif

File not found.File not found.

Best regards.
Alvaro.
2 users liked this post
Вячеслав Мезенцев 11/30/2018 3:25:00 AM, Radovan Omorjan 11/30/2018 5:06:00 AM
#2 Posted: 11/29/2018 11:48:00 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

I can't reproduce this in SMath.



1/1 in Smath 6179, proof: the snippet.

Cheers Alvaro

IntegrateODE.PNG

Integrate with ode solver.sm (29 KiB) downloaded 63 time(s).
#3 Posted: 11/29/2018 11:59:54 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

I can't reproduce this in SMath.


You may not be able to implement the Mathcad bloc Given/ODEsolve.
ODEsolve is based on linterp. That is the first point.
The other point is that in Mathcad "linterp(x)" is a scalar function.
In Smath: ainterp, cinterp, linterp are simply interpolation fncts
They are not scalar functions. How does it reflects in ODEsolve ?
In Smath, ln(x), exp(x), ... are scalar from source code.
I tried to make cinterp scalar like in Mathcad, not to avail.

Please, persist on such a beautiful idea.

#4 Posted: 11/30/2018 1:16:48 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

I tried to make cinterp scalar like in Mathcad, not to avail.


This document was essentially designed to plot scalar the derivative on canvas,
as well as get a discrete export. Also included: the scalar quadratic.

Cheers ... Jean

Spline Deriv Infinitesimal.sm (70 KiB) downloaded 57 time(s).


#5 Posted: 11/30/2018 2:31:22 AM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1674 posts.

Group: User

Wrote


You may not be able to implement the Mathcad bloc Given/ODEsolve.



Hi Jean. Actually not, just the solver, without the given.
I found how to call the odesolver, with D(x,y)=[f(x)].
This method is much more faster than the direct integration.
But remains the ln(0) error, which seems to be a bug in the odesolvers, because zero isn't in the domain range.

Clipboard01.gif

Integrate with ode solver.sm (10 KiB) downloaded 63 time(s).

Best regards.
Alvaro.
1 users liked this post
Radovan Omorjan 11/30/2018 5:10:00 AM
#6 Posted: 11/30/2018 3:35:52 AM
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 likes in 1708 posts.

Group: Moderator

The zero point is used to determine the dimension of the vector D(t,x) at runtime (D(0, x0)). The size of the system must be determined for the further operation of the numerical algorithm. It seems that it would be correct to substitute the beginning of the interval. I will try to change this. Also, if possible, I will support the one-dimensional case.
Russia ☭ forever, Viacheslav N. Mezentsev
4 users liked this post
sergio 11/30/2018 5:43:00 AM, frapuano 11/30/2018 5:37:00 AM, Alvaro Diaz Falconi 11/30/2018 4:53:00 AM, Radovan Omorjan 11/30/2018 5:06:00 AM
#7 Posted: 11/30/2018 5:01:06 AM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1674 posts.

Group: User

Thanks Viacheslav. It's amazing the effort that you and the others plugins developers put in enhance SMath, with very spectacular results.
Best regards.
Alvaro.
1 users liked this post
#8 Posted: 11/30/2018 12:29:42 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

Hi Jean. Actually not, just the solver, without the given.
I found how to call the odesolver, with D(x,y)=[f(x)].
This method is much more faster than the direct integration.
But remains the ln(0) error, which seems to be a bug in the odesolvers, because zero isn't in the domain range.



Buenos dias Alvaro !

ln(0) was introduced in Mathcad 11 soon after release via update [from recollection]
There is more in the attached, specially wrt parametric D(,,,).
Jean

ODEsolve.PNG

ODE 0_Model General.sm (29 KiB) downloaded 48 time(s).


#9 Posted: 11/30/2018 12:34:54 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

...

ODEsolve.PNG
#10 Posted: 11/30/2018 3:36:38 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

... refreshed version wrt explore all solvers.

ODE 0_Model General.sm (38 KiB) downloaded 67 time(s).
3 users liked this post
Alvaro Diaz Falconi 11/30/2018 3:54:00 PM, frapuano 11/30/2018 5:58:00 PM, Davide Carpi 12/3/2018 9:18:00 PM
  • New Posts New Posts
  • No New Posts No New Posts