help-octave
[Top][All Lists]
Advanced

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

Re: ODE system solving


From: Geraint Paul Bevan
Subject: Re: ODE system solving
Date: Fri, 07 Jan 2005 12:04:57 +0000
User-agent: Mozilla Thunderbird 0.7.1 (X11/20040715)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

address@hidden wrote:
| hi everybody
|
| i need to solve a differential equation system, 1 first order equation
and 1 second order equation.
|
| they are in the form
|
| w"=f(z,w,w',T,T')
| T'=f(z,w,T)
|
| w,w',w",T,T' are function of z.
| i have 3 initial condition w0,w'0, T0.
| in the rfirst equation i make the substitution
|
| w --> y1
| w'--> y2, so w" --> y2'
| T --> y3, so T' --> y3'
|
| the system became a 3 first order equation system, is it right?

Yes.

| this is the m-file section:
|
| SysO(1)=y(2);
|
|
SysO(2)=y(1)*y(2)/(3*Nup)-(g/(3*Nup))+(2*tau/(3*Nup*rho*Rz))+((y(2)^2)/y(1)*3*Nup)-(1/Nup)*dNup*y(2)*(-2*hc*(y(3)-Ta)/(Rz*rho*Cp*y(1)));
|
| SysO(3)=-2*hc*(y(3)-Ta)/(Rz*rho*Cp*y(1));
|
|
| as you can see, the second equation (SysO(2)) is dependent of T': in
fact the last term of the second equation is the same of the third equation.
| the question is: is this m-file correct?

As long as all the rates are expressed in terms of states only (which
they are), this should not cause any problems for ODE solvers.

The equations look fine to me.

| of course in the m-file i have all the other equations (Rz, Nup....).
they are function of w and T.
|
| in solving the system i receive a "tolerance not met" error message.
can you help me?!?!?

The problem is almost certainly numerical so it isn't really possible to
give a definite solution unless you provide the complete m-file and tell
us how you are trying to solve the equations. Are you using lsode? With
what options (if any)?

You could try relaxing the tolerance using lsode_options. Alternatively,
it often helps if you tighten the tolerance (slightly counter-intuitive,
perhaps).


- --
Geraint Bevan
http://www.mech.gla.ac.uk/~gbevan

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iEYEARECAAYFAkHeeukACgkQcXV3N50QmNM/KwCfYOX7rNzfoIX/1x7BWilGBa7+
CGUAniMEpBzwY78OXCY4K/+H1qPJYh0L
=Ejan
-----END PGP SIGNATURE-----



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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