Message Boards Message Boards

0
|
5546 Views
|
3 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Solve ODE's with NDSolve?

Posted 7 years ago

Hi Guys, trying to solve three ODE's below and getting the same "non numerical value for a derivative at t==0" error, can't see where i'm going wrong! Please help!

With[{m = 1, M = 1, l = 1, L = 1, g = 9.81, A = 0.01, w = 1000, 
  yO = 0.1}, 
 sol = NDSolve[{m l \[Theta]''[t] + M L \[Theta]''[t] + 
      m A w^2 Sin[\[Theta][t]] Cos[w t] - m y''[t] Sin[\[Theta][t]] + 
      M L \[Phi]''[t] Cos[\[Theta][t] - \[Phi][t]] + 
      M L \[Phi]'[t]^2 Sin[\[Theta][t] - \[Phi][t]] - 
      m y''[t] Sin[\[Theta][t]] - 
      m y'[t] \[Theta]'[t] Cos[\[Theta][t]] + 
      M A w^2 Sin[\[Theta][t]] Cos[w t] + 
      M y'[t] \[Theta]'[t] Cos[\[Theta][t]] + 
      M L \[Theta]'[t] \[Phi]'[t] Sin[\[Theta][t] - \[Phi][t]] - 
      m g Sin[\[Theta][t]] - M g Sin[\[Theta][t]] == 0 , 
    M L \[Phi]''[t] + 
      M l \[Theta]''[t] Cos[\[Theta][t] - \[Phi][t]] - 
      M l \[Theta]'[t]^2 Sin[\[Theta][t] - \[Phi][t]] - 
      M y''[t] Sin[\[Phi][t]] + M A w^2 Cos[w t] Sin[\[Phi][t]] - 
      M g Sin[\[Phi][t]] == 0,  
    m y''[t] - m l \[Theta]''[t] Sin[\[Theta][t]] - 
      m l \[Theta]'[t]^2 Cos[\[Theta][t]] - m A w^2 Cos[w t ] - 
      M l \[Theta]''[t] Sin[\[Theta][t]] - 
      M l \[Theta]'[t]^2 Cos[\[Theta][t]] + M y''[t] - 
      M A w^2 Cos[w t ] - M L \[Phi]''[t] Sin[\[Phi][t]] - 
      M L \[Phi]'[t]^2 Cos[\[Phi][t]] + m g + M g + K (y[t] - yO) == 
     0 , \[Theta]'[0] == 0, \[Phi]'[0] == 0, 
    y'[0] == 0, \[Theta][0] == 0, \[Phi][0] == 0.5, 
    y[0] == 0.01}, {\[Theta][t], \[Phi][t], y[t]}, {t, 10}]]

Any help appreciated! Thanks! :)

POSTED BY: B Patel
3 Replies
Posted 7 years ago

In equation 3, K is undefined. Should be L? Or M?

POSTED BY: Glenn Carlson

Did you try calculating the derivative at t = 0 ?

POSTED BY: Frank Kampas
Posted 7 years ago

Not sure how you mean?

POSTED BY: B Patel
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract