SADEL - Sets of Algebraic and Differential Equations solvers Library (SADEL) - Messages
#1 Posted: 7/21/2018 2:52:47 PM
SADEL

Functions list: manzhuk(5|6|7)
DAE (ODE) solvers:
manzhuk(init, x1, x2, intvls, D)
Arguments:
- init is either a vector of n real initial values, where n is the number of unknowns (or a single scalar initial value, in the case of a single ODE).
- x1 and x2 are real, scalar endpoints of the interval over which the solution to the ODE(s) is evaluated. Initial values in init are the values of the ODE function(s) evaluated at x1.
- intvls is the integer number of discretization intervals used to interpolate the solution function. The number of solution points is the number of intervals + 1.
- D is a vector function of the form D(x,y) specifying the right-hand side of the system
manzhuk(init, x1, x2, intvls, G, J1)
manzhuk(init, x1, x2, intvls, G, J1, J2)
[albumimg]1487[/albumimg] [albumimg]1488[/albumimg] [albumimg]1489[/albumimg] [albumimg]1490[/albumimg]
manzhuk. Kinetic curves.sm (13 KiB) downloaded 107 time(s).
manzhuk. Van der Pol oscillator 1.sm (10 KiB) downloaded 106 time(s).
manzhuk. Van der Pol oscillator 2.sm (13 KiB) downloaded 96 time(s).
manzhuk. Lorenz-Attractor.sm (16 KiB) downloaded 99 time(s).
manzhuk. Kinetic curves.pdf (38 KiB) downloaded 97 time(s).
manzhuk. Van der Pol oscillator 1.pdf (46 KiB) downloaded 89 time(s).
manzhuk. Van der Pol oscillator 2.pdf (62 KiB) downloaded 87 time(s).
manzhuk. Lorenz-Attractor.pdf (65 KiB) downloaded 99 time(s).
Manual (rus): DAE-solver-manzhuk.pdf (3 MiB) downloaded 117 time(s).
Links:
1. SADEL.





