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

questionable result of program

Raiko
17-Peridot

questionable result of program

Hi there,



I've attached a small MC 11 file where I tried to determine the area circles of different diameter occupy within a rectangular control area.



The result of the MathCad program looks all right however, when utilising the result further it turns out that it is now off by a factor of 10^6. I've noticed in some posts that there seems to be an issue with units in programs, but does anybody know what the cause is and how to avoid this?



I use MathCad mainly because it checks the units, but this should be reliable.

Thanks a lot in advance

Raiko
5 REPLIES 5
GuyB
10-Marble
(To:Raiko)

You want to update your vector 'b' with values of area.

The problem lies in your definition of 'b' - you defined it as unitless.

- Guy
Raiko
17-Peridot
(To:GuyB)

On 9/2/2009 9:05:47 AM, GuyBeadie wrote:
>You want to update your vector
>'b' with values of area.
>
>The problem lies in your
>definition of 'b' - you
>defined it as unitless.
>
> - Guy

Thank you Guy. Stupid me!
I wanted to preset b with values and, of course, MC did so but without units.

Raiko

Though there is nothing wrong "return", it is programmatically incorrect for this kind of application. You can have all sorts of items to "Get" where "Get" is often of different construct as they appear in the previous part of the programme and not otherwise modifiable. The other major point is that "return" has other programming facilities than "Get", thus the need to differentiate them and not confuse their use. xxx does nothing, remove. See yellow.

jmG

This work deserves no plot ? !
How do you quick check visually and for more circles, wouldn't be comfortable to see the graph of the ratio, especially if there is lot of circles. Comment for comment, a work sheet that does not resume the project is incomplete. especially for quick reviewers.

jmG
TomGutman
1-Visitor
(To:Raiko)

What version of Mathcad? While you say MC11, and the format is MC11, the sheet is clearly not a MC11 sheet as it fails to evaluate (due to unit errors) in MC11.

It does evaluate in MC14 (which is a bit more lenient about the units of zeros). And the calculations appear to be done correctly. The only error of 1E-6 that I can see is a term of 1E-6 in the expression for the filling ratio, a factor that does not belong there and is an error.
__________________
� � � � Tom Gutman
Announcements

Top Tags