Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

2 Pages<12
Options
Go to last post Go to first unread
Offline OchkovVF  
#21 Posted : 08 December 2023 19:26:36(UTC)
OchkovVF


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 06/04/2023(UTC)
Posts: 415
Man
Russian Federation

Was thanked: 41 time(s) in 38 post(s)
Originally Posted by: OchkovVF Go to Quoted Post


Offline uni  
#22 Posted : 08 December 2023 19:52:41(UTC)
uni


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 1,552
Man
Russian Federation

Was thanked: 1309 time(s) in 767 post(s)
Originally Posted by: Razonar Go to Quoted Post
Another notable thing about this example is that I would like someone to please explain to me how the hell the Viacheslav plugin manages to handle l'(t) within the equations, because I honestly didn't expect it.

I can add that I did not expect the solver to work adequately. The numerical solver in Mathcad is much more complex. It allows solving mixed systems. Valery poses problems that can't be solved in the same way, since current tools have significant limitations.

Edited by user 08 December 2023 19:55:48(UTC)  | Reason: Not specified

Russia ☭ forever
Viacheslav N. Mezentsev
thanks 1 user thanked uni for this useful post.
on 09/12/2023(UTC)
Offline OchkovVF  
#23 Posted : 08 December 2023 20:15:21(UTC)
OchkovVF


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 06/04/2023(UTC)
Posts: 415
Man
Russian Federation

Was thanked: 41 time(s) in 38 post(s)
Originally Posted by: uni Go to Quoted Post
Originally Posted by: Razonar Go to Quoted Post
Another notable thing about this example is that I would like someone to please explain to me how the hell the Viacheslav plugin manages to handle l'(t) within the equations, because I honestly didn't expect it.

I can add that I did not expect the solver to work adequately. The numerical solver in Mathcad is much more complex. It allows solving mixed systems. Valery poses problems that can't be solved in the same way, since current tools have significant limitations.


Слава! А можно снять это ограничение? Нужно, чтобы заработала функция odesolve. Тогда можно будет решать алгебро-дифференциальные уравнение (ADE).

Offline OchkovVF  
#24 Posted : 08 December 2023 20:20:11(UTC)
OchkovVF


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 06/04/2023(UTC)
Posts: 415
Man
Russian Federation

Was thanked: 41 time(s) in 38 post(s)

Pendulum-Spring70s.png
https://en.wikipedia.org/wiki/Torc
Grivna.png (778kb) downloaded 4 time(s).

Offline uni  
#25 Posted : 08 December 2023 20:36:03(UTC)
uni


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 1,552
Man
Russian Federation

Was thanked: 1309 time(s) in 767 post(s)
Ну, теоретически можно доработать алгоритм, чтобы можно было решать совместные системы. Я примерно знаю как это можно было бы сделать, но это требует отдельного исследования. У меня сейчас нет столько времени как было раньше. Текущая реализация была создана "на коленке" в течении пару недель, но обдумывал я её в течении нескольких лет, т.к. мне не хватало знаний c#.
Я иногда знаю что и как можно сделать, но практическая реализация откладывается до лучших времён, т.к. это не основная моя работа. Я в основном занимаюсь разработкой электроники и пишу программы для встраиваемых систем.

Regarding some points in the operation of the solver algorithm. During the transformation process, all functions that have a derivative sign change to the general representation (d/dt). For this reason, it is possible that l'(t) function is calculated numerically. To know for sure, I need to see how the solver works under the debugger.

Click to enlarge
Russia ☭ forever
Viacheslav N. Mezentsev
thanks 1 user thanked uni for this useful post.
on 09/12/2023(UTC)
Offline mkraska  
#26 Posted : 08 December 2023 21:36:00(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 2,023
Germany

Was thanked: 1153 time(s) in 739 post(s)
Originally Posted by: Razonar Go to Quoted Post
Originally Posted by: mkraska Go to Quoted Post
In this version you can specify the initial force in the spring. The initial conditions for x and y are adjusted appropriately. ...


A comparison between Martin's solution and that given by the equations of motion obtained from the Lagrangian. Spoiler: both give the same result.

I'd like to point out how incredibly complicated this problem actually is, and what a series of brilliant implementations Martin makes. For example, where the hell does he get the time derivative of the force on an elastic bar when he is given only the length of the bar as a function of the force? Obviously, it is not enough to apply the theorem of the derivative of the inverse function, but you also have to have a deep knowledge of the mechanics of the system to remember something called tangential stiffness, and although it uses k to represent it, we forgive it because It's German and they are well known to use their own abbreviations. Well, actually I don't know what letter to use, because I don't remember ever using that magnitude for any practical purpose, but in Spanish literature it is quite common to use k for its inverse, which is the constant that appears in Hooke's law. Or at least I think so, because the existence of elastic bodies is actually a complication, they should all be rigid better.

