Get Help

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
- :
- Mathcad 15 gets confused when solving equations wi...

Options

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

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

Showing results for

Highlighted

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

06-02-2013
12:45 PM

06-02-2013
12:45 PM

Why is it that mathcad is having trouble solving with units? Normally when I want to make a calculation with alot of units, it is no problem, or if I solve the equation my self and then hit the equal sign, there are no problems.

But when i use the solve or given/find function I will have to copypaste the result, remove alle the units, and then it works? It is like it gets confused with all the units

Solved! Go to Solution.

Labels:

1 ACCEPTED SOLUTION

Accepted Solutions

Highlighted

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

06-02-2013
04:00 PM

06-02-2013
04:00 PM

Humptey Dumptey wrote:

I can write my equation, goto symbolics>variables>solve, and then it rewrites the expression below.

IMHO thats not the best method using the symbolics as what you do is a static evaluation. Changing the input equations won't change the result and you will have to do a lot of copy and paste which is rather failure prone and does not result in a universally useable worksheet. Better to use the dynamic evaluation.

The symbolic processor does not know anything about units, it treats them as unknown variables. If you follow the symbolic evaluation by a numeric one (the equal sign), the numeric processor will take care of the units, cancel them or whatever will be necessary. You can do this on the result of the dynamic symbolic evaluation (the one with the arrow) as well, but there may be better methods.

Attach you worksheet (upper right, chose "use advanced editor") to let us see your equations.

10 REPLIES 10

Highlighted
##

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

06-02-2013
02:59 PM

06-02-2013
02:59 PM

Re: Mathcad 15 gets confused when solving equations with units in them.

Do you use the symbolic "solve" or are you talking about the numeric solve-block using "find".

Unfortunately both may have their problems with units but if you post your worksheet there may be a workaround which at least does not utilize copy and paste.

On possible cause may be that your solution vector contains values with different units which is a no go for Mathcad 15 and below. In that case usually there is an easy way out, though.

Highlighted
##

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

06-02-2013
03:03 PM

06-02-2013
03:03 PM

Re: Mathcad 15 gets confused when solving equations with units in them.

I can write my equation, goto symbolics>variables>solve, and then it rewrites the expression below. If I i do the equal sign on that new expression it works fines with units.

But if i just use the solve button in the "symbolic" window so it looks like "solve,x->" it is not happy with units. Also if I do the given/find it will not calculate.

Highlighted

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

06-02-2013
04:00 PM

06-02-2013
04:00 PM

Humptey Dumptey wrote:

I can write my equation, goto symbolics>variables>solve, and then it rewrites the expression below.

IMHO thats not the best method using the symbolics as what you do is a static evaluation. Changing the input equations won't change the result and you will have to do a lot of copy and paste which is rather failure prone and does not result in a universally useable worksheet. Better to use the dynamic evaluation.

The symbolic processor does not know anything about units, it treats them as unknown variables. If you follow the symbolic evaluation by a numeric one (the equal sign), the numeric processor will take care of the units, cancel them or whatever will be necessary. You can do this on the result of the dynamic symbolic evaluation (the one with the arrow) as well, but there may be better methods.

Attach you worksheet (upper right, chose "use advanced editor") to let us see your equations.

Highlighted
##

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

06-02-2013
05:08 PM

06-02-2013
05:08 PM

Re: Mathcad 15 gets confused when solving equations with units in them.

Worksheet too messy.

I found out. I had to redefine a definition. If I do a calculation that should give an enthalpy (kJ/kg), it writes the units as m^2/s^2(Whatever that is), instead of kJ/kg, so I have to correct it with ((1000*J)/kg) every time and also, it doesn't know what kilo Joule is (Argh!)

And yes I know that i can make equal sign after the result to get a more usable result

Highlighted
##

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

06-02-2013
05:40 PM

06-02-2013
05:40 PM

Re: Mathcad 15 gets confused when solving equations with units in them.

writes the units as m^2/s^2(Whatever that is), instead of kJ/kg,

SI-Units! Mathcad is correct in that respect

it doesn't know what kilo Joule is (Argh!)

Yes, but its very easy to overcome. Just define 1kJ:=1000J on top of your sheet. You may collect all such vital definitions and assumptions in a collapsed area and use it as a template.

Highlighted
##

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

06-02-2013
05:44 PM

06-02-2013
05:44 PM

Re: Mathcad 15 gets confused when solving equations with units in them.

How is J/kg m^2/s^2 ?

Thank you! I will try experimenting with that collapsed area thing. never used it before, but it is also smart when calculating with vectors in polar form, because you need to make polar definitions.

Then what about "ton" a ton is not 1000 kg if you ask mathcad

Highlighted
##

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

06-02-2013
06:22 PM

06-02-2013
06:22 PM

Re: Mathcad 15 gets confused when solving equations with units in them.

How is J/kg m^2/s^2 ?

Joule is not a SI base unit. In terms of base units we have 1 J = 1 kg * m^2 /s^2. Look it up in the books.

Then what about "ton" a ton is not 1000 kg if you ask mathcad

What you have in mind is a metric ton, thats "tonne" in Mathcad.

In localized versions of Mathcad its even simply "t", which is nice, as thats the usual abbrevation, but only on first look, as it would mean you cannot use t in a quickplot and get problems with laplace on some occasions. Same for seconds, which shortens from sec to s. Thats one of the reasons I use my Mathcad in the english flavor.

The "ton" you stumbled across is the US ton which is 2000 pounds (1 ton = 2000 lb) [short ton].

There are a some of other definitions of what a ton could be, e.g. 1 UK ton = 2240 pounds [long ton], which, AFAIK are not implemented in MC.

Highlighted
##

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

06-02-2013
06:26 PM

06-02-2013
06:26 PM

Re: Mathcad 15 gets confused when solving equations with units in them.

Ah that is the reason. Okay.

Is there a way to throw all those American units etc. away, and define new units? Like redefine "ton" as 1000 kg?

Highlighted
##

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

06-02-2013
06:36 PM

06-02-2013
06:36 PM

Re: Mathcad 15 gets confused when solving equations with units in them.

Is there a way to throw all those American units etc. away, and define new units? Like redefine "ton" as 1000 kg?

Easiest way would be as outlined for kJ. Simply redefine it the "normal" way.

If you want different base units, you can change that by going to Tools/Worksheet Options/UnitSystem. If you want it for every worksheet you create in the future, you will have to load the template file normal.mct and change it there.

You may want to search this forum for "custom units" for some discussions abou the pros and cons of doing so.

Highlighted
##

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

06-02-2013
06:48 PM

06-02-2013
06:48 PM

Re: Mathcad 15 gets confused when solving equations with units in them.

Thank you very much.