help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: function writing in differential equations


From: genehacker
Subject: Re: function writing in differential equations
Date: Tue, 14 Oct 2008 10:52:15 -0700 (PDT)

Thanx for the replies. So I directly put in the functional form in other
equations as it has to be as you mentioned.
Now I dont understand whether I have to use DAE or ODE solver. I have been
thinking of DAE because I have 'time-dependent variables' that are a
function of other variables in the model, 

So, If I have the following system of 6 equations:

xdot(1) = 0.5 * exp(-10*t) - x(4) * x(1);
xdot(2) = x(5) * 0.5 - x(6) * x(2);
xdot(3) = x(6) * x(2) - 0.5 * x(3);
x(4) = 0.5- ((0.5- 0.1)/(1 + (x(1)/5)));
x(5) = 0.5- ((0.5- 0.1)/(1 + (x(1)/5)));
x(6) = 0.1-((0.1- 0.5)/(1 + (x(1)/5)));

If x(4) = f(x(1)) is regarded as an algebraic equation, and x(4) is
time-dependent and influences x(1), I would think there are two approaches
to solve the problem and I have two questions in them.

1) Treat the system as DAE and use dassl to solve. But it requires to
specify xdot0! Do we need to specify this at all? Isn't it over-solving the
problem with more constraints? Is there a way not to specify x0 and still
use dassl?

2) Only treat x(1),x(2) and x(3) as variables of the system and consider
x(4),x(5) and x(6) as time-dependent parameters and pass these parameters to
ODE at each time step. So it looks like a loop.

foreach timestep
{
      compute paramteres
      feed to ODE
}
In this case, how would I send these parameters to this function Lsode?

Correct me if Im wrong or doesnt make any sense. 

Ps: I dont care about derivates of x(4),x(5) and x(6)

thanks
k3
-- 
View this message in context: 
http://www.nabble.com/function-writing-in-differential-equations-tp19964525p19978769.html
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]