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

Solving "layered" equations for a single variable

  • October 10, 2013
  • 2 replies
  • 2776 views

I'll start off by saying I'm new to MathCAD, and I'm pretty sure this is just a matter of discovering the proper syntax.

I am trying to solve a fluid flow problem where the flow splits through two paths, of different lengths and diameters.

My process goes like this:

  1. define required dimensions, flow characteristics, and fluid properties
  2. calculate simple parameters
  3. guess one parameter (V2)
  4. solve for multiple parameters based on initial guess of V2
  5. satisfy a relationship between pressure drops by iterating on V2

The problem, I think, is that V2 shows up on multiple "levels" in my pressure drop equations.

If Pd2 is a function of V2, and a function of f2

and f2 is a function of R2

and R2 is a function of V2

How do I write this out? Pd2(V2,f2(R2(V2))):= ...

Do I have to spell out the whole chain every time I refer to f2?

Do insead have to replace f2 in my Pd2 equation with an expression that is only in terms of V2?

I attached the file for an easier read. Currently it doesn't tell me there is an error, which bugs me.

Thanks

Best answer by RichardJ

You can create functions with arguments that are function names, but it's not what you want to do. Carry the name of the variable of interest through, not chains of function names.

2 replies

RichardJ19-TanzaniteAnswer
19-Tanzanite
October 10, 2013

You can create functions with arguments that are function names, but it's not what you want to do. Carry the name of the variable of interest through, not chains of function names.

25-Diamond I
October 10, 2013

The function you defined are actually all just dependend of the velocity V2.

If you change that accordingly, a solve block will work OK

See attached.

25-Diamond I
October 10, 2013

So I was too late 😉

I hadn't even realized that f1 and f2 would be the same function.

19-Tanzanite
October 10, 2013

I get to slip one past you ocasionally