Author |
Message |
Chris Bailey (cbailey)
Member Username: cbailey
Post Number: 6 Registered: 08-2006
| Posted on Thursday, November 29, 2007 - 01:11 pm: | |
My .pde includes these lines: r1 = 1.4299790E-07 r2 = -1.3643962E-09 r3 = 5.8610764E-12 r4 = -6.1995687E-15 r = r1 + r2*Temp + r3*Temp*Temp + r4*Temp*Temp*Temp When I try to run it, I get the error message "Operands not of same type" and the "div" operator in the second equation is highlighted. Evaluating the second equation requires evaluating r, and I can stop the message by setting r2, r3 and r4 to zero (this increases r somewhat and is wrong). I can, though, copy and paste the expression into a summary report, and it works there. What is wrong? |
Robert G. Nelson (rgnelson)
Moderator Username: rgnelson
Post Number: 1008 Registered: 06-2003
| Posted on Thursday, November 29, 2007 - 01:47 pm: | |
The equation processor carries some typing and identifying information with each item in the computation. It appears that it is losing some of this information when it forms a reciprocal. This causes later compatibility tests to fail. This is clearly a bug in the symbolic equation processor, and it is strange that this has never been tripped over before. Any reciprocal seems to trigger the error (e.g. c=1/x). We will track this down and fix it in the next maintenance release. In the meantime, you can work around it by using C= SAVE(1/r) This forms a finite element interpolation of the function, and hides the reciprocal from the DIV operator. It is potentially destabilizing, because the SAVE blocks the computation of dependencies inside its argument. But if C is well behaved, it should not be a problem.
|
Chris Bailey (cbailey)
Member Username: cbailey
Post Number: 7 Registered: 08-2006
| Posted on Thursday, November 29, 2007 - 05:01 pm: | |
I just created a new polynomial for c and took r=1/c elsewhere. Fix when convenient. Thanks! |
|