Skip to main content
14-Alexandrite
April 18, 2026
Question

ODEsolve problems again!

  • April 18, 2026
  • 2 replies
  • 164 views

Hi, I am trying to solve an ODE to model a “Ball and Cone” tuned mass damper. The equations simulate a ball mounted inside a pair of cones with mass on top. The ball oscillates up and down an inclined slope with a curved region at the apex between the up/down slopes. I am using Radau solver as it is a stiff equation. Adams/BDF “does not converge”. The 1st solve block uses a simplified simulation for base excitation of the TMD. Using Radau with modest levels of damping the first solve block result gives a discontinuous response which should not happen given the inclined slope is a tangent to the curved section at the apex. Any ideas how I can correct this discontinuity would be appreciated.

I tried using sigmoid transition functions (2nd solve block) for the step between inclined slope and radius but this gives a large number error.

The 3rd solve block includes an extra degree of freedom to simulate the tower on which the damper is mounted, which is the aim of the program. This won’t solve either with “too few IC’s”, when I believe I have the correct number for the 2 x 2nd order equations.

Any assistance will bring a smile to my face!

Thanks Ross

 

2 replies

25-Diamond I
April 18, 2026

Just a few remarks…

1)  You can speed up calculation if you define AA(t) as the second derivative of X(t) instead of being the first derivative of V(t).

2)  You have a typo in your third solve block. You typed Fo instead of F.0

3)  The first equation in your third solve block is not using function xu. So you could omit the second equation and only solve for x(t) 

In case you need xu as well you could follow up with a separate solve block for xu(t) once you have solved for x(t)
EDIT: I tried and got a “calculation does not converge” error

 

You actually can use two equations with two unknown functions in the solve block but you have to use the correct syntax:

We cannot extend the integration interval to more than 2 as this would throw an error (“This solution exceeds the maximum number of integration steps”). 

Plotting the function shows that we get a result quite different  from the above for the first second.
X(0)=0 is not respected, rather we see X(0)=52.6 and if we use more steps (like 100*Ns instead of just Ns) we even see X(0) to be up to 5000 and more!

The plot at the lower right compares the solution we get when we just solve for x(t) (X1, green) with the solution we get when we solve for x and xu in the same solve block.

 

Can’t explain the effects, just noticed them. Hope it may help you to fix the problem.

 

EDIT: Additional unexplainable strange effects with the last solve block (solving for both x and xu):

.) if the interval limit is changed from 2 to just 1 we get a result which matches pretty well the one we get when just solving for x(t) and we also see X(0)=0.

.) if the interval limit is changed from 2 to 1.5 wee see and error (again about exceeding the max. number of integration steps)

.) Is this the expected behaviour?

 

remslie14-AlexandriteAuthor
14-Alexandrite
April 18, 2026

Werner,

Your rapid response time is appreciated. Thanks for the tip on faster solve for AA(t).

My syntax errors catch me every time…. embarassing!

Since this is a coupled system I wish to solve for x and xu simultaneously. If I substitute x’’(t) into the xu’’(t) equation I now get “too many IC’s”!!! If I remove x(0)=0, still too many IC’s. If I remove both x(0)=0 and x’(0)=0 I still get too many IC’s. I’m not sure I will every understand the nuances of Odesolve! Iam sure there is a simple solution?

Regards,

Ross

25-Diamond I
April 18, 2026

Since this is a coupled system I wish to solve for x and xu simultaneously.

It’s not coupled. The first equation for x’’(t) is not using xu(t) or its derivatives.

Its just xu(t) which is depending on x(t) . So you can solve for x(t) first and only after that you may solve for xu(t) (which failed in my attempt, so I suspect that the second equation may need modifications).

As I had shown we get the same result for x(t) whether we solve for x(t) alone or for x(t) AND xu(t) simultaneously - at least starting with approx t=0.8, sometimes even from t=0 (if the interval just runs from 0 to 1 and not up to 2). I did not understand why the interval length of 1 and 2 worked, but 1.5 threw an error. Again I suspect the correctness of the second equation for xu(t). However, my technical understanding isn't sufficient to grasp this equation, let alone refine it.

 

If I substitute x’’(t) into the xu’’(t) equation I now get “too many IC’s”!!! If I remove x(0)=0, still too many IC’s. If I remove both x(0)=0 and x’(0)=0 I still get too many IC’s.

I am not sure what the problem is and what you substitute where. Did you succeed in duplicating what I had shown in this picture and did you work from that on?

Note that you have to fix the type with F.0 and change the syntax when using odesolve for a system of equations.

The above worked and gave the results shown in the previous answer.

Changing t.end from  “2” to “1” even gave the very same (upon optical inspection) result than solving just for x(t) alone without using the second equation for xu”(t).

But as already said the whole thing is quite instable and confusing as changing the “2” to “1.5” gave an error.

In contrast, there seems to be no problem or limit with the upper t-bound when we use only the equation for x"(t).
This is one reason to be wary of the equation for xu.

Here what I get for an upper bound of t=200

 

19-Tanzanite
April 20, 2026

There seems to be a mismatch between your copied text equations and your H and G functions.  The former are:

 

The terms in the red and blue boxes are not just 1 and 0, but your H and G functions are.  

Unfortunately, correcting this doesn’t solve your discontinuity problem!