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

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Numerical integration problem in Prime 3

HarveyHensley
12-Amethyst

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?

ACCEPTED SOLUTION

Accepted Solutions

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

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??

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!

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

Top Tags