TransWikia.com

" Unable to find initial conditions that satisfy the residual function within specified tolerances"

Mathematica Asked by bob the legend on December 23, 2020

I know that there are similar questions on stack exchange. However, I am relatively new to mathematica, so I couldn’t really understand the answers. Sorry.

Here’s my code:

k = 50000000;
c = 37;
g = 9.81;
[Mu] = 0.3;
i = 10^-5;
l = 0.1;
m = 0.35;
NDSolve[
 {m y''[t] == -k z[t]^(3/2) - c z'[t] - m g,
  [CurlyPhi]''[
    t] == ((-k z[t]^(3/2) - c z'[t]) l Sin[[CurlyPhi][
         t]] + [Mu] (-k z[t]^(3/2) - c z'[t]) Cos[[CurlyPhi][t]])/i,
  z[t] == y[t] - l Cos[[CurlyPhi][t]],
  
  
  y[0] == 0, y'[0] == -3, [CurlyPhi][0] == 0, [CurlyPhi]'[0] == 0, 
  z[0] == 0, z'[0] == 0}, {y[t], z[t], [CurlyPhi][t]}, {t, 0, 1}]

The error message is NDSolve::icfail: Unable to find initial conditions that satisfy the residual function within specified tolerances. Try giving initial conditions for both values and derivatives of the functions.

Is there any way to solve the equations numerically and plot graphs of them as a function of time. Thanks

One Answer

z[t] == y[t] - l Cos[[CurlyPhi][t]] is an algebraic equation, Delete it and define instead: z[t_] = y[t] - l Cos[[CurlyPhi][t]] and delete the initial conditions for z:

k = 50000000;
c = 37;
g = 9.81;
[Mu] = 0.3;
i = 10^-5;
l = 0.1;
m = 0.35;
NDSolve[
 {m y''[t] == -k z[t]^(3/2) - c z'[t] - m g,
  [CurlyPhi]''[
    t] == ((-k z[t]^(3/2) - c z'[t]) l Sin[[CurlyPhi][
         t]] + [Mu] (-k z[t]^(3/2) - c z'[t]) Cos[[CurlyPhi][t]])/i,
  z[t] == y[t] - l Cos[[CurlyPhi][t]],
  
  
  y[0] == 0, y'[0] == -3, [CurlyPhi][0] == 0, [CurlyPhi]'[0] == 0, 
  z[0] == 0, z'[0] == 0}, {y[t], z[t], [CurlyPhi][t]}, {t, 0, 1}]

Correct answer by Daniel Huber on December 23, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP