×
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

Iterative Calculations??

Iterative Calculations??

Iterative Calculations??

(OP)
Take a look at the attached worksheet.  The only two values changing are highlighted.  To solve this problem takes an iterative process.  First guessing the first highlighted value and back-checking against the second highlighted value.  The solution occurs at the point where the two values are equal.  I know there has to be a way to automate this.

Can anyone help me?

RE: Iterative Calculations??

I'd try a Solve block.

RE: Iterative Calculations??

Use Solve Block.  It does the iteration and solving for you.  You can also define the result of the Find() as a function of the other parameters, allowing you to vary those other parameters iteratively.

TTFN

FAQ731-376: Eng-Tips.com Forum Policies

RE: Iterative Calculations??

(OP)
Thanks for the response guys.  The solve block doesn't work.  At least, I can't figure out how to get it to work.  I've tried everything short of re-writing the worksheet.  The problem with using a solve block is that all non-iterative elements have to be located above the Given statement.  

More questions:
Since I created an ~11 step calculation loop, does that mena I have to "Find" all 11 values (i.e. Find(a,b,c,d,e,f,g...)?  Is there an easier way to repeat the calcuation loop and minimize the error between the two highlighted values?

I appreciate the input.

RE: Iterative Calculations??

You may have to rewrite your sheet so that you are not trying to solve equations written such that they facilitate "hand" guessing and iteration.  It looks like you have found this out.  Try experimenting with your equations.  You may be able to format (rewrite, simplify, express in different terms, etc.) them in a way that is conducive to using the solving functions in Mathcad.

RE: Iterative Calculations??

What are you trying to do?  It looks like you know how to use the interp function to find Htotal as a function of Q.  Just looking at Data.Cameron I can see the head for 2464 is going to be about 10.5 not 6.958. For QN=1149 I get the same answer Hn=2.341

Are you asking how to calculate the coefficients for
HN=c0+c1*QN+c2*QN^2+c3*QN^3
?
What are you iterating and changing?


 




RE: Iterative Calculations??

(OP)
I trying to solve for Head (hTotal and Ht are in essence the same thing).  I start by taking a guess at hTotal and going thru several steps to solve for Ht.  The exact solution occurs when hTotal = Ht.

RE: Iterative Calculations??

The point is that you need remove ALL the iteration stuff you were trying to do and simply write the equation for the equality that you want as if you had the correct value.  Replace the "=" with <ctrl>= and place between Given and Find.  Assign a guess value before Given.

That's all you need to do.

TTFN

FAQ731-376: Eng-Tips.com Forum Policies

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