Rank: Newbie
Groups: Registered
Joined: 01/03/2021(UTC) Posts: 3 Location: Kassel
|
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 (3kb) downloaded 8 time(s). Problems with units.pdf (96kb) downloaded 16 time(s).
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 23/07/2013(UTC) Posts: 1,126 Was thanked: 507 time(s) in 338 post(s)
|
Originally Posted by: ibruethsch 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 (5kb) downloaded 5 time(s).
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 01/03/2021(UTC) Posts: 3 Location: Kassel
|
@overlord thanks a lot
Adding the units (E.cm+E.c0m)*'MN/{'m^2} was the thing I missed.
Bernd
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 02/04/2018(UTC) Posts: 135 Was thanked: 22 time(s) in 19 post(s)
|
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.
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 01/03/2021(UTC) Posts: 3 Location: Kassel
|
@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
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 28/08/2014(UTC) Posts: 1,356 Was thanked: 815 time(s) in 516 post(s)
|
Originally Posted by: ibruethsch @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: Best regards. Alvaro.
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.