×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Programming and Units....
2

Programming and Units....

Programming and Units....

(OP)
All

I would appreciate any advice on how to solve the attached problem with units.  

Before I tried to use units in this MathCAD sheet, I was able to evaluate the function, Vu(x) for the maximum and minimum as shown in the attached sheet.  Now, having defined units for all the variables necessary to calculate Vu(x) I cannot get anything.  The MathCAD sheet outlines the Vx:=Vu(x) as all red, meaning undefined.  

I've tried a lot of things to no avail.  I can see from the MathCAD website that units can be used in programming.

I appreciate any help.

Thanks,
Q

Regards,
Qshake
pipe
Eng-Tips Forums:Real Solutions for Real Problems Really Quick.
 

RE: Programming and Units....

Probably ran into SUC, which sucks.  SUC stands for static unit checking and is one of the worst new "features" of versions later than 11.2a.

RE: Programming and Units....

Is it possible to post the actual worksheet, preferrably in M11 format?  

On the face of it, the only thing I can see at all is that your indexed x is actually defined as 0ft..48.75ft2, since you have Ltot*ft in the definition of x.

TTFN

FAQ731-376: Eng-Tips.com Forum Policies

RE: Programming and Units....

(OP)
IRstuff - thanks for the clarification on the ft^2.  I had been trying so many things that I've left a few ends open.

If I can back save to M11 I will repost tomorrow.  

Thanks again.

Q

Regards,
Qshake
pipe
Eng-Tips Forums:Real Solutions for Real Problems Really Quick.
 

RE: Programming and Units....

(OP)
BTW, I also found out via examples on the MathCAD website that when using units with plots or graphs, the units will default to the base units.  I didn't know that either beforehand.  I just assumed if you had a variable in kips, it plotted in kips and not pounds.

And for my example, I see that there is an issue between pound-mass and pound-force.  SO to read the correct values from the graphs I produced you have to divide Vu(x) by 32,200 to get an answer in kips.

I suppose somewhere in the beginning of my definitions for units I didn't distinguish between mass and force.  But then I did try to rely on the MathCAD base units.....

I appreciate the tips.

Regards,
Qshake
pipe
Eng-Tips Forums:Real Solutions for Real Problems Really Quick.
 

RE: Programming and Units....

The workaround of choice, if such a thing makes any sense, is to divide the quantities being graphed by the units desired, i.e., a force function divided by lbf.  This effectively normalizes the display graph to the desired units, and avoids any transcription errors with conversion factors.

TTFN

FAQ731-376: Eng-Tips.com Forum Policies

RE: Programming and Units....

Like IRSTUFF said, if you put TOTAL_FORCE/kcs in your y-axis (for example) you get the right magnitude line with the benefit of it being self-documenting.

David

RE: Programming and Units....

You can't have units in a vector subscript.  V[x, and M[x both require x to be unitless.  You could divide by ft, or define x as unitless initially then multiply by ft where necessary.

Peter
 

RE: Programming and Units....

(OP)
pstuckey, et al -

I owe you all an update (perhaps just to help you or others in the future).

Where I defined the range, x:=0..Ltot, I now know that when using units you must use the format, x:= 0ft, 1.0ft..Ltot, where Ltot has units of feet.  In this case, the 1.0ft is the increment of the step.  Once I found that out, the Ltot was then defined, x was defined and condequently Vu(x) was defined.  

Then came the matter of what pstuckey notes.  I had to divide the subscript, x in Vx by ft in order for it to be unitless.  Once completed the whole set up works just as it did.

Whew!  I love the program but like many programs wish there were more clear error messages.

Thanks to all for your help and directions.

Q

 

Regards,
Qshake
pipe
Eng-Tips Forums:Real Solutions for Real Problems Really Quick.
 

RE: Programming and Units....

I think it is clearer to first define a range variable, like n:=0..N-1, where N is the number of elements.
Then define the vector x[n:=n*ft
 

RE: Programming and Units....

Does your series of "if"'s require an "otherwise" at the end?  I don't see one.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources