A user-facing tour of the semantic quantities currently declared in Semantics.SourceGenerators/Metadata/dimensions.json (62 dimensions, plus 83 semantic overloads). The architecture lives in strategy-unified-vector-quantities.md; this document just shows what's available and how it groups by physics area.
The dimension set evolves with the metadata. If a dimension is here but you can't find a generated type, run
dotnet buildand look underSemantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/.
| Form | Meaning | Generated type pattern |
|---|---|---|
IVector0 |
non-negative magnitude | Speed<T>, Mass<T>, Energy<T>, … |
IVector1 |
signed 1D | Velocity1D<T>, Force1D<T>, Temperature<T> |
IVector2 |
2D directional | Velocity2D<T>, Force2D<T>, Acceleration2D<T> |
IVector3 |
3D directional | Velocity3D<T>, Force3D<T>, Position3D<T> |
IVector4 |
4D directional | Displacement4D<T> and similar (relativistic / spacetime) |
Forms a dimension doesn't declare aren't generated. For example, Mass is V0 only; Energy is V0 only; Velocity declares all of V0..V4.
Seven base dimensions:
Length— V0..V4 with overloadsWidth,Height,Depth,Radius,Diameter,Distance,Altitude,Wavelength,Thickness,Perimeter,Offset,Position3D,Translation3D. Diameter ↔ Radius is a generated relationship.Mass— V0 with overloadAtomicMass.Time— V0 with overloadsDuration,Period,Lifetime,RiseTime,FallTime,DelayTime.ElectricCurrent— V0/V1/V3.Temperature— V0 with overloadsKineticTemperature,ColorTemperature; V1 base for signed deltas.AmountOfSubstance— V0.LuminousIntensity— V0.
var height = Height<double>.FromMeter(1.75);
var atomic = AtomicMass<double>.FromKilogram(1.66e-27);
var lifetime = Lifetime<double>.FromSecond(3600);
var temp = Temperature<double>.FromKelvin(298.15);Area— V0 with overloadsCrossSection,SurfaceArea.Volume— V0 with overloadMolarVolume.Velocity/Acceleration/Jerk/Snap— full V0..V4.Frequency— V0 with overloadsSamplingRate,BitRate,RefreshRate,RotationalSpeed.
// V3 vectors use object-initializer construction (X / Y / Z components)
var velocity3d = new Velocity3D<double> { X = 3.0, Y = 4.0, Z = 0.0 };
var speed = velocity3d.Magnitude(); // 5.0 (Speed<double>)
var sampling = SamplingRate<double>.FromHertz(48_000);AngularDisplacement— V0/V1/V3 with overloads (Phase,RotationAngle,Heading,Pitch,Roll,Yaw).AngularVelocity,AngularAcceleration,AngularJerk— V0/V1/V3.Torque— V0/V1/V3.AngularMomentum— V0/V1/V3.MomentOfInertia— V0.
var heading = Heading<double>.FromRadian(Math.PI / 2); // V0 overload of AngularDisplacement
var omega3d = AngularVelocity3D<double>.FromRadianPerSecond(0.0, 0.0, 1.5);Force— V0..V4 with overloads (Weight,Drag,Thrust,Lift,Friction,Tension,Compression,Normal,Shear).Momentum— V0..V4.Pressure— V0 with overloads (AtmosphericPressure,GaugePressure,AbsolutePressure,VaporPressure,OsmoticPressure,Stress).Energy— V0 with overloads (KineticEnergy,PotentialEnergy,ThermalEnergy,ChemicalEnergy,WorkDone).Power— V0 with overloadRadiantPower.Density— V0.
var weight = Weight<double>.From(ForceMagnitude<double>.FromNewton(686.0));
var drag = Drag<double>.FromNewton(20.0);
var pe = PotentialEnergy<double>.FromJoule(500.0);Entropy— V0 with overloadMolarEntropy.SpecificHeat— V0 with overloadMolarHeatCapacity.ThermalConductivity— V0.HeatTransferCoefficient— V0.ThermalExpansion— V0.
Heat itself is currently expressed via Energy (and its ThermalEnergy overload) rather than a separate dimension.
ElectricCharge— V0/V1.ElectricPotential— V0/V1 with overloads (Voltage,EMF).ElectricField— V0/V1/V2/V3.ElectricResistance,ElectricConductance(overloadAdmittance),ElectricCapacitance,Inductance— V0.MagneticFluxDensity— V0/V3.MagneticFlux— V0.
var v = Voltage<double>.FromVolt(12.0);
var i = ElectricCurrent<double>.FromAmpere(2.0);
var r = v / i; // ElectricResistance<double>
var p = v * i; // Power<double>LuminousFlux— V0.Illuminance— V0 with overloadLuminance.OpticalPower— V0.Irradiance— V0 with overloadsRadiantExitance,Radiance,RadiantIntensity.
var flux = LuminousFlux<double>.FromLumen(800.0);
var lux = flux / Area<double>.FromSquareMeter(4.0); // Illuminance<double>AcousticImpedance— V0.- Most acoustic quantities reuse other dimensions:
Frequency(withSamplingRate/BitRateoverloads),Pressurefor sound pressure,Powerfor acoustic power,LengthforWavelength, etc.
var f = Frequency<double>.FromHertz(440.0); // A4 note
var T = f.Period(); // Time<double>KinematicViscosity— V0 with overloadMomentumDiffusivity.DynamicViscosity— V0.VolumetricFlowRate— V0.MassFlowRate— V0.SurfaceTension— V0.
ReynoldsNumber, MachNumber, SpecificGravity, RefractiveIndex are V0 overloads of Dimensionless.
Concentration— V0.MolarMass— V0.CatalyticActivity— V0 with overloadEnzymeActivity.ReactionRate— V0.MolarEnergy— V0 with overloadsActivationEnergy,EnthalpyOfReaction.
var n = AmountOfSubstance<double>.FromMole(0.5);
var V = Volume<double>.FromCubicMeter(0.002); // 2 L
var M = n / V; // Concentration<double>RadioactiveActivity— V0.AbsorbedDose— V0.EquivalentDose— V0.Exposure— V0.NuclearCrossSection— V0.
Dimensionless— V0 baseRatio(with overloadsRefractiveIndex,ReynoldsNumber,SpecificGravity,MachNumber); V1 baseSignedRatiofor signed quantities such as differential ratios.
Velocity3D<double> v = new() { X = 3.0, Y = 4.0, Z = 0.0 };
Speed<double> s = v.Magnitude(); // 5.0, always >= 0Force3D<double> F = new() { X = 0.0, Y = 10.0, Z = 0.0 };
Displacement3D<double> r = new() { X = 0.5, Y = 0.0, Z = 0.0 };
Torque3D<double> τ = F.Cross(r);Force3D<double> F = new() { X = 10.0, Y = 0.0, Z = 0.0 };
Displacement3D<double> r = new() { X = 2.0, Y = 0.0, Z = 0.0 };
Energy<double> work = F.Dot(r); // 20 JForceMagnitude<double> raw = ForceMagnitude<double>.FromNewton(686.0);
Weight<double> weight = Weight<double>.From(raw); // explicit narrow
ForceMagnitude<double> back = weight; // implicit widenvar R = PhysicalConstants.Generic.GasConstant<double>(); // J/(mol·K)
var n = AmountOfSubstance<double>.FromMole(1.0);
var T = Temperature<double>.FromKelvin(273.15);
var P = Pressure<double>.FromPascal(101_325.0);
// PV = nRT → V = nRT / P
// (constants flow into operators because everything stores SI base units)Edit Semantics.SourceGenerators/Metadata/dimensions.json and rebuild. The full schema and a worked example are in physics-generator.md.