Skip to main content
1-Visitor
October 29, 2013
Solved

Running the same mathcad file with different input value (mathcad15)

  • October 29, 2013
  • 1 reply
  • 5512 views

Hi all,

I am new here and a bit of a mathcad newbie. I taught myself how to use it by trial and error and googling which is probably not the best way to go about things.

I have written a mathcad file which calculates the flowrate of gas through an orrifice by simply inputting 1 value which is the depth.

This works fine as i can pick any depth i want and get the desired flowrate, however i would like the calculation to the give me the flowrate over a range of depths i.e 10,20,30,40....350 meters.

I can use a single colum matrix with multiple rows however my calculation starts to trip up when it encounters the if statement for each of these values.

The calculation works flawlessly if i input 1 depth, however for multiple depths it has this problem. Any help would be greatly appreciated

Simon

part+1.JPGpart+2.JPG

part+3.JPG

Best answer by Werner_E

Thanks Andy for spotting that.

I had ignored al calculation above 1)..

Have changed parameter name from d to dp so it is not confused with the orifice diameter (ther was not problem with that, though) and attached some plots which may help to decide the correctness of he results.

1 reply

25-Diamond I
October 29, 2013

We can't debug a picture, so pelase post the file.

It seems you should turn your calculations inti s function dependend on depth which you then call with a vector as parameter (and probably you should vectorize the function call).

For a quick hack it may help to vectorize the calculation of Q.

1-Visitor
October 29, 2013

sorry, file posted now. I left it as a working file with 1 depth input

thanks

Simon

25-Diamond I
October 29, 2013

Would the attched file help?

BTW - Mathcad can work with units and you may even define your own. Why don't you use that feature? Much less cumbersome than adding the units manually in textboxes.