# Using Solve Block Solutions

Apologies, as I can see from searching that this is a common question, but I'm still in my first week of using Mathcad. I am using the Colebrook White equation to find the friction factor of a pipe. The solver has returned an answer, but I am unable to find how to use this answer in the rest of my worksheet. I have defined my roughness, diameter and reynolds number already - and want to use the friction factor in subsequent formulae.

Mark

• ###### Re: Using Solve Block Solutions

Your solve block is set up incorrectly.

You say you have calculated Reynolds number - then it must be above the Solve block and all other variables used in the Solve block.

Mike

• ###### Re: Using Solve Block Solutions

Right, I'm assuming you want to calculate the friction factor for each Reynolds Numbers (Generating and Pumping), therefore I have turned the solve block into a function so each Reynolds number value can be called.

Mike

• ###### Re: Using Solve Block Solutions

Thanks for your reply Mike. Your solution seems to be working well, but is it possible to calculate separate friction factors for both pumping and generating? I know these will be virtually identical, but it's for a Master's project, so not a real world scenario. Would I need 2 solve blocks to achieve this?

Thanks

Mark

• ###### Re: Using Solve Block Solutions

Just played with it and got it to work with one solve block, many thanks!

• ###### Re: Using Solve Block Solutions

Just played with it and got it to work with one solve block, many thanks!

Mike

• ###### Re: Using Solve Block Solutions

Mike, thanks for your help previously. I have now edited some of the preceding formulae, turning them into matrices to enable a sort of parametric approach. However this has stopped my solve block working. How do I enable my solve block to return an answer in matrix form? I had a look at previous forum posts but was unable to decode the answer!

Mark

• ###### Re: Using Solve Block Solutions

Mark McMullan wrote:

How do I enable my solve block to return an answer in matrix form?

Mark

Use an index (a range variable) to get them automatically calculated one at a time. See attached.

Alan

• ###### Re: Using Solve Block Solutions

Hi Alan, thanks for that. I have tried to apply that logic, and yet again have come across another stumbling block that I can't figure out! The turbine power (Pt) doesn't seem to vary correctly. I would like to alter the reservoir volume (Vru) and the elevation difference (delta_h) and get a 5x5 matrix of the other calculations (such as Pt). That would inform me of the optimal reservoir and head combination. Do you know what I've done wrong?

File attached.

Thanks

Mark

• ###### Re: Using Solve Block Solutions

You need another index!

Alan

• ###### Re: Using Solve Block Solutions

Hero! Nice one, getting the hang of this thing now...Ain't easy to learn!

Thanks

Mark

• ###### Re: Using Solve Block Solutions

Ok, I'm officially cracking up. For some reason it is not able to calculate ff(re_g) anymore. Sorry for all the trouble, do you know of a good tutorial that would get all this straight in my head rather than trial & error, and the help of the people on this forum?!

Mark

• ###### Re: Using Solve Block Solutions

Mark McMullan wrote:

Ok, I'm officially cracking up. For some reason it is not able to calculate ff(re_g) anymore. Sorry for all the trouble, do you know of a good tutorial that would get all this straight in my head rather than trial & error, and the help of the people on this forum?!

Mark

Make ff a function of Dp also - see attached.

Keep going - you'll get there eventually!

Alan