3 ms·
Reynolds Number, Prandtl number, power factor, efficiency, anything that is a fraction of full range, mechanical strain, etc. There are many terms in an engine
by brandmeyer 7y ago
Reynolds Number, Prandtl number, power factor, efficiency, anything that is a fraction of full range, mechanical strain, etc.
There are many terms in an engineering project that are unitless. Having a system to automatically check the units on the remaining scalars is cute, but doesn't do anything to prevent you from improperly performing operations that relate efficiency and power factor by accident, for example.
Multi-input, multi-output control systems regularly assemble state vectors out of terms that have mixed units. You can easily have amps, volts, meters per second, and radians per second in the same mathematical vector.
I have yet to see a compile-time unit-checking scheme that adequately addressed those issues.
- touisteur 7y agoUgh... Kalman filters...
- mckinney 7y agoCan you provide an example involving "operations that relate efficiency and power factor by accident" or similar? I'd like to better understand your problem domain.
- brandmeyer 7y agoThat's kindof like asking for an example of operations that relate length and speed by accident. The whole point is that it is an accident. Its exactly the kind of accident that embedding units into your type system is supposed to prevent. I just find that the kind of trivial examples that folks support this way are just that - trivial examples. They don't scale to the kinds of problems that I am faced with solving.