|
| 1 | +# Plan: Units for Next 10 Quantities |
| 2 | + |
| 3 | +Accompanies the [next 10 quantities plan](next-10-quantities-plan.md). |
| 4 | + |
| 5 | +## Overview |
| 6 | + |
| 7 | +Each new quantity needs at least one SI derived unit. Some quantities also benefit from metric, imperial, or non-standard units that are in common practical use. |
| 8 | + |
| 9 | +Quantities marked with **(compound only)** have no universally recognised named unit; they are expressed as combinations of existing units (e.g. `N·m`, `Pa·s`). They still need to work with the existing `Scalar<TUnit>`, `Product<T1, T2>`, and `Quotient<TN, TD>` creation patterns but do not require a new unit struct. |
| 10 | + |
| 11 | +--- |
| 12 | + |
| 13 | +## Theme 1: Rotational Mechanics |
| 14 | + |
| 15 | +### 1. Torque — compound only |
| 16 | + |
| 17 | +Torque is dimensionally identical to energy (M·L²·T⁻²) but semantically distinct. The SI unit is the **newton metre** (N·m), which is *not* given a special name to preserve this distinction. |
| 18 | + |
| 19 | +| Unit | Symbol | Category | Conversion | Notes | |
| 20 | +|------|--------|----------|------------|-------| |
| 21 | +| — | N·m | (compound) | — | Expressed as `Product<Newton, Metre>`. No dedicated unit struct needed. | |
| 22 | +| — | lbf·ft | (compound) | 1 lbf·ft = 1.3558179483314 N·m | Expressed as `Product<PoundForce, Foot>`. Both units exist. | |
| 23 | +| — | lbf·in | (compound) | 1 lbf·in ≈ 0.1129848290276 N·m | Expressed as `Product<PoundForce, Inch>`. Both units exist. | |
| 24 | + |
| 25 | +**Implementation notes:** |
| 26 | +- The quantity struct uses `Product<TForce, TLength>` and `Quotient<TForce, TLength>` for `Of()` and `To()`. |
| 27 | +- All torque units are compound: `Product<Newton, Metre>`, `Product<PoundForce, Foot>`, and `Product<PoundForce, Inch>`. No dedicated unit structs needed. |
| 28 | + |
| 29 | +### 2. AngularVelocity — compound only |
| 30 | + |
| 31 | +All angular velocity units are expressible as quotients of existing angle and time units. No dedicated unit structs are needed. |
| 32 | + |
| 33 | +| Unit | Symbol | Category | Conversion | Notes | |
| 34 | +|------|--------|----------|------------|-------| |
| 35 | +| — | rad/s | (compound) | identity | Expressed as `Quotient<Radian, Second>`. Both units exist. | |
| 36 | +| — | rev/min | (compound) | 1 rev/min = 2π/60 rad/s | Expressed as `Quotient<Turn, Minute>`. Both units exist (`Turn` has representation `"rev"`). | |
| 37 | +| — | °/s | (compound) | 1 °/s = π/180 rad/s | Expressed as `Quotient<Degree, Second>`. Both units exist. | |
| 38 | + |
| 39 | +**Implementation notes:** |
| 40 | +- The quantity struct uses `Quotient<TAngle, TTime>` for `Of()` and `To()`. |
| 41 | +- All angular velocity units are compound. The SI coherent form is `Quotient<Radian, Second>` (rad/s). |
| 42 | +- `Turn` already exists (in `NonStandard/Angle/Turn.ai.cs`) with `Representation => "rev"`, so `Quotient<Turn, Minute>` naturally produces "rev/min". |
| 43 | + |
| 44 | +### 3. AngularAcceleration — compound only |
| 45 | + |
| 46 | +Angular acceleration follows the same pattern as (linear) acceleration: it is expressed as a compound of existing units. |
| 47 | + |
| 48 | +| Unit | Symbol | Category | Conversion | Notes | |
| 49 | +|------|--------|----------|------------|-------| |
| 50 | +| — | rad/s² | (compound) | identity | Compound of `Radian` and `Second`. Both units exist. | |
| 51 | + |
| 52 | +**Implementation notes:** |
| 53 | +- The quantity struct uses a compound creation pattern analogous to linear acceleration. |
| 54 | +- No dedicated unit struct is needed; the SI coherent form is composed from `Radian` and `Second`. |
| 55 | +- Additional non-standard compound forms can be added later as needed. |
| 56 | + |
| 57 | +--- |
| 58 | + |
| 59 | +## Theme 2: Electromagnetic Quantities |
| 60 | + |
| 61 | +### 4. ElectricalConductance — SI derived unit: siemens |
| 62 | + |
| 63 | +| Unit | Symbol | Category | Conversion | Notes | |
| 64 | +|------|--------|----------|------------|-------| |
| 65 | +| **Siemens** | S | SI Derived | identity | Named SI unit. Reciprocal of ohm. | |
| 66 | + |
| 67 | +**Implementation notes:** |
| 68 | +- `Siemens` implements `ISiUnit, IElectricalConductance, IInvertible<IElectricalResistance>`. |
| 69 | +- The `IInvertible` pattern mirrors how `Hertz` relates to `ITime`: `Siemens` is `1 / Ohm`. |
| 70 | +- Implements `ISystemInject<IElectricalResistance>` to inject `Ohm` as the base. |
| 71 | + |
| 72 | +### 5. Capacitance — SI derived unit: farad |
| 73 | + |
| 74 | +| Unit | Symbol | Category | Conversion | Notes | |
| 75 | +|------|--------|----------|------------|-------| |
| 76 | +| **Farad** | F | SI Derived | identity | Named SI unit for capacitance. | |
| 77 | + |
| 78 | +**Implementation notes:** |
| 79 | +- `Farad` implements `ISiUnit, ICapacitance`. |
| 80 | +- Practical capacitance values are typically very small (pF, nF, µF), so metric prefix support (`Si<Pico, Farad>()`, `Si<Nano, Farad>()`, `Si<Micro, Farad>()`) is essential — this is handled automatically by the prefix system. |
| 81 | + |
| 82 | +### 6. MagneticFlux — SI derived unit: weber |
| 83 | + |
| 84 | +| Unit | Symbol | Category | Conversion | Notes | |
| 85 | +|------|--------|----------|------------|-------| |
| 86 | +| **Weber** | Wb | SI Derived | identity | Named SI unit for magnetic flux. | |
| 87 | +| **Maxwell** | Mx | NonStandard | 1 Mx = 10⁻⁸ Wb | CGS unit, still occasionally encountered. | |
| 88 | + |
| 89 | +**Implementation notes:** |
| 90 | +- `Weber` implements `ISiUnit, IMagneticFlux`. |
| 91 | +- `Maxwell` implements `INonStandardUnit, IMagneticFlux` with `ToSi`: `self / 1e8` (rooted in `Weber`). |
| 92 | + |
| 93 | +### 7. MagneticFluxDensity — SI derived unit: tesla |
| 94 | + |
| 95 | +| Unit | Symbol | Category | Conversion | Notes | |
| 96 | +|------|--------|----------|------------|-------| |
| 97 | +| **Tesla** | T | SI Derived | identity | Named SI unit for magnetic flux density. | |
| 98 | +| **Gauss** | G | NonStandard | 1 G = 10⁻⁴ T | CGS unit, very widely used in practice. | |
| 99 | + |
| 100 | +**Implementation notes:** |
| 101 | +- `Tesla` implements `ISiUnit, IMagneticFluxDensity`. |
| 102 | +- `Gauss` implements `INonStandardUnit, IMagneticFluxDensity` with `ToSi`: `self / 1e4` (rooted in `Tesla`). |
| 103 | + |
| 104 | +--- |
| 105 | + |
| 106 | +## Theme 3: Photometry & Fluid Dynamics |
| 107 | + |
| 108 | +### 8. LuminousFlux — SI derived unit: lumen |
| 109 | + |
| 110 | +| Unit | Symbol | Category | Conversion | Notes | |
| 111 | +|------|--------|----------|------------|-------| |
| 112 | +| **Lumen** | lm | SI Derived | identity | Named SI unit. cd·sr, but sr is dimensionless. | |
| 113 | + |
| 114 | +**Implementation notes:** |
| 115 | +- `Lumen` implements `ISiUnit, ILuminousFlux`. |
| 116 | +- Since steradian (solid angle) is dimensionless, `LuminousFlux` is effectively linear in luminous intensity with its own named unit. |
| 117 | + |
| 118 | +### 9. Illuminance — SI derived unit: lux |
| 119 | + |
| 120 | +| Unit | Symbol | Category | Conversion | Notes | |
| 121 | +|------|--------|----------|------------|-------| |
| 122 | +| **Lux** | lx | SI Derived | identity | Named SI unit. lm/m². | |
| 123 | +| **FootCandle** | fc | NonStandard | 1 fc ≈ 10.7639 lx | Common in North American lighting practice. | |
| 124 | + |
| 125 | +**Implementation notes:** |
| 126 | +- `Lux` implements `ISiUnit, IIlluminance`. |
| 127 | +- `FootCandle` implements `INonStandardUnit, IIlluminance` with `ToSi`: `10.7639104167097 * self.RootedIn<Lux>()` (1 lumen per square foot). |
| 128 | + |
| 129 | +### 10. DynamicViscosity — compound only (pascal second) |
| 130 | + |
| 131 | +| Unit | Symbol | Category | Conversion | Notes | |
| 132 | +|------|--------|----------|------------|-------| |
| 133 | +| — | Pa·s | (compound) | — | Expressed as `Product<Pascal, Second>`. No dedicated named SI unit. | |
| 134 | +| **Poise** | P | NonStandard | 1 P = 0.1 Pa·s | CGS unit; often used as centipoise (cP = mPa·s). | |
| 135 | + |
| 136 | +**Implementation notes:** |
| 137 | +- Like Torque, DynamicViscosity has no special-name SI unit; it uses `Pa·s`. |
| 138 | +- `Poise` implements `INonStandardUnit, IDynamicViscosity` with `ToSi`: `self / 10`. |
| 139 | +- In practice, centipoise (cP) is extremely common. With `Poise` defined, `Si<Centi, Poise>()` would not work directly (Poise is non-standard, not metric). Consider also defining a metric `Poiseuille` (= 1 Pa·s) if prefix support is desired, though this name is rarely used. |
| 140 | + |
| 141 | +--- |
| 142 | + |
| 143 | +## Summary Table |
| 144 | + |
| 145 | +| Quantity | Named SI Unit | Additional Units | Notes | |
| 146 | +|----------|--------------|------------------|-------| |
| 147 | +| Torque | — (N·m) | — (lbf·ft, lbf·in) | Compound only; all units are compounds of existing units | |
| 148 | +| AngularVelocity | — (rad/s) | — (rev/min, °/s) | Compound only; all units are quotients of existing angle and time units | |
| 149 | +| AngularAcceleration | — (rad/s²) | — | Compound only; analogous to linear acceleration | |
| 150 | +| ElectricalConductance | Siemens | — | Invertible with Ohm | |
| 151 | +| Capacitance | Farad | — | Prefix support critical | |
| 152 | +| MagneticFlux | Weber | Maxwell | | |
| 153 | +| MagneticFluxDensity | Tesla | Gauss | | |
| 154 | +| LuminousFlux | Lumen | — | | |
| 155 | +| Illuminance | Lux | FootCandle | | |
| 156 | +| DynamicViscosity | — (Pa·s) | Poise | Compound only | |
| 157 | + |
| 158 | +**Total new unit structs: 10** (6 SI derived + 4 non-standard) |
| 159 | + |
| 160 | +Five units originally planned as discrete structs are now compound-only, as all their components already exist: |
| 161 | +- RadianPerSecond → `Quotient<Radian, Second>` |
| 162 | +- RadianPerSecondSquared → compound of `Radian` / `Second`² |
| 163 | +- RevolutionsPerMinute → `Quotient<Turn, Minute>` (`Turn` exists with representation `"rev"`) |
| 164 | +- DegreesPerSecond → `Quotient<Degree, Second>` |
| 165 | +- PoundForceFoot → `Product<PoundForce, Foot>` |
| 166 | + |
| 167 | +## File Locations |
| 168 | + |
| 169 | +| Unit | Path | |
| 170 | +|------|------| |
| 171 | +| Siemens | `Units/Si/Derived/ElectricalConductance/Siemens.ai.cs` | |
| 172 | +| Farad | `Units/Si/Derived/Capacitance/Farad.ai.cs` | |
| 173 | +| Weber | `Units/Si/Derived/MagneticFlux/Weber.ai.cs` | |
| 174 | +| Tesla | `Units/Si/Derived/MagneticFluxDensity/Tesla.ai.cs` | |
| 175 | +| Lumen | `Units/Si/Derived/LuminousFlux/Lumen.ai.cs` | |
| 176 | +| Lux | `Units/Si/Derived/Illuminance/Lux.ai.cs` | |
| 177 | +| Maxwell | `Units/NonStandard/MagneticFlux/Maxwell.ai.cs` | |
| 178 | +| Gauss | `Units/NonStandard/MagneticFluxDensity/Gauss.ai.cs` | |
| 179 | +| FootCandle | `Units/NonStandard/Illuminance/FootCandle.ai.cs` | |
| 180 | +| Poise | `Units/NonStandard/DynamicViscosity/Poise.ai.cs` | |
0 commit comments