Get Help

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Community
- :
- PTC Mathcad
- :
- PTC Mathcad
- :
- Solve equation with variables of different units

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

01-27-2015
07:47 PM

01-27-2015
07:47 PM

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

Solved! Go to Solution.

Labels:

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

01-27-2015
10:14 PM

19 REPLIES 19

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

01-27-2015
08:25 PM

01-27-2015
08:25 PM

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

... ???

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

01-27-2015
08:57 PM

01-27-2015
08:57 PM

Re: Solve equation with variables of different units

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

01-27-2015
09:09 PM

01-27-2015
09:09 PM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

01-27-2015
09:33 PM

01-27-2015
09:33 PM

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.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

01-27-2015
09:40 PM

01-27-2015
09:40 PM

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.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

01-27-2015
09:56 PM

01-27-2015
09:56 PM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

01-27-2015
10:02 PM

01-27-2015
10:02 PM

Re: Solve equation with variables of different units

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

01-27-2015
10:14 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

01-27-2015
10:44 PM

01-27-2015
10:44 PM

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

Top Tags