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

Matlab Coupled System of ODE's with algebraic coefficients

  1. Sep 18, 2016 #1

    joshmccraney

    User Avatar
    Gold Member

    Hi PF!

    I have a system of 4 first order linear ODE's, call each ODE ##\psi_1,...,\psi_4 : \psi = \psi(x,y,z,t)##. However, there are three algebraic variables (not ##x,y,z,t##, let's call them ##c_1,c_2,c_3##) that must be solved for as well, and I have three different (non-differential) equations to solve for them, call those ##\alpha_1, \,\, \alpha_2, \,\, \alpha_3 : \alpha_i = \alpha_i(c_1,c_2,c_3)##. I need to solve this system.

    I have been using ode15s in MATLAB, a stiff solver. Typically this method works but since there are algebraic variables whose governing equations are not differential, the ode15s function is not working. Any ideas how to set this up?

    Thanks so much!

    Josh
     
  2. jcsd
  3. Sep 20, 2016 #2

    Krylov

    User Avatar
    Science Advisor
    Education Advisor

    There are a few things I do not understand:
    • You say you have 4 ODEs. I imagine that ##\dot{x}(t) = \psi(x(t), y(t), z(t), t)## and similarly for ##\dot{y}## and ##\dot{z}##, but what is the purpose of ##\psi_4## then? Could you write down these ODEs a bit more explicitly? Is there a mass matrix present (see the ode15s documentation)? Is the mass matrix singular?
    • Then you have functions ##\alpha_i## that specify a relationship between the ##c_i##. Very well. However, it is not clear to me what couples ##x,y,z## and ##c_1,c_2,c_3##. What does the system of ODE have to do with the algebraic system? As it stands, I would say that you can solve these systems separately, but I don't think this is what you meant.
    It seems you have some sort of DAE (again, see the ode15s documentation), but it is not clear to me yet what it exactly looks like.
     
  4. Sep 26, 2016 #3

    kreil

    User Avatar
    Gold Member

Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Coupled System of ODE's with algebraic coefficients
  1. NDSolve coupled ode (Replies: 3)

Loading...