Minus kelvin

Minus kelvin - лишние скобки - Mensajes

#1 Publicado: 30/4/2023 15:55:23
Valery Ochkov

Valery Ochkov

67 me gusta en 713 mensajes.

Grupo: User

minus-K.png
#2 Publicado: 30/4/2023 17:18:37
Jean Giraud

Jean Giraud

983 me gusta en 6.866 mensajes.

Grupo: User

Mathsoft had this very sentence ... Watch where you thread.

degC.PNG
#3 Publicado: 1/5/2023 12:04:42
⚜ Kenny Lemens, P.E. ᵂᴵ

⚜ Kenny Lemens, P.E. ᵂᴵ

85 me gusta en 181 mensajes.

Grupo: User

Greetings,

It is important to note that temperature is a variable unit in SMath and not a function as it is in Mathcad.

Regardless, the first line is converting 10°C --> 283.15K; and then applying the unary operator of minus (-) to the value; thus: -283.15K; Make sure you apply the unit °C to -10 and not just 10; use the space bar to group your operations correctly.

When in doubt: use parenthesis for grouping your operations.


May this be of Good Help,
- SK Kenny Lemens, P.E. ᵂᴵ
"No matter where you go, there you are." -Buckaroo BanzaiHotkeys: https://en.smath.com/forum/resource.ashx?a=45771&b=2
#4 Publicado: 1/5/2023 12:41:51
Valery Ochkov

Valery Ochkov

67 me gusta en 713 mensajes.

Grupo: User

Wrote

Greetings,

It is important to note that temperature is a variable unit in SMath and not a function as it is in Mathcad.

Regardless, the first line is converting 10°C --> 283.15K; and then applying the unary operator of minus (-) to the value; thus: -283.15K; Make sure you apply the unit °C to -10 and not just 10; use the space bar to group your operations correctly.

When in doubt: use parenthesis for grouping your operations.


May this be of Good Help,
- SK Kenny Lemens, P.E. ᵂᴵ



2+2*2=8
2+(2*2)=6
#5 Publicado: 1/5/2023 12:56:33
⚜ Kenny Lemens, P.E. ᵂᴵ

⚜ Kenny Lemens, P.E. ᵂᴵ

85 me gusta en 181 mensajes.

Grupo: User

Greetings,

Wrote

2+2*2=8


I tried to duplicate this result, but was unsuccessful. However, the following will achieve '8':


(2+2)*2=8

or

2*(+2)*2=8


On the larger issue, I would refer you to the following handbook; it can be downloaded via your Extension Manager (i.e., [Tools] -> [Plugins...] -> [Interactive books]):
https://en.smath.com/view/interactivebook/

There is a section that reviews the Priority of operators; you will see that units are level 1, whereas unary is level 2: thus the disconnect for negative numbers.
Expressions with operators of varying priority
Those respective sheets are as follows:
  • Archivo no encontrado.
  • Archivo no encontrado.



May this be of Good Help,
- Kenny Lemens, P.E. ᵂᴵ
"No matter where you go, there you are." -Buckaroo BanzaiHotkeys: https://en.smath.com/forum/resource.ashx?a=45771&b=2
#6 Publicado: 1/5/2023 16:13:13
Martin Kraska

Martin Kraska

1.361 me gusta en 2.275 mensajes.

Grupo: Moderator

This issue is constantly confusing new users. The evil is in the design decision that the unary minus has the same priority as the binary plus and minus, both are less than multiply and divide. This is counter-intuitive. So you have to use parentesis in SMath where you would not expect to need them with pencil and paper. Changing these priority rules might fix the problem (and perhaps cause other ones).
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
#7 Publicado: 1/5/2023 20:17:27
Jean Giraud

Jean Giraud

983 me gusta en 6.866 mensajes.

Grupo: User

Wrote

So you have to use parenthesis in SMath


Golden rule from numerical priority rule(s)
Not unique to this application.
#8 Publicado: 21/6/2023 16:16:28
Arie

Arie

94 me gusta en 285 mensajes.

Grupo: User

I've gotten in the habit of using this function. This is probably dumb to do, but it forces me to use parenthesis for all temps.

temp.png
temperature.sm (4,71 KiB) descargado 1887 vez(es).
Feel free to join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
#9 Publicado: 21/6/2023 16:29:58
Arie

Arie

94 me gusta en 285 mensajes.

Grupo: User

Also this function can be useful when variables are defined in Celsius but need to be used relatively.

temp.png
Feel free to join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
#10 Publicado: 20/2/2024 19:10:50
miki

miki

0 me gusta en 1 mensajes.

Grupo: User

Wrote

Greetings,

It is important to note that temperature is a variable unit in SMath and not a function as it is in Mathcad.

Regardless, the first line is converting 10°C --> 283.15K; and then applying the unary operator of minus (-) to the value; thus: -283.15K; Make sure you apply the unit °C to -10 and not just 10; use the space bar to group your operations correctly.

When in doubt: use parenthesis for grouping your operations.

Ok

I put my negativ temp like t2=(-43), ant t1=20, all in degC

Now I got this in Smath editor

t1-t2 = 63K it is OK

but t1-t2 = -210,15degC

it works like this: t1-t2 = ((20+273) - (-43 + 273) - 273) = -210,15degC THIS IS WRONG. there should not be extra (-273) on the end when you enter degC in the placeholder of expresion for convert from K to degC


What is right

t1-t2 = 20-(-43) = 63degC

t1-t2 = (20+273) - (-43+273) = 63K

Difference deltaT/deltat do not depend of scale (for degC and K for sure)

so definitely there is a bug in conversion (adlist when conversion is done by manipulating placeholder behind result)

#11 Publicado: 20/2/2024 23:12:54
overlord

overlord

600 me gusta en 1.381 mensajes.

Grupo: Moderator

Wrote

I put my negativ temp like t2=(-43), ant t1=20, all in degC

Now I got this in Smath editor

t1-t2 = 63K it is OK

but t1-t2 = -210,15degC

it works like this: t1-t2 = ((20+273) - (-43 + 273) - 273) = -210,15degC THIS IS WRONG. there should not be extra (-273) on the end when you enter degC in the placeholder of expresion for convert from K to degC


What is right

t1-t2 = 20-(-43) = 63degC

t1-t2 = (20+273) - (-43+273) = 63K

Difference deltaT/deltat do not depend of scale (for degC and K for sure)

so definitely there is a bug in conversion (adlist when conversion is done by manipulating placeholder behind result)



This is not a bug, this is how SMath works.
You have to use delta temperatures for that kind of calculations.
Unfortunately there is no easier way.

2024-02-20_18-08.png

If you really need to calculate without delta temperatures,
You can use a custom equation/function like this.

Regards

2024-02-20_18-15.png
  • Nuevos mensajes
  • Sin mensajes nuevos