cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

Issue with entering piecewise function into rkfixed?

UK_9916373
10-Marble

Issue with entering piecewise function into rkfixed?

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. 

4 REPLIES 4
LucMeekes
23-Emerald III
(To:UK_9916373)

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

Yeah it is really large but thats the number we got when doing
experimental, I will recheck.

UK
LucMeekes
23-Emerald III
(To:UK_9916373)

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

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

 

Alan

Announcements

Top Tags