Skip to main content
1-Visitor
April 26, 2021
Question

Issue with entering piecewise function into rkfixed?

  • April 26, 2021
  • 2 replies
  • 2319 views

Hello,

I am trying to solve a series of two first order ODEs, the ODEs are a function of time but also include a piecewise temperature component that varies with time. I believed at first this is what was breaking the solver but when I make the temperature constant the solver remains broken. Can anyone see where my mistake is? I am thinking it is most likely the constants and/or initial conditions. 

 

Thanks for any help that can be provided. 

2 replies

23-Emerald IV
April 26, 2021

What about your constant ka0. It's pretty large, and you are multiplying it with an exponential function with a positive argument. That makes it even larger.

 

Success!
Luc

1-Visitor
April 26, 2021
Yeah it is really large but thats the number we got when doing
experimental, I will recheck.

UK
23-Emerald IV
April 27, 2021

Once entered into the expression with the exponential function, the values grow to 10^71 region and higher. I don't think that is realistic, unless countered by a contra-force.

Shouldn't the argument to the exponential function be negative? That would bring the ka values to 10^-5 and higher region, much more in line with the other values.

With that I get:

LucMeekes_0-1619553450815.png

Success!

Luc

19-Tanzanite
April 27, 2021

Replace rkfixed with Radau (it's a stiff system).

 

Alan