Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline studoc  
#1 Posted : 29 November 2017 04:07:29(UTC)
studoc


Rank: Member

Groups: Registered
Joined: 13/05/2011(UTC)
Posts: 17
Location: coolum bch, Australia

Hi,

I am a bottom feeder here: as an engineer I don't do any high flying maths, I just use Smath for repetitive calculations and as a means to set out calcs in a legible manner. As in this case, where I will be needing to discuss a problem with a colleague.

So, I have assessed a loading in a simple calculation and then, for the purposes of future calculations, wanted to ascribe units to the result.

These units happen to be kN (kiloNewtons).

At the end of my result (checked by hand as being correct) I enable the dynamic units assistant, start typing and there it is: "kN", being careful not to select knots, i hit the TAB button to insert.
I see the blue italic of kN in place and hit enter to exit the placeholder, then Smath goes rogue…
It rounds my result and gives it's own interpretation of kN…

Unfortunately for me, I did not want my result rounded and for me, a kN is a kN is a kN….

This has frustrated me in the past, wherein I shake my fist at god and just type the units as text, but is there a way of getting the logical result I was looking for in the first place….??

cheers,

Stuart

rogue units.tiff (9kb) downloaded 23 time(s).

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline Davide Carpi  
#2 Posted : 29 November 2017 05:09:31(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,647
Man
Italy
Location: Italy

Was thanked: 1329 time(s) in 875 post(s)
Hello Stuart,

First of all, seems you are running an outdated (and buggy) version of SS (0.98.6179 probably); my suggestion is to switch ASAP to the latest stable version.

SMath provides a dimension consistency check when you type a custom unit in the units' placeholder, therefore when you try to modify the unit of a dimensionless number to something, the inverse multiplies your unit to have the right dimension; in your SS it is obviously buggy because Pascal isn't the inverse dimension of kN (pressure vs force). With latest stable or nighty build you should see:

2017-11-29 03_16_21-SMath Studio 0.98.6484 - [Bad Unit Correction.sm_].png

If your intent is just to display an unit for dimensionles values, thee are several other ways:

2017-11-29 03_13_45-SMath Studio 0.98.6484 - [Bad Unit Correction.sm_].png


Or even you can use the units in the definition of G.s ("globally" for the whole variable or "locally" for each term inside it).

2017-11-29 03_19_49-SMath Studio 0.98.6484 - [Bad Unit Correction.sm_].png

Edited by user 29 November 2017 05:51:51(UTC)  | Reason: Not specified

If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
thanks 2 users thanked Davide Carpi for this useful post.
on 29/11/2017(UTC),  on 30/11/2017(UTC)
Offline studoc  
#3 Posted : 30 November 2017 03:09:01(UTC)
studoc


Rank: Member

Groups: Registered
Joined: 13/05/2011(UTC)
Posts: 17
Location: coolum bch, Australia

Thanks Davide, that's terrific…!

Take the rest off the day off….!
Offline studoc  
#4 Posted : 04 December 2017 03:55:11(UTC)
studoc


Rank: Member

Groups: Registered
Joined: 13/05/2011(UTC)
Posts: 17
Location: coolum bch, Australia

For anyone that is still watching…

I liked the principle of the, "modified unit in the unit placeholder" (hopefully shown attached…) mod unit.tiff (11kb) downloaded 22 time(s).

This got my most of the way there, but area has been a problem for me ever since I started using Smath..
The units tool has a sub category: "area", but unfortunately area is treated as acres, hectares and the like, so you won't find m^2 or mm^2…

I applied the "modified unit in the unit placeholder" principle to my sheet, but Smath seemed to reject this, see the red box in the attached image and the resulting dimensionless result for my area calc… area.tiff (6kb) downloaded 17 time(s).

Why would this be…..?

(I would add that "D" was entered as a dimensionless number, as it ascribing metres as units become cumbersome in matrix algebra, so was deleted..)


Stuart.
Offline mkraska  
#5 Posted : 04 December 2017 10:45:36(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,986
Germany

Was thanked: 1124 time(s) in 721 post(s)
You can only assign to names, variables or functions, not to expressions. 'm^2 is an expression. Assignment to vector or list elements is an exception to this rule, because strictly speaking, indexing is also an operation.

The unit system only defines units, which are pure names, not expressions. If you want the result in 'm^2 you have to type just this in the placeholder.

Indeed matrices with entries of different dimension/unit aren't easy to handle. Some options to mitigate this, are:

- use individual vectors for what would otherwise be the column of a table.
- most matrix functions can handle units very well. Please give an example of what doesn't work as expected
- normalize entries by some arbitrary unit. This approach is used in the example BeamFEA
- the symbolic (CAS) plugins for Maxima and Maple can handle units.

2017-12-04 08_42_14-BeamFEA - SMath Studio in the Cloud.png
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
Offline studoc  
#6 Posted : 12 December 2017 10:09:24(UTC)
studoc


Rank: Member

Groups: Registered
Joined: 13/05/2011(UTC)
Posts: 17
Location: coolum bch, Australia

Okay.. thanks....

No SI units for area... got it..

I'll just continue to type them in..
Users browsing this topic
Guest
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.