Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Iterative Calculations??

Status
Not open for further replies.

waste3

Civil/Environmental
Dec 7, 2007
3
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?
 
Replies continue below

Recommended for you

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
 
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.
 
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.
 
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?







 
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.
 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor