Disable specific unit

Disable specific unit - How to disable not used unit - 消息

#1 已发布: 2018/4/23 10:18:16
m227

m227

4个赞和1个踩,共29个帖子。

组: User

Hi, in my calculations I often use kJ/kg (and derivative) units (enthalpy, specific heat).
SMath always presents result in Gy and I have always manually to redefine it.

Is there any possibility to disable Gy unit which is useless for my tasks?
I tried to assign 'Gy := 0 to disable this unit but it does not work.
#2 已发布: 2018/4/23 10:42:17
Jean Giraud

Jean Giraud

983个赞,共6,866个帖子。

组: User

Wrote

Is there any possibility to disable Gy unit which is useless for my tasks?



Work sheet would help.
Unitless solves all problems.
Knowing in advance the unit of result, define it user style
kJ/kg ... Smath style kJ_kg:=1
copy "kJ_kg", paste in the empty place holder of result.
#3 已发布: 2018/4/23 13:09:38
Ruben Sidranski

Ruben Sidranski

17个赞,共465个帖子。

组: User

Wrote

Hi, in my calculations I often use kJ/kg (and derivative) units (enthalpy, specific heat).
SMath always presents result in Gy and I have always manually to redefine it.

Is there any possibility to disable Gy unit which is useless for my tasks?
I tried to assign 'Gy := 0 to disable this unit but it does not work.


When you re-defined Gy, did you use the ' infront of Gy (e.g. 'Gy? This makes it the same font/etc.
I work in IP units and need to re-define everything in the results. Part of the quirks of working in SMath
#4 已发布: 2018/4/23 14:40:46
Jean Giraud

Jean Giraud

983个赞,共6,866个帖子。

组: User

Wrote

Is there any possibility to disable Gy unit which is useless for my tasks?
I tried to assign 'Gy := 0 to disable this unit but it does not work.



Gy.PNG
#5 已发布: 2018/4/27 07:38:08
m227

m227

4个赞和1个踩,共29个帖子。

组: User

Hi, I would like to have something without need of definition new auxiliary variables. Just to disable a single unit...
Here is my sample which is automatically recalculated to unwanted Gy:
2018-04-27 12_35_35-SMath Studio - [steamprop.sm_].png
#6 已发布: 2018/4/27 08:45:21
Martin Kraska

Martin Kraska

1,362个赞,共2,276个帖子。

组: Moderator

btw, the default unit depends on optimization setting.

symbolic evaluation gives bare SI base units.
numeric evaluation gives some derived unit, which might or might not be appropriate for the given case.
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
#7 已发布: 2018/11/8 03:44:26
Ganzman

Ganzman

0个赞,共2个帖子。

组: User

I have to agree with m227. Can we request this as a feature as Gy is hardly applicable in most cases.
#8 已发布: 2018/11/8 20:02:36
Alvaro

Alvaro

1,139个赞,共1,805个帖子。

组: User

Wrote

I have to agree with m227. Can we request this as a feature as Gy is hardly applicable in most cases.



Hi. This is a workaround. Edit the file Units.xml under the SMath/entries/ folder, disabling the entries for the unit Gy:

Clipboard04.gif
Clipboard03.gif

Then you can get, for example, the enthalpy from Coolprops plugin in J/kg by default:

Clipboard05.gif

Best regards.
Alvaro.
1位用户喜欢此帖子
frapuano 2018/11/9 06:54:00
#9 已发布: 2018/11/8 20:35:48
Ganzman

Ganzman

0个赞,共2个帖子。

组: User

Much obliged!
  • 有新帖
  • 无新帖