Problem with units...

Problem with units... - Messages

#1 Posted: 2/2/2017 9:46:35 PM
JJTTBB

JJTTBB

0 likes in 5 posts.

Group: User

problem.sm (4 KiB) downloaded 74 time(s).

Why do I see the message that units don't match?
#2 Posted: 2/3/2017 6:37:30 AM
JJTTBB

JJTTBB

0 likes in 5 posts.

Group: User

Thank you very much for the file... However, I don't understand what to do... and I don't understand why I have to write at a random place the unit I want to use.
Let me explain please.
What I need to do is writing text and equations and results and some pictures maybe...like if I was using WORD or a DTP application. So, I can't just write text, units, formulas etc... here and there, it has to be nice and organized. Please have a look at the attachment.

So, the BIG question is this! : Do you think SMath is the right tool for this? Is it ready for - at least basic- document editing like the one I am trying to do?


I don't think that using areas will do the work.

I opened the file you sent. Ending the formula with mPa doesn't help... Everything is in kN/m and when I type "=" it turns to MPa... this is not correct and this is certainly not convinient.

I prepared a second file to show you what I mean...


File not found.File not found.
#3 Posted: 2/3/2017 7:09:34 AM
Davide Carpi

Davide Carpi

1416 likes in 2873 posts.

Group: Moderator

In general you should define a method to do your calculations and follow it in the whole worksheet;

  • with units:

    2017-02-03 11_02_13-SMath Studio - [problem.sm_].png

    Units are part of the calculations, illegal operations will be noticed (f.e. if you try to sum dimensionless values with values having a unit)


  • full dimensionless:

    2017-02-03 11_11_50-SMath Studio - [problem.sm_].png

    Units are given as separate regions, only for reader's convenience (units not involved in calculations -> no units' checks)


  • dimensionless with units given in results (like previous + Ignore units feature):

    2017-02-03 11_03_10-SMath Studio - [problem.sm_].png

    Units are given in result placeholder, only for reader's convenience (units not involved in calculations -> no units' checks); please notice that in 1st and 4th definitions the result is shown even if no calculations are involved; this is to insert the units in the result)




The 3rd is what you were tying to do in your worksheet, but you have assigned an unit to a variable, mixing with the 1st method; currently "ignore units" is a feature that works only if units are given in place (in the region in which you enable the feature). As you can see in the screenshot, you can make it working if you assign the variable to the result (not to the variable itself).


Wrote

I opened the file you sent. Ending the formula with mPa doesn't help... Everything is in kN/m and when I type "=" it turns to MPa... this is not correct and this is certainly not convinient.


Results by design are given in base units ('m*'Pa in this case); just type the ones more appropriate for the context in the rightmost placeholder.

If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#4 Posted: 2/3/2017 7:56:36 AM
JJTTBB

JJTTBB

0 likes in 5 posts.

Group: User

Thank you for your quick answer. However, I would appreciate if I could get an answer on why Smath transformed kN/m to MPa since it is not correct...Because units are a good way to check if calculations are correct.

#5 Posted: 2/3/2017 8:47:33 AM
Davide Carpi

Davide Carpi

1416 likes in 2873 posts.

Group: Moderator

Wrote

Thank you for your quick answer. However, I would appreciate if I could get an answer on why Smath transformed kN/m to MPa since it is not correct...Because units are a good way to check if calculations are correct.



You're welcome

This is by design; units are stored in base units to perform calculations and returned in results as base units.

