Units implementation

Units implementation - Сообщения

#41 Опубликовано: 10.03.2010 08:03:37
Radovan Omorjan

Radovan Omorjan

325 сообщений из 2052 понравились пользователям.

Группа: Moderator

Hello,

Some intrinsic math function (sin,cos,ln,log...) can be applied on the unit variables. I think this should not be allowed.

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#42 Опубликовано: 10.03.2010 12:51:21
Edwin

Edwin

0 сообщений из 12 понравились пользователям.

Группа: User

With all that talk about base units, wouldn't it be possible to store the unit definitions as files (.sm files?) in a separate directory? Then they can be maintained by others and if someone want something different, it can just be added. Then all that's needed is a way to choose the unit set for a document (or even use no units at all).
#43 Опубликовано: 10.03.2010 15:01:50
Andrey Ivashov

Andrey Ivashov

2269 сообщений из 3729 понравились пользователям.

Группа: Super Administrator

Wrote

Some intrinsic math function (sin,cos,ln,log...) can be applied on the unit variables. I think this should not be allowed.


Agree. Will fix.

Updated: fixed.

Wrote

With all that talk about base units, wouldn't it be possible to store the unit definitions as files (.sm files?) in a separate directory?


Actually, this was my goal, but then I saw problems of sharing worksheets in that case. F.e.: if user1 will send file to user2, but file is created with program contains custom units, then user2 will not be able to work with such file. Of course, I can imagine couple of solutions, but all of these require some not easy logic, so in future I'll try to implement one of them.
#44 Опубликовано: 12.03.2010 00:53:55
Andrey Ivashov

Andrey Ivashov

2269 сообщений из 3729 понравились пользователям.

Группа: Super Administrator

Changes made according to the posts above.


Figure 1: Units simplification dramatically improved!


Figure 2: Error handling improved.

Thanks for testing! New beta will be available soon.
#45 Опубликовано: 12.03.2010 07:46:03
captainblack

captainblack

0 сообщений из 13 понравились пользователям.

Группа: User

Wrote

About the definition of pound, lb : the current definition of lb in SMath Studio is 1 lb = 0.4536 kg. In the U.S., where the so-called "Imperial," or "English," system of units refuses to leave center stage, the pound, lb, is a unit of force, not of mass. Some unit-conversion software, such as the one included with the HP graphing calculators, use 'lbf', i.e., pound-force, to refer to the pound as force, and then use the 'lb' to refer to the pound as mass, as you do. I would suggest adding the pound-force 'lbf' in SMath Studio, with 1 lbf = 4.44822161526 N.




Unfortunately in the Imperial/English/Customary units used in the US the pound is both a force unit when the mass unit is the slug and a mass unit when the force unit is the poundel. This is a ludicrous situation and the US should sort its self out. This will be to the benefit of the US education system, international scientific co-operation, space flight etc.


One way to encourage this is for mathematical and scientific software to stop supporting these units.

CB
#46 Опубликовано: 12.03.2010 15:54:44
maweilian

maweilian

5 сообщений из 103 понравились пользователям.

Группа: User

Wrote

One way to encourage this is for mathematical and scientific software to stop supporting these units.



I think it would be better to improve and maintain the usefulness of Smath to as many users as possible and not to try to use the program as a lever to force the correction of perceived problems in other arenas.
Will Massie Mechanical Engineer Oregon, USA
#47 Опубликовано: 12.03.2010 21:52:37
Gilberto E. Urroz

Gilberto E. Urroz

21 сообщений из 36 понравились пользователям.

Группа: User

Wrote

Wrote

About the definition of pound, lb : the current definition of lb in SMath Studio is 1 lb = 0.4536 kg. In the U.S., where the so-called "Imperial," or "English," system of units refuses to leave center stage, the pound, lb, is a unit of force, not of mass. Some unit-conversion software, such as the one included with the HP graphing calculators, use 'lbf', i.e., pound-force, to refer to the pound as force, and then use the 'lb' to refer to the pound as mass, as you do. I would suggest adding the pound-force 'lbf' in SMath Studio, with 1 lbf = 4.44822161526 N.




Unfortunately in the Imperial/English/Customary units used in the US the pound is both a force unit when the mass unit is the slug and a mass unit when the force unit is the poundel. This is a ludicrous situation and the US should sort its self out. This will be to the benefit of the US education system, international scientific co-operation, space flight etc.


One way to encourage this is for mathematical and scientific software to stop supporting these units.

CB


==================================

I know that the proliferation of unit systems is counterproductive, and we, in the engineering colleges in the US are trying to keep the metric system as a viable alternative, but the bulk of US industries still use the so-called "Imperial" or "English" system. And I love "psi". We need pounds somewhere. By the way, the books we use in the US don's use "poundel" anymore. I think the "standard" is lb = unit of force, slug = (1 lb )/(1 ft/s^2) = unit of mass. We also use "kips", which stand for "ki(lo)p(ound)s". Talk about a hybrid unit. The US Congress tried to force metric conversion in the 1970's, but the States never ratified it.
#48 Опубликовано: 12.03.2010 22:40:55
maweilian

