Problem with units...

Problem with units... - Poruke

#1 Objavljeno: 2. 2. 2017. 21:46:35
JJTTBB

JJTTBB

0 svidjanja u 5 postova.

Grupa: User

problem.sm (4,17 KiB) preuzeto 1486 put(ova).

Why do I see the message that units don't match?
#2 Objavljeno: 3. 2. 2017. 06:37:30
JJTTBB

JJTTBB

0 svidjanja u 5 postova.

Grupa: 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...


Fajl nije pronađen.Fajl nije pronađen.
#3 Objavljeno: 3. 2. 2017. 07:09:34
Davide Carpi

Davide Carpi

1.444 svidjanja u 2.936 postova.

Grupa: 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 Objavljeno: 3. 2. 2017. 07:56:36
JJTTBB

JJTTBB

0 svidjanja u 5 postova.

Grupa: 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 Objavljeno: 3. 2. 2017. 08:47:33
Davide Carpi

Davide Carpi

1.444 svidjanja u 2.936 postova.

Grupa: 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 Objavljeno: 3. 2. 2017. 08:50:59
Martin Kraska

Martin Kraska

1.369 svidjanja u 2.283 postova.

Grupa: 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.
    Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
    1 korisnika je svidelo ovu objavu
    Davide Carpi 3. 2. 2017. 08:55:00
    #7 Objavljeno: 3. 2. 2017. 08:53:32
    Martin Kraska

    Martin Kraska

    1.369 svidjanja u 2.283 postova.

    Grupa: 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?
    Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
    #8 Objavljeno: 3. 2. 2017. 08:58:07
    Davide Carpi

    Davide Carpi

    1.444 svidjanja u 2.936 postova.

    Grupa: 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 Objavljeno: 3. 2. 2017. 09:01:44
    MSL

    MSL

    1 svidjanja u 22 postova.

    Grupa: 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.

    MSFajl nije pronađen.Fajl nije pronađen.
    #10 Objavljeno: 3. 2. 2017. 09:14:28
    JJTTBB

    JJTTBB

    0 svidjanja u 5 postova.

    Grupa: 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 Objavljeno: 3. 2. 2017. 11:10:10
    Jean Giraud

    Jean Giraud

    983 svidjanja u 6.866 postova.

    Grupa: 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 Objavljeno: 13. 2. 2017. 09:50:56
    Lyster

    Lyster

    0 svidjanja u 1 postova.

    Grupa: 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,02 KiB) preuzeto 1424 put(ova).

    Units error.png
    #13 Objavljeno: 13. 2. 2017. 10:46:20
    csb531

    csb531

    0 svidjanja u 24 postova.

    Grupa: 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 Objavljeno: 13. 2. 2017. 18:41:52
    Radovan Omorjan

    Radovan Omorjan

    325 svidjanja i 1 nesvidjanja u 2.052 postova.

    Grupa: 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 Objavljeno: 14. 2. 2017. 10:48:19
    Martin Kraska

    Martin Kraska

    1.369 svidjanja u 2.283 postova.

    Grupa: 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,26 KiB) preuzeto 1546 put(ova).
    Section units temperature.sm (19,73 KiB) preuzeto 1432 put(ova).
    2017-02-14 14_38_53.sm_].png
    Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
    • Novi postovi
    • Nema novih postova