[SS-2368] Unit behavior - units don't match issue

[SS-2368] Unit behavior - units don't match issue - Reciprocal units don't match when reciprocated - Сообщения

#1 Опубликовано: 05.08.2016 20:19:36
fred47

fred47

0 сообщений из 1 понравились пользователям.

Группа: User

Hi,

I have run into a problem with using units which are reciprocals - specifically Ohms and Siemens.

If I try to add a quantity with units Ohms to the reciprocal of a quantity with units Siemens, an error occurs: Units don't match.

Due to computer limitations where I am presently, I have only text entry.

Example:

Ra := 1 Ohm
Ga := 1 S
Rsum := Ra + 1/Ga = "units don't match"

But they do cancel:

Rprod := Ra * Ga = 1

Is there a work-around I'm missing somehow?

Thanks,
Fred
#2 Опубликовано: 06.08.2016 10:20:10
Davide Carpi

Davide Carpi

1416 сообщений из 2873 понравились пользователям.

Группа: Moderator

Hello Fred,

it is a bug; as workaround you can transit through a 3rd variable with symbolic optimization on his definition, then it is possible to evaluate numerically this variable in a separate region (see the cloud example)

2016-08-06 15_21_29-SMath Studio Desktop - [OhmSiemens.sm_].png
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#3 Опубликовано: 18.08.2016 05:45:41
nierges

nierges

0 сообщений из 3 понравились пользователям.

Группа: User

Hi,

I was trying to implement a formula to calculate needed inductance on a flyback transformer and the program reports that units do not match. However splitting the formula in smaller pieces I was able to get the result out of it.
units dont match.sm (34 КиБ) скачан 59 раз(а).

Thank you.
#4 Опубликовано: 18.08.2016 05:53:04
Davide Carpi

Davide Carpi

1416 сообщений из 2873 понравились пользователям.

Группа: Moderator

It is the same bug as the one shown in the first post, so I moved your post here.

The problem is related to the numeric evaluation, but there is a workaround:
- remove the RHS (the evaluation = and all after it)
- change optimization to symbolical
- show the result alone (Lp=#)


Bug reported as SS-2368
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
1 пользователям понравился этот пост
nierges 19.08.2016 05:10:00
#5 Опубликовано: 19.08.2016 05:11:59
nierges

nierges

0 сообщений из 3 понравились пользователям.

Группа: User

Wrote

It is the same bug as the one shown in the first post, so I moved your post here.

The problem is related to the numeric evaluation, but there is a workaround:
- remove the RHS (the evaluation = and all after it)
- change optimization to symbolical
- show the result alone (Lp=#)


Bug reported as SS-2368



Thank you Davide, seems to work following your advice.
Emil
#6 Опубликовано: 19.08.2016 12:07:49
Andrey Ivashov

Andrey Ivashov

2269 сообщений из 3734 понравились пользователям.

Группа: Super Administrator

Both issues fixed. See latest available nightly build: http://en.smath.info/forum/yaf_postst7698_SMath-Studio-0-98-6073--19-August-2016.aspx
1 пользователям понравился этот пост
Davide Carpi 19.08.2016 20:35:00
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений