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

Numerical integration problem in Prime 3

SOLVED
Highlighted

Numerical integration problem in Prime 3

I have converted a MC15 file to Prime 3 and the numerical integration function does not appear to work on one of my functions.

The problem begins near the end of the file, after Eq E1.13. The definition of the problem function is farther up the file.

I've tested some options for changing the writing of the equation as you will see, but no luck.

What am I doing wrong?

Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Numerical integration problem in Prime 3

It seems that the error is due to the units in DHT().

I have no clue why, but a redefinition of DHT() (see attached) cures the problem.

Not sure if it should be called a bug?

EDIT: It might be because during integration the function is called with a temperature difference as parameter rather than a temperature??

View solution in original post

3 REPLIES 3
Highlighted

Re: Numerical integration problem in Prime 3

It seems that the error is due to the units in DHT().

I have no clue why, but a redefinition of DHT() (see attached) cures the problem.

Not sure if it should be called a bug?

EDIT: It might be because during integration the function is called with a temperature difference as parameter rather than a temperature??

View solution in original post

Re: Numerical integration problem in Prime 3

Thanks Werner. I too have no clue. The form you gave should be the same result as what I had assuming the base unit of t was K as it was.

I have another version that uses your tip without the program structure. In this case, I get some results that fail, but the one that worked in Mathcad 15 still works.

I never would have thought of the approach you took. In fact, I hadn't learned about UnitsOf feature. Thanks!

Highlighted

Re: Numerical integration problem in Prime 3

I tend to call it a bug.

This makes it work:

DHT1.png

but the following equivalent functions fail

DHT3.pngDHT2.png

I can't think of any good reason for this behaviour.

Announcements