Message Boards Message Boards

[?]Avoid "NDSolve::overdet: There are fewer dependent variables, ..."error?

Posted 7 years ago

Hello everyone. I am trying the solve thermoelasticiy equations for thermoelastic beam with 'method of lines'. I wrote the code in mathematica but when try the run,mathematica give this message to me "NDSolve::overdet: "There are fewer dependent variables, {s[0][t],s[1][t],s[2][t],s[3][t],s[4][t],s[5][t],s[6][t],s[7][t],s[8][t],s[9][t],s[10][t],v[0][t],v[1][t],v[2][t],v[3][t],v[4][t],v[5][t],v[6][t],v[7][t],v[8][t],v[9][t],v[10][t]}, than equations, so the system is overdetermined". I have equation as much as dependent variables but still give error. How can fix this. Thank you

n = 10;
h = 1/h;
V[t_] = Table[v[i][t], {i, 0, n}]
S[t_] = Table[s[i][t], {i, 0, n}]
eqns = Thread[
  D[S[t], t] == 
   Join[{D[0, t] + (0 - s[0][t])}, 
    ListCorrelate[{1, 2, 3}, S[t], {1, 3}] + 
     ListCorrelate[{1, 2, 3}, D[V[t], t], {1, 3}] + 
     ListCorrelate[{a}, Table[1, {j, 1, n - 1}], {1, 1}], 
    ListCorrelate[{1, 2, 3}, {s[n - 1][t], s[n][t], s[n - 1][t]}] + 
     ListCorrelate[{a}, Table[1, {j, 1, 1}]] + 
     ListCorrelate[{1, 2, 3}, {v[n - 1]'[t], v[n]'[t], 
       2*v[n]'[t] - v[n - 1]'[t]}]]]
eqns2 = Thread[
  D[V[t], t, t] == 
   Join[{D[0, t] + (0 - v[0][t])}, 
    ListCorrelate[{1, -4, 6, -4, 1}, {v[1][t], v[0][t], v[1][t], 
       v[2][t], v[3][t]}, {1, 5}] + 
     ListCorrelate[{1, -2, 1}, {s[0][t], s[1][t], s[2][t]}] + 
     ListCorrelate[{f}, {1}], 
    ListCorrelate[{1, -4, 6, -4, 1}, V[t], {1, 5}] + 
     ListCorrelate[{1, -2, 1}, S[t], {11, 15}] + 
     ListCorrelate[{f}, Table[1, {j, 2, n - 2}], {1, 1}], 
    ListCorrelate[{1, -4, 6, -4, 1}, {v[n - 3][t], v[n - 2][t], 
       v[n - 1][t], v[n][t], 2*v[n][t] - v[n - 1][t]}, {1, 5}] + 
     ListCorrelate[{1, -2, 1}, {s[n - 2][t], s[n - 1][t], s[n][t]}] + 
     ListCorrelate[{f}, {1}], 
    ListCorrelate[{1, -4, 6, -4, 1}, {v[n - 2][t], v[n - 1][t], 
       v[n][t], 2*v[n][t] - v[n - 1][t], 
       4*v[n][t] - 4*v[n - 1][t] + v[n - 2][t]}, {1, 5}] + 
     ListCorrelate[{1, -2, 1}, {s[n - 1][t], s[n][t], s[n - 1][t]}] + 
     ListCorrelate[{f}, {1}]]]
initc1 = Thread[S[0] == Table[0, {n + 1}]]
initc2 = Thread[V[0] == Table[0, {n + 1}]]
initc3 = Thread[Table[v[i]'[t], {i, 0, n}] == Table[0, {n + 1}]]
lines = NDSolve[{eqns, eqns2, initc1, initc2, initc3}, {S[t], 
   V[t]}, {t, 0, 5}]
POSTED BY: tarik balci
4 Replies
Posted 7 years ago

Thank you, you've been very helpful

POSTED BY: tarik balci

Look up the documentation for NDSolve. Under options, you will find one called MaxSteps. You can follow the examples there.

POSTED BY: Michael Rogers
Posted 7 years ago

Yes you are right. I wrote t instead of 0,thank you. I fix it then code worked but this warning appear "NDSolve::mxst: Maximum number of 10000 steps reached at the point t == 0.7449335690865351`". I wonder it is possible to increase the number of steps.If possible, how do I handle this?

POSTED BY: tarik balci

What you call initc3 consists of differential equations, not initial or boundary conditions. Perhaps you mean to write 0 instead of t.

P.S. Personally, I find it nicer if there are semicolons at the end of lines to suppress irrelevant output.

POSTED BY: Michael Rogers
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