Constants, Dimensions, and Units

Constants, Dimensions, and Units - How to customize XML files for Constants, Dimensions, and Units - Сообщения

#1 Опубликовано: 15.01.2016 01:06:20
David Thomson

David Thomson

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

Группа: User

One of the greatest features of SMath is the ability to work with constants, dimensions, and units. Not everybody needs to see all the possible constants, dimensions, and units and to include them all into one program creates time-wasting clutter.

Is there some way we can create our own files of constants, dimensions, and units? Also, I would like to be able to choose which units will be used as the default result unit.

In my work, I use several dozens of unique units and don't want to spend time manually typing the result unit into the worksheet when I can train the computer to do it for me. That is what the computer is for.

If I could get information on how the unit.xml and constant.xml files work, I could produce the necessary files.
#2 Опубликовано: 15.01.2016 05:52:45
Davide Carpi

Davide Carpi

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

Группа: Moderator

Hello aetherwizard,

Wrote

Is there some way we can create our own files of constants, dimensions, and units?


You can use this as reference (the built-in file was updated with new units since the last post)
Also, you can create your own snippet with your set of custom units.

Wrote

Also, I would like to be able to choose which units will be used as the default result unit.


As for now is available only a beta imperial/SI choice (see here)

You can vote these requests:
- Measurement Systems support
- Automatic engineering unit prefixes like nm, km, etc.
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#3 Опубликовано: 15.01.2016 11:27:40
David Thomson

David Thomson

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

Группа: User

Wrote

You can use this as reference (the built-in file was updated with new units since the last post)
Also, you can create your own snippet with your set of custom units.


I did not see anything in the post or the attached file that looked like an explanation for how the files work. Am I supposed to hack the files by trial and error?

Wrote

As for now is available only a beta imperial/SI choice

You can vote these requests:
- Measurement Systems support
- Automatic engineering unit prefixes like nm, km, etc.


Apparently, I am blocked from voting as I have just joined the forum. I would vote for both of these requests.

#4 Опубликовано: 15.01.2016 14:17:15
Davide Carpi

Davide Carpi

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

Группа: Moderator

Wrote

I did not see anything in the post or the attached file that looked like an explanation for how the files work. Am I supposed to hack the files by trial and error?


The second one. (The official way is to create and use a snippet).

Looking at the code posted by Martin:
	<property dimension="253">
      <add factor="1" exp="2" system="Metric" title="Ar" lang:ger="Ar">
        <synonym name="Ar" lang:ger="Ar" />
      </add>
dimension is a value representing the dimension of the unit (a length, an area, ..., 253 is for area as I can guess from the childrens); those numbers are hardcoded values, you can't invent them.
factor="1" exp="2" -> 1 * 10^2 = 100 (factor respect to the base unit)
system= is for the default measurement system (beta, as mentioned)
title/lang are for descriptions
synonym contains the string to type on the canvas

Wrote

Apparently, I am blocked from voting as I have just joined the forum. I would vote for both of these requests.


Sorry I did not mentioned it, you have to register also in the BTS to vote or post bugs/feature request.
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#5 Опубликовано: 15.01.2016 18:24:08
Jean Giraud

Jean Giraud

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

Группа: User

Not so simple to convince somebody to never use a unit system in calculations.
Maths are unitless. Engineering/Scientific formulas are constructed wrt to the
unit system in cause and wrt applicable constants[SI, Imperial ...]. So, no need
for units, just append the result in term of the system used [Ton/hr ...].
When intermediate calculations need the symbolic engine [Maple for instance],
can't use units. Assume your project delivers 10 results that need be shown in
term of the clients request, simple example: make all units "literal-unary"

Example: Ton/hr:=1 ,,,, gram/sec:=1 ,,,,
Where the result is in silent Ton/hr , make it speak ,,, brush to highlight
Ton/hr in the unary definition, paste in your result ,,, 123.456789Ton/hr.

My "Eisbach Handbook" [not existing anymore] gives Engineering formulas in
appropriate unit system as explained above. I have seen a 48" butterfly valve
to be installed in a 4" pipe. Sometimes, laughing is relaxing.

Jean
#6 Опубликовано: 15.01.2016 19:05:20
David Thomson

David Thomson

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

Группа: User

Wrote

Not so simple to convince somebody to never use a unit system in calculations.
Maths are unitless.


Not everybody is working on math. I'm working on dimensional analysis. To me, math is a secondary consideration to test the dimensional analysis.

Even still, I have found several published physics equations that have bad dimensions. The reported dimensional resort is different from the actual dimensions of the units used and some of the math is simply not allowed. There used to be a relativistic equation for calculating magnetic fields from a moving charge, which I demonstrated was flat wrong. I haven't seen it so much in the past ten years since I pointed this out.

I hope someone is giving top priority to perfecting the units in smath, as this could be a powerful tool for people working in theoretical physics.

1 пользователям понравился этот пост
Mike Kaganski 06.04.2016 20:17:00
#7 Опубликовано: 15.01.2016 19:10:56
David Thomson

David Thomson

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

Группа: User

Wrote

253 is for area as I can guess from the childrens); those numbers are hardcoded values, you can't invent them.


That is a major weakness for me. I have been developing a completely new unit system that has many more units than those presently being used. Is there a comprehensive list of all the units already hardcoded? Who would I communicate with to get more units integrated?

Wrote

factor="1" exp="2" -> 1 * 10^2 = 100 (factor respect to the base unit)
system= is for the default measurement system (beta, as mentioned)
title/lang are for descriptions
synonym contains the string to type on the canvas

That is easy to follow.
Wrote

you have to register also in the BTS to vote or post bugs/feature request.


Thanks... voted!

#8 Опубликовано: 15.01.2016 20:17:32
Davide Carpi

Davide Carpi

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

Группа: Moderator

Wrote

That is a major weakness for me.


I understand, but I guess it's because was not designed for user-edit; for the insertion in few types of dimensions may be affordable, seems not your case.

Wrote

I have been developing a completely new unit system that has many more units than those presently being used. Is there a comprehensive list of all the units already hardcoded?


AFAIK nope (I may be wrong).

Wrote

Who would I communicate with to get more units integrated?


You can make a request in the BTS, selecting type as "Feature", you can post and/or attach a list of the units you want.

To ask directly the developer, the contacts are on the bottom of any post made by him (f.e. see here)
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений