How to deal with very small and very large parameter values while solving DAE?

I have to solve a system of differential algebraic equations wherein some of the parameter values are very large (e.g. of the order of 10^5 to 10^10) and some other parameter values are very small (e.g. order of 10^-4 to 10^-6). I use ode15s, but the code breaks saying:
Warning: Failure at t=1.000000e-03. Unable to meet integration tolerances without reducing the step size below the smallest value allowed
(3.552714e-18) at time t.
How do I resolve this?

9 Commenti

And you are sure the code fails because of the mentionned scaling problem ? It's impossible to give advice without seeing your DAE system.
Yes, I think the code fails because of the scaling problem, because it works for certain other parameter values. I have attached my problem in an image file (it's rather a huge problem). I have discretised in the spatial coordinate \zeta and then fed into the matlab function file. Here, k2,k3 and k4 are the large parameters and Dc, Dh are the small parameters.
Since the code stops right at the beginning of the integration, I doubt that it's a matter of scaling. Did you check the time derivatives for NaN or Inf values ?
@Torsten I haven't checked the time derivatives for NaN values. Will do. Thanks. :-)
Hi David, I haven't looked at pdepe yet. Yes, I'm solving the system for a large vector of dependent variables after discretization in zeta. I don't understand the notation u and nu in your explanation. My equations are all non-dimensionalised.
Hi Monisha,
I made up names u and nu for new rescaled variables in place of t and zeta respectively. Having thought about it more, I don't think what I wrote in the previous comment is adequate, so I withdrew it.
@Torsten How do I output time derivatives from the matlab function file?Thanks.
When you generate the vector of time derivatives, just omit the semicolon at the end of the line.
Hi Torsten, My vector is very long (like 4000 elements), so outputting to the command window and checking the values is a tedious process. But nevertheless I can try with a smaller number of nodes. Thanks.

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Mathematics in Centro assistenza e File Exchange

Prodotti

Release

R2017a

Richiesto:

il 23 Ott 2018

Modificato:

il 26 Ott 2018

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by