http://www.codeplex.com/QuantitySystem

although I am not considering a brilliant person

but this is my blog

so I am a smart brilliant guy who can make impossible things done.

and to my next victory about Quantities

Remember when I told you about the Quantity Frame work

the quantity frame work main idea is to help programmer to define the quantity in its context

so

no more double f = 60;

it is

var f = SIUnitSystem.Default<Newton>(60);

and to predict the quantity from the various arithmatic operations

so if

var l = SIUnitSystem.Default<Metre>(10);

var work = f * l; will return an object of work quantity

so far

the situation was good

but the real problem appeared when I was considering the Quantity of Torque

Torque which have the same Dimensions of Work prevented me to include it in the library

and you know that Torque is a very important Quantity

by returning to Wikipedia in the definition of Angle

I discovered that I can define length in terms of two dimensions

Normal Length NL

Radius Length RL

and in MLT System

L will be NL + RL

so Angle is dimensionless value L = NL1 RL-1 =0 and thats correct

but this way I could save it in the library and also can obtain a unique key for it

Torque is F * RL

and when multiply Torque * Angle = F1 RL1 RL-1 NL1 = F1 NL1 which is the dimension of Work correctly

I am very amused to solve this problem

if you had a look before on jscience measure library of treating this problem

you will find that they ignored the Quantity and began with the units approach { that’s what I understand about it }

units approach is not what I want

I wanted to be able to do arithmetic operations and to be able to know the result quantity.

however

please follow the link to my library in .NET framework 3.5

may be I am mad or it may turn to a real something

### Leave a Reply

You must be logged in to post a comment.