Result units might be not appropriate depending on the context, but are dimensionally correct (in fact you can change it without further corrections by the program's core).

In latest worksheet you posted above there are m, cm, mm; if they meets inside an equation, what should be the correct unit to give in result for lengths? And if you multiply a force for a length you are looking for the torque (force x distance -> kN*m, f.e.) or for the work (force x displacement -> J, f.e.)? The choosen behavior should be the same in any part of the worksheet?

These are only examples, you might imagine that this can be extended to many more cases. The program must be the more generic as possible, this approach solve these issues (the cost is that you might have to force the output unit)

However there is a feature request to have default output units (you can vote and make suggestions here: SS-1).
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#6 Posted: 2/3/2017 8:50:59 AM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

Wrote


  • dimensionless with units given in results (like previous + Ignore units feature):

    2017-02-03 11_03_10-SMath Studio - [problem.sm_].png



  • I had no idea what the context menu item "ignore units" was good for. Now I know: You can write statements like 1=1m. What is the reader supposed to think about it? Does it mean m=1?

    I strictly recommend to stick with units as tightly as possible using the first version described by Davide above.
    Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
    1 users liked this post
    Davide Carpi 2/3/2017 8:55:00 AM
    #7 Posted: 2/3/2017 8:53:32 AM
    Martin Kraska

    Martin Kraska

    1222 likes in 2150 posts.

    Group: Moderator

    Wrote

    However, I would appreciate if I could get an answer on why Smath transformed kN/m to MPa since it is not correct...Because units are a good way to check if calculations are correct.



    Indeed, kN/m is not MPa, could you please show a minimum working example, where this happens?
    Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
    #8 Posted: 2/3/2017 8:58:07 AM
    Davide Carpi

    Davide Carpi

    1416 likes in 2873 posts.

    Group: Moderator

    Wrote

    Indeed, kN/m is not MPa, could you please show a minimum working example, where this happens?



    m*Pa, I guess was a typo in his post

    2017-02-03 12_57_37-SMath Studio - [problem(1).sm].png
    If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
    #9 Posted: 2/3/2017 9:01:44 AM
    MSL

    MSL

    1 likes in 22 posts.

    Group: User

    Dear JJTTBB

    The Newton(N) is the unit of the force, and the Pascal(Pa) is the unit of the pressure.
    The pressure (Pa)is the force(N) per area(m^2).
    Please, refer to the attached file.

    MSFile not found.File not found.
    #10 Posted: 2/3/2017 9:14:28 AM
    JJTTBB

    JJTTBB

    0 likes in 5 posts.

    Group: User

    Thank you all for such a quick response...

    @Novice: Yes... I understand what you show me but it is not right to have multiple units for the same thing... because "G" will be used again probably 1-2 pages later... Also, it is not correct for the reader.
    #11 Posted: 2/3/2017 11:10:10 AM
    Jean Giraud

    Jean Giraud

    983 likes in 6866 posts.

    Group: User

    Wrote

    I don't understand why I have to write at a random place the unit I want to use.



    Your question has TWO answers:

    Unit kN.bmp

    #12 Posted: 2/13/2017 9:50:56 AM
    Lyster

    Lyster

    0 likes in 1 posts.

    Group: User

    I get this error as well. I have attempted to refine the units and you'll see that I have broken the offending equation into it's component parts and resolved each half separately, which it does fine. It's only when I join them back together again I get the error...
    I'm new to this particular program but have used Mathcad alot so just not sure if I'm doing something wrong or misunderstanding the capabilities of this program...

    Refer attached.

    FAR36 Noise Assessment.sm (13 KiB) downloaded 31 time(s).

    Units error.png
    #13 Posted: 2/13/2017 10:46:20 AM
    csb531

    csb531

    0 likes in 24 posts.

    Group: User

    Hello Lyster,
    It has something to do with the transition between ºC and Kelvin.
    You can see how Smath "sees" the units if you hoover with your mouse over the definitions / equations.

    I have no solution for you now, but i tried to force smath to give the wanted units, but found an error as it returns the same value in degrees Celsius and degrees Kelvin, see plot:
    Knipsel_C_K.JPG

    I suggest you try to find an answer in one of the topics about degrees Celsius and Kelvin (or Fahrenheit)...

    Sorry I cannot help you more for now..
    #14 Posted: 2/13/2017 6:41:52 PM
    Radovan Omorjan

    Radovan Omorjan

    325 likes in 2052 posts.

    Group: Moderator

    Hello,

    One must be careful with temperature units. SMath (like Mathcad) has defined units for temperature changes. Therefore, use the temperature change unit for DeltaT.ISA.

    Regards,
    Radovan
    When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
    #15 Posted: 2/14/2017 10:48:19 AM
    Martin Kraska

    Martin Kraska

    1222 likes in 2150 posts.

    Group: Moderator

    As Radovan said, don't use non-absolute units for temperature changes. Temperature gradient is change of temperature per distance. If you don't like Kelvin, use Delta°C or friends. See the attached handbook section for temperature units. You find it in the portable distribution under

    Toolbar [?]> Units> Temperature units

    FAR36%20Noise%20Assessment_Kr.sm (13 KiB) downloaded 32 time(s).
    Section units temperature.sm (19 KiB) downloaded 36 time(s).
    2017-02-14 14_38_53.sm_].png
    Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
    • New Posts New Posts
    • No New Posts No New Posts