Units autocorrection is wrong

Units autocorrection is wrong - MN/m2 - Messages

#1 Posted: 3/5/2021 5:03:11 PM
ibruethsch

ibruethsch

0 likes in 3 posts.

Group: 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 KiB) downloaded 30 time(s).
Problems with units.pdf (95 KiB) downloaded 37 time(s).
#2 Posted: 3/5/2021 6:05:02 PM
overlord

overlord

552 likes in 1332 posts.

Group: 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 KiB) downloaded 18 time(s).

2021-03-06_00-01.png
#3 Posted: 3/6/2021 6:01:36 AM
ibruethsch

ibruethsch

0 likes in 3 posts.

Group: User

@overlord
thanks a lot

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

Bernd
#4 Posted: 3/11/2021 5:49:17 PM
Wesly Centerwall

Wesly Centerwall

26 likes in 156 posts.

Group: 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 Posted: 3/12/2021 6:02:34 AM
ibruethsch

ibruethsch

0 likes in 3 posts.

Group: 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 Posted: 3/12/2021 12:55:31 PM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1674 posts.

Group: 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.
  • New Posts New Posts
  • No New Posts No New Posts