cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Solve equation with variables of different units

SOLVED
BPP
Regular Member

Solve equation with variables of different units

I find myself trying to solve a set of equations, which are a function of two variables (P2 and D), with different units (psi and pulg), whose values I intend to find out.

How I can deal with this problem?

Thank in advance

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Solve equation with variables of different units

Here are two different approaches.

19 REPLIES 19

Re: Solve equation with variables of different units

Bryan Pérez Pérez wrote:

I find myself trying to solve a set of equations, which are a function of two variables (P2 and D), with different units (psi and pulg), whose values I intend to find out.

How I can deal with this problem?

You deal with this problem exactly as you had done, but ...

... you haven't defined variable f

... you used function L.e with just one argument while ther should be two

... you have a unit mismatch in your first inequation (left side Re(D) is dimensionless, right side is in/psi) guess it should be P.2 instead of D on the RHS

... ???

Re: Solve equation with variables of different units

IMAGEN.png

I made the correction of the inequality, but still can not solve the problem

Re: Solve equation with variables of different units

Bryan Pérez Pérez wrote:

I made the correction of the inequality, but still can not solve the problem

There are still my other two points missing.

1) You used your own function L.e wrong in the second equation of the sove block (argument D is missing)

2) f is missing. You cant't expect it to be calculated from the first equation unless you

a) provide an explicit function f(D,P.2):= ... or

b) you include f in the list of variables Mathcad should solve for - then you have to provide a guess value

Re: Solve equation with variables of different units

At last I found the mistake of Le (P2, D).

About provide explicit function f (P2, D), the truth could not do, because for the calculations the value of this variable is calculated by iteration of equation I use in the calculations.

Re: Solve equation with variables of different units

Bryan Pérez Pérez wrote:

At last I found the mistake of Le (P2, D).

About provide explicit function f (P2, D), the truth could not do, because for the calculations the value of this variable is calculated by iteration of equation I use in the calculations.

Sure you can define a function f(D) which calculates the value of f for any given value of D!

As f is inside and outside of the logarithm you won't find an analytic function but will have to define a numerical one to do the job (a small solve block turned into a function of D).

Your solution will not be unique because you have one equation less than variables to solve for and two inequality constraints.

Another problem: If you insist on the second inequality you will not get a solution near your guess values. Try instead 1000 psi and 20 in.

Re: Solve equation with variables of different units

The truth do not quite understand how, appreciate if you could give me an example on the attached sheet about defining f

BPP
Regular Member
(in response to BPP)

Re: Solve equation with variables of different units

My apologies for being so slow, I could finally get it, thanks for everything Werner

Re: Solve equation with variables of different units

Here are two different approaches.

Re: Solve equation with variables of different units

With your instructions, I managed to solve the problem, in the same way that your first approach.

Again, thank you very much Werner