Precision issues in exponent computation and differential equation

Hello,

Im working on a differential equation based model some of its equations has power term (x^a) which is major issue because without this model works fine. Now issue is that I have used stiff solver(RodasP5), different tolerence levels (1e-2 - 1e-15), maxiters, passing dt but still its of no help.

I see NaN issues, negative values although system should be always positive. So, I also used callbacks which helps with positivity but still system is very unstable and just produces NaN. Solver fails even at t = 0.0.

Can you guys suggest something or point me to any related discussion if you know about. :slight_smile:

Thank you

Share some equations.

How did you prove that?

What value is NaN in the derivative at t=0?

Im making a small working model where I could mimic these issue. I cant share actual model unfortunately :smiling_face_with_tear: . I will post here with result.