The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: A differential inside another differential - DAES
Replies: 1   Last Post: Mar 8, 2013 2:35 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View  

Posts: 1,717
Registered: 11/8/10
Re: A differential inside another differential - DAES
Posted: Mar 8, 2013 2:35 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Elsis" wrote in message <khaghp$q69$>...
> Hello
> I have a set of DAES, but I have one differential inside another something like this:
> Dx(1)=x(2)-x(1)
> 0=x(2)-K*x(1) >>> an algebraic equation
> Dx(3)=K*Dx(1)+K*x(3)
> is it possible to solve a system like this on Matlab or I should require to do something extra to solve it?
> thanks! have a nice day!
> Elsa

Three ways to rewrite your DAE system:

Either you define the mass matrix for the system above as
M=[1 0 0; 0 0 0; -K 0 1]
and the right-hand side vector as

or, since Dx1 = x(2)-x(1), you can insert this expression directly into the third
equation to get
0=x(2)-K*x(1) >>> an algebraic equation
and thus
M=[1 0 0; 0 0 0; 0 0 1]
or you solve for x(2) from the algebraic equation and insert in the other two:
from the algebraic equation you get x(2)=K*x(1) and thus
Dx(1) = x(2)-x(1) = K*x(1)-x(1)=(K-1)*x(1)
Dx(3) = K*Dx(1)+K*x(3)=K*(K-1)*x(1)+K*x(3)=K*((K-1)*x(1)+x(3))

Best wishes

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.