Another notable thing about this example is that I would like someone to please explain to me how the hell the Viacheslav plugin manages to handle l'(t) within the equations, because I honestly didn't expect it.

Federpendel-NL - Lagrangian.sm (258kb) downloaded 7 time(s).

Best regards.
Alvaro.


Alvaro, thanks for the feedback. I know that for the stiffness c or k are used in our textbooks. c seems more natural to symbolize the compliance rather the stiffness. But anyways students can't rely on things always being written the same way, so they have to get used to get it from the context, not from the names. BTW the concept of tangential stiffness and it's inversion is quite common in nonlinear FEA, particularly in material modelling and there writing the matrix as K is quite common.

As to the integration of F: The innocent approach was to avoid the direct inversion of L(F) used by you in a previous example. Integrating the inverted derivative seemed to be a way to let rk do the work. Initially I wrote F'(x,y,x',y'Wink explicitly bu I found that it is sufficient to provide dF/dL and l' is somehow converted and expanded by chain rule inside uni's magic.

And yes, something like odesolve() would be mandatory if the program is to cost nearly the same as Mathcad. Let's hope that there is actually some выручка by selling licenses so that we can expect emerging ressources for development of decent algorithms. And decent documentation, at least on the level of https://home.csulb.edu/~woollett/mbe3ode1.pdf

Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
thanks 1 user thanked mkraska for this useful post.
on 09/12/2023(UTC)
Offline mkraska  
#27 Posted : 09 December 2023 09:48:49(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 2,023
Germany

Was thanked: 1153 time(s) in 739 post(s)
Trying to solve a boundary value problem (posed by Valery): find the required angular velocity at an given angular position such that after a given time the pendulum is at a specified angular position
Here we try to get from 100° to 100° in two seconds. It turns out that we have to give an initial velocity of approx. 4 rad/s. The pendulum approaches north pole and comes back just in time. There are infinitely many solutions, if you allow for additional full rotations before the target is reached.

Most of the time I spent on finding a way to embed the numerical solution of the nonlinear differential equation into a numerical solver.
Unfortunately most of the solvers are "special needs" solvers. It is unclear why something can be plotted but not solved. And hardly any good error message. Exception is al_nleqsolve, which gives particularly helpful messages.

Any improvements or insights welcome.

Pendel NL RWP.png
Pendel NL RWP.sm (26kb) downloaded 4 time(s).
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
Offline Razonar  
#28 Posted : 09 December 2023 22:54:12(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,438
Uruguay

Was thanked: 888 time(s) in 564 post(s)
Hi Martin. I guess that your issue is that the end angle is 460 degrees, not 100. You can also see this post.

Clipboard01.png

bvp2-pend.sm (146kb) downloaded 4 time(s).

Best regards.
Alvaro.

Edited by user 09 December 2023 23:12:58(UTC)  | Reason: Not specified

Offline Jean Giraud  
#29 Posted : 10 December 2023 04:42:50(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 983 time(s) in 811 post(s)
That circle looks weird.

Circle_solve at(2).sm (13kb) downloaded 5 time(s).
Offline mkraska  
#30 Posted : 10 December 2023 09:55:10(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 2,023
Germany

Was thanked: 1153 time(s) in 739 post(s)
Originally Posted by: Razonar Go to Quoted Post
Hi Martin. I guess that your issue is that the end angle is 460 degrees, not 100. You can also see this post.

Best regards.
Alvaro.


Thanks a lot for the hints. In fact, my issue was how to handle the problem with the other solvers. Yet, you seem to prefer al_nleqsolve(), obviously for good reason.

Your bvp-procedure is impressive, it should go to the kernel or at least to a plugin.
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
Offline OchkovVF  
#31 Posted : 10 December 2023 10:15:34(UTC)
OchkovVF


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 06/04/2023(UTC)
Posts: 415
Man
Russian Federation

Was thanked: 41 time(s) in 38 post(s)
Well, who will be the first to create a calculation for a damped pendulum suspended on an elastic rod?
Fig-13-GravityTrain.sm (14kb) downloaded 5 time(s).
Fig-13-GravityTrain.png
Users browsing this topic
2 Pages<12
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.