Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parameter Equations 1

Status
Not open for further replies.

warburton1

Aerospace
Joined
Aug 22, 2000
Messages
45
Location
CA
Hi,
I am trying to run an equation within the parameter/formula editor of v5. The equation is used to determine the minimum length of a part based upon an angular variable and length (in other words a trigonometric equation is applied). However, whilst in its simple form the equation works as soon as I try to round the figures down to a useful value (eg whole number), the system responds with the non-homogeneous units message. Below is a sample of the equation I am running.

min_flange_length=int (((beam_size /2)/sin (beam_angle))+ offset_constant)

I have also tried by changing the 2 to both a parameter with a real value and by applying it as a 2in, all to no avail.

Any help would be appreciated. Thanks

Gary W.
 
Gary,

You indeed need to homogenize units
int function returns (unitless) real number and your lenght parameter requires a unit of length. You need to multiply the int result with lenght unit like 1in (or 1mm or whatever length units you're using)

min_flange_length=(int (((beam_size /2)/sin (beam_angle))+ offset_constant)*1in


 
Thanks Eklunja,
Your help was much appreciated, I had missed the conversion of the real value back to a length, your solution solved the homogeneous units issue, however, it did result in another rather strange fault. The process of converting the equation to a real value changed the lengths from inches to metres such that a length of 3.39 inches would return a value of;-

int(0.0861)=0

I fixed this by multiplying the length by 39.37, but this is a rather awkward fix for what should be a simple equation process.

Gary W.
 
All V5 Calculations are in metric (usually milimeters, not meters). This is especially true when using VB and KWA/KWE. The conversion to inches is done on the fly by the user interface.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top