Functions list: manzhuk(5|6|7)
DAE (ODE) solvers:
manzhuk(init, x1, x2, intvls, D)
Arguments:
- init is either a vector of n real initial values, where n is the number of unknowns (or a single scalar initial value, in the case of a single ODE).
- x1 and x2 are real, scalar endpoints of the interval over which the solution to the ODE(s) is evaluated. Initial values in init are the values of the ODE function(s) evaluated at x1.
- intvls is the integer number of discretization intervals used to interpolate the solution function. The number of solution points is the number of intervals + 1.
- D is a vector function of the form D(x,y) specifying the right-hand side of the system
manzhuk(init, x1, x2, intvls, G, J1)
manzhuk(init, x1, x2, intvls, G, J1, J2)
[albumimg]1487[/albumimg] [albumimg]1488[/albumimg] [albumimg]1489[/albumimg] [albumimg]1490[/albumimg]
manzhuk. Kinetic curves.sm (13 KiB) downloaded 107 time(s).
manzhuk. Van der Pol oscillator 1.sm (10 KiB) downloaded 106 time(s).
manzhuk. Van der Pol oscillator 2.sm (13 KiB) downloaded 96 time(s).
manzhuk. Lorenz-Attractor.sm (16 KiB) downloaded 99 time(s).
manzhuk. Kinetic curves.pdf (38 KiB) downloaded 97 time(s).
manzhuk. Van der Pol oscillator 1.pdf (46 KiB) downloaded 89 time(s).
manzhuk. Van der Pol oscillator 2.pdf (62 KiB) downloaded 87 time(s).
manzhuk. Lorenz-Attractor.pdf (65 KiB) downloaded 99 time(s).
Manual (rus): DAE-solver-manzhuk.pdf (3 MiB) downloaded 117 time(s).
Links:
1. SADEL.
Russia ☭ forever, Viacheslav N. Mezentsev
5 users liked this post
frapuano 7/21/2018 3:14:00 PM, Radovan Omorjan 7/21/2018 3:15:00 PM, NDTM Amarasekera 7/21/2018 4:21:00 PM, Davide Carpi 7/23/2018 6:23:00 AM, Andrey Ivashov 12/7/2018 5:22:00 PM
#2 Posted: 7/21/2018 8:00:49 PM
Updated. Short form added.
[albumimg]1491[/albumimg] [albumimg]1492[/albumimg] [albumimg]1493[/albumimg] [albumimg]1494[/albumimg] [albumimg]1495[/albumimg]
manzhuk. Kinetic curves (short).sm (11 KiB) downloaded 95 time(s).
manzhuk. Lorenz-Attractor (short).sm (15 KiB) downloaded 83 time(s).
manzhuk. Van der Pol oscillator 1 (short).sm (9 KiB) downloaded 87 time(s).
manzhuk. Van der Pol oscillator 2 (short).sm (12 KiB) downloaded 91 time(s).
manzhuk. Arenstorf Orbit (short).sm (16 KiB) downloaded 94 time(s).
manzhuk. Kinetic curves (short).pdf (37 KiB) downloaded 91 time(s).
manzhuk. Lorenz-Attractor (short).pdf (63 KiB) downloaded 89 time(s).
manzhuk. Van der Pol oscillator 1 (short).pdf (45 KiB) downloaded 82 time(s).
manzhuk. Van der Pol oscillator 2 (short).pdf (61 KiB) downloaded 81 time(s).
manzhuk. Arenstorf Orbit (short).pdf (55 KiB) downloaded 90 time(s).
[albumimg]1491[/albumimg] [albumimg]1492[/albumimg] [albumimg]1493[/albumimg] [albumimg]1494[/albumimg] [albumimg]1495[/albumimg]
manzhuk. Kinetic curves (short).sm (11 KiB) downloaded 95 time(s).
manzhuk. Lorenz-Attractor (short).sm (15 KiB) downloaded 83 time(s).
manzhuk. Van der Pol oscillator 1 (short).sm (9 KiB) downloaded 87 time(s).
manzhuk. Van der Pol oscillator 2 (short).sm (12 KiB) downloaded 91 time(s).
manzhuk. Arenstorf Orbit (short).sm (16 KiB) downloaded 94 time(s).
manzhuk. Kinetic curves (short).pdf (37 KiB) downloaded 91 time(s).
manzhuk. Lorenz-Attractor (short).pdf (63 KiB) downloaded 89 time(s).
manzhuk. Van der Pol oscillator 1 (short).pdf (45 KiB) downloaded 82 time(s).
manzhuk. Van der Pol oscillator 2 (short).pdf (61 KiB) downloaded 81 time(s).
manzhuk. Arenstorf Orbit (short).pdf (55 KiB) downloaded 90 time(s).
Russia ☭ forever, Viacheslav N. Mezentsev
2 users liked this post
#3 Posted: 7/22/2018 1:21:16 PM
Updated. manzhuk() now more stable. Don't use hmx parameter. By default, its value is dt / 2.
Russia ☭ forever, Viacheslav N. Mezentsev
1 users liked this post
frapuano 7/22/2018 4:55:00 PM
#4 Posted: 7/22/2018 8:41:12 PM
WroteUpdated. Short form added.
Thanks Uni.
The complete Smath code might be educative.
mwode45 solves as well.
Jean
ODE manzhuk Arenstorf Orbit.sm (21 KiB) downloaded 106 time(s).
#5 Posted: 7/22/2018 10:16:45 PM
#6 Posted: 7/23/2018 3:23:04 AM
Hello uni,
It seems this is a quite interesting ODE-DAE solver. I did not understand what the matrices J1 and J2 are. The manual is quite complicated for me. I just supposed that J1,J2 have something to do with DAE (differential algebraic equations). It seems to me that J1 is the Jacobian matrix regarding the vector of parameters (third argument in the function G()). I suppose J2 is again some kind of Jacobian matrix.
If one of your motivation was to have a DAE solver in SMath, I appreciate that very much.
Looking forward for some more examples from you about using this solver - especially DAE systems.
Regards,
Radovan
It seems this is a quite interesting ODE-DAE solver. I did not understand what the matrices J1 and J2 are. The manual is quite complicated for me. I just supposed that J1,J2 have something to do with DAE (differential algebraic equations). It seems to me that J1 is the Jacobian matrix regarding the vector of parameters (third argument in the function G()). I suppose J2 is again some kind of Jacobian matrix.
If one of your motivation was to have a DAE solver in SMath, I appreciate that very much.
Looking forward for some more examples from you about using this solver - especially DAE systems.
Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#7 Posted: 7/23/2018 5:55:52 AM
3 users liked this post
frapuano 7/23/2018 8:46:00 AM, Davide Carpi 7/23/2018 6:23:00 AM, Radovan Omorjan 7/23/2018 6:05:00 AM
#8 Posted: 7/23/2018 10:58:21 AM
#9 Posted: 7/23/2018 11:54:48 AM
I have more than 12 examples of how to use it, but, unfortunately, symbolic interpreter slows down the computation of the algorithm. So I decided to show an alternative version of its use, using the Script component. I hope that I will succeed.
Russia ☭ forever, Viacheslav N. Mezentsev
2 users liked this post
#10 Posted: 8/1/2018 12:10:59 PM
Simple test 1.
[albumimg]1496[/albumimg]
manzhuk.test1.sm (11 KiB) downloaded 98 time(s).
manzhuk.test1.pdf (48 KiB) downloaded 101 time(s).
[albumimg]1496[/albumimg]
manzhuk.test1.sm (11 KiB) downloaded 98 time(s).
manzhuk.test1.pdf (48 KiB) downloaded 101 time(s).
Russia ☭ forever, Viacheslav N. Mezentsev
1 users liked this post
frapuano 8/1/2018 1:57:00 PM
#11 Posted: 12/6/2018 4:12:13 PM
Updated.
Changes:
- zero point issue partially fixed;
- added support for the simple D(t,x) definition.
Changes:
- zero point issue partially fixed;
- added support for the simple D(t,x) definition.
Russia ☭ forever, Viacheslav N. Mezentsev
#12 Posted: 3/12/2020 12:44:42 PM
Good afternoon!
I use sadel to calculate the parameters of the transient in the RLC-circuit.
Why doesn't time go by in calculations? file attached model2_sadel_p.sm (25 KiB) downloaded 85 time(s).
I use sadel to calculate the parameters of the transient in the RLC-circuit.
Why doesn't time go by in calculations? file attached model2_sadel_p.sm (25 KiB) downloaded 85 time(s).
#13 Posted: 3/12/2020 1:43:04 PM
Можно посмотреть на описание задачи в изначальной форме?
Russia ☭ forever, Viacheslav N. Mezentsev
#14 Posted: 3/12/2020 1:55:48 PM
WroteМожно посмотреть на описание задачи в изначальной форме?
Схема замещения https://i.imgur.com/9p8FrH3.png
Система дифуров, описывающая процессы, происходящие при разряде https://i.imgur.com/Qf2fE8w.png
Взаимная индуктивность https://i.imgur.com/lRdX1Hp.png
Входные параметры электрической цепи рассчитаны, но сомнений не вызывают
#15 Posted: 3/13/2020 8:00:34 AM
Для начала нужно в выражении G(t,x,xp) исправить xp на px. Смущает выражение для второй производной. Кажется, что первая и вторая производные dx/dt должны быть как-то связаны. Я не составлял подобных систем и с ходу не могу сказать что не так. Хорошо бы ещё посмотреть на результат моделирования схемы в специализированной программе, чтобы убедиться, что начальные условия и параметры схемы действительно приводят к какому-то не нулевому результату.
Ещё, мне кажется, что не обязательно использовать библиотеку SADEL для решения этой системы, а можно попробовать использовать любые другие решатели, чтобы избавиться от px-параметра.
Ещё, мне кажется, что не обязательно использовать библиотеку SADEL для решения этой системы, а можно попробовать использовать любые другие решатели, чтобы избавиться от px-параметра.
Russia ☭ forever, Viacheslav N. Mezentsev
#16 Posted: 3/13/2020 8:09:48 AM
WroteДля начала нужно в выражении G(t,x,xp) исправить xp на px.
действительно! не заметила. Но конечно это исправление не помогло, программа видимо умнее меня, сама догадалась что имелось ввиду
WroteСмущает выражение для второй производной. Кажется, что первая и вторая производные dx/dt должны быть как-то связаны. Я не составлял подобных систем и с ходу не могу сказать что не так.
dx/dt=v, dv/dt=a. Когда составлялась система дифуров вместо второй производной использовалась первая
WroteХорошо бы ещё посмотреть на результат моделирования схемы в специализированной программе, чтобы убедиться, что начальные условия и параметры схемы действительно приводят к какому-то не нулевому результату.
это хорошая идея, попробую. Просто я опираюсь на источники, где описаны именно такая схема, именно такая система дифуров и именно такие входные параметры. Я пытаюсь пока что просто повторить. Это дает определенную уверенность, что должно работать. Хотя не исключено, что где-то упущена ошибка.
То, что в результатах расчета время не движется - это такая реакция программы на то, что она не может посчитать? Не могу понять о чем это говорит
#17 Posted: 3/13/2020 8:24:49 AM
Нужно, чтобы ier был равен нулю, тогда можно делать интерпретации результата. Этого можно достичь, если исправить указанную ошибку и отключить задание минимального шага интегрирования (hmn) или сделать его меньше. Дальше нужно проверить опечатки в системе. Я посмотрю под отладчиком почему время не меняется.
Russia ☭ forever, Viacheslav N. Mezentsev
#18 Posted: 3/13/2020 8:55:08 AM
#19 Posted: 3/13/2020 10:45:36 AM
WroteМожно писать вот так, чтобы было нагляднее, но промежуточные вычисления в этом случае замедлят работу функции.
вы имеете ввиду нагляднее для того, кто пишет/читает функцию? т.е. другая форма записи?
это здорово - я попробовала так написать, так тоже запускается расчет, правда результат тот же плачевный

#20 Posted: 3/13/2020 11:24:51 AM
По сути это та же форма записи, так как результат работы функции определяется последним выражением блока программы. Определение переменных из вектора k можно вынести из программного блока на лист, т.к. это константы. Ещё нужно всем выражениям указать численный тип оптимизации в свойствах контекстного меню.
Что касается численного моделирования, то можно попробовать посчитать в Proteus данную схемку. Там только нужно подумать как имитировать ключ.
А что за книжка-то?
Что касается численного моделирования, то можно попробовать посчитать в Proteus данную схемку. Там только нужно подумать как имитировать ключ.
А что за книжка-то?
Russia ☭ forever, Viacheslav N. Mezentsev
-
New Posts
-
No New Posts