Units autocorrection is wrong

Units autocorrection is wrong - MN/m2 - 消息

#1 已发布: 2021/3/5 17:03:11
ibruethsch

ibruethsch

0个赞,共3个帖子。

组: User

Hello
I’m a beginner with Smath.
Very powerful tool – thanks to the inventor.
I have problem with the units.
Very simple example

What to do that the result is 52500 MN/m2
Any help is appreciated.
Bernd

MNprom2.sm (2.97 KiB)已下载 1223 次。
Problems with units.pdf (95.11 KiB)已下载 802 次。
#2 已发布: 2021/3/5 18:05:02
overlord

overlord

600个赞,共1,381个帖子。

组: Moderator

Wrote

Hello
I’m a beginner with Smath.
Very powerful tool – thanks to the inventor.
I have problem with the units.
Very simple example

What to do that the result is 52500 MN/m2
Any help is appreciated.
Bernd



You are adding two unitless variable and expect result with unit, which makes no sense.
Either multiply addition with unit; or assign units to variables in first place.

Regards

MNprom2_units.sm (4.83 KiB)已下载 1227 次。

2021-03-06_00-01.png
#3 已发布: 2021/3/6 06:01:36
ibruethsch

ibruethsch

0个赞,共3个帖子。

组: User

@overlord
thanks a lot

Adding the units
(E.cm+E.c0m)*'MN/{'m^2}
was the thing I missed.

Bernd
#4 已发布: 2021/3/11 17:49:17
⠀

⠀

26个赞,共155个帖子。

组: User

I would recommend assigning units to individual variables, that way you can check equation logic with the units you get automatically. If the units are wrong, then something is wrong in the formula logic.
The default units shown in the result might be different than what you want, but you can modify it to the units you want to see and the numerical value is automatically updated.

Sometimes you might need to use a value with units in an unitless way (as a factor), for this just divide out the units before the calculation so that you keep your numerical value.
#5 已发布: 2021/3/12 06:02:34
ibruethsch

ibruethsch

0个赞,共3个帖子。

组: User

@Wb.c Thanks a lot

I Tried the following:

KiN:'KN
Flä:'m^2
Force:100*KiN
A:10*Flä
Press:Force/A=10*'KN/{'m^2}

That looks the way I want.


>>If the units are wrong, then something is wrong in the formula logic.<<
I double that. I appreciate the unit-feature in SMATH.

Bernd
#6 已发布: 2021/3/12 12:55:31
Alvaro

Alvaro

1,139个赞,共1,805个帖子。

组: User

Wrote

@Wb.c Thanks a lot

I Tried the following:

KiN:'KN
Flä:'m^2
Force:100*KiN
A:10*Flä
Press:Force/A=10*'KN/{'m^2}

That looks the way I want.


>>If the units are wrong, then something is wrong in the formula logic.<<
I double that. I appreciate the unit-feature in SMATH.

Bernd



Hi. I'm not sure if this comment helps or not, but it's confusing to me the way that you introduce KiN. Notice that 10^3 newtons are 'kN in SMath and 'KN it's "undefined", even it can be used as unit.

Also you introduce another unit, or something like that, as Flä.

If you want to show your result as kN/m^2 or kN/Flä the usual way in SMath is using the "unit placeholder" at the right end after the evaluation with equal:

Clipboard01.jpg

Best regards.
Alvaro.
  • 有新帖
  • 无新帖