maweilian

5 сообщений из 103 понравились пользователям.

Группа: User

Wrote

I know that the proliferation of unit systems is counterproductive, and we, in the engineering colleges in the US are trying to keep the metric system as a viable alternative, but the bulk of US industries still use the so-called "Imperial" or "English" system. And I love "psi". We need pounds somewhere. By the way, the books we use in the US don's use "poundel" anymore. I think the "standard" is lb = unit of force, slug = (1 lb )/(1 ft/s^2) = unit of mass. We also use "kips", which stand for "ki(lo)p(ound)s". Talk about a hybrid unit. The US Congress tried to force metric conversion in the 1970's, but the States never ratified it.



Dr. Urroz,

I also agree that the existence of more than one system of units may very well be counterproductive on a global scale. But, as you said, this is the way things are for now. But that is why Smath should remain flexible in this area. I really like the way that Andrey has allowed users to define and use custom units. I work in the marine industry in the U.S. and besides working with pounds and gallons, I often have to use nautical units such as long tons, fathoms, and knots. The proliferation of units is a reality that is not going to go away very soon. I do not expect Andrey to include every possible unit as a built-in part of Smath (although, the most commonly used Imperial units should be), but I hope he continues to make it flexible and customizable in every way possible. That way, it will remain a powerful, practical tool for engineers from all countries.
Will Massie Mechanical Engineer Oregon, USA
#49 Опубликовано: 12.03.2010 23:24:36
Radovan Omorjan

Radovan Omorjan

325 сообщений из 2052 понравились пользователям.

Группа: Moderator

Hello,

Regarding to the previous comments, it crossed my mind that the predefined constants, variables, functions, units etc. in SMath should (might) be protected (some of them can not be redefined like int, diff, ...). Actually, ther is Dynamic asistance as a great toll and we instantly can see what is defined or not. In spite of that, I think it might be beneficial not to allow (to protect) redefinition of SMath incorporated constants, variables, functions, units ... unless the user declare them "unprotected". I suppose this could not make the things more complicated, contrary - it might help avoiding some hard to trace errors.

Regards,
Radovan

EDIT: ...(some of them can not be redefined like int, diff, ...)
Actually, I was wrong. It loks a bit "crazy" but we can redefine them (One should have a bit "distorted" mind to do this :d )
[MATH]int(a;b;c;d)←a+b+c+d[/MATH]
[MATH]int(1;2;3;4)=10[/MATH]
[MATH]diff(x;y)←x^2+y^2[/MATH]
[MATH]diff(2;3)=13[/MATH]
[MATH]diff(2;3)—13[/MATH]
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#50 Опубликовано: 12.03.2010 23:38:24
maweilian

maweilian

5 сообщений из 103 понравились пользователям.

Группа: User

Wrote

Regarding to the previous comments, it crossed my mind that the predefined constants, variables, functions, units etc. in SMath should (might) be protected (some of them can not be redefined like int, diff, ...). Actually, ther is Dynamic asistance as a great toll and we instantly can see what is defined or not. In spite of that, I think it might be beneficial not to allow (to protect) redefinition of SMath incorporated constants, variables, functions, units ... unless the user declare them "unprotected". I suppose this could not make the things more complicated, contrary - it might help avoiding some hard to trace errors.



Radovan, I agree. That is a very good idea.

Will Massie Mechanical Engineer Oregon, USA
#51 Опубликовано: 14.03.2010 03:11:17
Andrey Ivashov

Andrey Ivashov

2269 сообщений из 3729 понравились пользователям.

Группа: Super Administrator

Wrote

About the definition of pound, lb : the current definition of lb in SMath Studio is 1 lb = 0.4536 kg. ... I would suggest adding the pound-force 'lbf' in SMath Studio, with 1 lbf = 4.44822161526 N.

Including the pound-force, as I suggest, will allow us, hydraulic engineers in the U.S., to use the commonly-used unit of pounds per square inch (psi = 1 lbf/in^2) for pressure, which currently I cannot properly define. If you decide to include 'psi' in your collection of units, use 1 psi = 6894.75729317 Pa. I also use the psf = pound-per-square-foot, 1 psf = (1/144) psi = 47.8802589803 Pa.

By the way, the unit of mass in the English System ( E.S. ) is the 'slug', 1 slug = ( 1 lbf )/(1 ft/s^2). The "slug" should be included in the units of mass in SMath Studio also. 1 slug = 14.5939029372 kg.

Also, the BTU, or Btu, (British Thermal Unit) should be included in the units of energy, since is still commonly found in HVAC applications. 1 BTU (or Btu) = 1055.05585262 J.


All units you've mentioned added to the built-in list:
#52 Опубликовано: 17.03.2010 00:27:11
Andrey Ivashov

Andrey Ivashov

2269 сообщений из 3729 понравились пользователям.

Группа: Super Administrator

Wrote

