root/trunk/units/types.d

Revision 515, 1.4 kB (checked in by BCS, 6 years ago)

added some values, units, types and operators/function

Line 
1 module types;
2
3 import unit;
4
5 public template Lit(int l, int m, int t, int T, int I)
6 {
7     alias Unit!(l,1,m,1,t,1,T,1,I,1) Lit;
8 }
9
10
11 ///
12 public struct Types
13 {
14     alias Lit!( 0, 0, 0, 0, 0) Value;       ///
15     alias Lit!( 1, 0, 0, 0, 0) Distance;    ///
16     alias Lit!( 0, 1, 0, 0, 0) Mass;        ///
17     alias Lit!( 0, 0, 1, 0, 0) Time;        ///
18     alias Lit!( 0, 0, 0, 1, 0) Temp;        ///
19     alias Lit!( 0, 0, 0, 0, 1) Current;     ///
20
21     alias Lit!(-3, 1, 0, 0, 0) MassDensity; ///
22
23     alias Lit!(-2,-1, 3, 0, 2) Resistance;  ///
24     alias Lit!(-2,-1, 4, 0, 2) Capacitance; ///
25
26     alias Lit!(-1, 1,-2, 0, 0) Pressure;    ///
27     alias Lit!(-1, 1,-1, 0, 0) Viscosity;   ///
28
29     alias Lit!( 0, 0,-1, 0, 0) Frequency;   ///
30     alias Lit!( 0, 0, 1, 0, 1) Charge;      ///
31     alias Lit!( 0, 1,-1, 0, 0) MassFlow;    ///
32
33     alias Lit!( 1, 1,-2, 0, 0) Force;       ///
34     alias Lit!( 1, 0,-2, 0, 0) Acceleration;///
35     alias Lit!( 1, 0,-1, 0, 0) Speed;       ///
36
37     alias Lit!( 2, 1,-3, 0,-1) Voltage;     ///
38     alias Lit!( 2, 1,-3, 0, 0) Power;       ///
39     alias Lit!( 2, 1,-2, 0,-2) Inductance;  ///
40     alias Lit!( 2, 1,-2, 0, 0) Energy;      ///
41     alias Lit!( 2, 0, 0, 0, 0) Area;        ///
42     alias Lit!( 2, 0,-1, 0, 0) KViscosity;  ///
43
44     alias Lit!( 3, 0,-1, 0, 0) VolumeFlow;  ///
45     alias Lit!( 3, 0, 0, 0, 0) Volume;      ///
46 }
47
48 public struct Engr
49 {
50     public struct Thermal
51     {
52         alias Lit!( 2, 0,-2,-1, 0) ThermalCap;      ///
53         alias Lit!( 1, 1,-3,-1, 0) ThermalCond;     ///
54         alias Lit!( 0, 1,-3,-1, 0) ConvectionCoeff; ///
55     }
56 }
Note: See TracBrowser for help on using the browser.