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

SOLVED
Highlighted
Visitor

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

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

Highlighted

## 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:

but the following equivalent functions fail

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

Announcements