Question: How to define a new system of units?

Hi,

I am trying to define a system of units so that I get results in the units I want.

Specifically; I want to use energy in MeV (or eV, if I have to) and masses*c^2 in MeV (or eV) as well. Related, I need ScientificConstants like Planck's h in MeVs etc.

So I say

AddSystem('Accelerator','MeV','meter','second');
UseSystem('Accelerator');

which is accepted. I even get energies converted to MeV if I enter one in a different unit and use

convert(E,'system');

However, the ScientificConstant h "cannot be represented in the system Accelerator", which is clearly rubbish as h is in J*s and can easily be represented in MeV*s. If I try to add 'joule' to the list iof units in AddSystem and use 'check' I correctly get an error as MeV already represents the energy.

GetUnits('context'='Accelerator');

comes up empty (whereas context='SI' has 45 entries). Why?? At the very least I would have expected MeV, meter and second to be in context for system 'Accelerator'. Do I need to AddUnit() the units I want to use?? I would not think so as I am not redefining any, all the ones I use are perfectly known to Maple except I need the defaults to be different.

I tried to stay in SI and work with UseUnit(); but that seems to have zero effect. Even after that convert(h,'system') will stay in J*s.

This is my first foray into Units, and so far I am not meeting with success. I assume this is my being dense but I don't see how to get it to work in the units I need.

Any hints?

Thanks,

Mac Dude.

Please Wait...