Units implementation

Units implementation - Messages

#41 Posted: 3/10/2010 8:03:37 AM
Radovan Omorjan

Radovan Omorjan

325 likes in 2052 posts.

Group: 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 Posted: 3/10/2010 12:51:21 PM
Edwin

Edwin

0 likes in 12 posts.

Group: 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 Posted: 3/10/2010 3:01:50 PM
Andrey Ivashov

Andrey Ivashov

2270 likes in 3734 posts.

Group: 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 Posted: 3/12/2010 12:53:55 AM
Andrey Ivashov

Andrey Ivashov

2270 likes in 3734 posts.

Group: 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 Posted: 3/12/2010 7:46:03 AM
captainblack

captainblack

0 likes in 13 posts.

Group: 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 Posted: 3/12/2010 3:54:44 PM
maweilian

maweilian

5 likes in 103 posts.

Group: 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 Posted: 3/12/2010 9:52:37 PM
Gilberto E. Urroz

Gilberto E. Urroz

21 likes in 36 posts.

Group: 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 Posted: 3/12/2010 10:40:55 PM
maweilian

maweilian

5 likes in 103 posts.

Group: 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 Posted: 3/12/2010 11:24:36 PM
Radovan Omorjan

Radovan Omorjan

325 likes in 2052 posts.

Group: 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 Posted: 3/12/2010 11:38:24 PM
maweilian

maweilian

5 likes in 103 posts.

Group: 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 Posted: 3/14/2010 3:11:17 AM
Andrey Ivashov

Andrey Ivashov

2270 likes in 3734 posts.

Group: 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 Posted: 3/17/2010 12:27:11 AM
Andrey Ivashov

Andrey Ivashov

2270 likes in 3734 posts.

Group: 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 Posted: 3/17/2010 2:16:55 AM
Andrey Ivashov

Andrey Ivashov

2270 likes in 3734 posts.

Group: 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 Posted: 3/17/2010 7:53:22 AM
Radovan Omorjan

Radovan Omorjan

325 likes in 2052 posts.

Group: 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 Posted: 3/17/2010 12:31:15 PM
Andrey Ivashov

Andrey Ivashov

2270 likes in 3734 posts.

Group: 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 Posted: 3/17/2010 3:59:14 PM
Radovan Omorjan

Radovan Omorjan

325 likes in 2052 posts.

Group: 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 Posted: 3/17/2010 4:08:43 PM
maweilian

maweilian

5 likes in 103 posts.

Group: 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 Posted: 3/22/2010 10:08:15 AM
Radovan Omorjan

Radovan Omorjan

325 likes in 2052 posts.

Group: 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 Posted: 3/23/2010 7:34:39 AM
kazdano

kazdano

0 likes in 2 posts.

Group: 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 Posted: 3/23/2010 12:21:29 PM
Andrey Ivashov

Andrey Ivashov

2270 likes in 3734 posts.

Group: 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.
  • New Posts New Posts
  • No New Posts No New Posts