It loks a bit "crazy" but we can redefine them


Why do you think so? This is the main concept of the program - user can redefine everything, even if it will be funny for someone else. If user will create more powerful algorithm of integral solving, then int(..) function can be overridden. Also, I don't believe that user could redefine int(..) function (just f.e.) accidentally, but this allows experienced user to be free with his or her ideas. I see no problem here.
#53 Опубликовано: 17.03.2010 02:16:55
Andrey Ivashov

Andrey Ivashov

2269 сообщений из 3729 понравились пользователям.

Группа: Super Administrator

Before I'll get a time break on a week I've created a new beta: Beta: SMath Studio 0.87.3728 (17 March 2010). Please, check it for changes you have requested. This is a last beta version before release, so will be good if we can find unit-related errors here...

Best regards, Andrey Ivashov.
#54 Опубликовано: 17.03.2010 07:53:22
Radovan Omorjan

Radovan Omorjan

325 сообщений из 2052 понравились пользователям.

Группа: Moderator

Wrote

Wrote

It loks a bit "crazy" but we can redefine them


Why do you think so? This is the main concept of the program - user can redefine everything, even if it will be funny for someone else. If user will create more powerful algorithm of integral solving, then int(..) function can be overridden. Also, I don't believe that user could redefine int(..) function (just f.e.) accidentally, but this allows experienced user to be free with his or her ideas. I see no problem here.


I might not make myself understood, sorry. No, I am not against redefining things. Contrary, this is a very welcome feature. I've mentioned that Dynamic Assistance (DA) as a great tool in avoiding accidental changing, constants, variables, functions, units. Just the Dynamic Assistance could be enough in order to check what has been already defined. There is also a mark on every redefined item in DA (a hand over it - very good ). I thought just as an option to add "protected","unprotected" feature. Just in case. When typing, someone might not look at the DA and make some errors. Although, on the second thoughts it might be redundant. You are right, DA might be good enough.

About redefining int(..) and diff(..) I was just joking in order to show that could be done

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#55 Опубликовано: 17.03.2010 12:31:15
Andrey Ivashov

Andrey Ivashov

2269 сообщений из 3729 понравились пользователям.

Группа: Super Administrator

Radovan, ok. Actually I have started thinking about how to provide similar with Mathcad logic to visualize overridden entries after your posts (by underlining such variables/functions/units). I think it is better then just forbid redefinitions. So, as always, thank you!

Regards.
#56 Опубликовано: 17.03.2010 15:59:14
Radovan Omorjan

Radovan Omorjan

325 сообщений из 2052 понравились пользователям.

Группа: Moderator

Yes, it might be useful. I, personally, have never liked those green "wawes" in Mathcad underlying the redefined variables. Maybe other users did not mind that.

Regards,
Radovan

PS. Andrey, have a good time and take some rest
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#57 Опубликовано: 17.03.2010 16:08:43
maweilian

maweilian

5 сообщений из 103 понравились пользователям.

Группа: User

Downloaded the newest Beta. The program still exhibits behavior I mentioned in my previous post in this thread.

Firstly, it still defaults to different units than what are used in the calculation. See below:


I really think the result should automatically use the same units that are used in the calculation (when this is possible), and/or the user should be able to select (in the "Options" dialog) the default units that will be used.

Secondly, I realize now that the second placeholder that appears after the unit can be used to override the unit. This is ok, but it would seem more natural to simply select the unit to be overriden and simply press delete and/or then type a new unit in its place. This seems more intuitive. That being said, the way it is now is acceptable to me.

What do others think?
Will Massie Mechanical Engineer Oregon, USA
#58 Опубликовано: 22.03.2010 10:08:15
Radovan Omorjan

Radovan Omorjan

325 сообщений из 2052 понравились пользователям.

Группа: Moderator

Hello,

I am a bit puzzled here. Please look at the picture:

This os Ok too.

This one as well

This one can be done only if typing 10*/ and then putting the units in nominator and denominator.
Is there maybe something wrong (a bug) here? Is there anything that could be done about it?

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#59 Опубликовано: 23.03.2010 07:34:39
kazdano

kazdano

0 сообщений из 2 понравились пользователям.

Группа: User

Andrey you are the best!!! Greate work for now. I mean amazing!!! Also thanks to Radovan for his engage to make program better. ;D
#60 Опубликовано: 23.03.2010 12:21:29
Andrey Ivashov

Andrey Ivashov

2269 сообщений из 3729 понравились пользователям.

Группа: Super Administrator

Wrote

Andrey you are the best!!! Greate work for now. I mean amazing!!! Also thanks to Radovan for his engage to make program better. ;D


Thank you! Radovan makes a great work - it's true. Just want to say also thanks to every person who participating in the forum!

Just for information: as you, maybe, know I have paused work on the program one week ago. It was important because I had to pass an exam (Microsoft .NET Framework 3.5, ASP.NET Application Development) today. Now it's ok, exam is passed and I'm back to work. Will check all new bug reports that appeared last days.
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений