| 1 |
with ada.numerics.generic_elementary_functions; |
| 2 |
with Dimensions2_real_numbers; |
| 3 |
|
| 4 |
package Dimensions2_Phys is |
| 5 |
|
| 6 |
type si_type is new Dimensions2_real_numbers.Real with |
| 7 |
dimension_system => |
| 8 |
((unit_name => meter, unit_symbol => 'm', dim_symbol => 'L'), |
| 9 |
(unit_name => kilogram, unit_symbol => "kg", dim_symbol => 'M'), |
| 10 |
(unit_name => second, unit_symbol => 's', dim_symbol => 'T'), |
| 11 |
(unit_name => ampere, unit_symbol => 'A', dim_symbol => 'I'), |
| 12 |
(unit_name => kelvin, unit_symbol => 'K', dim_symbol => "Theta"), |
| 13 |
(unit_name => mole, unit_symbol => "mol", dim_symbol => 'N'), |
| 14 |
(unit_name => euro, unit_symbol => "EUR", dim_symbol => 'E')); |
| 15 |
|
| 16 |
subtype distance is Si_Type with |
| 17 |
dimension => (symbol => 'm', meter => 1, others => 0); |
| 18 |
|
| 19 |
subtype mass is Si_Type with |
| 20 |
dimension => (symbol => "kg", kilogram => 1, others => 0); |
| 21 |
|
| 22 |
subtype time is Si_Type with |
| 23 |
dimension => (symbol => 's', second => 1, others => 0); |
| 24 |
|
| 25 |
subtype electric_current is Si_Type with |
| 26 |
dimension => (symbol => 'A', ampere => 1, others => 0); |
| 27 |
|
| 28 |
subtype temperature is Si_Type with |
| 29 |
dimension => (symbol => 'K', kelvin => 1, others => 0); |
| 30 |
|
| 31 |
subtype amount_of_substance is Si_Type with |
| 32 |
dimension => (symbol => "mol", mole => 1, others => 0); |
| 33 |
|
| 34 |
pragma warnings (off, "*assumed to be*"); |
| 35 |
subtype pressure_barg is Dimensions2_real_numbers.Real; |
| 36 |
m : constant Distance := 1.0; |
| 37 |
kg : constant Mass := 1.0; |
| 38 |
s : constant Time := 1.0; |
| 39 |
a : constant Electric_Current := 1.0; |
| 40 |
k : constant Temperature := 1.0; |
| 41 |
mol : constant Amount_Of_Substance := 1.0; |
| 42 |
min : constant Time := 1.0; |
| 43 |
h : constant Time := 60.0 * min; |
| 44 |
|
| 45 |
subtype frequency is Si_Type with |
| 46 |
dimension => (symbol => "Hz", second => -1, others => 0); |
| 47 |
|
| 48 |
subtype massflow is Si_Type with |
| 49 |
dimension => (symbol => "kg/s", |
| 50 |
kilogram => 1, second => -1, others => 0); |
| 51 |
|
| 52 |
subtype molar_heat_capacity is Si_Type with |
| 53 |
dimension => (symbol => "J/(K*mol)", meter => 2, kilogram => 1, |
| 54 |
second => -2, kelvin => -1, mole => -1, others => 0); |
| 55 |
|
| 56 |
subtype molar_flow is Si_Type with |
| 57 |
dimension => (symbol => "mol/s", second => -1, mole => 1, others => 0); |
| 58 |
|
| 59 |
subtype pressure is Si_Type with |
| 60 |
dimension => |
| 61 |
(symbol => "Pa", meter => -1, kilogram => 1, second => -2, others => 0); |
| 62 |
|
| 63 |
subtype ratio is Si_Type range 0.0 .. 1.0; |
| 64 |
|
| 65 |
subtype scalar is Si_Type; |
| 66 |
|
| 67 |
subtype specific_heat_capacity is Si_Type with |
| 68 |
dimension => (symbol => "J/(K*kg)", meter => 2, second => -2, |
| 69 |
kelvin => -1, others => 0); |
| 70 |
|
| 71 |
subtype speed is Si_Type with |
| 72 |
dimension => (symbol => "m/s", meter => 1, second => -1, others => 0); |
| 73 |
|
| 74 |
subtype volume is Si_Type with |
| 75 |
dimension => (symbol => "m^3", meter => 3, others => 0); |
| 76 |
|
| 77 |
subtype volumetric_flow is Si_Type with |
| 78 |
dimension => (symbol => "m^3/s", meter => 3, second => -1, others => 0); |
| 79 |
|
| 80 |
end Dimensions2_Phys; |