×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Contact US

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!

*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

While loop help

While loop help

While loop help

(OP)
Hi. I am trying to write a while loop to solve the iteration in the screenshot attached. Using Prime 9.0. Help would be greatly appreciated!

The function f(x) should be evaluated for x until the the value of 4 inch is reached. x should be incremented by 1 starting at 1. I have very limited programming knowledge and been looking at all of the examples and can't seem to figure it out.

Thank you for the help!

RE: While loop help


> are angle units in degrees? unusual to see 360/x in a radian environment
> presumably, Rebar should be return in inches
> what changes x as a function of i? nothing in rebar[i is a function of i
> the while test seems like it should be a function of x and not f(x), and the condition should be "≤" and not the opposite

TTFN (ta ta for now)
I can do absolutely anything. I'm an expert! https://www.youtube.com/watch?v=BKorP55Aqvg
FAQ731-376: Eng-Tips.com Forum Policies forum1529: Translation Assistance for Engineers Entire Forum list http://www.eng-tips.com/forumlist.cfm

RE: While loop help

(OP)

Quote (IRstuff)


The sin (360/x) should give me the arc angel needed to calculate the spacing in a circular pattern. I am trying to do the following.

I have a fixed diameter rebar cage and it needs a lot of vertical rebar for a design, for this particular design, I will need 2 rebar rings (one inside of each other). The spacing is the concern as it is required to allow for concrete to flow properly. So, the following is what I intend to iterate:

1. I want to have a maximum of 4inch of spacing between the bars in a circular pattern
2. I want to know how many bars will fit into the outside ring
3. If all of the bars fit, then only 1 ring is required
4. If only some of the bars fit with the 4 inch spacing, then go on to design and iterate for the inside ring (of a smaller diameter than the outside ring)

Just for reference, the outside cage would be 36 bars in a 96in cage = f(36) = ((sin(360deg/36))*radius of cage)-diameter of rebar = 6.099 inches and the inside ring will be 32 bars in a 84in cage at 5.937 inches.

I am trying to set up the sheet to automate this process and eliminate the iterations in excel and/or hand calcs.

RE: While loop help

Quote:

The sin (360/x) should give me the arc angel needed to calculate the spacing in a circular pattern. I am trying to do the following.

Mathcad defaults to radians, not degrees, hence the question.

You've not answered the other issues

TTFN (ta ta for now)
I can do absolutely anything. I'm an expert! https://www.youtube.com/watch?v=BKorP55Aqvg
FAQ731-376: Eng-Tips.com Forum Policies forum1529: Translation Assistance for Engineers Entire Forum list http://www.eng-tips.com/forumlist.cfm

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! Already a Member? Login


Resources

Low-Volume Rapid Injection Molding With 3D Printed Molds
Learn methods and guidelines for using stereolithography (SLA) 3D printed molds in the injection molding process to lower costs and lead time. Discover how this hybrid manufacturing process enables on-demand mold fabrication to quickly produce small batches of thermoplastic parts. Download Now
Design for Additive Manufacturing (DfAM)
Examine how the principles of DfAM upend many of the long-standing rules around manufacturability - allowing engineers and designers to place a part’s function at the center of their design considerations. Download Now
Taking Control of Engineering Documents
This ebook covers tips for creating and managing workflows, security best practices and protection of intellectual property, Cloud vs. on-premise software solutions, CAD file management, compliance, and more. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close