Message Boards Message Boards

0
|
6088 Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:

How to solve this DAE ?

Posted 9 years ago

I want to use the DAE to find an analytical model. But it always run out of memory (8GB), is there anyway can solve it?

DSolve[{a[t] + c[t] - f[t] == 0, d[t] + e[t] + f[t] - i[t] == 0, 
  2 g[t] + h[t] == 0, a[t] - e[t] == 2 d[t] + e[t] - h[t] == 0, 
  a'[t]/3 + c'[t] == N*2 a[t], 
  d'[t]/3 + e'[t]/2 + f'[t] == D*(d[t] + e[t])- e[t], 
  g'[t]/3 + h'[t]/2 + i'[t] == M*i[t] -A}, {a[t], d[t], g[t], e[t], 
  h[t], c[t], f[t], i[t]}, t] 

Where D, M, N, and A is constant.

Thanks a lot!

POSTED BY: Jie Li
Posted 9 years ago

Since D and N are pre-defined Mathematica function names, do some variable substitutions. Since the resulting system seems to take a long time and since some of your functions are simple linear combinations of others, do some function substitutions.

In[1]:= Simplify[{a[t] + c[t] - f[t] == 0, d[t] + e[t] + f[t] - i[t] == 0, 2 g[t] + h[t] == 0,
   a[t] - e[t] == 0, 2 d[t] + e[t] - h[t] == 0, a'[t]/3 + c'[t] == capN*2 a[t], 
   d'[t]/3+e'[t]/2+f'[t] == capD*(d[t]+e[t]) - e[t], g'[t]/3+h'[t]/2+i'[t] == capM*i[t]-capA} //.
   {a[t] -> e[t], a'[t] -> e'[t],
    h[t] -> -2 g[t], h'[t] -> -2 g'[t],
    f[t] -> a[t] + c[t], f'[t] -> a'[t] + c'[t], 
    i[t] -> d[t] + 2 a[t] + c[t], i'[t] -> d'[t] + 2 a'[t] + c'[t],
    g[t] -> - d[t] - e[t]/2, g'[t] -> -d'[t] - e'[t]/2}]

Out[1]= {True, True, True, True, True, 6 capN e[t] == 3 c'[t] + e'[t], 
 6 capD d[t] + 6 (-1 + capD) e[t] == 6 c'[t] + 2 d'[t] + 9 e'[t], 
 capA + c'[t] + (5 d[t])/3 + (7 e'[t])/3 == capM (c[t] + d[t] + 2 e[t])}

Then this

In[2]:= DSolve[{6 capN e[t] == 3 c'[t]+e'[t], 6 capD d[t]+6 (-1+capD) e[t] == 6 c'[t]+2 d'[t]+9 e'[t], 
  capA + c[t] + (5 d'[t])/3 + (7 e'[t])/3 == capM (c[t] + d[t] + 2 e[t])}, {c[t], d[t], e[t]}, t]

solves in a couple of seconds. Unfortunately the result is large and complicated, but with some study you might be able to see how to simplify this greatly. Then you can use that result to determine each of the functions that were eliminated.

POSTED BY: Bill Simpson
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