Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Differential algebraic equations

  1. Jun 11, 2012 #1
    Hi Everyone,

    I am trying to solve a system of non-linear differential equations coupled to algebraic expressions:

    W(x)' = f(Cn(x)), where n = 1:6
    C1(x)' = f(Cn(x),V1(x),V2(x))
    C2(x)' = f(Cn(x),V1(x),V2(x)),
    C3(x)' = f(Cn(x),V1(x),V2(x)),
    V1(x)'' = f(Cn(x),V1(x),V2(x)),
    0 = gm(Cn(x),V1(x),V2(x)), where m = 1:4

    I am trying to use Matlab's inbuilt decic.m function to calculate consistent initial conditions for each variable that will satisfy the system. I am splitting up the equation for V1(x)'' into two first order ODEs, and will declare V1(X)' as a variable. This makes a system of ten equations in total.

    Decic takes two vectors which estimate the initial value of each variable and it's derivative. I would like to choose the initial values for W(0), C1(0), C2(0), C3(0) and V1(0). This I believe means they become fixed when passing them into the decic function. The rest of the values can be anything reasonable that is consistent with the system of equations.

    The problem I have with Matlab is that the error I am receiving tells me to free up fixed components. I end up freeing all of them, i.e. fixed_yo = zeros(1,10) and fixed_yp0 = zeros(1,10) and I still receive the error telling me to free up 1 fixed component. I have no more components to free. What does this mean? How do I get around this issue, and/or is there an alternative method I could use to find consistent initial conditions?

    Thanks so much for any helpful feedback, please ask any questions that may help.

    kt
     
  2. jcsd
  3. Jul 31, 2012 #2
    Hi,

    I just discovered this forum. When browsing around I saw this older question.

    I had a lecture about DAEs but I could hardly remember the topics.

    What is maybe of interest for you is the book from Hairer and Wanner
    http://books.google.de/books/about/...erential_Equations.html?hl=de&id=m7c8nNLPwaIC

    Also on the website from Hairer http://www.unige.ch/~hairer/software.html
    an excellent fortran based solver is available. But be cautioned, there is also a Matlab version of the solver available but this code does not work correctly.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook