qnty 0.0.9__py3-none-any.whl → 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. qnty/__init__.py +2 -3
  2. qnty/constants/__init__.py +10 -0
  3. qnty/constants/numerical.py +18 -0
  4. qnty/constants/solvers.py +6 -0
  5. qnty/constants/tests.py +6 -0
  6. qnty/dimensions/__init__.py +23 -0
  7. qnty/dimensions/base.py +97 -0
  8. qnty/dimensions/field_dims.py +126 -0
  9. qnty/dimensions/field_dims.pyi +128 -0
  10. qnty/dimensions/signature.py +111 -0
  11. qnty/equations/__init__.py +1 -1
  12. qnty/equations/equation.py +118 -155
  13. qnty/equations/system.py +68 -65
  14. qnty/expressions/__init__.py +25 -46
  15. qnty/expressions/formatter.py +188 -0
  16. qnty/expressions/functions.py +46 -68
  17. qnty/expressions/nodes.py +539 -384
  18. qnty/expressions/types.py +70 -0
  19. qnty/problems/__init__.py +145 -0
  20. qnty/problems/composition.py +1031 -0
  21. qnty/problems/problem.py +695 -0
  22. qnty/problems/rules.py +145 -0
  23. qnty/problems/solving.py +1216 -0
  24. qnty/problems/validation.py +127 -0
  25. qnty/quantities/__init__.py +28 -5
  26. qnty/quantities/base_qnty.py +677 -0
  27. qnty/quantities/field_converters.py +24004 -0
  28. qnty/quantities/field_qnty.py +1012 -0
  29. qnty/{generated/setters.py → quantities/field_setter.py} +3071 -2961
  30. qnty/{generated/quantities.py → quantities/field_vars.py} +754 -432
  31. qnty/{generated/quantities.pyi → quantities/field_vars.pyi} +1289 -1290
  32. qnty/solving/manager.py +50 -44
  33. qnty/solving/order.py +181 -133
  34. qnty/solving/solvers/__init__.py +2 -9
  35. qnty/solving/solvers/base.py +27 -37
  36. qnty/solving/solvers/iterative.py +115 -135
  37. qnty/solving/solvers/simultaneous.py +93 -165
  38. qnty/units/__init__.py +1 -0
  39. qnty/{generated/units.py → units/field_units.py} +1700 -991
  40. qnty/units/field_units.pyi +2461 -0
  41. qnty/units/prefixes.py +58 -105
  42. qnty/units/registry.py +76 -89
  43. qnty/utils/__init__.py +16 -0
  44. qnty/utils/caching/__init__.py +23 -0
  45. qnty/utils/caching/manager.py +401 -0
  46. qnty/utils/error_handling/__init__.py +66 -0
  47. qnty/utils/error_handling/context.py +39 -0
  48. qnty/utils/error_handling/exceptions.py +96 -0
  49. qnty/utils/error_handling/handlers.py +171 -0
  50. qnty/utils/logging.py +4 -4
  51. qnty/utils/protocols.py +164 -0
  52. qnty/utils/scope_discovery.py +420 -0
  53. {qnty-0.0.9.dist-info → qnty-0.1.0.dist-info}/METADATA +1 -1
  54. qnty-0.1.0.dist-info/RECORD +60 -0
  55. qnty/_backup/problem_original.py +0 -1251
  56. qnty/_backup/quantity.py +0 -63
  57. qnty/codegen/cli.py +0 -125
  58. qnty/codegen/generators/data/unit_data.json +0 -8807
  59. qnty/codegen/generators/data_processor.py +0 -345
  60. qnty/codegen/generators/dimensions_gen.py +0 -434
  61. qnty/codegen/generators/doc_generator.py +0 -141
  62. qnty/codegen/generators/out/dimension_mapping.json +0 -974
  63. qnty/codegen/generators/out/dimension_metadata.json +0 -123
  64. qnty/codegen/generators/out/units_metadata.json +0 -223
  65. qnty/codegen/generators/quantities_gen.py +0 -159
  66. qnty/codegen/generators/setters_gen.py +0 -178
  67. qnty/codegen/generators/stubs_gen.py +0 -167
  68. qnty/codegen/generators/units_gen.py +0 -295
  69. qnty/expressions/cache.py +0 -94
  70. qnty/generated/dimensions.py +0 -514
  71. qnty/problem/__init__.py +0 -91
  72. qnty/problem/base.py +0 -142
  73. qnty/problem/composition.py +0 -385
  74. qnty/problem/composition_mixin.py +0 -382
  75. qnty/problem/equations.py +0 -413
  76. qnty/problem/metaclass.py +0 -302
  77. qnty/problem/reconstruction.py +0 -1016
  78. qnty/problem/solving.py +0 -180
  79. qnty/problem/validation.py +0 -64
  80. qnty/problem/variables.py +0 -239
  81. qnty/quantities/expression_quantity.py +0 -314
  82. qnty/quantities/quantity.py +0 -428
  83. qnty/quantities/typed_quantity.py +0 -215
  84. qnty/validation/__init__.py +0 -0
  85. qnty/validation/registry.py +0 -0
  86. qnty/validation/rules.py +0 -167
  87. qnty-0.0.9.dist-info/RECORD +0 -63
  88. /qnty/{codegen → extensions}/__init__.py +0 -0
  89. /qnty/{codegen/generators → extensions/integration}/__init__.py +0 -0
  90. /qnty/{codegen/generators/utils → extensions/plotting}/__init__.py +0 -0
  91. /qnty/{generated → extensions/reporting}/__init__.py +0 -0
  92. {qnty-0.0.9.dist-info → qnty-0.1.0.dist-info}/WHEEL +0 -0
@@ -4,17 +4,18 @@ Quantity Classes Module - Static Edition
4
4
 
5
5
  Static quantity class definitions for maximum import performance.
6
6
  Uses static class generation instead of dynamic type() calls.
7
- Auto-generated from unit_data.json.
7
+ Auto-generated by codegen/generators/field_vars.py
8
+ DO NOT EDIT MANUALLY - changes will be overwritten.
8
9
  """
9
10
 
10
- from ..quantities.typed_quantity import TypedQuantity
11
- from . import dimensions as dim
12
- from . import setters as ts
11
+ from ..dimensions import field_dims as dim
12
+ from . import field_setter as ts
13
+ from .field_qnty import FieldQnty
13
14
 
14
15
  # ===== QUANTITY CLASSES =====
15
16
  # Static quantity class definitions with __slots__ optimization
16
17
 
17
- class AbsorbedDose(TypedQuantity):
18
+ class AbsorbedDose(FieldQnty):
18
19
  """
19
20
  Type-safe absorbed radiation dose quantity with expression capabilities.
20
21
 
@@ -30,10 +31,11 @@ class AbsorbedDose(TypedQuantity):
30
31
 
31
32
  Available units: "erg_per_gram", "gram_rad", "gray"
32
33
  """
34
+
33
35
  __slots__ = ()
34
36
  _setter_class = ts.AbsorbedDoseSetter
35
- _expected_dimension = dim.ABSORBED_DOSE
36
-
37
+ _dimension = dim.ABSORBED_DOSE
38
+
37
39
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
38
40
  """
39
41
  Initialize absorbed radiation dose quantity.
@@ -52,13 +54,15 @@ class AbsorbedDose(TypedQuantity):
52
54
  super().__init__(name_or_value, unit, name, is_known=is_known)
53
55
  else:
54
56
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
57
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
55
58
 
56
- def set(self, value: int | float) -> ts.AbsorbedDoseSetter:
59
+ def set(self, value: float, unit: str | None = None) -> ts.AbsorbedDoseSetter:
57
60
  """
58
61
  Create a setter for this absorbed radiation dose quantity.
59
62
 
60
63
  Args:
61
64
  value: The numeric value to set
65
+ unit: Optional unit string (for compatibility with base class)
62
66
 
63
67
  Returns:
64
68
  AbsorbedDoseSetter: A setter with unit properties like .meters, .inches, etc.
@@ -70,7 +74,7 @@ class AbsorbedDose(TypedQuantity):
70
74
  return ts.AbsorbedDoseSetter(self, value)
71
75
 
72
76
 
73
- class Acceleration(TypedQuantity):
77
+ class Acceleration(FieldQnty):
74
78
  """
75
79
  Type-safe acceleration quantity with expression capabilities.
76
80
 
@@ -86,10 +90,11 @@ class Acceleration(TypedQuantity):
86
90
 
87
91
  Available units: "meter_per_second_squared", "foot_per_second_squared"
88
92
  """
93
+
89
94
  __slots__ = ()
90
95
  _setter_class = ts.AccelerationSetter
91
- _expected_dimension = dim.ACCELERATION
92
-
96
+ _dimension = dim.ACCELERATION
97
+
93
98
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
94
99
  """
95
100
  Initialize acceleration quantity.
@@ -108,13 +113,15 @@ class Acceleration(TypedQuantity):
108
113
  super().__init__(name_or_value, unit, name, is_known=is_known)
109
114
  else:
110
115
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
116
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
111
117
 
112
- def set(self, value: int | float) -> ts.AccelerationSetter:
118
+ def set(self, value: float, unit: str | None = None) -> ts.AccelerationSetter:
113
119
  """
114
120
  Create a setter for this acceleration quantity.
115
121
 
116
122
  Args:
117
123
  value: The numeric value to set
124
+ unit: Optional unit string (for compatibility with base class)
118
125
 
119
126
  Returns:
120
127
  AccelerationSetter: A setter with unit properties like .meters, .inches, etc.
@@ -126,7 +133,7 @@ class Acceleration(TypedQuantity):
126
133
  return ts.AccelerationSetter(self, value)
127
134
 
128
135
 
129
- class ActivationEnergy(TypedQuantity):
136
+ class ActivationEnergy(FieldQnty):
130
137
  """
131
138
  Type-safe activation energy quantity with expression capabilities.
132
139
 
@@ -142,10 +149,11 @@ class ActivationEnergy(TypedQuantity):
142
149
 
143
150
  Available units: "btu_per_pound_mole", "calorie_mean_per_gram_mole", "joule_per_gram_mole"
144
151
  """
152
+
145
153
  __slots__ = ()
146
154
  _setter_class = ts.ActivationEnergySetter
147
- _expected_dimension = dim.ACTIVATION_ENERGY
148
-
155
+ _dimension = dim.ACTIVATION_ENERGY
156
+
149
157
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
150
158
  """
151
159
  Initialize activation energy quantity.
@@ -164,13 +172,15 @@ class ActivationEnergy(TypedQuantity):
164
172
  super().__init__(name_or_value, unit, name, is_known=is_known)
165
173
  else:
166
174
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
175
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
167
176
 
168
- def set(self, value: int | float) -> ts.ActivationEnergySetter:
177
+ def set(self, value: float, unit: str | None = None) -> ts.ActivationEnergySetter:
169
178
  """
170
179
  Create a setter for this activation energy quantity.
171
180
 
172
181
  Args:
173
182
  value: The numeric value to set
183
+ unit: Optional unit string (for compatibility with base class)
174
184
 
175
185
  Returns:
176
186
  ActivationEnergySetter: A setter with unit properties like .meters, .inches, etc.
@@ -182,7 +192,7 @@ class ActivationEnergy(TypedQuantity):
182
192
  return ts.ActivationEnergySetter(self, value)
183
193
 
184
194
 
185
- class AmountOfSubstance(TypedQuantity):
195
+ class AmountOfSubstance(FieldQnty):
186
196
  """
187
197
  Type-safe amount of substance quantity with expression capabilities.
188
198
 
@@ -198,10 +208,11 @@ class AmountOfSubstance(TypedQuantity):
198
208
 
199
209
  Available units: "kilogram_mol", "mole", "pound_mole"
200
210
  """
211
+
201
212
  __slots__ = ()
202
213
  _setter_class = ts.AmountOfSubstanceSetter
203
- _expected_dimension = dim.AMOUNT_OF_SUBSTANCE
204
-
214
+ _dimension = dim.AMOUNT_OF_SUBSTANCE
215
+
205
216
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
206
217
  """
207
218
  Initialize amount of substance quantity.
@@ -220,13 +231,15 @@ class AmountOfSubstance(TypedQuantity):
220
231
  super().__init__(name_or_value, unit, name, is_known=is_known)
221
232
  else:
222
233
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
234
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
223
235
 
224
- def set(self, value: int | float) -> ts.AmountOfSubstanceSetter:
236
+ def set(self, value: float, unit: str | None = None) -> ts.AmountOfSubstanceSetter:
225
237
  """
226
238
  Create a setter for this amount of substance quantity.
227
239
 
228
240
  Args:
229
241
  value: The numeric value to set
242
+ unit: Optional unit string (for compatibility with base class)
230
243
 
231
244
  Returns:
232
245
  AmountOfSubstanceSetter: A setter with unit properties like .meters, .inches, etc.
@@ -238,7 +251,7 @@ class AmountOfSubstance(TypedQuantity):
238
251
  return ts.AmountOfSubstanceSetter(self, value)
239
252
 
240
253
 
241
- class AnglePlane(TypedQuantity):
254
+ class AnglePlane(FieldQnty):
242
255
  """
243
256
  Type-safe angle, plane quantity with expression capabilities.
244
257
 
@@ -254,10 +267,11 @@ class AnglePlane(TypedQuantity):
254
267
 
255
268
  Available units: "degree", "gon", "grade"
256
269
  """
270
+
257
271
  __slots__ = ()
258
272
  _setter_class = ts.AnglePlaneSetter
259
- _expected_dimension = dim.ANGLE_PLANE
260
-
273
+ _dimension = dim.ANGLE_PLANE
274
+
261
275
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
262
276
  """
263
277
  Initialize angle, plane quantity.
@@ -276,13 +290,15 @@ class AnglePlane(TypedQuantity):
276
290
  super().__init__(name_or_value, unit, name, is_known=is_known)
277
291
  else:
278
292
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
293
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
279
294
 
280
- def set(self, value: int | float) -> ts.AnglePlaneSetter:
295
+ def set(self, value: float, unit: str | None = None) -> ts.AnglePlaneSetter:
281
296
  """
282
297
  Create a setter for this angle, plane quantity.
283
298
 
284
299
  Args:
285
300
  value: The numeric value to set
301
+ unit: Optional unit string (for compatibility with base class)
286
302
 
287
303
  Returns:
288
304
  AnglePlaneSetter: A setter with unit properties like .meters, .inches, etc.
@@ -294,7 +310,7 @@ class AnglePlane(TypedQuantity):
294
310
  return ts.AnglePlaneSetter(self, value)
295
311
 
296
312
 
297
- class AngleSolid(TypedQuantity):
313
+ class AngleSolid(FieldQnty):
298
314
  """
299
315
  Type-safe angle, solid quantity with expression capabilities.
300
316
 
@@ -310,10 +326,11 @@ class AngleSolid(TypedQuantity):
310
326
 
311
327
  Available units: "spat", "square_degree", "square_gon"
312
328
  """
329
+
313
330
  __slots__ = ()
314
331
  _setter_class = ts.AngleSolidSetter
315
- _expected_dimension = dim.ANGLE_SOLID
316
-
332
+ _dimension = dim.ANGLE_SOLID
333
+
317
334
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
318
335
  """
319
336
  Initialize angle, solid quantity.
@@ -332,13 +349,15 @@ class AngleSolid(TypedQuantity):
332
349
  super().__init__(name_or_value, unit, name, is_known=is_known)
333
350
  else:
334
351
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
352
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
335
353
 
336
- def set(self, value: int | float) -> ts.AngleSolidSetter:
354
+ def set(self, value: float, unit: str | None = None) -> ts.AngleSolidSetter:
337
355
  """
338
356
  Create a setter for this angle, solid quantity.
339
357
 
340
358
  Args:
341
359
  value: The numeric value to set
360
+ unit: Optional unit string (for compatibility with base class)
342
361
 
343
362
  Returns:
344
363
  AngleSolidSetter: A setter with unit properties like .meters, .inches, etc.
@@ -350,7 +369,7 @@ class AngleSolid(TypedQuantity):
350
369
  return ts.AngleSolidSetter(self, value)
351
370
 
352
371
 
353
- class AngularAcceleration(TypedQuantity):
372
+ class AngularAcceleration(FieldQnty):
354
373
  """
355
374
  Type-safe angular acceleration quantity with expression capabilities.
356
375
 
@@ -366,10 +385,11 @@ class AngularAcceleration(TypedQuantity):
366
385
 
367
386
  Available units: "radian_per_second_squared", "revolution_per_second_squared", "rpm_or_revolution_per_minute"
368
387
  """
388
+
369
389
  __slots__ = ()
370
390
  _setter_class = ts.AngularAccelerationSetter
371
- _expected_dimension = dim.ANGULAR_ACCELERATION
372
-
391
+ _dimension = dim.ANGULAR_ACCELERATION
392
+
373
393
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
374
394
  """
375
395
  Initialize angular acceleration quantity.
@@ -388,13 +408,15 @@ class AngularAcceleration(TypedQuantity):
388
408
  super().__init__(name_or_value, unit, name, is_known=is_known)
389
409
  else:
390
410
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
411
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
391
412
 
392
- def set(self, value: int | float) -> ts.AngularAccelerationSetter:
413
+ def set(self, value: float, unit: str | None = None) -> ts.AngularAccelerationSetter:
393
414
  """
394
415
  Create a setter for this angular acceleration quantity.
395
416
 
396
417
  Args:
397
418
  value: The numeric value to set
419
+ unit: Optional unit string (for compatibility with base class)
398
420
 
399
421
  Returns:
400
422
  AngularAccelerationSetter: A setter with unit properties like .meters, .inches, etc.
@@ -406,7 +428,7 @@ class AngularAcceleration(TypedQuantity):
406
428
  return ts.AngularAccelerationSetter(self, value)
407
429
 
408
430
 
409
- class AngularMomentum(TypedQuantity):
431
+ class AngularMomentum(FieldQnty):
410
432
  """
411
433
  Type-safe angular momentum quantity with expression capabilities.
412
434
 
@@ -422,10 +444,11 @@ class AngularMomentum(TypedQuantity):
422
444
 
423
445
  Available units: "gram_centimeter_squared_per_second", "kilogram_meter_squared_per_second", "pound_force_square_foot_per_second"
424
446
  """
447
+
425
448
  __slots__ = ()
426
449
  _setter_class = ts.AngularMomentumSetter
427
- _expected_dimension = dim.ANGULAR_MOMENTUM
428
-
450
+ _dimension = dim.ANGULAR_MOMENTUM
451
+
429
452
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
430
453
  """
431
454
  Initialize angular momentum quantity.
@@ -444,13 +467,15 @@ class AngularMomentum(TypedQuantity):
444
467
  super().__init__(name_or_value, unit, name, is_known=is_known)
445
468
  else:
446
469
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
470
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
447
471
 
448
- def set(self, value: int | float) -> ts.AngularMomentumSetter:
472
+ def set(self, value: float, unit: str | None = None) -> ts.AngularMomentumSetter:
449
473
  """
450
474
  Create a setter for this angular momentum quantity.
451
475
 
452
476
  Args:
453
477
  value: The numeric value to set
478
+ unit: Optional unit string (for compatibility with base class)
454
479
 
455
480
  Returns:
456
481
  AngularMomentumSetter: A setter with unit properties like .meters, .inches, etc.
@@ -462,7 +487,7 @@ class AngularMomentum(TypedQuantity):
462
487
  return ts.AngularMomentumSetter(self, value)
463
488
 
464
489
 
465
- class Area(TypedQuantity):
490
+ class Area(FieldQnty):
466
491
  """
467
492
  Type-safe area quantity with expression capabilities.
468
493
 
@@ -478,10 +503,11 @@ class Area(TypedQuantity):
478
503
 
479
504
  Available units: "acre_general", "are", "arpent_quebec"
480
505
  """
506
+
481
507
  __slots__ = ()
482
508
  _setter_class = ts.AreaSetter
483
- _expected_dimension = dim.AREA
484
-
509
+ _dimension = dim.AREA
510
+
485
511
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
486
512
  """
487
513
  Initialize area quantity.
@@ -500,13 +526,15 @@ class Area(TypedQuantity):
500
526
  super().__init__(name_or_value, unit, name, is_known=is_known)
501
527
  else:
502
528
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
529
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
503
530
 
504
- def set(self, value: int | float) -> ts.AreaSetter:
531
+ def set(self, value: float, unit: str | None = None) -> ts.AreaSetter:
505
532
  """
506
533
  Create a setter for this area quantity.
507
534
 
508
535
  Args:
509
536
  value: The numeric value to set
537
+ unit: Optional unit string (for compatibility with base class)
510
538
 
511
539
  Returns:
512
540
  AreaSetter: A setter with unit properties like .meters, .inches, etc.
@@ -518,7 +546,7 @@ class Area(TypedQuantity):
518
546
  return ts.AreaSetter(self, value)
519
547
 
520
548
 
521
- class AreaPerUnitVolume(TypedQuantity):
549
+ class AreaPerUnitVolume(FieldQnty):
522
550
  """
523
551
  Type-safe area per unit volume quantity with expression capabilities.
524
552
 
@@ -534,10 +562,11 @@ class AreaPerUnitVolume(TypedQuantity):
534
562
 
535
563
  Available units: "square_centimeter_per_cubic_centimeter", "square_foot_per_cubic_foot", "square_inch_per_cubic_inch"
536
564
  """
565
+
537
566
  __slots__ = ()
538
567
  _setter_class = ts.AreaPerUnitVolumeSetter
539
- _expected_dimension = dim.AREA_PER_UNIT_VOLUME
540
-
568
+ _dimension = dim.AREA_PER_UNIT_VOLUME
569
+
541
570
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
542
571
  """
543
572
  Initialize area per unit volume quantity.
@@ -556,13 +585,15 @@ class AreaPerUnitVolume(TypedQuantity):
556
585
  super().__init__(name_or_value, unit, name, is_known=is_known)
557
586
  else:
558
587
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
588
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
559
589
 
560
- def set(self, value: int | float) -> ts.AreaPerUnitVolumeSetter:
590
+ def set(self, value: float, unit: str | None = None) -> ts.AreaPerUnitVolumeSetter:
561
591
  """
562
592
  Create a setter for this area per unit volume quantity.
563
593
 
564
594
  Args:
565
595
  value: The numeric value to set
596
+ unit: Optional unit string (for compatibility with base class)
566
597
 
567
598
  Returns:
568
599
  AreaPerUnitVolumeSetter: A setter with unit properties like .meters, .inches, etc.
@@ -574,7 +605,7 @@ class AreaPerUnitVolume(TypedQuantity):
574
605
  return ts.AreaPerUnitVolumeSetter(self, value)
575
606
 
576
607
 
577
- class AtomicWeight(TypedQuantity):
608
+ class AtomicWeight(FieldQnty):
578
609
  """
579
610
  Type-safe atomic weight quantity with expression capabilities.
580
611
 
@@ -590,10 +621,11 @@ class AtomicWeight(TypedQuantity):
590
621
 
591
622
  Available units: "atomic_mass_unit_12c", "grams_per_mole", "kilograms_per_kilomole"
592
623
  """
624
+
593
625
  __slots__ = ()
594
626
  _setter_class = ts.AtomicWeightSetter
595
- _expected_dimension = dim.ATOMIC_WEIGHT
596
-
627
+ _dimension = dim.ATOMIC_WEIGHT
628
+
597
629
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
598
630
  """
599
631
  Initialize atomic weight quantity.
@@ -612,13 +644,15 @@ class AtomicWeight(TypedQuantity):
612
644
  super().__init__(name_or_value, unit, name, is_known=is_known)
613
645
  else:
614
646
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
647
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
615
648
 
616
- def set(self, value: int | float) -> ts.AtomicWeightSetter:
649
+ def set(self, value: float, unit: str | None = None) -> ts.AtomicWeightSetter:
617
650
  """
618
651
  Create a setter for this atomic weight quantity.
619
652
 
620
653
  Args:
621
654
  value: The numeric value to set
655
+ unit: Optional unit string (for compatibility with base class)
622
656
 
623
657
  Returns:
624
658
  AtomicWeightSetter: A setter with unit properties like .meters, .inches, etc.
@@ -630,7 +664,7 @@ class AtomicWeight(TypedQuantity):
630
664
  return ts.AtomicWeightSetter(self, value)
631
665
 
632
666
 
633
- class Concentration(TypedQuantity):
667
+ class Concentration(FieldQnty):
634
668
  """
635
669
  Type-safe concentration quantity with expression capabilities.
636
670
 
@@ -646,10 +680,11 @@ class Concentration(TypedQuantity):
646
680
 
647
681
  Available units: "grains_of_i_per_cubic_foot", "grains_of_i_per_gallon_us"
648
682
  """
683
+
649
684
  __slots__ = ()
650
685
  _setter_class = ts.ConcentrationSetter
651
- _expected_dimension = dim.CONCENTRATION
652
-
686
+ _dimension = dim.CONCENTRATION
687
+
653
688
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
654
689
  """
655
690
  Initialize concentration quantity.
@@ -668,13 +703,15 @@ class Concentration(TypedQuantity):
668
703
  super().__init__(name_or_value, unit, name, is_known=is_known)
669
704
  else:
670
705
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
706
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
671
707
 
672
- def set(self, value: int | float) -> ts.ConcentrationSetter:
708
+ def set(self, value: float, unit: str | None = None) -> ts.ConcentrationSetter:
673
709
  """
674
710
  Create a setter for this concentration quantity.
675
711
 
676
712
  Args:
677
713
  value: The numeric value to set
714
+ unit: Optional unit string (for compatibility with base class)
678
715
 
679
716
  Returns:
680
717
  ConcentrationSetter: A setter with unit properties like .meters, .inches, etc.
@@ -686,7 +723,7 @@ class Concentration(TypedQuantity):
686
723
  return ts.ConcentrationSetter(self, value)
687
724
 
688
725
 
689
- class Dimensionless(TypedQuantity):
726
+ class Dimensionless(FieldQnty):
690
727
  """
691
728
  Type-safe dimensionless quantity with expression capabilities.
692
729
 
@@ -700,10 +737,11 @@ class Dimensionless(TypedQuantity):
700
737
  >>> unknown = Dimensionless("efficiency") # Unknown dimensionless
701
738
  >>> known = Dimensionless(0.85, "thermal_efficiency") # Known dimensionless
702
739
  """
740
+
703
741
  __slots__ = ()
704
742
  _setter_class = ts.DimensionlessSetter
705
- _expected_dimension = dim.DIMENSIONLESS
706
-
743
+ _dimension = dim.DIMENSIONLESS
744
+
707
745
  def __init__(self, name_or_value: str | int | float, name: str | None = None, is_known: bool = True):
708
746
  """
709
747
  Initialize dimensionless quantity.
@@ -719,13 +757,15 @@ class Dimensionless(TypedQuantity):
719
757
  else:
720
758
  # Two arguments: value and name (known variable)
721
759
  super().__init__(name_or_value, name, is_known=is_known)
760
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
722
761
 
723
- def set(self, value: int | float) -> ts.DimensionlessSetter:
762
+ def set(self, value: float, unit: str | None = None) -> ts.DimensionlessSetter:
724
763
  """
725
764
  Create a setter for this dimensionless quantity.
726
765
 
727
766
  Args:
728
767
  value: The numeric value to set
768
+ unit: Optional unit string (for compatibility with base class)
729
769
 
730
770
  Returns:
731
771
  DimensionlessSetter: A setter with unit properties like .meters, .inches, etc.
@@ -737,7 +777,7 @@ class Dimensionless(TypedQuantity):
737
777
  return ts.DimensionlessSetter(self, value)
738
778
 
739
779
 
740
- class DynamicFluidity(TypedQuantity):
780
+ class DynamicFluidity(FieldQnty):
741
781
  """
742
782
  Type-safe dynamic fluidity quantity with expression capabilities.
743
783
 
@@ -753,10 +793,11 @@ class DynamicFluidity(TypedQuantity):
753
793
 
754
794
  Available units: "meter_seconds_per_kilogram", "rhe", "square_foot_per_pound_second"
755
795
  """
796
+
756
797
  __slots__ = ()
757
798
  _setter_class = ts.DynamicFluiditySetter
758
- _expected_dimension = dim.DYNAMIC_FLUIDITY
759
-
799
+ _dimension = dim.DYNAMIC_FLUIDITY
800
+
760
801
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
761
802
  """
762
803
  Initialize dynamic fluidity quantity.
@@ -775,13 +816,15 @@ class DynamicFluidity(TypedQuantity):
775
816
  super().__init__(name_or_value, unit, name, is_known=is_known)
776
817
  else:
777
818
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
819
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
778
820
 
779
- def set(self, value: int | float) -> ts.DynamicFluiditySetter:
821
+ def set(self, value: float, unit: str | None = None) -> ts.DynamicFluiditySetter:
780
822
  """
781
823
  Create a setter for this dynamic fluidity quantity.
782
824
 
783
825
  Args:
784
826
  value: The numeric value to set
827
+ unit: Optional unit string (for compatibility with base class)
785
828
 
786
829
  Returns:
787
830
  DynamicFluiditySetter: A setter with unit properties like .meters, .inches, etc.
@@ -793,7 +836,7 @@ class DynamicFluidity(TypedQuantity):
793
836
  return ts.DynamicFluiditySetter(self, value)
794
837
 
795
838
 
796
- class ElectricCapacitance(TypedQuantity):
839
+ class ElectricCapacitance(FieldQnty):
797
840
  """
798
841
  Type-safe electric capacitance quantity with expression capabilities.
799
842
 
@@ -809,10 +852,11 @@ class ElectricCapacitance(TypedQuantity):
809
852
 
810
853
  Available units: "cm", "abfarad", "farad"
811
854
  """
855
+
812
856
  __slots__ = ()
813
857
  _setter_class = ts.ElectricCapacitanceSetter
814
- _expected_dimension = dim.ELECTRIC_CAPACITANCE
815
-
858
+ _dimension = dim.ELECTRIC_CAPACITANCE
859
+
816
860
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
817
861
  """
818
862
  Initialize electric capacitance quantity.
@@ -831,13 +875,15 @@ class ElectricCapacitance(TypedQuantity):
831
875
  super().__init__(name_or_value, unit, name, is_known=is_known)
832
876
  else:
833
877
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
878
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
834
879
 
835
- def set(self, value: int | float) -> ts.ElectricCapacitanceSetter:
880
+ def set(self, value: float, unit: str | None = None) -> ts.ElectricCapacitanceSetter:
836
881
  """
837
882
  Create a setter for this electric capacitance quantity.
838
883
 
839
884
  Args:
840
885
  value: The numeric value to set
886
+ unit: Optional unit string (for compatibility with base class)
841
887
 
842
888
  Returns:
843
889
  ElectricCapacitanceSetter: A setter with unit properties like .meters, .inches, etc.
@@ -849,7 +895,7 @@ class ElectricCapacitance(TypedQuantity):
849
895
  return ts.ElectricCapacitanceSetter(self, value)
850
896
 
851
897
 
852
- class ElectricCharge(TypedQuantity):
898
+ class ElectricCharge(FieldQnty):
853
899
  """
854
900
  Type-safe electric charge quantity with expression capabilities.
855
901
 
@@ -865,10 +911,11 @@ class ElectricCharge(TypedQuantity):
865
911
 
866
912
  Available units: "abcoulomb", "ampere_hour", "coulomb"
867
913
  """
914
+
868
915
  __slots__ = ()
869
916
  _setter_class = ts.ElectricChargeSetter
870
- _expected_dimension = dim.ELECTRIC_CHARGE
871
-
917
+ _dimension = dim.ELECTRIC_CHARGE
918
+
872
919
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
873
920
  """
874
921
  Initialize electric charge quantity.
@@ -887,13 +934,15 @@ class ElectricCharge(TypedQuantity):
887
934
  super().__init__(name_or_value, unit, name, is_known=is_known)
888
935
  else:
889
936
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
937
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
890
938
 
891
- def set(self, value: int | float) -> ts.ElectricChargeSetter:
939
+ def set(self, value: float, unit: str | None = None) -> ts.ElectricChargeSetter:
892
940
  """
893
941
  Create a setter for this electric charge quantity.
894
942
 
895
943
  Args:
896
944
  value: The numeric value to set
945
+ unit: Optional unit string (for compatibility with base class)
897
946
 
898
947
  Returns:
899
948
  ElectricChargeSetter: A setter with unit properties like .meters, .inches, etc.
@@ -905,7 +954,7 @@ class ElectricCharge(TypedQuantity):
905
954
  return ts.ElectricChargeSetter(self, value)
906
955
 
907
956
 
908
- class ElectricCurrentIntensity(TypedQuantity):
957
+ class ElectricCurrentIntensity(FieldQnty):
909
958
  """
910
959
  Type-safe electric current intensity quantity with expression capabilities.
911
960
 
@@ -921,10 +970,11 @@ class ElectricCurrentIntensity(TypedQuantity):
921
970
 
922
971
  Available units: "abampere", "ampere_intl_mean", "ampere_intl_us"
923
972
  """
973
+
924
974
  __slots__ = ()
925
975
  _setter_class = ts.ElectricCurrentIntensitySetter
926
- _expected_dimension = dim.ELECTRIC_CURRENT_INTENSITY
927
-
976
+ _dimension = dim.ELECTRIC_CURRENT_INTENSITY
977
+
928
978
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
929
979
  """
930
980
  Initialize electric current intensity quantity.
@@ -943,13 +993,15 @@ class ElectricCurrentIntensity(TypedQuantity):
943
993
  super().__init__(name_or_value, unit, name, is_known=is_known)
944
994
  else:
945
995
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
996
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
946
997
 
947
- def set(self, value: int | float) -> ts.ElectricCurrentIntensitySetter:
998
+ def set(self, value: float, unit: str | None = None) -> ts.ElectricCurrentIntensitySetter:
948
999
  """
949
1000
  Create a setter for this electric current intensity quantity.
950
1001
 
951
1002
  Args:
952
1003
  value: The numeric value to set
1004
+ unit: Optional unit string (for compatibility with base class)
953
1005
 
954
1006
  Returns:
955
1007
  ElectricCurrentIntensitySetter: A setter with unit properties like .meters, .inches, etc.
@@ -961,7 +1013,7 @@ class ElectricCurrentIntensity(TypedQuantity):
961
1013
  return ts.ElectricCurrentIntensitySetter(self, value)
962
1014
 
963
1015
 
964
- class ElectricDipoleMoment(TypedQuantity):
1016
+ class ElectricDipoleMoment(FieldQnty):
965
1017
  """
966
1018
  Type-safe electric dipole moment quantity with expression capabilities.
967
1019
 
@@ -977,10 +1029,11 @@ class ElectricDipoleMoment(TypedQuantity):
977
1029
 
978
1030
  Available units: "ampere_meter_second", "coulomb_meter", "debye"
979
1031
  """
1032
+
980
1033
  __slots__ = ()
981
1034
  _setter_class = ts.ElectricDipoleMomentSetter
982
- _expected_dimension = dim.ELECTRIC_DIPOLE_MOMENT
983
-
1035
+ _dimension = dim.ELECTRIC_DIPOLE_MOMENT
1036
+
984
1037
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
985
1038
  """
986
1039
  Initialize electric dipole moment quantity.
@@ -999,13 +1052,15 @@ class ElectricDipoleMoment(TypedQuantity):
999
1052
  super().__init__(name_or_value, unit, name, is_known=is_known)
1000
1053
  else:
1001
1054
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
1055
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
1002
1056
 
1003
- def set(self, value: int | float) -> ts.ElectricDipoleMomentSetter:
1057
+ def set(self, value: float, unit: str | None = None) -> ts.ElectricDipoleMomentSetter:
1004
1058
  """
1005
1059
  Create a setter for this electric dipole moment quantity.
1006
1060
 
1007
1061
  Args:
1008
1062
  value: The numeric value to set
1063
+ unit: Optional unit string (for compatibility with base class)
1009
1064
 
1010
1065
  Returns:
1011
1066
  ElectricDipoleMomentSetter: A setter with unit properties like .meters, .inches, etc.
@@ -1017,7 +1072,7 @@ class ElectricDipoleMoment(TypedQuantity):
1017
1072
  return ts.ElectricDipoleMomentSetter(self, value)
1018
1073
 
1019
1074
 
1020
- class ElectricFieldStrength(TypedQuantity):
1075
+ class ElectricFieldStrength(FieldQnty):
1021
1076
  """
1022
1077
  Type-safe electric field strength quantity with expression capabilities.
1023
1078
 
@@ -1033,10 +1088,11 @@ class ElectricFieldStrength(TypedQuantity):
1033
1088
 
1034
1089
  Available units: "volt_per_centimeter", "volt_per_meter"
1035
1090
  """
1091
+
1036
1092
  __slots__ = ()
1037
1093
  _setter_class = ts.ElectricFieldStrengthSetter
1038
- _expected_dimension = dim.ELECTRIC_FIELD_STRENGTH
1039
-
1094
+ _dimension = dim.ELECTRIC_FIELD_STRENGTH
1095
+
1040
1096
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
1041
1097
  """
1042
1098
  Initialize electric field strength quantity.
@@ -1055,13 +1111,15 @@ class ElectricFieldStrength(TypedQuantity):
1055
1111
  super().__init__(name_or_value, unit, name, is_known=is_known)
1056
1112
  else:
1057
1113
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
1114
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
1058
1115
 
1059
- def set(self, value: int | float) -> ts.ElectricFieldStrengthSetter:
1116
+ def set(self, value: float, unit: str | None = None) -> ts.ElectricFieldStrengthSetter:
1060
1117
  """
1061
1118
  Create a setter for this electric field strength quantity.
1062
1119
 
1063
1120
  Args:
1064
1121
  value: The numeric value to set
1122
+ unit: Optional unit string (for compatibility with base class)
1065
1123
 
1066
1124
  Returns:
1067
1125
  ElectricFieldStrengthSetter: A setter with unit properties like .meters, .inches, etc.
@@ -1073,7 +1131,7 @@ class ElectricFieldStrength(TypedQuantity):
1073
1131
  return ts.ElectricFieldStrengthSetter(self, value)
1074
1132
 
1075
1133
 
1076
- class ElectricInductance(TypedQuantity):
1134
+ class ElectricInductance(FieldQnty):
1077
1135
  """
1078
1136
  Type-safe electric inductance quantity with expression capabilities.
1079
1137
 
@@ -1089,10 +1147,11 @@ class ElectricInductance(TypedQuantity):
1089
1147
 
1090
1148
  Available units: "abhenry", "cm", "henry"
1091
1149
  """
1150
+
1092
1151
  __slots__ = ()
1093
1152
  _setter_class = ts.ElectricInductanceSetter
1094
- _expected_dimension = dim.ELECTRIC_INDUCTANCE
1095
-
1153
+ _dimension = dim.ELECTRIC_INDUCTANCE
1154
+
1096
1155
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
1097
1156
  """
1098
1157
  Initialize electric inductance quantity.
@@ -1111,13 +1170,15 @@ class ElectricInductance(TypedQuantity):
1111
1170
  super().__init__(name_or_value, unit, name, is_known=is_known)
1112
1171
  else:
1113
1172
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
1173
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
1114
1174
 
1115
- def set(self, value: int | float) -> ts.ElectricInductanceSetter:
1175
+ def set(self, value: float, unit: str | None = None) -> ts.ElectricInductanceSetter:
1116
1176
  """
1117
1177
  Create a setter for this electric inductance quantity.
1118
1178
 
1119
1179
  Args:
1120
1180
  value: The numeric value to set
1181
+ unit: Optional unit string (for compatibility with base class)
1121
1182
 
1122
1183
  Returns:
1123
1184
  ElectricInductanceSetter: A setter with unit properties like .meters, .inches, etc.
@@ -1129,7 +1190,7 @@ class ElectricInductance(TypedQuantity):
1129
1190
  return ts.ElectricInductanceSetter(self, value)
1130
1191
 
1131
1192
 
1132
- class ElectricPotential(TypedQuantity):
1193
+ class ElectricPotential(FieldQnty):
1133
1194
  """
1134
1195
  Type-safe electric potential quantity with expression capabilities.
1135
1196
 
@@ -1145,10 +1206,11 @@ class ElectricPotential(TypedQuantity):
1145
1206
 
1146
1207
  Available units: "abvolt", "statvolt", "u_a_potential"
1147
1208
  """
1209
+
1148
1210
  __slots__ = ()
1149
1211
  _setter_class = ts.ElectricPotentialSetter
1150
- _expected_dimension = dim.ELECTRIC_POTENTIAL
1151
-
1212
+ _dimension = dim.ELECTRIC_POTENTIAL
1213
+
1152
1214
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
1153
1215
  """
1154
1216
  Initialize electric potential quantity.
@@ -1167,13 +1229,15 @@ class ElectricPotential(TypedQuantity):
1167
1229
  super().__init__(name_or_value, unit, name, is_known=is_known)
1168
1230
  else:
1169
1231
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
1232
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
1170
1233
 
1171
- def set(self, value: int | float) -> ts.ElectricPotentialSetter:
1234
+ def set(self, value: float, unit: str | None = None) -> ts.ElectricPotentialSetter:
1172
1235
  """
1173
1236
  Create a setter for this electric potential quantity.
1174
1237
 
1175
1238
  Args:
1176
1239
  value: The numeric value to set
1240
+ unit: Optional unit string (for compatibility with base class)
1177
1241
 
1178
1242
  Returns:
1179
1243
  ElectricPotentialSetter: A setter with unit properties like .meters, .inches, etc.
@@ -1185,7 +1249,7 @@ class ElectricPotential(TypedQuantity):
1185
1249
  return ts.ElectricPotentialSetter(self, value)
1186
1250
 
1187
1251
 
1188
- class ElectricResistance(TypedQuantity):
1252
+ class ElectricResistance(FieldQnty):
1189
1253
  """
1190
1254
  Type-safe electric resistance quantity with expression capabilities.
1191
1255
 
@@ -1201,10 +1265,11 @@ class ElectricResistance(TypedQuantity):
1201
1265
 
1202
1266
  Available units: "abohm", "jacobi", "lenz"
1203
1267
  """
1268
+
1204
1269
  __slots__ = ()
1205
1270
  _setter_class = ts.ElectricResistanceSetter
1206
- _expected_dimension = dim.ELECTRIC_RESISTANCE
1207
-
1271
+ _dimension = dim.ELECTRIC_RESISTANCE
1272
+
1208
1273
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
1209
1274
  """
1210
1275
  Initialize electric resistance quantity.
@@ -1223,13 +1288,15 @@ class ElectricResistance(TypedQuantity):
1223
1288
  super().__init__(name_or_value, unit, name, is_known=is_known)
1224
1289
  else:
1225
1290
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
1291
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
1226
1292
 
1227
- def set(self, value: int | float) -> ts.ElectricResistanceSetter:
1293
+ def set(self, value: float, unit: str | None = None) -> ts.ElectricResistanceSetter:
1228
1294
  """
1229
1295
  Create a setter for this electric resistance quantity.
1230
1296
 
1231
1297
  Args:
1232
1298
  value: The numeric value to set
1299
+ unit: Optional unit string (for compatibility with base class)
1233
1300
 
1234
1301
  Returns:
1235
1302
  ElectricResistanceSetter: A setter with unit properties like .meters, .inches, etc.
@@ -1241,7 +1308,7 @@ class ElectricResistance(TypedQuantity):
1241
1308
  return ts.ElectricResistanceSetter(self, value)
1242
1309
 
1243
1310
 
1244
- class ElectricalConductance(TypedQuantity):
1311
+ class ElectricalConductance(FieldQnty):
1245
1312
  """
1246
1313
  Type-safe electrical conductance quantity with expression capabilities.
1247
1314
 
@@ -1257,10 +1324,11 @@ class ElectricalConductance(TypedQuantity):
1257
1324
 
1258
1325
  Available units: "emu_cgs", "esu_cgs", "mho"
1259
1326
  """
1327
+
1260
1328
  __slots__ = ()
1261
1329
  _setter_class = ts.ElectricalConductanceSetter
1262
- _expected_dimension = dim.ELECTRICAL_CONDUCTANCE
1263
-
1330
+ _dimension = dim.ELECTRICAL_CONDUCTANCE
1331
+
1264
1332
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
1265
1333
  """
1266
1334
  Initialize electrical conductance quantity.
@@ -1279,13 +1347,15 @@ class ElectricalConductance(TypedQuantity):
1279
1347
  super().__init__(name_or_value, unit, name, is_known=is_known)
1280
1348
  else:
1281
1349
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
1350
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
1282
1351
 
1283
- def set(self, value: int | float) -> ts.ElectricalConductanceSetter:
1352
+ def set(self, value: float, unit: str | None = None) -> ts.ElectricalConductanceSetter:
1284
1353
  """
1285
1354
  Create a setter for this electrical conductance quantity.
1286
1355
 
1287
1356
  Args:
1288
1357
  value: The numeric value to set
1358
+ unit: Optional unit string (for compatibility with base class)
1289
1359
 
1290
1360
  Returns:
1291
1361
  ElectricalConductanceSetter: A setter with unit properties like .meters, .inches, etc.
@@ -1297,7 +1367,7 @@ class ElectricalConductance(TypedQuantity):
1297
1367
  return ts.ElectricalConductanceSetter(self, value)
1298
1368
 
1299
1369
 
1300
- class ElectricalPermittivity(TypedQuantity):
1370
+ class ElectricalPermittivity(FieldQnty):
1301
1371
  """
1302
1372
  Type-safe electrical permittivity quantity with expression capabilities.
1303
1373
 
@@ -1313,10 +1383,11 @@ class ElectricalPermittivity(TypedQuantity):
1313
1383
 
1314
1384
  Available units: "farad_per_meter"
1315
1385
  """
1386
+
1316
1387
  __slots__ = ()
1317
1388
  _setter_class = ts.ElectricalPermittivitySetter
1318
- _expected_dimension = dim.ELECTRICAL_PERMITTIVITY
1319
-
1389
+ _dimension = dim.ELECTRICAL_PERMITTIVITY
1390
+
1320
1391
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
1321
1392
  """
1322
1393
  Initialize electrical permittivity quantity.
@@ -1335,13 +1406,15 @@ class ElectricalPermittivity(TypedQuantity):
1335
1406
  super().__init__(name_or_value, unit, name, is_known=is_known)
1336
1407
  else:
1337
1408
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
1409
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
1338
1410
 
1339
- def set(self, value: int | float) -> ts.ElectricalPermittivitySetter:
1411
+ def set(self, value: float, unit: str | None = None) -> ts.ElectricalPermittivitySetter:
1340
1412
  """
1341
1413
  Create a setter for this electrical permittivity quantity.
1342
1414
 
1343
1415
  Args:
1344
1416
  value: The numeric value to set
1417
+ unit: Optional unit string (for compatibility with base class)
1345
1418
 
1346
1419
  Returns:
1347
1420
  ElectricalPermittivitySetter: A setter with unit properties like .meters, .inches, etc.
@@ -1353,7 +1426,7 @@ class ElectricalPermittivity(TypedQuantity):
1353
1426
  return ts.ElectricalPermittivitySetter(self, value)
1354
1427
 
1355
1428
 
1356
- class ElectricalResistivity(TypedQuantity):
1429
+ class ElectricalResistivity(FieldQnty):
1357
1430
  """
1358
1431
  Type-safe electrical resistivity quantity with expression capabilities.
1359
1432
 
@@ -1369,10 +1442,11 @@ class ElectricalResistivity(TypedQuantity):
1369
1442
 
1370
1443
  Available units: "circular_mil_ohm_per_foot", "emu_cgs", "microhm_inch"
1371
1444
  """
1445
+
1372
1446
  __slots__ = ()
1373
1447
  _setter_class = ts.ElectricalResistivitySetter
1374
- _expected_dimension = dim.ELECTRICAL_RESISTIVITY
1375
-
1448
+ _dimension = dim.ELECTRICAL_RESISTIVITY
1449
+
1376
1450
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
1377
1451
  """
1378
1452
  Initialize electrical resistivity quantity.
@@ -1391,13 +1465,15 @@ class ElectricalResistivity(TypedQuantity):
1391
1465
  super().__init__(name_or_value, unit, name, is_known=is_known)
1392
1466
  else:
1393
1467
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
1468
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
1394
1469
 
1395
- def set(self, value: int | float) -> ts.ElectricalResistivitySetter:
1470
+ def set(self, value: float, unit: str | None = None) -> ts.ElectricalResistivitySetter:
1396
1471
  """
1397
1472
  Create a setter for this electrical resistivity quantity.
1398
1473
 
1399
1474
  Args:
1400
1475
  value: The numeric value to set
1476
+ unit: Optional unit string (for compatibility with base class)
1401
1477
 
1402
1478
  Returns:
1403
1479
  ElectricalResistivitySetter: A setter with unit properties like .meters, .inches, etc.
@@ -1409,7 +1485,7 @@ class ElectricalResistivity(TypedQuantity):
1409
1485
  return ts.ElectricalResistivitySetter(self, value)
1410
1486
 
1411
1487
 
1412
- class EnergyFlux(TypedQuantity):
1488
+ class EnergyFlux(FieldQnty):
1413
1489
  """
1414
1490
  Type-safe energy flux quantity with expression capabilities.
1415
1491
 
@@ -1425,10 +1501,11 @@ class EnergyFlux(TypedQuantity):
1425
1501
 
1426
1502
  Available units: "btu_per_square_foot_per_hour", "calorie_per_square_centimeter_per_second", "celsius_heat_units_chu"
1427
1503
  """
1504
+
1428
1505
  __slots__ = ()
1429
1506
  _setter_class = ts.EnergyFluxSetter
1430
- _expected_dimension = dim.ENERGY_FLUX
1431
-
1507
+ _dimension = dim.ENERGY_FLUX
1508
+
1432
1509
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
1433
1510
  """
1434
1511
  Initialize energy flux quantity.
@@ -1447,13 +1524,15 @@ class EnergyFlux(TypedQuantity):
1447
1524
  super().__init__(name_or_value, unit, name, is_known=is_known)
1448
1525
  else:
1449
1526
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
1527
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
1450
1528
 
1451
- def set(self, value: int | float) -> ts.EnergyFluxSetter:
1529
+ def set(self, value: float, unit: str | None = None) -> ts.EnergyFluxSetter:
1452
1530
  """
1453
1531
  Create a setter for this energy flux quantity.
1454
1532
 
1455
1533
  Args:
1456
1534
  value: The numeric value to set
1535
+ unit: Optional unit string (for compatibility with base class)
1457
1536
 
1458
1537
  Returns:
1459
1538
  EnergyFluxSetter: A setter with unit properties like .meters, .inches, etc.
@@ -1465,7 +1544,7 @@ class EnergyFlux(TypedQuantity):
1465
1544
  return ts.EnergyFluxSetter(self, value)
1466
1545
 
1467
1546
 
1468
- class EnergyHeatWork(TypedQuantity):
1547
+ class EnergyHeatWork(FieldQnty):
1469
1548
  """
1470
1549
  Type-safe energy, heat, work quantity with expression capabilities.
1471
1550
 
@@ -1481,10 +1560,11 @@ class EnergyHeatWork(TypedQuantity):
1481
1560
 
1482
1561
  Available units: "barrel_oil_equivalent_or_equivalent_barrel", "billion_electronvolt", "british_thermal_unit_4circ_mathrmc"
1483
1562
  """
1563
+
1484
1564
  __slots__ = ()
1485
1565
  _setter_class = ts.EnergyHeatWorkSetter
1486
- _expected_dimension = dim.ENERGY_HEAT_WORK
1487
-
1566
+ _dimension = dim.ENERGY_HEAT_WORK
1567
+
1488
1568
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
1489
1569
  """
1490
1570
  Initialize energy, heat, work quantity.
@@ -1503,13 +1583,15 @@ class EnergyHeatWork(TypedQuantity):
1503
1583
  super().__init__(name_or_value, unit, name, is_known=is_known)
1504
1584
  else:
1505
1585
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
1586
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
1506
1587
 
1507
- def set(self, value: int | float) -> ts.EnergyHeatWorkSetter:
1588
+ def set(self, value: float, unit: str | None = None) -> ts.EnergyHeatWorkSetter:
1508
1589
  """
1509
1590
  Create a setter for this energy, heat, work quantity.
1510
1591
 
1511
1592
  Args:
1512
1593
  value: The numeric value to set
1594
+ unit: Optional unit string (for compatibility with base class)
1513
1595
 
1514
1596
  Returns:
1515
1597
  EnergyHeatWorkSetter: A setter with unit properties like .meters, .inches, etc.
@@ -1521,7 +1603,7 @@ class EnergyHeatWork(TypedQuantity):
1521
1603
  return ts.EnergyHeatWorkSetter(self, value)
1522
1604
 
1523
1605
 
1524
- class EnergyPerUnitArea(TypedQuantity):
1606
+ class EnergyPerUnitArea(FieldQnty):
1525
1607
  """
1526
1608
  Type-safe energy per unit area quantity with expression capabilities.
1527
1609
 
@@ -1537,10 +1619,11 @@ class EnergyPerUnitArea(TypedQuantity):
1537
1619
 
1538
1620
  Available units: "british_thermal_unit_per_square_foot", "joule_per_square_meter", "langley"
1539
1621
  """
1622
+
1540
1623
  __slots__ = ()
1541
1624
  _setter_class = ts.EnergyPerUnitAreaSetter
1542
- _expected_dimension = dim.ENERGY_PER_UNIT_AREA
1543
-
1625
+ _dimension = dim.ENERGY_PER_UNIT_AREA
1626
+
1544
1627
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
1545
1628
  """
1546
1629
  Initialize energy per unit area quantity.
@@ -1559,13 +1642,15 @@ class EnergyPerUnitArea(TypedQuantity):
1559
1642
  super().__init__(name_or_value, unit, name, is_known=is_known)
1560
1643
  else:
1561
1644
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
1645
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
1562
1646
 
1563
- def set(self, value: int | float) -> ts.EnergyPerUnitAreaSetter:
1647
+ def set(self, value: float, unit: str | None = None) -> ts.EnergyPerUnitAreaSetter:
1564
1648
  """
1565
1649
  Create a setter for this energy per unit area quantity.
1566
1650
 
1567
1651
  Args:
1568
1652
  value: The numeric value to set
1653
+ unit: Optional unit string (for compatibility with base class)
1569
1654
 
1570
1655
  Returns:
1571
1656
  EnergyPerUnitAreaSetter: A setter with unit properties like .meters, .inches, etc.
@@ -1577,7 +1662,7 @@ class EnergyPerUnitArea(TypedQuantity):
1577
1662
  return ts.EnergyPerUnitAreaSetter(self, value)
1578
1663
 
1579
1664
 
1580
- class Force(TypedQuantity):
1665
+ class Force(FieldQnty):
1581
1666
  """
1582
1667
  Type-safe force quantity with expression capabilities.
1583
1668
 
@@ -1593,10 +1678,11 @@ class Force(TypedQuantity):
1593
1678
 
1594
1679
  Available units: "crinal", "dyne", "funal"
1595
1680
  """
1681
+
1596
1682
  __slots__ = ()
1597
1683
  _setter_class = ts.ForceSetter
1598
- _expected_dimension = dim.FORCE
1599
-
1684
+ _dimension = dim.FORCE
1685
+
1600
1686
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
1601
1687
  """
1602
1688
  Initialize force quantity.
@@ -1615,13 +1701,15 @@ class Force(TypedQuantity):
1615
1701
  super().__init__(name_or_value, unit, name, is_known=is_known)
1616
1702
  else:
1617
1703
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
1704
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
1618
1705
 
1619
- def set(self, value: int | float) -> ts.ForceSetter:
1706
+ def set(self, value: float, unit: str | None = None) -> ts.ForceSetter:
1620
1707
  """
1621
1708
  Create a setter for this force quantity.
1622
1709
 
1623
1710
  Args:
1624
1711
  value: The numeric value to set
1712
+ unit: Optional unit string (for compatibility with base class)
1625
1713
 
1626
1714
  Returns:
1627
1715
  ForceSetter: A setter with unit properties like .meters, .inches, etc.
@@ -1633,7 +1721,7 @@ class Force(TypedQuantity):
1633
1721
  return ts.ForceSetter(self, value)
1634
1722
 
1635
1723
 
1636
- class ForceBody(TypedQuantity):
1724
+ class ForceBody(FieldQnty):
1637
1725
  """
1638
1726
  Type-safe force (body) quantity with expression capabilities.
1639
1727
 
@@ -1649,10 +1737,11 @@ class ForceBody(TypedQuantity):
1649
1737
 
1650
1738
  Available units: "dyne_per_cubic_centimeter", "kilogram_force_per_cubic_centimeter", "kilogram_force_per_cubic_meter"
1651
1739
  """
1740
+
1652
1741
  __slots__ = ()
1653
1742
  _setter_class = ts.ForceBodySetter
1654
- _expected_dimension = dim.FORCE_BODY
1655
-
1743
+ _dimension = dim.FORCE_BODY
1744
+
1656
1745
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
1657
1746
  """
1658
1747
  Initialize force (body) quantity.
@@ -1671,13 +1760,15 @@ class ForceBody(TypedQuantity):
1671
1760
  super().__init__(name_or_value, unit, name, is_known=is_known)
1672
1761
  else:
1673
1762
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
1763
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
1674
1764
 
1675
- def set(self, value: int | float) -> ts.ForceBodySetter:
1765
+ def set(self, value: float, unit: str | None = None) -> ts.ForceBodySetter:
1676
1766
  """
1677
1767
  Create a setter for this force (body) quantity.
1678
1768
 
1679
1769
  Args:
1680
1770
  value: The numeric value to set
1771
+ unit: Optional unit string (for compatibility with base class)
1681
1772
 
1682
1773
  Returns:
1683
1774
  ForceBodySetter: A setter with unit properties like .meters, .inches, etc.
@@ -1689,7 +1780,7 @@ class ForceBody(TypedQuantity):
1689
1780
  return ts.ForceBodySetter(self, value)
1690
1781
 
1691
1782
 
1692
- class ForcePerUnitMass(TypedQuantity):
1783
+ class ForcePerUnitMass(FieldQnty):
1693
1784
  """
1694
1785
  Type-safe force per unit mass quantity with expression capabilities.
1695
1786
 
@@ -1705,10 +1796,11 @@ class ForcePerUnitMass(TypedQuantity):
1705
1796
 
1706
1797
  Available units: "dyne_per_gram", "kilogram_force_per_kilogram", "newton_per_kilogram"
1707
1798
  """
1799
+
1708
1800
  __slots__ = ()
1709
1801
  _setter_class = ts.ForcePerUnitMassSetter
1710
- _expected_dimension = dim.FORCE_PER_UNIT_MASS
1711
-
1802
+ _dimension = dim.FORCE_PER_UNIT_MASS
1803
+
1712
1804
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
1713
1805
  """
1714
1806
  Initialize force per unit mass quantity.
@@ -1727,13 +1819,15 @@ class ForcePerUnitMass(TypedQuantity):
1727
1819
  super().__init__(name_or_value, unit, name, is_known=is_known)
1728
1820
  else:
1729
1821
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
1822
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
1730
1823
 
1731
- def set(self, value: int | float) -> ts.ForcePerUnitMassSetter:
1824
+ def set(self, value: float, unit: str | None = None) -> ts.ForcePerUnitMassSetter:
1732
1825
  """
1733
1826
  Create a setter for this force per unit mass quantity.
1734
1827
 
1735
1828
  Args:
1736
1829
  value: The numeric value to set
1830
+ unit: Optional unit string (for compatibility with base class)
1737
1831
 
1738
1832
  Returns:
1739
1833
  ForcePerUnitMassSetter: A setter with unit properties like .meters, .inches, etc.
@@ -1745,7 +1839,7 @@ class ForcePerUnitMass(TypedQuantity):
1745
1839
  return ts.ForcePerUnitMassSetter(self, value)
1746
1840
 
1747
1841
 
1748
- class FrequencyVoltageRatio(TypedQuantity):
1842
+ class FrequencyVoltageRatio(FieldQnty):
1749
1843
  """
1750
1844
  Type-safe frequency voltage ratio quantity with expression capabilities.
1751
1845
 
@@ -1761,10 +1855,11 @@ class FrequencyVoltageRatio(TypedQuantity):
1761
1855
 
1762
1856
  Available units: "cycles_per_second_per_volt", "hertz_per_volt", "terahertz_per_volt"
1763
1857
  """
1858
+
1764
1859
  __slots__ = ()
1765
1860
  _setter_class = ts.FrequencyVoltageRatioSetter
1766
- _expected_dimension = dim.FREQUENCY_VOLTAGE_RATIO
1767
-
1861
+ _dimension = dim.FREQUENCY_VOLTAGE_RATIO
1862
+
1768
1863
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
1769
1864
  """
1770
1865
  Initialize frequency voltage ratio quantity.
@@ -1783,13 +1878,15 @@ class FrequencyVoltageRatio(TypedQuantity):
1783
1878
  super().__init__(name_or_value, unit, name, is_known=is_known)
1784
1879
  else:
1785
1880
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
1881
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
1786
1882
 
1787
- def set(self, value: int | float) -> ts.FrequencyVoltageRatioSetter:
1883
+ def set(self, value: float, unit: str | None = None) -> ts.FrequencyVoltageRatioSetter:
1788
1884
  """
1789
1885
  Create a setter for this frequency voltage ratio quantity.
1790
1886
 
1791
1887
  Args:
1792
1888
  value: The numeric value to set
1889
+ unit: Optional unit string (for compatibility with base class)
1793
1890
 
1794
1891
  Returns:
1795
1892
  FrequencyVoltageRatioSetter: A setter with unit properties like .meters, .inches, etc.
@@ -1801,7 +1898,7 @@ class FrequencyVoltageRatio(TypedQuantity):
1801
1898
  return ts.FrequencyVoltageRatioSetter(self, value)
1802
1899
 
1803
1900
 
1804
- class FuelConsumption(TypedQuantity):
1901
+ class FuelConsumption(FieldQnty):
1805
1902
  """
1806
1903
  Type-safe fuel consumption quantity with expression capabilities.
1807
1904
 
@@ -1817,10 +1914,11 @@ class FuelConsumption(TypedQuantity):
1817
1914
 
1818
1915
  Available units: "unit_100_km_per_liter", "gallons_uk", "gallons_us"
1819
1916
  """
1917
+
1820
1918
  __slots__ = ()
1821
1919
  _setter_class = ts.FuelConsumptionSetter
1822
- _expected_dimension = dim.FUEL_CONSUMPTION
1823
-
1920
+ _dimension = dim.FUEL_CONSUMPTION
1921
+
1824
1922
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
1825
1923
  """
1826
1924
  Initialize fuel consumption quantity.
@@ -1839,13 +1937,15 @@ class FuelConsumption(TypedQuantity):
1839
1937
  super().__init__(name_or_value, unit, name, is_known=is_known)
1840
1938
  else:
1841
1939
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
1940
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
1842
1941
 
1843
- def set(self, value: int | float) -> ts.FuelConsumptionSetter:
1942
+ def set(self, value: float, unit: str | None = None) -> ts.FuelConsumptionSetter:
1844
1943
  """
1845
1944
  Create a setter for this fuel consumption quantity.
1846
1945
 
1847
1946
  Args:
1848
1947
  value: The numeric value to set
1948
+ unit: Optional unit string (for compatibility with base class)
1849
1949
 
1850
1950
  Returns:
1851
1951
  FuelConsumptionSetter: A setter with unit properties like .meters, .inches, etc.
@@ -1857,7 +1957,7 @@ class FuelConsumption(TypedQuantity):
1857
1957
  return ts.FuelConsumptionSetter(self, value)
1858
1958
 
1859
1959
 
1860
- class HeatOfCombustion(TypedQuantity):
1960
+ class HeatOfCombustion(FieldQnty):
1861
1961
  """
1862
1962
  Type-safe heat of combustion quantity with expression capabilities.
1863
1963
 
@@ -1873,10 +1973,11 @@ class HeatOfCombustion(TypedQuantity):
1873
1973
 
1874
1974
  Available units: "british_thermal_unit_per_pound", "calorie_per_gram", "chu_per_pound"
1875
1975
  """
1976
+
1876
1977
  __slots__ = ()
1877
1978
  _setter_class = ts.HeatOfCombustionSetter
1878
- _expected_dimension = dim.HEAT_OF_COMBUSTION
1879
-
1979
+ _dimension = dim.HEAT_OF_COMBUSTION
1980
+
1880
1981
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
1881
1982
  """
1882
1983
  Initialize heat of combustion quantity.
@@ -1895,13 +1996,15 @@ class HeatOfCombustion(TypedQuantity):
1895
1996
  super().__init__(name_or_value, unit, name, is_known=is_known)
1896
1997
  else:
1897
1998
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
1999
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
1898
2000
 
1899
- def set(self, value: int | float) -> ts.HeatOfCombustionSetter:
2001
+ def set(self, value: float, unit: str | None = None) -> ts.HeatOfCombustionSetter:
1900
2002
  """
1901
2003
  Create a setter for this heat of combustion quantity.
1902
2004
 
1903
2005
  Args:
1904
2006
  value: The numeric value to set
2007
+ unit: Optional unit string (for compatibility with base class)
1905
2008
 
1906
2009
  Returns:
1907
2010
  HeatOfCombustionSetter: A setter with unit properties like .meters, .inches, etc.
@@ -1913,7 +2016,7 @@ class HeatOfCombustion(TypedQuantity):
1913
2016
  return ts.HeatOfCombustionSetter(self, value)
1914
2017
 
1915
2018
 
1916
- class HeatOfFusion(TypedQuantity):
2019
+ class HeatOfFusion(FieldQnty):
1917
2020
  """
1918
2021
  Type-safe heat of fusion quantity with expression capabilities.
1919
2022
 
@@ -1929,10 +2032,11 @@ class HeatOfFusion(TypedQuantity):
1929
2032
 
1930
2033
  Available units: "british_thermal_unit_mean", "british_thermal_unit_per_pound", "calorie_per_gram"
1931
2034
  """
2035
+
1932
2036
  __slots__ = ()
1933
2037
  _setter_class = ts.HeatOfFusionSetter
1934
- _expected_dimension = dim.HEAT_OF_FUSION
1935
-
2038
+ _dimension = dim.HEAT_OF_FUSION
2039
+
1936
2040
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
1937
2041
  """
1938
2042
  Initialize heat of fusion quantity.
@@ -1951,13 +2055,15 @@ class HeatOfFusion(TypedQuantity):
1951
2055
  super().__init__(name_or_value, unit, name, is_known=is_known)
1952
2056
  else:
1953
2057
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
2058
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
1954
2059
 
1955
- def set(self, value: int | float) -> ts.HeatOfFusionSetter:
2060
+ def set(self, value: float, unit: str | None = None) -> ts.HeatOfFusionSetter:
1956
2061
  """
1957
2062
  Create a setter for this heat of fusion quantity.
1958
2063
 
1959
2064
  Args:
1960
2065
  value: The numeric value to set
2066
+ unit: Optional unit string (for compatibility with base class)
1961
2067
 
1962
2068
  Returns:
1963
2069
  HeatOfFusionSetter: A setter with unit properties like .meters, .inches, etc.
@@ -1969,7 +2075,7 @@ class HeatOfFusion(TypedQuantity):
1969
2075
  return ts.HeatOfFusionSetter(self, value)
1970
2076
 
1971
2077
 
1972
- class HeatOfVaporization(TypedQuantity):
2078
+ class HeatOfVaporization(FieldQnty):
1973
2079
  """
1974
2080
  Type-safe heat of vaporization quantity with expression capabilities.
1975
2081
 
@@ -1985,10 +2091,11 @@ class HeatOfVaporization(TypedQuantity):
1985
2091
 
1986
2092
  Available units: "british_thermal_unit_per_pound", "calorie_per_gram", "chu_per_pound"
1987
2093
  """
2094
+
1988
2095
  __slots__ = ()
1989
2096
  _setter_class = ts.HeatOfVaporizationSetter
1990
- _expected_dimension = dim.HEAT_OF_VAPORIZATION
1991
-
2097
+ _dimension = dim.HEAT_OF_VAPORIZATION
2098
+
1992
2099
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
1993
2100
  """
1994
2101
  Initialize heat of vaporization quantity.
@@ -2007,13 +2114,15 @@ class HeatOfVaporization(TypedQuantity):
2007
2114
  super().__init__(name_or_value, unit, name, is_known=is_known)
2008
2115
  else:
2009
2116
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
2117
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
2010
2118
 
2011
- def set(self, value: int | float) -> ts.HeatOfVaporizationSetter:
2119
+ def set(self, value: float, unit: str | None = None) -> ts.HeatOfVaporizationSetter:
2012
2120
  """
2013
2121
  Create a setter for this heat of vaporization quantity.
2014
2122
 
2015
2123
  Args:
2016
2124
  value: The numeric value to set
2125
+ unit: Optional unit string (for compatibility with base class)
2017
2126
 
2018
2127
  Returns:
2019
2128
  HeatOfVaporizationSetter: A setter with unit properties like .meters, .inches, etc.
@@ -2025,7 +2134,7 @@ class HeatOfVaporization(TypedQuantity):
2025
2134
  return ts.HeatOfVaporizationSetter(self, value)
2026
2135
 
2027
2136
 
2028
- class HeatTransferCoefficient(TypedQuantity):
2137
+ class HeatTransferCoefficient(FieldQnty):
2029
2138
  """
2030
2139
  Type-safe heat transfer coefficient quantity with expression capabilities.
2031
2140
 
@@ -2041,10 +2150,11 @@ class HeatTransferCoefficient(TypedQuantity):
2041
2150
 
2042
2151
  Available units: "btu_per_square_foot_per_hour_per_degree_fahrenheit_or_rankine", "watt_per_square_meter_per_degree_celsius_or_kelvin"
2043
2152
  """
2153
+
2044
2154
  __slots__ = ()
2045
2155
  _setter_class = ts.HeatTransferCoefficientSetter
2046
- _expected_dimension = dim.HEAT_TRANSFER_COEFFICIENT
2047
-
2156
+ _dimension = dim.HEAT_TRANSFER_COEFFICIENT
2157
+
2048
2158
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
2049
2159
  """
2050
2160
  Initialize heat transfer coefficient quantity.
@@ -2063,13 +2173,15 @@ class HeatTransferCoefficient(TypedQuantity):
2063
2173
  super().__init__(name_or_value, unit, name, is_known=is_known)
2064
2174
  else:
2065
2175
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
2176
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
2066
2177
 
2067
- def set(self, value: int | float) -> ts.HeatTransferCoefficientSetter:
2178
+ def set(self, value: float, unit: str | None = None) -> ts.HeatTransferCoefficientSetter:
2068
2179
  """
2069
2180
  Create a setter for this heat transfer coefficient quantity.
2070
2181
 
2071
2182
  Args:
2072
2183
  value: The numeric value to set
2184
+ unit: Optional unit string (for compatibility with base class)
2073
2185
 
2074
2186
  Returns:
2075
2187
  HeatTransferCoefficientSetter: A setter with unit properties like .meters, .inches, etc.
@@ -2081,7 +2193,7 @@ class HeatTransferCoefficient(TypedQuantity):
2081
2193
  return ts.HeatTransferCoefficientSetter(self, value)
2082
2194
 
2083
2195
 
2084
- class Illuminance(TypedQuantity):
2196
+ class Illuminance(FieldQnty):
2085
2197
  """
2086
2198
  Type-safe illuminance quantity with expression capabilities.
2087
2199
 
@@ -2097,10 +2209,11 @@ class Illuminance(TypedQuantity):
2097
2209
 
2098
2210
  Available units: "foot_candle", "lux", "nox"
2099
2211
  """
2212
+
2100
2213
  __slots__ = ()
2101
2214
  _setter_class = ts.IlluminanceSetter
2102
- _expected_dimension = dim.ILLUMINANCE
2103
-
2215
+ _dimension = dim.ILLUMINANCE
2216
+
2104
2217
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
2105
2218
  """
2106
2219
  Initialize illuminance quantity.
@@ -2119,13 +2232,15 @@ class Illuminance(TypedQuantity):
2119
2232
  super().__init__(name_or_value, unit, name, is_known=is_known)
2120
2233
  else:
2121
2234
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
2235
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
2122
2236
 
2123
- def set(self, value: int | float) -> ts.IlluminanceSetter:
2237
+ def set(self, value: float, unit: str | None = None) -> ts.IlluminanceSetter:
2124
2238
  """
2125
2239
  Create a setter for this illuminance quantity.
2126
2240
 
2127
2241
  Args:
2128
2242
  value: The numeric value to set
2243
+ unit: Optional unit string (for compatibility with base class)
2129
2244
 
2130
2245
  Returns:
2131
2246
  IlluminanceSetter: A setter with unit properties like .meters, .inches, etc.
@@ -2137,7 +2252,7 @@ class Illuminance(TypedQuantity):
2137
2252
  return ts.IlluminanceSetter(self, value)
2138
2253
 
2139
2254
 
2140
- class KineticEnergyOfTurbulence(TypedQuantity):
2255
+ class KineticEnergyOfTurbulence(FieldQnty):
2141
2256
  """
2142
2257
  Type-safe kinetic energy of turbulence quantity with expression capabilities.
2143
2258
 
@@ -2153,10 +2268,11 @@ class KineticEnergyOfTurbulence(TypedQuantity):
2153
2268
 
2154
2269
  Available units: "square_foot_per_second_squared", "square_meters_per_second_squared"
2155
2270
  """
2271
+
2156
2272
  __slots__ = ()
2157
2273
  _setter_class = ts.KineticEnergyOfTurbulenceSetter
2158
- _expected_dimension = dim.KINETIC_ENERGY_OF_TURBULENCE
2159
-
2274
+ _dimension = dim.KINETIC_ENERGY_OF_TURBULENCE
2275
+
2160
2276
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
2161
2277
  """
2162
2278
  Initialize kinetic energy of turbulence quantity.
@@ -2175,13 +2291,15 @@ class KineticEnergyOfTurbulence(TypedQuantity):
2175
2291
  super().__init__(name_or_value, unit, name, is_known=is_known)
2176
2292
  else:
2177
2293
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
2294
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
2178
2295
 
2179
- def set(self, value: int | float) -> ts.KineticEnergyOfTurbulenceSetter:
2296
+ def set(self, value: float, unit: str | None = None) -> ts.KineticEnergyOfTurbulenceSetter:
2180
2297
  """
2181
2298
  Create a setter for this kinetic energy of turbulence quantity.
2182
2299
 
2183
2300
  Args:
2184
2301
  value: The numeric value to set
2302
+ unit: Optional unit string (for compatibility with base class)
2185
2303
 
2186
2304
  Returns:
2187
2305
  KineticEnergyOfTurbulenceSetter: A setter with unit properties like .meters, .inches, etc.
@@ -2193,7 +2311,7 @@ class KineticEnergyOfTurbulence(TypedQuantity):
2193
2311
  return ts.KineticEnergyOfTurbulenceSetter(self, value)
2194
2312
 
2195
2313
 
2196
- class Length(TypedQuantity):
2314
+ class Length(FieldQnty):
2197
2315
  """
2198
2316
  Type-safe length quantity with expression capabilities.
2199
2317
 
@@ -2209,10 +2327,11 @@ class Length(TypedQuantity):
2209
2327
 
2210
2328
  Available units: "ngstr_m", "arpent_quebec", "astronomic_unit"
2211
2329
  """
2330
+
2212
2331
  __slots__ = ()
2213
2332
  _setter_class = ts.LengthSetter
2214
- _expected_dimension = dim.LENGTH
2215
-
2333
+ _dimension = dim.LENGTH
2334
+
2216
2335
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
2217
2336
  """
2218
2337
  Initialize length quantity.
@@ -2231,13 +2350,15 @@ class Length(TypedQuantity):
2231
2350
  super().__init__(name_or_value, unit, name, is_known=is_known)
2232
2351
  else:
2233
2352
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
2353
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
2234
2354
 
2235
- def set(self, value: int | float) -> ts.LengthSetter:
2355
+ def set(self, value: float, unit: str | None = None) -> ts.LengthSetter:
2236
2356
  """
2237
2357
  Create a setter for this length quantity.
2238
2358
 
2239
2359
  Args:
2240
2360
  value: The numeric value to set
2361
+ unit: Optional unit string (for compatibility with base class)
2241
2362
 
2242
2363
  Returns:
2243
2364
  LengthSetter: A setter with unit properties like .meters, .inches, etc.
@@ -2249,7 +2370,7 @@ class Length(TypedQuantity):
2249
2370
  return ts.LengthSetter(self, value)
2250
2371
 
2251
2372
 
2252
- class LinearMassDensity(TypedQuantity):
2373
+ class LinearMassDensity(FieldQnty):
2253
2374
  """
2254
2375
  Type-safe linear mass density quantity with expression capabilities.
2255
2376
 
@@ -2265,10 +2386,11 @@ class LinearMassDensity(TypedQuantity):
2265
2386
 
2266
2387
  Available units: "denier", "kilogram_per_centimeter", "kilogram_per_meter"
2267
2388
  """
2389
+
2268
2390
  __slots__ = ()
2269
2391
  _setter_class = ts.LinearMassDensitySetter
2270
- _expected_dimension = dim.LINEAR_MASS_DENSITY
2271
-
2392
+ _dimension = dim.LINEAR_MASS_DENSITY
2393
+
2272
2394
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
2273
2395
  """
2274
2396
  Initialize linear mass density quantity.
@@ -2287,13 +2409,15 @@ class LinearMassDensity(TypedQuantity):
2287
2409
  super().__init__(name_or_value, unit, name, is_known=is_known)
2288
2410
  else:
2289
2411
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
2412
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
2290
2413
 
2291
- def set(self, value: int | float) -> ts.LinearMassDensitySetter:
2414
+ def set(self, value: float, unit: str | None = None) -> ts.LinearMassDensitySetter:
2292
2415
  """
2293
2416
  Create a setter for this linear mass density quantity.
2294
2417
 
2295
2418
  Args:
2296
2419
  value: The numeric value to set
2420
+ unit: Optional unit string (for compatibility with base class)
2297
2421
 
2298
2422
  Returns:
2299
2423
  LinearMassDensitySetter: A setter with unit properties like .meters, .inches, etc.
@@ -2305,7 +2429,7 @@ class LinearMassDensity(TypedQuantity):
2305
2429
  return ts.LinearMassDensitySetter(self, value)
2306
2430
 
2307
2431
 
2308
- class LinearMomentum(TypedQuantity):
2432
+ class LinearMomentum(FieldQnty):
2309
2433
  """
2310
2434
  Type-safe linear momentum quantity with expression capabilities.
2311
2435
 
@@ -2321,10 +2445,11 @@ class LinearMomentum(TypedQuantity):
2321
2445
 
2322
2446
  Available units: "foot_pounds_force_per_hour", "foot_pounds_force_per_minute", "foot_pounds_force_per_second"
2323
2447
  """
2448
+
2324
2449
  __slots__ = ()
2325
2450
  _setter_class = ts.LinearMomentumSetter
2326
- _expected_dimension = dim.LINEAR_MOMENTUM
2327
-
2451
+ _dimension = dim.LINEAR_MOMENTUM
2452
+
2328
2453
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
2329
2454
  """
2330
2455
  Initialize linear momentum quantity.
@@ -2343,13 +2468,15 @@ class LinearMomentum(TypedQuantity):
2343
2468
  super().__init__(name_or_value, unit, name, is_known=is_known)
2344
2469
  else:
2345
2470
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
2471
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
2346
2472
 
2347
- def set(self, value: int | float) -> ts.LinearMomentumSetter:
2473
+ def set(self, value: float, unit: str | None = None) -> ts.LinearMomentumSetter:
2348
2474
  """
2349
2475
  Create a setter for this linear momentum quantity.
2350
2476
 
2351
2477
  Args:
2352
2478
  value: The numeric value to set
2479
+ unit: Optional unit string (for compatibility with base class)
2353
2480
 
2354
2481
  Returns:
2355
2482
  LinearMomentumSetter: A setter with unit properties like .meters, .inches, etc.
@@ -2361,7 +2488,7 @@ class LinearMomentum(TypedQuantity):
2361
2488
  return ts.LinearMomentumSetter(self, value)
2362
2489
 
2363
2490
 
2364
- class LuminanceSelf(TypedQuantity):
2491
+ class LuminanceSelf(FieldQnty):
2365
2492
  """
2366
2493
  Type-safe luminance (self) quantity with expression capabilities.
2367
2494
 
@@ -2377,10 +2504,11 @@ class LuminanceSelf(TypedQuantity):
2377
2504
 
2378
2505
  Available units: "apostilb", "blondel", "candela_per_square_meter"
2379
2506
  """
2507
+
2380
2508
  __slots__ = ()
2381
2509
  _setter_class = ts.LuminanceSelfSetter
2382
- _expected_dimension = dim.LUMINANCE_SELF
2383
-
2510
+ _dimension = dim.LUMINANCE_SELF
2511
+
2384
2512
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
2385
2513
  """
2386
2514
  Initialize luminance (self) quantity.
@@ -2399,13 +2527,15 @@ class LuminanceSelf(TypedQuantity):
2399
2527
  super().__init__(name_or_value, unit, name, is_known=is_known)
2400
2528
  else:
2401
2529
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
2530
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
2402
2531
 
2403
- def set(self, value: int | float) -> ts.LuminanceSelfSetter:
2532
+ def set(self, value: float, unit: str | None = None) -> ts.LuminanceSelfSetter:
2404
2533
  """
2405
2534
  Create a setter for this luminance (self) quantity.
2406
2535
 
2407
2536
  Args:
2408
2537
  value: The numeric value to set
2538
+ unit: Optional unit string (for compatibility with base class)
2409
2539
 
2410
2540
  Returns:
2411
2541
  LuminanceSelfSetter: A setter with unit properties like .meters, .inches, etc.
@@ -2417,7 +2547,7 @@ class LuminanceSelf(TypedQuantity):
2417
2547
  return ts.LuminanceSelfSetter(self, value)
2418
2548
 
2419
2549
 
2420
- class LuminousFlux(TypedQuantity):
2550
+ class LuminousFlux(FieldQnty):
2421
2551
  """
2422
2552
  Type-safe luminous flux quantity with expression capabilities.
2423
2553
 
@@ -2433,10 +2563,11 @@ class LuminousFlux(TypedQuantity):
2433
2563
 
2434
2564
  Available units: "candela_steradian", "lumen"
2435
2565
  """
2566
+
2436
2567
  __slots__ = ()
2437
2568
  _setter_class = ts.LuminousFluxSetter
2438
- _expected_dimension = dim.LUMINOUS_FLUX
2439
-
2569
+ _dimension = dim.LUMINOUS_FLUX
2570
+
2440
2571
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
2441
2572
  """
2442
2573
  Initialize luminous flux quantity.
@@ -2455,13 +2586,15 @@ class LuminousFlux(TypedQuantity):
2455
2586
  super().__init__(name_or_value, unit, name, is_known=is_known)
2456
2587
  else:
2457
2588
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
2589
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
2458
2590
 
2459
- def set(self, value: int | float) -> ts.LuminousFluxSetter:
2591
+ def set(self, value: float, unit: str | None = None) -> ts.LuminousFluxSetter:
2460
2592
  """
2461
2593
  Create a setter for this luminous flux quantity.
2462
2594
 
2463
2595
  Args:
2464
2596
  value: The numeric value to set
2597
+ unit: Optional unit string (for compatibility with base class)
2465
2598
 
2466
2599
  Returns:
2467
2600
  LuminousFluxSetter: A setter with unit properties like .meters, .inches, etc.
@@ -2473,7 +2606,7 @@ class LuminousFlux(TypedQuantity):
2473
2606
  return ts.LuminousFluxSetter(self, value)
2474
2607
 
2475
2608
 
2476
- class LuminousIntensity(TypedQuantity):
2609
+ class LuminousIntensity(FieldQnty):
2477
2610
  """
2478
2611
  Type-safe luminous intensity quantity with expression capabilities.
2479
2612
 
@@ -2489,10 +2622,11 @@ class LuminousIntensity(TypedQuantity):
2489
2622
 
2490
2623
  Available units: "candela", "candle_international", "carcel"
2491
2624
  """
2625
+
2492
2626
  __slots__ = ()
2493
2627
  _setter_class = ts.LuminousIntensitySetter
2494
- _expected_dimension = dim.LUMINOUS_INTENSITY
2495
-
2628
+ _dimension = dim.LUMINOUS_INTENSITY
2629
+
2496
2630
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
2497
2631
  """
2498
2632
  Initialize luminous intensity quantity.
@@ -2511,13 +2645,15 @@ class LuminousIntensity(TypedQuantity):
2511
2645
  super().__init__(name_or_value, unit, name, is_known=is_known)
2512
2646
  else:
2513
2647
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
2648
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
2514
2649
 
2515
- def set(self, value: int | float) -> ts.LuminousIntensitySetter:
2650
+ def set(self, value: float, unit: str | None = None) -> ts.LuminousIntensitySetter:
2516
2651
  """
2517
2652
  Create a setter for this luminous intensity quantity.
2518
2653
 
2519
2654
  Args:
2520
2655
  value: The numeric value to set
2656
+ unit: Optional unit string (for compatibility with base class)
2521
2657
 
2522
2658
  Returns:
2523
2659
  LuminousIntensitySetter: A setter with unit properties like .meters, .inches, etc.
@@ -2529,7 +2665,7 @@ class LuminousIntensity(TypedQuantity):
2529
2665
  return ts.LuminousIntensitySetter(self, value)
2530
2666
 
2531
2667
 
2532
- class MagneticField(TypedQuantity):
2668
+ class MagneticField(FieldQnty):
2533
2669
  """
2534
2670
  Type-safe magnetic field quantity with expression capabilities.
2535
2671
 
@@ -2545,10 +2681,11 @@ class MagneticField(TypedQuantity):
2545
2681
 
2546
2682
  Available units: "ampere_per_meter", "lenz", "oersted"
2547
2683
  """
2684
+
2548
2685
  __slots__ = ()
2549
2686
  _setter_class = ts.MagneticFieldSetter
2550
- _expected_dimension = dim.MAGNETIC_FIELD
2551
-
2687
+ _dimension = dim.MAGNETIC_FIELD
2688
+
2552
2689
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
2553
2690
  """
2554
2691
  Initialize magnetic field quantity.
@@ -2567,13 +2704,15 @@ class MagneticField(TypedQuantity):
2567
2704
  super().__init__(name_or_value, unit, name, is_known=is_known)
2568
2705
  else:
2569
2706
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
2707
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
2570
2708
 
2571
- def set(self, value: int | float) -> ts.MagneticFieldSetter:
2709
+ def set(self, value: float, unit: str | None = None) -> ts.MagneticFieldSetter:
2572
2710
  """
2573
2711
  Create a setter for this magnetic field quantity.
2574
2712
 
2575
2713
  Args:
2576
2714
  value: The numeric value to set
2715
+ unit: Optional unit string (for compatibility with base class)
2577
2716
 
2578
2717
  Returns:
2579
2718
  MagneticFieldSetter: A setter with unit properties like .meters, .inches, etc.
@@ -2585,7 +2724,7 @@ class MagneticField(TypedQuantity):
2585
2724
  return ts.MagneticFieldSetter(self, value)
2586
2725
 
2587
2726
 
2588
- class MagneticFlux(TypedQuantity):
2727
+ class MagneticFlux(FieldQnty):
2589
2728
  """
2590
2729
  Type-safe magnetic flux quantity with expression capabilities.
2591
2730
 
@@ -2601,10 +2740,11 @@ class MagneticFlux(TypedQuantity):
2601
2740
 
2602
2741
  Available units: "kapp_line", "line", "maxwell"
2603
2742
  """
2743
+
2604
2744
  __slots__ = ()
2605
2745
  _setter_class = ts.MagneticFluxSetter
2606
- _expected_dimension = dim.MAGNETIC_FLUX
2607
-
2746
+ _dimension = dim.MAGNETIC_FLUX
2747
+
2608
2748
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
2609
2749
  """
2610
2750
  Initialize magnetic flux quantity.
@@ -2623,13 +2763,15 @@ class MagneticFlux(TypedQuantity):
2623
2763
  super().__init__(name_or_value, unit, name, is_known=is_known)
2624
2764
  else:
2625
2765
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
2766
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
2626
2767
 
2627
- def set(self, value: int | float) -> ts.MagneticFluxSetter:
2768
+ def set(self, value: float, unit: str | None = None) -> ts.MagneticFluxSetter:
2628
2769
  """
2629
2770
  Create a setter for this magnetic flux quantity.
2630
2771
 
2631
2772
  Args:
2632
2773
  value: The numeric value to set
2774
+ unit: Optional unit string (for compatibility with base class)
2633
2775
 
2634
2776
  Returns:
2635
2777
  MagneticFluxSetter: A setter with unit properties like .meters, .inches, etc.
@@ -2641,7 +2783,7 @@ class MagneticFlux(TypedQuantity):
2641
2783
  return ts.MagneticFluxSetter(self, value)
2642
2784
 
2643
2785
 
2644
- class MagneticInductionFieldStrength(TypedQuantity):
2786
+ class MagneticInductionFieldStrength(FieldQnty):
2645
2787
  """
2646
2788
  Type-safe magnetic induction field strength quantity with expression capabilities.
2647
2789
 
@@ -2657,10 +2799,11 @@ class MagneticInductionFieldStrength(TypedQuantity):
2657
2799
 
2658
2800
  Available units: "gamma", "gauss", "line_per_square_centimeter"
2659
2801
  """
2802
+
2660
2803
  __slots__ = ()
2661
2804
  _setter_class = ts.MagneticInductionFieldStrengthSetter
2662
- _expected_dimension = dim.MAGNETIC_INDUCTION_FIELD_STRENGTH
2663
-
2805
+ _dimension = dim.MAGNETIC_INDUCTION_FIELD_STRENGTH
2806
+
2664
2807
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
2665
2808
  """
2666
2809
  Initialize magnetic induction field strength quantity.
@@ -2679,13 +2822,15 @@ class MagneticInductionFieldStrength(TypedQuantity):
2679
2822
  super().__init__(name_or_value, unit, name, is_known=is_known)
2680
2823
  else:
2681
2824
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
2825
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
2682
2826
 
2683
- def set(self, value: int | float) -> ts.MagneticInductionFieldStrengthSetter:
2827
+ def set(self, value: float, unit: str | None = None) -> ts.MagneticInductionFieldStrengthSetter:
2684
2828
  """
2685
2829
  Create a setter for this magnetic induction field strength quantity.
2686
2830
 
2687
2831
  Args:
2688
2832
  value: The numeric value to set
2833
+ unit: Optional unit string (for compatibility with base class)
2689
2834
 
2690
2835
  Returns:
2691
2836
  MagneticInductionFieldStrengthSetter: A setter with unit properties like .meters, .inches, etc.
@@ -2697,7 +2842,7 @@ class MagneticInductionFieldStrength(TypedQuantity):
2697
2842
  return ts.MagneticInductionFieldStrengthSetter(self, value)
2698
2843
 
2699
2844
 
2700
- class MagneticMoment(TypedQuantity):
2845
+ class MagneticMoment(FieldQnty):
2701
2846
  """
2702
2847
  Type-safe magnetic moment quantity with expression capabilities.
2703
2848
 
@@ -2713,10 +2858,11 @@ class MagneticMoment(TypedQuantity):
2713
2858
 
2714
2859
  Available units: "bohr_magneton", "joule_per_tesla", "nuclear_magneton"
2715
2860
  """
2861
+
2716
2862
  __slots__ = ()
2717
2863
  _setter_class = ts.MagneticMomentSetter
2718
- _expected_dimension = dim.MAGNETIC_MOMENT
2719
-
2864
+ _dimension = dim.MAGNETIC_MOMENT
2865
+
2720
2866
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
2721
2867
  """
2722
2868
  Initialize magnetic moment quantity.
@@ -2735,13 +2881,15 @@ class MagneticMoment(TypedQuantity):
2735
2881
  super().__init__(name_or_value, unit, name, is_known=is_known)
2736
2882
  else:
2737
2883
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
2884
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
2738
2885
 
2739
- def set(self, value: int | float) -> ts.MagneticMomentSetter:
2886
+ def set(self, value: float, unit: str | None = None) -> ts.MagneticMomentSetter:
2740
2887
  """
2741
2888
  Create a setter for this magnetic moment quantity.
2742
2889
 
2743
2890
  Args:
2744
2891
  value: The numeric value to set
2892
+ unit: Optional unit string (for compatibility with base class)
2745
2893
 
2746
2894
  Returns:
2747
2895
  MagneticMomentSetter: A setter with unit properties like .meters, .inches, etc.
@@ -2753,7 +2901,7 @@ class MagneticMoment(TypedQuantity):
2753
2901
  return ts.MagneticMomentSetter(self, value)
2754
2902
 
2755
2903
 
2756
- class MagneticPermeability(TypedQuantity):
2904
+ class MagneticPermeability(FieldQnty):
2757
2905
  """
2758
2906
  Type-safe magnetic permeability quantity with expression capabilities.
2759
2907
 
@@ -2769,10 +2917,11 @@ class MagneticPermeability(TypedQuantity):
2769
2917
 
2770
2918
  Available units: "henrys_per_meter", "newton_per_square_ampere"
2771
2919
  """
2920
+
2772
2921
  __slots__ = ()
2773
2922
  _setter_class = ts.MagneticPermeabilitySetter
2774
- _expected_dimension = dim.MAGNETIC_PERMEABILITY
2775
-
2923
+ _dimension = dim.MAGNETIC_PERMEABILITY
2924
+
2776
2925
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
2777
2926
  """
2778
2927
  Initialize magnetic permeability quantity.
@@ -2791,13 +2940,15 @@ class MagneticPermeability(TypedQuantity):
2791
2940
  super().__init__(name_or_value, unit, name, is_known=is_known)
2792
2941
  else:
2793
2942
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
2943
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
2794
2944
 
2795
- def set(self, value: int | float) -> ts.MagneticPermeabilitySetter:
2945
+ def set(self, value: float, unit: str | None = None) -> ts.MagneticPermeabilitySetter:
2796
2946
  """
2797
2947
  Create a setter for this magnetic permeability quantity.
2798
2948
 
2799
2949
  Args:
2800
2950
  value: The numeric value to set
2951
+ unit: Optional unit string (for compatibility with base class)
2801
2952
 
2802
2953
  Returns:
2803
2954
  MagneticPermeabilitySetter: A setter with unit properties like .meters, .inches, etc.
@@ -2809,7 +2960,7 @@ class MagneticPermeability(TypedQuantity):
2809
2960
  return ts.MagneticPermeabilitySetter(self, value)
2810
2961
 
2811
2962
 
2812
- class MagnetomotiveForce(TypedQuantity):
2963
+ class MagnetomotiveForce(FieldQnty):
2813
2964
  """
2814
2965
  Type-safe magnetomotive force quantity with expression capabilities.
2815
2966
 
@@ -2825,10 +2976,11 @@ class MagnetomotiveForce(TypedQuantity):
2825
2976
 
2826
2977
  Available units: "abampere_turn", "ampere", "ampere_turn"
2827
2978
  """
2979
+
2828
2980
  __slots__ = ()
2829
2981
  _setter_class = ts.MagnetomotiveForceSetter
2830
- _expected_dimension = dim.MAGNETOMOTIVE_FORCE
2831
-
2982
+ _dimension = dim.MAGNETOMOTIVE_FORCE
2983
+
2832
2984
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
2833
2985
  """
2834
2986
  Initialize magnetomotive force quantity.
@@ -2847,13 +2999,15 @@ class MagnetomotiveForce(TypedQuantity):
2847
2999
  super().__init__(name_or_value, unit, name, is_known=is_known)
2848
3000
  else:
2849
3001
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
3002
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
2850
3003
 
2851
- def set(self, value: int | float) -> ts.MagnetomotiveForceSetter:
3004
+ def set(self, value: float, unit: str | None = None) -> ts.MagnetomotiveForceSetter:
2852
3005
  """
2853
3006
  Create a setter for this magnetomotive force quantity.
2854
3007
 
2855
3008
  Args:
2856
3009
  value: The numeric value to set
3010
+ unit: Optional unit string (for compatibility with base class)
2857
3011
 
2858
3012
  Returns:
2859
3013
  MagnetomotiveForceSetter: A setter with unit properties like .meters, .inches, etc.
@@ -2865,7 +3019,7 @@ class MagnetomotiveForce(TypedQuantity):
2865
3019
  return ts.MagnetomotiveForceSetter(self, value)
2866
3020
 
2867
3021
 
2868
- class Mass(TypedQuantity):
3022
+ class Mass(FieldQnty):
2869
3023
  """
2870
3024
  Type-safe mass quantity with expression capabilities.
2871
3025
 
@@ -2881,10 +3035,11 @@ class Mass(TypedQuantity):
2881
3035
 
2882
3036
  Available units: "slug", "atomic_mass_unit_12_mathrmc", "carat_metric"
2883
3037
  """
3038
+
2884
3039
  __slots__ = ()
2885
3040
  _setter_class = ts.MassSetter
2886
- _expected_dimension = dim.MASS
2887
-
3041
+ _dimension = dim.MASS
3042
+
2888
3043
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
2889
3044
  """
2890
3045
  Initialize mass quantity.
@@ -2903,13 +3058,15 @@ class Mass(TypedQuantity):
2903
3058
  super().__init__(name_or_value, unit, name, is_known=is_known)
2904
3059
  else:
2905
3060
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
3061
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
2906
3062
 
2907
- def set(self, value: int | float) -> ts.MassSetter:
3063
+ def set(self, value: float, unit: str | None = None) -> ts.MassSetter:
2908
3064
  """
2909
3065
  Create a setter for this mass quantity.
2910
3066
 
2911
3067
  Args:
2912
3068
  value: The numeric value to set
3069
+ unit: Optional unit string (for compatibility with base class)
2913
3070
 
2914
3071
  Returns:
2915
3072
  MassSetter: A setter with unit properties like .meters, .inches, etc.
@@ -2921,7 +3078,7 @@ class Mass(TypedQuantity):
2921
3078
  return ts.MassSetter(self, value)
2922
3079
 
2923
3080
 
2924
- class MassDensity(TypedQuantity):
3081
+ class MassDensity(FieldQnty):
2925
3082
  """
2926
3083
  Type-safe mass density quantity with expression capabilities.
2927
3084
 
@@ -2937,10 +3094,11 @@ class MassDensity(TypedQuantity):
2937
3094
 
2938
3095
  Available units: "gram_per_cubic_centimeter", "gram_per_cubic_decimeter", "gram_per_cubic_meter"
2939
3096
  """
3097
+
2940
3098
  __slots__ = ()
2941
3099
  _setter_class = ts.MassDensitySetter
2942
- _expected_dimension = dim.MASS_DENSITY
2943
-
3100
+ _dimension = dim.MASS_DENSITY
3101
+
2944
3102
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
2945
3103
  """
2946
3104
  Initialize mass density quantity.
@@ -2959,13 +3117,15 @@ class MassDensity(TypedQuantity):
2959
3117
  super().__init__(name_or_value, unit, name, is_known=is_known)
2960
3118
  else:
2961
3119
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
3120
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
2962
3121
 
2963
- def set(self, value: int | float) -> ts.MassDensitySetter:
3122
+ def set(self, value: float, unit: str | None = None) -> ts.MassDensitySetter:
2964
3123
  """
2965
3124
  Create a setter for this mass density quantity.
2966
3125
 
2967
3126
  Args:
2968
3127
  value: The numeric value to set
3128
+ unit: Optional unit string (for compatibility with base class)
2969
3129
 
2970
3130
  Returns:
2971
3131
  MassDensitySetter: A setter with unit properties like .meters, .inches, etc.
@@ -2977,7 +3137,7 @@ class MassDensity(TypedQuantity):
2977
3137
  return ts.MassDensitySetter(self, value)
2978
3138
 
2979
3139
 
2980
- class MassFlowRate(TypedQuantity):
3140
+ class MassFlowRate(FieldQnty):
2981
3141
  """
2982
3142
  Type-safe mass flow rate quantity with expression capabilities.
2983
3143
 
@@ -2993,10 +3153,11 @@ class MassFlowRate(TypedQuantity):
2993
3153
 
2994
3154
  Available units: "kilograms_per_day", "kilograms_per_hour", "kilograms_per_minute"
2995
3155
  """
3156
+
2996
3157
  __slots__ = ()
2997
3158
  _setter_class = ts.MassFlowRateSetter
2998
- _expected_dimension = dim.MASS_FLOW_RATE
2999
-
3159
+ _dimension = dim.MASS_FLOW_RATE
3160
+
3000
3161
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
3001
3162
  """
3002
3163
  Initialize mass flow rate quantity.
@@ -3015,13 +3176,15 @@ class MassFlowRate(TypedQuantity):
3015
3176
  super().__init__(name_or_value, unit, name, is_known=is_known)
3016
3177
  else:
3017
3178
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
3179
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
3018
3180
 
3019
- def set(self, value: int | float) -> ts.MassFlowRateSetter:
3181
+ def set(self, value: float, unit: str | None = None) -> ts.MassFlowRateSetter:
3020
3182
  """
3021
3183
  Create a setter for this mass flow rate quantity.
3022
3184
 
3023
3185
  Args:
3024
3186
  value: The numeric value to set
3187
+ unit: Optional unit string (for compatibility with base class)
3025
3188
 
3026
3189
  Returns:
3027
3190
  MassFlowRateSetter: A setter with unit properties like .meters, .inches, etc.
@@ -3033,7 +3196,7 @@ class MassFlowRate(TypedQuantity):
3033
3196
  return ts.MassFlowRateSetter(self, value)
3034
3197
 
3035
3198
 
3036
- class MassFlux(TypedQuantity):
3199
+ class MassFlux(FieldQnty):
3037
3200
  """
3038
3201
  Type-safe mass flux quantity with expression capabilities.
3039
3202
 
@@ -3049,10 +3212,11 @@ class MassFlux(TypedQuantity):
3049
3212
 
3050
3213
  Available units: "kilogram_per_square_meter_per_day", "kilogram_per_square_meter_per_hour", "kilogram_per_square_meter_per_minute"
3051
3214
  """
3215
+
3052
3216
  __slots__ = ()
3053
3217
  _setter_class = ts.MassFluxSetter
3054
- _expected_dimension = dim.MASS_FLUX
3055
-
3218
+ _dimension = dim.MASS_FLUX
3219
+
3056
3220
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
3057
3221
  """
3058
3222
  Initialize mass flux quantity.
@@ -3071,13 +3235,15 @@ class MassFlux(TypedQuantity):
3071
3235
  super().__init__(name_or_value, unit, name, is_known=is_known)
3072
3236
  else:
3073
3237
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
3238
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
3074
3239
 
3075
- def set(self, value: int | float) -> ts.MassFluxSetter:
3240
+ def set(self, value: float, unit: str | None = None) -> ts.MassFluxSetter:
3076
3241
  """
3077
3242
  Create a setter for this mass flux quantity.
3078
3243
 
3079
3244
  Args:
3080
3245
  value: The numeric value to set
3246
+ unit: Optional unit string (for compatibility with base class)
3081
3247
 
3082
3248
  Returns:
3083
3249
  MassFluxSetter: A setter with unit properties like .meters, .inches, etc.
@@ -3089,7 +3255,7 @@ class MassFlux(TypedQuantity):
3089
3255
  return ts.MassFluxSetter(self, value)
3090
3256
 
3091
3257
 
3092
- class MassFractionOfI(TypedQuantity):
3258
+ class MassFractionOfI(FieldQnty):
3093
3259
  """
3094
3260
  Type-safe mass fraction of "i" quantity with expression capabilities.
3095
3261
 
@@ -3105,10 +3271,11 @@ class MassFractionOfI(TypedQuantity):
3105
3271
 
3106
3272
  Available units: "grains_of_i_per_pound_total", "gram_of_i_per_kilogram_total", "kilogram_of_i_per_kilogram_total"
3107
3273
  """
3274
+
3108
3275
  __slots__ = ()
3109
3276
  _setter_class = ts.MassFractionOfISetter
3110
- _expected_dimension = dim.MASS_FRACTION_OF_I
3111
-
3277
+ _dimension = dim.MASS_FRACTION_OF_I
3278
+
3112
3279
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
3113
3280
  """
3114
3281
  Initialize mass fraction of "i" quantity.
@@ -3127,13 +3294,15 @@ class MassFractionOfI(TypedQuantity):
3127
3294
  super().__init__(name_or_value, unit, name, is_known=is_known)
3128
3295
  else:
3129
3296
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
3297
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
3130
3298
 
3131
- def set(self, value: int | float) -> ts.MassFractionOfISetter:
3299
+ def set(self, value: float, unit: str | None = None) -> ts.MassFractionOfISetter:
3132
3300
  """
3133
3301
  Create a setter for this mass fraction of "i" quantity.
3134
3302
 
3135
3303
  Args:
3136
3304
  value: The numeric value to set
3305
+ unit: Optional unit string (for compatibility with base class)
3137
3306
 
3138
3307
  Returns:
3139
3308
  MassFractionOfISetter: A setter with unit properties like .meters, .inches, etc.
@@ -3145,7 +3314,7 @@ class MassFractionOfI(TypedQuantity):
3145
3314
  return ts.MassFractionOfISetter(self, value)
3146
3315
 
3147
3316
 
3148
- class MassTransferCoefficient(TypedQuantity):
3317
+ class MassTransferCoefficient(FieldQnty):
3149
3318
  """
3150
3319
  Type-safe mass transfer coefficient quantity with expression capabilities.
3151
3320
 
@@ -3161,10 +3330,11 @@ class MassTransferCoefficient(TypedQuantity):
3161
3330
 
3162
3331
  Available units: "gram_per_square_centimeter_per_second", "kilogram_per_square_meter_per_second", "pounds_force_per_cubic_foot_per_hour"
3163
3332
  """
3333
+
3164
3334
  __slots__ = ()
3165
3335
  _setter_class = ts.MassTransferCoefficientSetter
3166
- _expected_dimension = dim.MASS_TRANSFER_COEFFICIENT
3167
-
3336
+ _dimension = dim.MASS_TRANSFER_COEFFICIENT
3337
+
3168
3338
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
3169
3339
  """
3170
3340
  Initialize mass transfer coefficient quantity.
@@ -3183,13 +3353,15 @@ class MassTransferCoefficient(TypedQuantity):
3183
3353
  super().__init__(name_or_value, unit, name, is_known=is_known)
3184
3354
  else:
3185
3355
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
3356
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
3186
3357
 
3187
- def set(self, value: int | float) -> ts.MassTransferCoefficientSetter:
3358
+ def set(self, value: float, unit: str | None = None) -> ts.MassTransferCoefficientSetter:
3188
3359
  """
3189
3360
  Create a setter for this mass transfer coefficient quantity.
3190
3361
 
3191
3362
  Args:
3192
3363
  value: The numeric value to set
3364
+ unit: Optional unit string (for compatibility with base class)
3193
3365
 
3194
3366
  Returns:
3195
3367
  MassTransferCoefficientSetter: A setter with unit properties like .meters, .inches, etc.
@@ -3201,7 +3373,7 @@ class MassTransferCoefficient(TypedQuantity):
3201
3373
  return ts.MassTransferCoefficientSetter(self, value)
3202
3374
 
3203
3375
 
3204
- class MolalityOfSoluteI(TypedQuantity):
3376
+ class MolalityOfSoluteI(FieldQnty):
3205
3377
  """
3206
3378
  Type-safe molality of solute "i" quantity with expression capabilities.
3207
3379
 
@@ -3217,10 +3389,11 @@ class MolalityOfSoluteI(TypedQuantity):
3217
3389
 
3218
3390
  Available units: "gram_moles_of_i_per_kilogram", "kilogram_mols_of_i_per_kilogram", "kmols_of_i_per_kilogram"
3219
3391
  """
3392
+
3220
3393
  __slots__ = ()
3221
3394
  _setter_class = ts.MolalityOfSoluteISetter
3222
- _expected_dimension = dim.MOLALITY_OF_SOLUTE_I
3223
-
3395
+ _dimension = dim.MOLALITY_OF_SOLUTE_I
3396
+
3224
3397
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
3225
3398
  """
3226
3399
  Initialize molality of solute "i" quantity.
@@ -3239,13 +3412,15 @@ class MolalityOfSoluteI(TypedQuantity):
3239
3412
  super().__init__(name_or_value, unit, name, is_known=is_known)
3240
3413
  else:
3241
3414
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
3415
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
3242
3416
 
3243
- def set(self, value: int | float) -> ts.MolalityOfSoluteISetter:
3417
+ def set(self, value: float, unit: str | None = None) -> ts.MolalityOfSoluteISetter:
3244
3418
  """
3245
3419
  Create a setter for this molality of solute "i" quantity.
3246
3420
 
3247
3421
  Args:
3248
3422
  value: The numeric value to set
3423
+ unit: Optional unit string (for compatibility with base class)
3249
3424
 
3250
3425
  Returns:
3251
3426
  MolalityOfSoluteISetter: A setter with unit properties like .meters, .inches, etc.
@@ -3257,7 +3432,7 @@ class MolalityOfSoluteI(TypedQuantity):
3257
3432
  return ts.MolalityOfSoluteISetter(self, value)
3258
3433
 
3259
3434
 
3260
- class MolarConcentrationByMass(TypedQuantity):
3435
+ class MolarConcentrationByMass(FieldQnty):
3261
3436
  """
3262
3437
  Type-safe molar concentration by mass quantity with expression capabilities.
3263
3438
 
@@ -3273,10 +3448,11 @@ class MolarConcentrationByMass(TypedQuantity):
3273
3448
 
3274
3449
  Available units: "gram_mole_or_mole_per_gram", "gram_mole_or_mole_per_kilogram", "kilogram_mole_or_kmol_per_kilogram"
3275
3450
  """
3451
+
3276
3452
  __slots__ = ()
3277
3453
  _setter_class = ts.MolarConcentrationByMassSetter
3278
- _expected_dimension = dim.MOLAR_CONCENTRATION_BY_MASS
3279
-
3454
+ _dimension = dim.MOLAR_CONCENTRATION_BY_MASS
3455
+
3280
3456
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
3281
3457
  """
3282
3458
  Initialize molar concentration by mass quantity.
@@ -3295,13 +3471,15 @@ class MolarConcentrationByMass(TypedQuantity):
3295
3471
  super().__init__(name_or_value, unit, name, is_known=is_known)
3296
3472
  else:
3297
3473
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
3474
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
3298
3475
 
3299
- def set(self, value: int | float) -> ts.MolarConcentrationByMassSetter:
3476
+ def set(self, value: float, unit: str | None = None) -> ts.MolarConcentrationByMassSetter:
3300
3477
  """
3301
3478
  Create a setter for this molar concentration by mass quantity.
3302
3479
 
3303
3480
  Args:
3304
3481
  value: The numeric value to set
3482
+ unit: Optional unit string (for compatibility with base class)
3305
3483
 
3306
3484
  Returns:
3307
3485
  MolarConcentrationByMassSetter: A setter with unit properties like .meters, .inches, etc.
@@ -3313,7 +3491,7 @@ class MolarConcentrationByMass(TypedQuantity):
3313
3491
  return ts.MolarConcentrationByMassSetter(self, value)
3314
3492
 
3315
3493
 
3316
- class MolarFlowRate(TypedQuantity):
3494
+ class MolarFlowRate(FieldQnty):
3317
3495
  """
3318
3496
  Type-safe molar flow rate quantity with expression capabilities.
3319
3497
 
@@ -3329,10 +3507,11 @@ class MolarFlowRate(TypedQuantity):
3329
3507
 
3330
3508
  Available units: "gram_mole_per_day", "gram_mole_per_hour", "gram_mole_per_minute"
3331
3509
  """
3510
+
3332
3511
  __slots__ = ()
3333
3512
  _setter_class = ts.MolarFlowRateSetter
3334
- _expected_dimension = dim.MOLAR_FLOW_RATE
3335
-
3513
+ _dimension = dim.MOLAR_FLOW_RATE
3514
+
3336
3515
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
3337
3516
  """
3338
3517
  Initialize molar flow rate quantity.
@@ -3351,13 +3530,15 @@ class MolarFlowRate(TypedQuantity):
3351
3530
  super().__init__(name_or_value, unit, name, is_known=is_known)
3352
3531
  else:
3353
3532
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
3533
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
3354
3534
 
3355
- def set(self, value: int | float) -> ts.MolarFlowRateSetter:
3535
+ def set(self, value: float, unit: str | None = None) -> ts.MolarFlowRateSetter:
3356
3536
  """
3357
3537
  Create a setter for this molar flow rate quantity.
3358
3538
 
3359
3539
  Args:
3360
3540
  value: The numeric value to set
3541
+ unit: Optional unit string (for compatibility with base class)
3361
3542
 
3362
3543
  Returns:
3363
3544
  MolarFlowRateSetter: A setter with unit properties like .meters, .inches, etc.
@@ -3369,7 +3550,7 @@ class MolarFlowRate(TypedQuantity):
3369
3550
  return ts.MolarFlowRateSetter(self, value)
3370
3551
 
3371
3552
 
3372
- class MolarFlux(TypedQuantity):
3553
+ class MolarFlux(FieldQnty):
3373
3554
  """
3374
3555
  Type-safe molar flux quantity with expression capabilities.
3375
3556
 
@@ -3385,10 +3566,11 @@ class MolarFlux(TypedQuantity):
3385
3566
 
3386
3567
  Available units: "kmol_per_square_meter_per_day", "kmol_per_square_meter_per_hour", "kmol_per_square_meter_per_minute"
3387
3568
  """
3569
+
3388
3570
  __slots__ = ()
3389
3571
  _setter_class = ts.MolarFluxSetter
3390
- _expected_dimension = dim.MOLAR_FLUX
3391
-
3572
+ _dimension = dim.MOLAR_FLUX
3573
+
3392
3574
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
3393
3575
  """
3394
3576
  Initialize molar flux quantity.
@@ -3407,13 +3589,15 @@ class MolarFlux(TypedQuantity):
3407
3589
  super().__init__(name_or_value, unit, name, is_known=is_known)
3408
3590
  else:
3409
3591
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
3592
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
3410
3593
 
3411
- def set(self, value: int | float) -> ts.MolarFluxSetter:
3594
+ def set(self, value: float, unit: str | None = None) -> ts.MolarFluxSetter:
3412
3595
  """
3413
3596
  Create a setter for this molar flux quantity.
3414
3597
 
3415
3598
  Args:
3416
3599
  value: The numeric value to set
3600
+ unit: Optional unit string (for compatibility with base class)
3417
3601
 
3418
3602
  Returns:
3419
3603
  MolarFluxSetter: A setter with unit properties like .meters, .inches, etc.
@@ -3425,7 +3609,7 @@ class MolarFlux(TypedQuantity):
3425
3609
  return ts.MolarFluxSetter(self, value)
3426
3610
 
3427
3611
 
3428
- class MolarHeatCapacity(TypedQuantity):
3612
+ class MolarHeatCapacity(FieldQnty):
3429
3613
  """
3430
3614
  Type-safe molar heat capacity quantity with expression capabilities.
3431
3615
 
@@ -3441,10 +3625,11 @@ class MolarHeatCapacity(TypedQuantity):
3441
3625
 
3442
3626
  Available units: "btu_per_pound_mole_per_degree_fahrenheit_or_degree_rankine", "calories_per_gram_mole_per_kelvin_or_degree_celsius", "joule_per_gram_mole_per_kelvin_or_degree_celsius"
3443
3627
  """
3628
+
3444
3629
  __slots__ = ()
3445
3630
  _setter_class = ts.MolarHeatCapacitySetter
3446
- _expected_dimension = dim.MOLAR_HEAT_CAPACITY
3447
-
3631
+ _dimension = dim.MOLAR_HEAT_CAPACITY
3632
+
3448
3633
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
3449
3634
  """
3450
3635
  Initialize molar heat capacity quantity.
@@ -3463,13 +3648,15 @@ class MolarHeatCapacity(TypedQuantity):
3463
3648
  super().__init__(name_or_value, unit, name, is_known=is_known)
3464
3649
  else:
3465
3650
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
3651
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
3466
3652
 
3467
- def set(self, value: int | float) -> ts.MolarHeatCapacitySetter:
3653
+ def set(self, value: float, unit: str | None = None) -> ts.MolarHeatCapacitySetter:
3468
3654
  """
3469
3655
  Create a setter for this molar heat capacity quantity.
3470
3656
 
3471
3657
  Args:
3472
3658
  value: The numeric value to set
3659
+ unit: Optional unit string (for compatibility with base class)
3473
3660
 
3474
3661
  Returns:
3475
3662
  MolarHeatCapacitySetter: A setter with unit properties like .meters, .inches, etc.
@@ -3481,7 +3668,7 @@ class MolarHeatCapacity(TypedQuantity):
3481
3668
  return ts.MolarHeatCapacitySetter(self, value)
3482
3669
 
3483
3670
 
3484
- class MolarityOfI(TypedQuantity):
3671
+ class MolarityOfI(FieldQnty):
3485
3672
  """
3486
3673
  Type-safe molarity of "i" quantity with expression capabilities.
3487
3674
 
@@ -3497,10 +3684,11 @@ class MolarityOfI(TypedQuantity):
3497
3684
 
3498
3685
  Available units: "gram_moles_of_i_per_cubic_meter", "gram_moles_of_i_per_liter", "kilogram_moles_of_i_per_cubic_meter"
3499
3686
  """
3687
+
3500
3688
  __slots__ = ()
3501
3689
  _setter_class = ts.MolarityOfISetter
3502
- _expected_dimension = dim.MOLARITY_OF_I
3503
-
3690
+ _dimension = dim.MOLARITY_OF_I
3691
+
3504
3692
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
3505
3693
  """
3506
3694
  Initialize molarity of "i" quantity.
@@ -3519,13 +3707,15 @@ class MolarityOfI(TypedQuantity):
3519
3707
  super().__init__(name_or_value, unit, name, is_known=is_known)
3520
3708
  else:
3521
3709
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
3710
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
3522
3711
 
3523
- def set(self, value: int | float) -> ts.MolarityOfISetter:
3712
+ def set(self, value: float, unit: str | None = None) -> ts.MolarityOfISetter:
3524
3713
  """
3525
3714
  Create a setter for this molarity of "i" quantity.
3526
3715
 
3527
3716
  Args:
3528
3717
  value: The numeric value to set
3718
+ unit: Optional unit string (for compatibility with base class)
3529
3719
 
3530
3720
  Returns:
3531
3721
  MolarityOfISetter: A setter with unit properties like .meters, .inches, etc.
@@ -3537,7 +3727,7 @@ class MolarityOfI(TypedQuantity):
3537
3727
  return ts.MolarityOfISetter(self, value)
3538
3728
 
3539
3729
 
3540
- class MoleFractionOfI(TypedQuantity):
3730
+ class MoleFractionOfI(FieldQnty):
3541
3731
  """
3542
3732
  Type-safe mole fraction of "i" quantity with expression capabilities.
3543
3733
 
@@ -3553,10 +3743,11 @@ class MoleFractionOfI(TypedQuantity):
3553
3743
 
3554
3744
  Available units: "gram_mole_of_i_per_gram_mole_total", "kilogram_mole_of_i_per_kilogram_mole_total", "kilomole_of_i_per_kilomole_total"
3555
3745
  """
3746
+
3556
3747
  __slots__ = ()
3557
3748
  _setter_class = ts.MoleFractionOfISetter
3558
- _expected_dimension = dim.MOLE_FRACTION_OF_I
3559
-
3749
+ _dimension = dim.MOLE_FRACTION_OF_I
3750
+
3560
3751
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
3561
3752
  """
3562
3753
  Initialize mole fraction of "i" quantity.
@@ -3575,13 +3766,15 @@ class MoleFractionOfI(TypedQuantity):
3575
3766
  super().__init__(name_or_value, unit, name, is_known=is_known)
3576
3767
  else:
3577
3768
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
3769
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
3578
3770
 
3579
- def set(self, value: int | float) -> ts.MoleFractionOfISetter:
3771
+ def set(self, value: float, unit: str | None = None) -> ts.MoleFractionOfISetter:
3580
3772
  """
3581
3773
  Create a setter for this mole fraction of "i" quantity.
3582
3774
 
3583
3775
  Args:
3584
3776
  value: The numeric value to set
3777
+ unit: Optional unit string (for compatibility with base class)
3585
3778
 
3586
3779
  Returns:
3587
3780
  MoleFractionOfISetter: A setter with unit properties like .meters, .inches, etc.
@@ -3593,7 +3786,7 @@ class MoleFractionOfI(TypedQuantity):
3593
3786
  return ts.MoleFractionOfISetter(self, value)
3594
3787
 
3595
3788
 
3596
- class MomentOfInertia(TypedQuantity):
3789
+ class MomentOfInertia(FieldQnty):
3597
3790
  """
3598
3791
  Type-safe moment of inertia quantity with expression capabilities.
3599
3792
 
@@ -3609,10 +3802,11 @@ class MomentOfInertia(TypedQuantity):
3609
3802
 
3610
3803
  Available units: "gram_force_centimeter_square_second", "gram_square_centimeter", "kilogram_force_centimeter_square_second"
3611
3804
  """
3805
+
3612
3806
  __slots__ = ()
3613
3807
  _setter_class = ts.MomentOfInertiaSetter
3614
- _expected_dimension = dim.MOMENT_OF_INERTIA
3615
-
3808
+ _dimension = dim.MOMENT_OF_INERTIA
3809
+
3616
3810
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
3617
3811
  """
3618
3812
  Initialize moment of inertia quantity.
@@ -3631,13 +3825,15 @@ class MomentOfInertia(TypedQuantity):
3631
3825
  super().__init__(name_or_value, unit, name, is_known=is_known)
3632
3826
  else:
3633
3827
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
3828
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
3634
3829
 
3635
- def set(self, value: int | float) -> ts.MomentOfInertiaSetter:
3830
+ def set(self, value: float, unit: str | None = None) -> ts.MomentOfInertiaSetter:
3636
3831
  """
3637
3832
  Create a setter for this moment of inertia quantity.
3638
3833
 
3639
3834
  Args:
3640
3835
  value: The numeric value to set
3836
+ unit: Optional unit string (for compatibility with base class)
3641
3837
 
3642
3838
  Returns:
3643
3839
  MomentOfInertiaSetter: A setter with unit properties like .meters, .inches, etc.
@@ -3649,7 +3845,7 @@ class MomentOfInertia(TypedQuantity):
3649
3845
  return ts.MomentOfInertiaSetter(self, value)
3650
3846
 
3651
3847
 
3652
- class MomentumFlowRate(TypedQuantity):
3848
+ class MomentumFlowRate(FieldQnty):
3653
3849
  """
3654
3850
  Type-safe momentum flow rate quantity with expression capabilities.
3655
3851
 
@@ -3665,10 +3861,11 @@ class MomentumFlowRate(TypedQuantity):
3665
3861
 
3666
3862
  Available units: "foot_pounds_per_square_hour", "foot_pounds_per_square_minute", "foot_pounds_per_square_second"
3667
3863
  """
3864
+
3668
3865
  __slots__ = ()
3669
3866
  _setter_class = ts.MomentumFlowRateSetter
3670
- _expected_dimension = dim.MOMENTUM_FLOW_RATE
3671
-
3867
+ _dimension = dim.MOMENTUM_FLOW_RATE
3868
+
3672
3869
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
3673
3870
  """
3674
3871
  Initialize momentum flow rate quantity.
@@ -3687,13 +3884,15 @@ class MomentumFlowRate(TypedQuantity):
3687
3884
  super().__init__(name_or_value, unit, name, is_known=is_known)
3688
3885
  else:
3689
3886
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
3887
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
3690
3888
 
3691
- def set(self, value: int | float) -> ts.MomentumFlowRateSetter:
3889
+ def set(self, value: float, unit: str | None = None) -> ts.MomentumFlowRateSetter:
3692
3890
  """
3693
3891
  Create a setter for this momentum flow rate quantity.
3694
3892
 
3695
3893
  Args:
3696
3894
  value: The numeric value to set
3895
+ unit: Optional unit string (for compatibility with base class)
3697
3896
 
3698
3897
  Returns:
3699
3898
  MomentumFlowRateSetter: A setter with unit properties like .meters, .inches, etc.
@@ -3705,7 +3904,7 @@ class MomentumFlowRate(TypedQuantity):
3705
3904
  return ts.MomentumFlowRateSetter(self, value)
3706
3905
 
3707
3906
 
3708
- class MomentumFlux(TypedQuantity):
3907
+ class MomentumFlux(FieldQnty):
3709
3908
  """
3710
3909
  Type-safe momentum flux quantity with expression capabilities.
3711
3910
 
@@ -3721,10 +3920,11 @@ class MomentumFlux(TypedQuantity):
3721
3920
 
3722
3921
  Available units: "dyne_per_square_centimeter", "gram_per_centimeter_per_square_second", "newton_per_square_meter"
3723
3922
  """
3923
+
3724
3924
  __slots__ = ()
3725
3925
  _setter_class = ts.MomentumFluxSetter
3726
- _expected_dimension = dim.MOMENTUM_FLUX
3727
-
3926
+ _dimension = dim.MOMENTUM_FLUX
3927
+
3728
3928
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
3729
3929
  """
3730
3930
  Initialize momentum flux quantity.
@@ -3743,13 +3943,15 @@ class MomentumFlux(TypedQuantity):
3743
3943
  super().__init__(name_or_value, unit, name, is_known=is_known)
3744
3944
  else:
3745
3945
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
3946
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
3746
3947
 
3747
- def set(self, value: int | float) -> ts.MomentumFluxSetter:
3948
+ def set(self, value: float, unit: str | None = None) -> ts.MomentumFluxSetter:
3748
3949
  """
3749
3950
  Create a setter for this momentum flux quantity.
3750
3951
 
3751
3952
  Args:
3752
3953
  value: The numeric value to set
3954
+ unit: Optional unit string (for compatibility with base class)
3753
3955
 
3754
3956
  Returns:
3755
3957
  MomentumFluxSetter: A setter with unit properties like .meters, .inches, etc.
@@ -3761,7 +3963,7 @@ class MomentumFlux(TypedQuantity):
3761
3963
  return ts.MomentumFluxSetter(self, value)
3762
3964
 
3763
3965
 
3764
- class NormalityOfSolution(TypedQuantity):
3966
+ class NormalityOfSolution(FieldQnty):
3765
3967
  """
3766
3968
  Type-safe normality of solution quantity with expression capabilities.
3767
3969
 
@@ -3777,10 +3979,11 @@ class NormalityOfSolution(TypedQuantity):
3777
3979
 
3778
3980
  Available units: "gram_equivalents_per_cubic_meter", "gram_equivalents_per_liter", "pound_equivalents_per_cubic_foot"
3779
3981
  """
3982
+
3780
3983
  __slots__ = ()
3781
3984
  _setter_class = ts.NormalityOfSolutionSetter
3782
- _expected_dimension = dim.NORMALITY_OF_SOLUTION
3783
-
3985
+ _dimension = dim.NORMALITY_OF_SOLUTION
3986
+
3784
3987
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
3785
3988
  """
3786
3989
  Initialize normality of solution quantity.
@@ -3799,13 +4002,15 @@ class NormalityOfSolution(TypedQuantity):
3799
4002
  super().__init__(name_or_value, unit, name, is_known=is_known)
3800
4003
  else:
3801
4004
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
4005
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
3802
4006
 
3803
- def set(self, value: int | float) -> ts.NormalityOfSolutionSetter:
4007
+ def set(self, value: float, unit: str | None = None) -> ts.NormalityOfSolutionSetter:
3804
4008
  """
3805
4009
  Create a setter for this normality of solution quantity.
3806
4010
 
3807
4011
  Args:
3808
4012
  value: The numeric value to set
4013
+ unit: Optional unit string (for compatibility with base class)
3809
4014
 
3810
4015
  Returns:
3811
4016
  NormalityOfSolutionSetter: A setter with unit properties like .meters, .inches, etc.
@@ -3817,7 +4022,7 @@ class NormalityOfSolution(TypedQuantity):
3817
4022
  return ts.NormalityOfSolutionSetter(self, value)
3818
4023
 
3819
4024
 
3820
- class ParticleDensity(TypedQuantity):
4025
+ class ParticleDensity(FieldQnty):
3821
4026
  """
3822
4027
  Type-safe particle density quantity with expression capabilities.
3823
4028
 
@@ -3833,10 +4038,11 @@ class ParticleDensity(TypedQuantity):
3833
4038
 
3834
4039
  Available units: "particles_per_cubic_centimeter", "particles_per_cubic_foot", "particles_per_cubic_meter"
3835
4040
  """
4041
+
3836
4042
  __slots__ = ()
3837
4043
  _setter_class = ts.ParticleDensitySetter
3838
- _expected_dimension = dim.PARTICLE_DENSITY
3839
-
4044
+ _dimension = dim.PARTICLE_DENSITY
4045
+
3840
4046
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
3841
4047
  """
3842
4048
  Initialize particle density quantity.
@@ -3855,13 +4061,15 @@ class ParticleDensity(TypedQuantity):
3855
4061
  super().__init__(name_or_value, unit, name, is_known=is_known)
3856
4062
  else:
3857
4063
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
4064
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
3858
4065
 
3859
- def set(self, value: int | float) -> ts.ParticleDensitySetter:
4066
+ def set(self, value: float, unit: str | None = None) -> ts.ParticleDensitySetter:
3860
4067
  """
3861
4068
  Create a setter for this particle density quantity.
3862
4069
 
3863
4070
  Args:
3864
4071
  value: The numeric value to set
4072
+ unit: Optional unit string (for compatibility with base class)
3865
4073
 
3866
4074
  Returns:
3867
4075
  ParticleDensitySetter: A setter with unit properties like .meters, .inches, etc.
@@ -3873,7 +4081,7 @@ class ParticleDensity(TypedQuantity):
3873
4081
  return ts.ParticleDensitySetter(self, value)
3874
4082
 
3875
4083
 
3876
- class Percent(TypedQuantity):
4084
+ class Percent(FieldQnty):
3877
4085
  """
3878
4086
  Type-safe percent quantity with expression capabilities.
3879
4087
 
@@ -3889,10 +4097,11 @@ class Percent(TypedQuantity):
3889
4097
 
3890
4098
  Available units: "percent", "per_mille", "basis_point"
3891
4099
  """
4100
+
3892
4101
  __slots__ = ()
3893
4102
  _setter_class = ts.PercentSetter
3894
- _expected_dimension = dim.PERCENT
3895
-
4103
+ _dimension = dim.PERCENT
4104
+
3896
4105
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
3897
4106
  """
3898
4107
  Initialize percent quantity.
@@ -3911,13 +4120,15 @@ class Percent(TypedQuantity):
3911
4120
  super().__init__(name_or_value, unit, name, is_known=is_known)
3912
4121
  else:
3913
4122
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
4123
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
3914
4124
 
3915
- def set(self, value: int | float) -> ts.PercentSetter:
4125
+ def set(self, value: float, unit: str | None = None) -> ts.PercentSetter:
3916
4126
  """
3917
4127
  Create a setter for this percent quantity.
3918
4128
 
3919
4129
  Args:
3920
4130
  value: The numeric value to set
4131
+ unit: Optional unit string (for compatibility with base class)
3921
4132
 
3922
4133
  Returns:
3923
4134
  PercentSetter: A setter with unit properties like .meters, .inches, etc.
@@ -3929,7 +4140,7 @@ class Percent(TypedQuantity):
3929
4140
  return ts.PercentSetter(self, value)
3930
4141
 
3931
4142
 
3932
- class Permeability(TypedQuantity):
4143
+ class Permeability(FieldQnty):
3933
4144
  """
3934
4145
  Type-safe permeability quantity with expression capabilities.
3935
4146
 
@@ -3945,10 +4156,11 @@ class Permeability(TypedQuantity):
3945
4156
 
3946
4157
  Available units: "darcy", "square_feet", "square_meters"
3947
4158
  """
4159
+
3948
4160
  __slots__ = ()
3949
4161
  _setter_class = ts.PermeabilitySetter
3950
- _expected_dimension = dim.PERMEABILITY
3951
-
4162
+ _dimension = dim.PERMEABILITY
4163
+
3952
4164
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
3953
4165
  """
3954
4166
  Initialize permeability quantity.
@@ -3967,13 +4179,15 @@ class Permeability(TypedQuantity):
3967
4179
  super().__init__(name_or_value, unit, name, is_known=is_known)
3968
4180
  else:
3969
4181
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
4182
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
3970
4183
 
3971
- def set(self, value: int | float) -> ts.PermeabilitySetter:
4184
+ def set(self, value: float, unit: str | None = None) -> ts.PermeabilitySetter:
3972
4185
  """
3973
4186
  Create a setter for this permeability quantity.
3974
4187
 
3975
4188
  Args:
3976
4189
  value: The numeric value to set
4190
+ unit: Optional unit string (for compatibility with base class)
3977
4191
 
3978
4192
  Returns:
3979
4193
  PermeabilitySetter: A setter with unit properties like .meters, .inches, etc.
@@ -3985,7 +4199,7 @@ class Permeability(TypedQuantity):
3985
4199
  return ts.PermeabilitySetter(self, value)
3986
4200
 
3987
4201
 
3988
- class PhotonEmissionRate(TypedQuantity):
4202
+ class PhotonEmissionRate(FieldQnty):
3989
4203
  """
3990
4204
  Type-safe photon emission rate quantity with expression capabilities.
3991
4205
 
@@ -4001,10 +4215,11 @@ class PhotonEmissionRate(TypedQuantity):
4001
4215
 
4002
4216
  Available units: "rayleigh", "reciprocal_square_meter_second"
4003
4217
  """
4218
+
4004
4219
  __slots__ = ()
4005
4220
  _setter_class = ts.PhotonEmissionRateSetter
4006
- _expected_dimension = dim.PHOTON_EMISSION_RATE
4007
-
4221
+ _dimension = dim.PHOTON_EMISSION_RATE
4222
+
4008
4223
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
4009
4224
  """
4010
4225
  Initialize photon emission rate quantity.
@@ -4023,13 +4238,15 @@ class PhotonEmissionRate(TypedQuantity):
4023
4238
  super().__init__(name_or_value, unit, name, is_known=is_known)
4024
4239
  else:
4025
4240
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
4241
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
4026
4242
 
4027
- def set(self, value: int | float) -> ts.PhotonEmissionRateSetter:
4243
+ def set(self, value: float, unit: str | None = None) -> ts.PhotonEmissionRateSetter:
4028
4244
  """
4029
4245
  Create a setter for this photon emission rate quantity.
4030
4246
 
4031
4247
  Args:
4032
4248
  value: The numeric value to set
4249
+ unit: Optional unit string (for compatibility with base class)
4033
4250
 
4034
4251
  Returns:
4035
4252
  PhotonEmissionRateSetter: A setter with unit properties like .meters, .inches, etc.
@@ -4041,7 +4258,7 @@ class PhotonEmissionRate(TypedQuantity):
4041
4258
  return ts.PhotonEmissionRateSetter(self, value)
4042
4259
 
4043
4260
 
4044
- class PowerPerUnitMass(TypedQuantity):
4261
+ class PowerPerUnitMass(FieldQnty):
4045
4262
  """
4046
4263
  Type-safe power per unit mass or specific power quantity with expression capabilities.
4047
4264
 
@@ -4057,10 +4274,11 @@ class PowerPerUnitMass(TypedQuantity):
4057
4274
 
4058
4275
  Available units: "british_thermal_unit_per_hour_per_pound_mass", "calorie_per_second_per_gram", "kilocalorie_per_hour_per_kilogram"
4059
4276
  """
4277
+
4060
4278
  __slots__ = ()
4061
4279
  _setter_class = ts.PowerPerUnitMassSetter
4062
- _expected_dimension = dim.POWER_PER_UNIT_MASS
4063
-
4280
+ _dimension = dim.POWER_PER_UNIT_MASS
4281
+
4064
4282
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
4065
4283
  """
4066
4284
  Initialize power per unit mass or specific power quantity.
@@ -4079,13 +4297,15 @@ class PowerPerUnitMass(TypedQuantity):
4079
4297
  super().__init__(name_or_value, unit, name, is_known=is_known)
4080
4298
  else:
4081
4299
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
4300
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
4082
4301
 
4083
- def set(self, value: int | float) -> ts.PowerPerUnitMassSetter:
4302
+ def set(self, value: float, unit: str | None = None) -> ts.PowerPerUnitMassSetter:
4084
4303
  """
4085
4304
  Create a setter for this power per unit mass or specific power quantity.
4086
4305
 
4087
4306
  Args:
4088
4307
  value: The numeric value to set
4308
+ unit: Optional unit string (for compatibility with base class)
4089
4309
 
4090
4310
  Returns:
4091
4311
  PowerPerUnitMassSetter: A setter with unit properties like .meters, .inches, etc.
@@ -4097,7 +4317,7 @@ class PowerPerUnitMass(TypedQuantity):
4097
4317
  return ts.PowerPerUnitMassSetter(self, value)
4098
4318
 
4099
4319
 
4100
- class PowerPerUnitVolume(TypedQuantity):
4320
+ class PowerPerUnitVolume(FieldQnty):
4101
4321
  """
4102
4322
  Type-safe power per unit volume or power density quantity with expression capabilities.
4103
4323
 
@@ -4113,10 +4333,11 @@ class PowerPerUnitVolume(TypedQuantity):
4113
4333
 
4114
4334
  Available units: "british_thermal_unit_per_hour_per_cubic_foot", "calorie_per_second_per_cubic_centimeter", "chu_per_hour_per_cubic_foot"
4115
4335
  """
4336
+
4116
4337
  __slots__ = ()
4117
4338
  _setter_class = ts.PowerPerUnitVolumeSetter
4118
- _expected_dimension = dim.POWER_PER_UNIT_VOLUME
4119
-
4339
+ _dimension = dim.POWER_PER_UNIT_VOLUME
4340
+
4120
4341
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
4121
4342
  """
4122
4343
  Initialize power per unit volume or power density quantity.
@@ -4135,13 +4356,15 @@ class PowerPerUnitVolume(TypedQuantity):
4135
4356
  super().__init__(name_or_value, unit, name, is_known=is_known)
4136
4357
  else:
4137
4358
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
4359
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
4138
4360
 
4139
- def set(self, value: int | float) -> ts.PowerPerUnitVolumeSetter:
4361
+ def set(self, value: float, unit: str | None = None) -> ts.PowerPerUnitVolumeSetter:
4140
4362
  """
4141
4363
  Create a setter for this power per unit volume or power density quantity.
4142
4364
 
4143
4365
  Args:
4144
4366
  value: The numeric value to set
4367
+ unit: Optional unit string (for compatibility with base class)
4145
4368
 
4146
4369
  Returns:
4147
4370
  PowerPerUnitVolumeSetter: A setter with unit properties like .meters, .inches, etc.
@@ -4153,7 +4376,7 @@ class PowerPerUnitVolume(TypedQuantity):
4153
4376
  return ts.PowerPerUnitVolumeSetter(self, value)
4154
4377
 
4155
4378
 
4156
- class PowerThermalDuty(TypedQuantity):
4379
+ class PowerThermalDuty(FieldQnty):
4157
4380
  """
4158
4381
  Type-safe power, thermal duty quantity with expression capabilities.
4159
4382
 
@@ -4169,10 +4392,11 @@ class PowerThermalDuty(TypedQuantity):
4169
4392
 
4170
4393
  Available units: "abwatt_emu_of_power", "boiler_horsepower", "british_thermal_unit_mean"
4171
4394
  """
4395
+
4172
4396
  __slots__ = ()
4173
4397
  _setter_class = ts.PowerThermalDutySetter
4174
- _expected_dimension = dim.POWER_THERMAL_DUTY
4175
-
4398
+ _dimension = dim.POWER_THERMAL_DUTY
4399
+
4176
4400
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
4177
4401
  """
4178
4402
  Initialize power, thermal duty quantity.
@@ -4191,13 +4415,15 @@ class PowerThermalDuty(TypedQuantity):
4191
4415
  super().__init__(name_or_value, unit, name, is_known=is_known)
4192
4416
  else:
4193
4417
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
4418
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
4194
4419
 
4195
- def set(self, value: int | float) -> ts.PowerThermalDutySetter:
4420
+ def set(self, value: float, unit: str | None = None) -> ts.PowerThermalDutySetter:
4196
4421
  """
4197
4422
  Create a setter for this power, thermal duty quantity.
4198
4423
 
4199
4424
  Args:
4200
4425
  value: The numeric value to set
4426
+ unit: Optional unit string (for compatibility with base class)
4201
4427
 
4202
4428
  Returns:
4203
4429
  PowerThermalDutySetter: A setter with unit properties like .meters, .inches, etc.
@@ -4209,7 +4435,7 @@ class PowerThermalDuty(TypedQuantity):
4209
4435
  return ts.PowerThermalDutySetter(self, value)
4210
4436
 
4211
4437
 
4212
- class Pressure(TypedQuantity):
4438
+ class Pressure(FieldQnty):
4213
4439
  """
4214
4440
  Type-safe pressure quantity with expression capabilities.
4215
4441
 
@@ -4225,10 +4451,11 @@ class Pressure(TypedQuantity):
4225
4451
 
4226
4452
  Available units: "atmosphere_standard", "bar", "barye"
4227
4453
  """
4454
+
4228
4455
  __slots__ = ()
4229
4456
  _setter_class = ts.PressureSetter
4230
- _expected_dimension = dim.PRESSURE
4231
-
4457
+ _dimension = dim.PRESSURE
4458
+
4232
4459
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
4233
4460
  """
4234
4461
  Initialize pressure quantity.
@@ -4247,13 +4474,15 @@ class Pressure(TypedQuantity):
4247
4474
  super().__init__(name_or_value, unit, name, is_known=is_known)
4248
4475
  else:
4249
4476
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
4477
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
4250
4478
 
4251
- def set(self, value: int | float) -> ts.PressureSetter:
4479
+ def set(self, value: float, unit: str | None = None) -> ts.PressureSetter:
4252
4480
  """
4253
4481
  Create a setter for this pressure quantity.
4254
4482
 
4255
4483
  Args:
4256
4484
  value: The numeric value to set
4485
+ unit: Optional unit string (for compatibility with base class)
4257
4486
 
4258
4487
  Returns:
4259
4488
  PressureSetter: A setter with unit properties like .meters, .inches, etc.
@@ -4265,7 +4494,7 @@ class Pressure(TypedQuantity):
4265
4494
  return ts.PressureSetter(self, value)
4266
4495
 
4267
4496
 
4268
- class RadiationDoseEquivalent(TypedQuantity):
4497
+ class RadiationDoseEquivalent(FieldQnty):
4269
4498
  """
4270
4499
  Type-safe radiation dose equivalent quantity with expression capabilities.
4271
4500
 
@@ -4281,10 +4510,11 @@ class RadiationDoseEquivalent(TypedQuantity):
4281
4510
 
4282
4511
  Available units: "rem", "sievert", "millisievert"
4283
4512
  """
4513
+
4284
4514
  __slots__ = ()
4285
4515
  _setter_class = ts.RadiationDoseEquivalentSetter
4286
- _expected_dimension = dim.RADIATION_DOSE_EQUIVALENT
4287
-
4516
+ _dimension = dim.RADIATION_DOSE_EQUIVALENT
4517
+
4288
4518
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
4289
4519
  """
4290
4520
  Initialize radiation dose equivalent quantity.
@@ -4303,13 +4533,15 @@ class RadiationDoseEquivalent(TypedQuantity):
4303
4533
  super().__init__(name_or_value, unit, name, is_known=is_known)
4304
4534
  else:
4305
4535
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
4536
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
4306
4537
 
4307
- def set(self, value: int | float) -> ts.RadiationDoseEquivalentSetter:
4538
+ def set(self, value: float, unit: str | None = None) -> ts.RadiationDoseEquivalentSetter:
4308
4539
  """
4309
4540
  Create a setter for this radiation dose equivalent quantity.
4310
4541
 
4311
4542
  Args:
4312
4543
  value: The numeric value to set
4544
+ unit: Optional unit string (for compatibility with base class)
4313
4545
 
4314
4546
  Returns:
4315
4547
  RadiationDoseEquivalentSetter: A setter with unit properties like .meters, .inches, etc.
@@ -4321,7 +4553,7 @@ class RadiationDoseEquivalent(TypedQuantity):
4321
4553
  return ts.RadiationDoseEquivalentSetter(self, value)
4322
4554
 
4323
4555
 
4324
- class RadiationExposure(TypedQuantity):
4556
+ class RadiationExposure(FieldQnty):
4325
4557
  """
4326
4558
  Type-safe radiation exposure quantity with expression capabilities.
4327
4559
 
@@ -4337,10 +4569,11 @@ class RadiationExposure(TypedQuantity):
4337
4569
 
4338
4570
  Available units: "coulomb_per_kilogram", "d_unit", "pastille_dose_b_unit"
4339
4571
  """
4572
+
4340
4573
  __slots__ = ()
4341
4574
  _setter_class = ts.RadiationExposureSetter
4342
- _expected_dimension = dim.RADIATION_EXPOSURE
4343
-
4575
+ _dimension = dim.RADIATION_EXPOSURE
4576
+
4344
4577
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
4345
4578
  """
4346
4579
  Initialize radiation exposure quantity.
@@ -4359,13 +4592,15 @@ class RadiationExposure(TypedQuantity):
4359
4592
  super().__init__(name_or_value, unit, name, is_known=is_known)
4360
4593
  else:
4361
4594
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
4595
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
4362
4596
 
4363
- def set(self, value: int | float) -> ts.RadiationExposureSetter:
4597
+ def set(self, value: float, unit: str | None = None) -> ts.RadiationExposureSetter:
4364
4598
  """
4365
4599
  Create a setter for this radiation exposure quantity.
4366
4600
 
4367
4601
  Args:
4368
4602
  value: The numeric value to set
4603
+ unit: Optional unit string (for compatibility with base class)
4369
4604
 
4370
4605
  Returns:
4371
4606
  RadiationExposureSetter: A setter with unit properties like .meters, .inches, etc.
@@ -4377,7 +4612,7 @@ class RadiationExposure(TypedQuantity):
4377
4612
  return ts.RadiationExposureSetter(self, value)
4378
4613
 
4379
4614
 
4380
- class Radioactivity(TypedQuantity):
4615
+ class Radioactivity(FieldQnty):
4381
4616
  """
4382
4617
  Type-safe radioactivity quantity with expression capabilities.
4383
4618
 
@@ -4393,10 +4628,11 @@ class Radioactivity(TypedQuantity):
4393
4628
 
4394
4629
  Available units: "becquerel", "curie", "mache_unit"
4395
4630
  """
4631
+
4396
4632
  __slots__ = ()
4397
4633
  _setter_class = ts.RadioactivitySetter
4398
- _expected_dimension = dim.RADIOACTIVITY
4399
-
4634
+ _dimension = dim.RADIOACTIVITY
4635
+
4400
4636
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
4401
4637
  """
4402
4638
  Initialize radioactivity quantity.
@@ -4415,13 +4651,15 @@ class Radioactivity(TypedQuantity):
4415
4651
  super().__init__(name_or_value, unit, name, is_known=is_known)
4416
4652
  else:
4417
4653
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
4654
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
4418
4655
 
4419
- def set(self, value: int | float) -> ts.RadioactivitySetter:
4656
+ def set(self, value: float, unit: str | None = None) -> ts.RadioactivitySetter:
4420
4657
  """
4421
4658
  Create a setter for this radioactivity quantity.
4422
4659
 
4423
4660
  Args:
4424
4661
  value: The numeric value to set
4662
+ unit: Optional unit string (for compatibility with base class)
4425
4663
 
4426
4664
  Returns:
4427
4665
  RadioactivitySetter: A setter with unit properties like .meters, .inches, etc.
@@ -4433,7 +4671,7 @@ class Radioactivity(TypedQuantity):
4433
4671
  return ts.RadioactivitySetter(self, value)
4434
4672
 
4435
4673
 
4436
- class SecondMomentOfArea(TypedQuantity):
4674
+ class SecondMomentOfArea(FieldQnty):
4437
4675
  """
4438
4676
  Type-safe second moment of area quantity with expression capabilities.
4439
4677
 
@@ -4449,10 +4687,11 @@ class SecondMomentOfArea(TypedQuantity):
4449
4687
 
4450
4688
  Available units: "inch_quadrupled", "centimeter_quadrupled", "foot_quadrupled"
4451
4689
  """
4690
+
4452
4691
  __slots__ = ()
4453
4692
  _setter_class = ts.SecondMomentOfAreaSetter
4454
- _expected_dimension = dim.SECOND_MOMENT_OF_AREA
4455
-
4693
+ _dimension = dim.SECOND_MOMENT_OF_AREA
4694
+
4456
4695
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
4457
4696
  """
4458
4697
  Initialize second moment of area quantity.
@@ -4471,13 +4710,15 @@ class SecondMomentOfArea(TypedQuantity):
4471
4710
  super().__init__(name_or_value, unit, name, is_known=is_known)
4472
4711
  else:
4473
4712
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
4713
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
4474
4714
 
4475
- def set(self, value: int | float) -> ts.SecondMomentOfAreaSetter:
4715
+ def set(self, value: float, unit: str | None = None) -> ts.SecondMomentOfAreaSetter:
4476
4716
  """
4477
4717
  Create a setter for this second moment of area quantity.
4478
4718
 
4479
4719
  Args:
4480
4720
  value: The numeric value to set
4721
+ unit: Optional unit string (for compatibility with base class)
4481
4722
 
4482
4723
  Returns:
4483
4724
  SecondMomentOfAreaSetter: A setter with unit properties like .meters, .inches, etc.
@@ -4489,7 +4730,7 @@ class SecondMomentOfArea(TypedQuantity):
4489
4730
  return ts.SecondMomentOfAreaSetter(self, value)
4490
4731
 
4491
4732
 
4492
- class SecondRadiationConstantPlanck(TypedQuantity):
4733
+ class SecondRadiationConstantPlanck(FieldQnty):
4493
4734
  """
4494
4735
  Type-safe second radiation constant (planck) quantity with expression capabilities.
4495
4736
 
@@ -4505,10 +4746,11 @@ class SecondRadiationConstantPlanck(TypedQuantity):
4505
4746
 
4506
4747
  Available units: "meter_kelvin"
4507
4748
  """
4749
+
4508
4750
  __slots__ = ()
4509
4751
  _setter_class = ts.SecondRadiationConstantPlanckSetter
4510
- _expected_dimension = dim.SECOND_RADIATION_CONSTANT_PLANCK
4511
-
4752
+ _dimension = dim.SECOND_RADIATION_CONSTANT_PLANCK
4753
+
4512
4754
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
4513
4755
  """
4514
4756
  Initialize second radiation constant (planck) quantity.
@@ -4527,13 +4769,15 @@ class SecondRadiationConstantPlanck(TypedQuantity):
4527
4769
  super().__init__(name_or_value, unit, name, is_known=is_known)
4528
4770
  else:
4529
4771
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
4772
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
4530
4773
 
4531
- def set(self, value: int | float) -> ts.SecondRadiationConstantPlanckSetter:
4774
+ def set(self, value: float, unit: str | None = None) -> ts.SecondRadiationConstantPlanckSetter:
4532
4775
  """
4533
4776
  Create a setter for this second radiation constant (planck) quantity.
4534
4777
 
4535
4778
  Args:
4536
4779
  value: The numeric value to set
4780
+ unit: Optional unit string (for compatibility with base class)
4537
4781
 
4538
4782
  Returns:
4539
4783
  SecondRadiationConstantPlanckSetter: A setter with unit properties like .meters, .inches, etc.
@@ -4545,7 +4789,7 @@ class SecondRadiationConstantPlanck(TypedQuantity):
4545
4789
  return ts.SecondRadiationConstantPlanckSetter(self, value)
4546
4790
 
4547
4791
 
4548
- class SpecificEnthalpy(TypedQuantity):
4792
+ class SpecificEnthalpy(FieldQnty):
4549
4793
  """
4550
4794
  Type-safe specific enthalpy quantity with expression capabilities.
4551
4795
 
@@ -4561,10 +4805,11 @@ class SpecificEnthalpy(TypedQuantity):
4561
4805
 
4562
4806
  Available units: "british_thermal_unit_mean", "british_thermal_unit_per_pound", "calorie_per_gram"
4563
4807
  """
4808
+
4564
4809
  __slots__ = ()
4565
4810
  _setter_class = ts.SpecificEnthalpySetter
4566
- _expected_dimension = dim.SPECIFIC_ENTHALPY
4567
-
4811
+ _dimension = dim.SPECIFIC_ENTHALPY
4812
+
4568
4813
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
4569
4814
  """
4570
4815
  Initialize specific enthalpy quantity.
@@ -4583,13 +4828,15 @@ class SpecificEnthalpy(TypedQuantity):
4583
4828
  super().__init__(name_or_value, unit, name, is_known=is_known)
4584
4829
  else:
4585
4830
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
4831
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
4586
4832
 
4587
- def set(self, value: int | float) -> ts.SpecificEnthalpySetter:
4833
+ def set(self, value: float, unit: str | None = None) -> ts.SpecificEnthalpySetter:
4588
4834
  """
4589
4835
  Create a setter for this specific enthalpy quantity.
4590
4836
 
4591
4837
  Args:
4592
4838
  value: The numeric value to set
4839
+ unit: Optional unit string (for compatibility with base class)
4593
4840
 
4594
4841
  Returns:
4595
4842
  SpecificEnthalpySetter: A setter with unit properties like .meters, .inches, etc.
@@ -4601,7 +4848,7 @@ class SpecificEnthalpy(TypedQuantity):
4601
4848
  return ts.SpecificEnthalpySetter(self, value)
4602
4849
 
4603
4850
 
4604
- class SpecificGravity(TypedQuantity):
4851
+ class SpecificGravity(FieldQnty):
4605
4852
  """
4606
4853
  Type-safe specific gravity quantity with expression capabilities.
4607
4854
 
@@ -4617,10 +4864,11 @@ class SpecificGravity(TypedQuantity):
4617
4864
 
4618
4865
  Available units: "dimensionless"
4619
4866
  """
4867
+
4620
4868
  __slots__ = ()
4621
4869
  _setter_class = ts.SpecificGravitySetter
4622
- _expected_dimension = dim.SPECIFIC_GRAVITY
4623
-
4870
+ _dimension = dim.SPECIFIC_GRAVITY
4871
+
4624
4872
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
4625
4873
  """
4626
4874
  Initialize specific gravity quantity.
@@ -4639,13 +4887,15 @@ class SpecificGravity(TypedQuantity):
4639
4887
  super().__init__(name_or_value, unit, name, is_known=is_known)
4640
4888
  else:
4641
4889
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
4890
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
4642
4891
 
4643
- def set(self, value: int | float) -> ts.SpecificGravitySetter:
4892
+ def set(self, value: float, unit: str | None = None) -> ts.SpecificGravitySetter:
4644
4893
  """
4645
4894
  Create a setter for this specific gravity quantity.
4646
4895
 
4647
4896
  Args:
4648
4897
  value: The numeric value to set
4898
+ unit: Optional unit string (for compatibility with base class)
4649
4899
 
4650
4900
  Returns:
4651
4901
  SpecificGravitySetter: A setter with unit properties like .meters, .inches, etc.
@@ -4657,7 +4907,7 @@ class SpecificGravity(TypedQuantity):
4657
4907
  return ts.SpecificGravitySetter(self, value)
4658
4908
 
4659
4909
 
4660
- class SpecificHeatCapacityConstantPressure(TypedQuantity):
4910
+ class SpecificHeatCapacityConstantPressure(FieldQnty):
4661
4911
  """
4662
4912
  Type-safe specific heat capacity (constant pressure) quantity with expression capabilities.
4663
4913
 
@@ -4673,10 +4923,11 @@ class SpecificHeatCapacityConstantPressure(TypedQuantity):
4673
4923
 
4674
4924
  Available units: "btu_per_pound_per_degree_fahrenheit_or_degree_rankine", "calories_per_gram_per_kelvin_or_degree_celsius", "joules_per_kilogram_per_kelvin_or_degree_celsius"
4675
4925
  """
4926
+
4676
4927
  __slots__ = ()
4677
4928
  _setter_class = ts.SpecificHeatCapacityConstantPressureSetter
4678
- _expected_dimension = dim.SPECIFIC_HEAT_CAPACITY_CONSTANT_PRESSURE
4679
-
4929
+ _dimension = dim.SPECIFIC_HEAT_CAPACITY_CONSTANT_PRESSURE
4930
+
4680
4931
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
4681
4932
  """
4682
4933
  Initialize specific heat capacity (constant pressure) quantity.
@@ -4695,13 +4946,15 @@ class SpecificHeatCapacityConstantPressure(TypedQuantity):
4695
4946
  super().__init__(name_or_value, unit, name, is_known=is_known)
4696
4947
  else:
4697
4948
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
4949
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
4698
4950
 
4699
- def set(self, value: int | float) -> ts.SpecificHeatCapacityConstantPressureSetter:
4951
+ def set(self, value: float, unit: str | None = None) -> ts.SpecificHeatCapacityConstantPressureSetter:
4700
4952
  """
4701
4953
  Create a setter for this specific heat capacity (constant pressure) quantity.
4702
4954
 
4703
4955
  Args:
4704
4956
  value: The numeric value to set
4957
+ unit: Optional unit string (for compatibility with base class)
4705
4958
 
4706
4959
  Returns:
4707
4960
  SpecificHeatCapacityConstantPressureSetter: A setter with unit properties like .meters, .inches, etc.
@@ -4713,7 +4966,7 @@ class SpecificHeatCapacityConstantPressure(TypedQuantity):
4713
4966
  return ts.SpecificHeatCapacityConstantPressureSetter(self, value)
4714
4967
 
4715
4968
 
4716
- class SpecificLength(TypedQuantity):
4969
+ class SpecificLength(FieldQnty):
4717
4970
  """
4718
4971
  Type-safe specific length quantity with expression capabilities.
4719
4972
 
@@ -4729,10 +4982,11 @@ class SpecificLength(TypedQuantity):
4729
4982
 
4730
4983
  Available units: "centimeter_per_gram", "cotton_count", "ft_per_pound"
4731
4984
  """
4985
+
4732
4986
  __slots__ = ()
4733
4987
  _setter_class = ts.SpecificLengthSetter
4734
- _expected_dimension = dim.SPECIFIC_LENGTH
4735
-
4988
+ _dimension = dim.SPECIFIC_LENGTH
4989
+
4736
4990
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
4737
4991
  """
4738
4992
  Initialize specific length quantity.
@@ -4751,13 +5005,15 @@ class SpecificLength(TypedQuantity):
4751
5005
  super().__init__(name_or_value, unit, name, is_known=is_known)
4752
5006
  else:
4753
5007
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
5008
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
4754
5009
 
4755
- def set(self, value: int | float) -> ts.SpecificLengthSetter:
5010
+ def set(self, value: float, unit: str | None = None) -> ts.SpecificLengthSetter:
4756
5011
  """
4757
5012
  Create a setter for this specific length quantity.
4758
5013
 
4759
5014
  Args:
4760
5015
  value: The numeric value to set
5016
+ unit: Optional unit string (for compatibility with base class)
4761
5017
 
4762
5018
  Returns:
4763
5019
  SpecificLengthSetter: A setter with unit properties like .meters, .inches, etc.
@@ -4769,7 +5025,7 @@ class SpecificLength(TypedQuantity):
4769
5025
  return ts.SpecificLengthSetter(self, value)
4770
5026
 
4771
5027
 
4772
- class SpecificSurface(TypedQuantity):
5028
+ class SpecificSurface(FieldQnty):
4773
5029
  """
4774
5030
  Type-safe specific surface quantity with expression capabilities.
4775
5031
 
@@ -4785,10 +5041,11 @@ class SpecificSurface(TypedQuantity):
4785
5041
 
4786
5042
  Available units: "square_centimeter_per_gram", "square_foot_per_kilogram", "square_foot_per_pound"
4787
5043
  """
5044
+
4788
5045
  __slots__ = ()
4789
5046
  _setter_class = ts.SpecificSurfaceSetter
4790
- _expected_dimension = dim.SPECIFIC_SURFACE
4791
-
5047
+ _dimension = dim.SPECIFIC_SURFACE
5048
+
4792
5049
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
4793
5050
  """
4794
5051
  Initialize specific surface quantity.
@@ -4807,13 +5064,15 @@ class SpecificSurface(TypedQuantity):
4807
5064
  super().__init__(name_or_value, unit, name, is_known=is_known)
4808
5065
  else:
4809
5066
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
5067
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
4810
5068
 
4811
- def set(self, value: int | float) -> ts.SpecificSurfaceSetter:
5069
+ def set(self, value: float, unit: str | None = None) -> ts.SpecificSurfaceSetter:
4812
5070
  """
4813
5071
  Create a setter for this specific surface quantity.
4814
5072
 
4815
5073
  Args:
4816
5074
  value: The numeric value to set
5075
+ unit: Optional unit string (for compatibility with base class)
4817
5076
 
4818
5077
  Returns:
4819
5078
  SpecificSurfaceSetter: A setter with unit properties like .meters, .inches, etc.
@@ -4825,7 +5084,7 @@ class SpecificSurface(TypedQuantity):
4825
5084
  return ts.SpecificSurfaceSetter(self, value)
4826
5085
 
4827
5086
 
4828
- class SpecificVolume(TypedQuantity):
5087
+ class SpecificVolume(FieldQnty):
4829
5088
  """
4830
5089
  Type-safe specific volume quantity with expression capabilities.
4831
5090
 
@@ -4841,10 +5100,11 @@ class SpecificVolume(TypedQuantity):
4841
5100
 
4842
5101
  Available units: "cubic_centimeter_per_gram", "cubic_foot_per_kilogram", "cubic_foot_per_pound"
4843
5102
  """
5103
+
4844
5104
  __slots__ = ()
4845
5105
  _setter_class = ts.SpecificVolumeSetter
4846
- _expected_dimension = dim.SPECIFIC_VOLUME
4847
-
5106
+ _dimension = dim.SPECIFIC_VOLUME
5107
+
4848
5108
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
4849
5109
  """
4850
5110
  Initialize specific volume quantity.
@@ -4863,13 +5123,15 @@ class SpecificVolume(TypedQuantity):
4863
5123
  super().__init__(name_or_value, unit, name, is_known=is_known)
4864
5124
  else:
4865
5125
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
5126
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
4866
5127
 
4867
- def set(self, value: int | float) -> ts.SpecificVolumeSetter:
5128
+ def set(self, value: float, unit: str | None = None) -> ts.SpecificVolumeSetter:
4868
5129
  """
4869
5130
  Create a setter for this specific volume quantity.
4870
5131
 
4871
5132
  Args:
4872
5133
  value: The numeric value to set
5134
+ unit: Optional unit string (for compatibility with base class)
4873
5135
 
4874
5136
  Returns:
4875
5137
  SpecificVolumeSetter: A setter with unit properties like .meters, .inches, etc.
@@ -4881,7 +5143,7 @@ class SpecificVolume(TypedQuantity):
4881
5143
  return ts.SpecificVolumeSetter(self, value)
4882
5144
 
4883
5145
 
4884
- class Stress(TypedQuantity):
5146
+ class Stress(FieldQnty):
4885
5147
  """
4886
5148
  Type-safe stress quantity with expression capabilities.
4887
5149
 
@@ -4897,10 +5159,11 @@ class Stress(TypedQuantity):
4897
5159
 
4898
5160
  Available units: "dyne_per_square_centimeter", "gigapascal", "hectopascal"
4899
5161
  """
5162
+
4900
5163
  __slots__ = ()
4901
5164
  _setter_class = ts.StressSetter
4902
- _expected_dimension = dim.STRESS
4903
-
5165
+ _dimension = dim.STRESS
5166
+
4904
5167
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
4905
5168
  """
4906
5169
  Initialize stress quantity.
@@ -4919,13 +5182,15 @@ class Stress(TypedQuantity):
4919
5182
  super().__init__(name_or_value, unit, name, is_known=is_known)
4920
5183
  else:
4921
5184
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
5185
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
4922
5186
 
4923
- def set(self, value: int | float) -> ts.StressSetter:
5187
+ def set(self, value: float, unit: str | None = None) -> ts.StressSetter:
4924
5188
  """
4925
5189
  Create a setter for this stress quantity.
4926
5190
 
4927
5191
  Args:
4928
5192
  value: The numeric value to set
5193
+ unit: Optional unit string (for compatibility with base class)
4929
5194
 
4930
5195
  Returns:
4931
5196
  StressSetter: A setter with unit properties like .meters, .inches, etc.
@@ -4937,7 +5202,7 @@ class Stress(TypedQuantity):
4937
5202
  return ts.StressSetter(self, value)
4938
5203
 
4939
5204
 
4940
- class SurfaceMassDensity(TypedQuantity):
5205
+ class SurfaceMassDensity(FieldQnty):
4941
5206
  """
4942
5207
  Type-safe surface mass density quantity with expression capabilities.
4943
5208
 
@@ -4953,10 +5218,11 @@ class SurfaceMassDensity(TypedQuantity):
4953
5218
 
4954
5219
  Available units: "gram_per_square_centimeter", "gram_per_square_meter", "kilogram_per_square_meter"
4955
5220
  """
5221
+
4956
5222
  __slots__ = ()
4957
5223
  _setter_class = ts.SurfaceMassDensitySetter
4958
- _expected_dimension = dim.SURFACE_MASS_DENSITY
4959
-
5224
+ _dimension = dim.SURFACE_MASS_DENSITY
5225
+
4960
5226
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
4961
5227
  """
4962
5228
  Initialize surface mass density quantity.
@@ -4975,13 +5241,15 @@ class SurfaceMassDensity(TypedQuantity):
4975
5241
  super().__init__(name_or_value, unit, name, is_known=is_known)
4976
5242
  else:
4977
5243
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
5244
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
4978
5245
 
4979
- def set(self, value: int | float) -> ts.SurfaceMassDensitySetter:
5246
+ def set(self, value: float, unit: str | None = None) -> ts.SurfaceMassDensitySetter:
4980
5247
  """
4981
5248
  Create a setter for this surface mass density quantity.
4982
5249
 
4983
5250
  Args:
4984
5251
  value: The numeric value to set
5252
+ unit: Optional unit string (for compatibility with base class)
4985
5253
 
4986
5254
  Returns:
4987
5255
  SurfaceMassDensitySetter: A setter with unit properties like .meters, .inches, etc.
@@ -4993,7 +5261,7 @@ class SurfaceMassDensity(TypedQuantity):
4993
5261
  return ts.SurfaceMassDensitySetter(self, value)
4994
5262
 
4995
5263
 
4996
- class SurfaceTension(TypedQuantity):
5264
+ class SurfaceTension(FieldQnty):
4997
5265
  """
4998
5266
  Type-safe surface tension quantity with expression capabilities.
4999
5267
 
@@ -5009,10 +5277,11 @@ class SurfaceTension(TypedQuantity):
5009
5277
 
5010
5278
  Available units: "dyne_per_centimeter", "gram_force_per_centimeter", "newton_per_meter"
5011
5279
  """
5280
+
5012
5281
  __slots__ = ()
5013
5282
  _setter_class = ts.SurfaceTensionSetter
5014
- _expected_dimension = dim.SURFACE_TENSION
5015
-
5283
+ _dimension = dim.SURFACE_TENSION
5284
+
5016
5285
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
5017
5286
  """
5018
5287
  Initialize surface tension quantity.
@@ -5031,13 +5300,15 @@ class SurfaceTension(TypedQuantity):
5031
5300
  super().__init__(name_or_value, unit, name, is_known=is_known)
5032
5301
  else:
5033
5302
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
5303
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
5034
5304
 
5035
- def set(self, value: int | float) -> ts.SurfaceTensionSetter:
5305
+ def set(self, value: float, unit: str | None = None) -> ts.SurfaceTensionSetter:
5036
5306
  """
5037
5307
  Create a setter for this surface tension quantity.
5038
5308
 
5039
5309
  Args:
5040
5310
  value: The numeric value to set
5311
+ unit: Optional unit string (for compatibility with base class)
5041
5312
 
5042
5313
  Returns:
5043
5314
  SurfaceTensionSetter: A setter with unit properties like .meters, .inches, etc.
@@ -5049,7 +5320,7 @@ class SurfaceTension(TypedQuantity):
5049
5320
  return ts.SurfaceTensionSetter(self, value)
5050
5321
 
5051
5322
 
5052
- class Temperature(TypedQuantity):
5323
+ class Temperature(FieldQnty):
5053
5324
  """
5054
5325
  Type-safe temperature quantity with expression capabilities.
5055
5326
 
@@ -5065,10 +5336,11 @@ class Temperature(TypedQuantity):
5065
5336
 
5066
5337
  Available units: "degree_celsius_unit_size", "degree_fahrenheit_unit_size", "degree_r_aumur_unit_size"
5067
5338
  """
5339
+
5068
5340
  __slots__ = ()
5069
5341
  _setter_class = ts.TemperatureSetter
5070
- _expected_dimension = dim.TEMPERATURE
5071
-
5342
+ _dimension = dim.TEMPERATURE
5343
+
5072
5344
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
5073
5345
  """
5074
5346
  Initialize temperature quantity.
@@ -5087,13 +5359,15 @@ class Temperature(TypedQuantity):
5087
5359
  super().__init__(name_or_value, unit, name, is_known=is_known)
5088
5360
  else:
5089
5361
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
5362
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
5090
5363
 
5091
- def set(self, value: int | float) -> ts.TemperatureSetter:
5364
+ def set(self, value: float, unit: str | None = None) -> ts.TemperatureSetter:
5092
5365
  """
5093
5366
  Create a setter for this temperature quantity.
5094
5367
 
5095
5368
  Args:
5096
5369
  value: The numeric value to set
5370
+ unit: Optional unit string (for compatibility with base class)
5097
5371
 
5098
5372
  Returns:
5099
5373
  TemperatureSetter: A setter with unit properties like .meters, .inches, etc.
@@ -5105,7 +5379,7 @@ class Temperature(TypedQuantity):
5105
5379
  return ts.TemperatureSetter(self, value)
5106
5380
 
5107
5381
 
5108
- class ThermalConductivity(TypedQuantity):
5382
+ class ThermalConductivity(FieldQnty):
5109
5383
  """
5110
5384
  Type-safe thermal conductivity quantity with expression capabilities.
5111
5385
 
@@ -5121,10 +5395,11 @@ class ThermalConductivity(TypedQuantity):
5121
5395
 
5122
5396
  Available units: "btu_it", "btu_therm", "btu_therm"
5123
5397
  """
5398
+
5124
5399
  __slots__ = ()
5125
5400
  _setter_class = ts.ThermalConductivitySetter
5126
- _expected_dimension = dim.THERMAL_CONDUCTIVITY
5127
-
5401
+ _dimension = dim.THERMAL_CONDUCTIVITY
5402
+
5128
5403
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
5129
5404
  """
5130
5405
  Initialize thermal conductivity quantity.
@@ -5143,13 +5418,15 @@ class ThermalConductivity(TypedQuantity):
5143
5418
  super().__init__(name_or_value, unit, name, is_known=is_known)
5144
5419
  else:
5145
5420
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
5421
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
5146
5422
 
5147
- def set(self, value: int | float) -> ts.ThermalConductivitySetter:
5423
+ def set(self, value: float, unit: str | None = None) -> ts.ThermalConductivitySetter:
5148
5424
  """
5149
5425
  Create a setter for this thermal conductivity quantity.
5150
5426
 
5151
5427
  Args:
5152
5428
  value: The numeric value to set
5429
+ unit: Optional unit string (for compatibility with base class)
5153
5430
 
5154
5431
  Returns:
5155
5432
  ThermalConductivitySetter: A setter with unit properties like .meters, .inches, etc.
@@ -5161,7 +5438,7 @@ class ThermalConductivity(TypedQuantity):
5161
5438
  return ts.ThermalConductivitySetter(self, value)
5162
5439
 
5163
5440
 
5164
- class Time(TypedQuantity):
5441
+ class Time(FieldQnty):
5165
5442
  """
5166
5443
  Type-safe time quantity with expression capabilities.
5167
5444
 
@@ -5177,10 +5454,11 @@ class Time(TypedQuantity):
5177
5454
 
5178
5455
  Available units: "blink", "century", "chronon_or_tempon"
5179
5456
  """
5457
+
5180
5458
  __slots__ = ()
5181
5459
  _setter_class = ts.TimeSetter
5182
- _expected_dimension = dim.TIME
5183
-
5460
+ _dimension = dim.TIME
5461
+
5184
5462
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
5185
5463
  """
5186
5464
  Initialize time quantity.
@@ -5199,13 +5477,15 @@ class Time(TypedQuantity):
5199
5477
  super().__init__(name_or_value, unit, name, is_known=is_known)
5200
5478
  else:
5201
5479
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
5480
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
5202
5481
 
5203
- def set(self, value: int | float) -> ts.TimeSetter:
5482
+ def set(self, value: float, unit: str | None = None) -> ts.TimeSetter:
5204
5483
  """
5205
5484
  Create a setter for this time quantity.
5206
5485
 
5207
5486
  Args:
5208
5487
  value: The numeric value to set
5488
+ unit: Optional unit string (for compatibility with base class)
5209
5489
 
5210
5490
  Returns:
5211
5491
  TimeSetter: A setter with unit properties like .meters, .inches, etc.
@@ -5217,7 +5497,7 @@ class Time(TypedQuantity):
5217
5497
  return ts.TimeSetter(self, value)
5218
5498
 
5219
5499
 
5220
- class Torque(TypedQuantity):
5500
+ class Torque(FieldQnty):
5221
5501
  """
5222
5502
  Type-safe torque quantity with expression capabilities.
5223
5503
 
@@ -5233,10 +5513,11 @@ class Torque(TypedQuantity):
5233
5513
 
5234
5514
  Available units: "centimeter_kilogram_force", "dyne_centimeter", "foot_kilogram_force"
5235
5515
  """
5516
+
5236
5517
  __slots__ = ()
5237
5518
  _setter_class = ts.TorqueSetter
5238
- _expected_dimension = dim.TORQUE
5239
-
5519
+ _dimension = dim.TORQUE
5520
+
5240
5521
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
5241
5522
  """
5242
5523
  Initialize torque quantity.
@@ -5255,13 +5536,15 @@ class Torque(TypedQuantity):
5255
5536
  super().__init__(name_or_value, unit, name, is_known=is_known)
5256
5537
  else:
5257
5538
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
5539
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
5258
5540
 
5259
- def set(self, value: int | float) -> ts.TorqueSetter:
5541
+ def set(self, value: float, unit: str | None = None) -> ts.TorqueSetter:
5260
5542
  """
5261
5543
  Create a setter for this torque quantity.
5262
5544
 
5263
5545
  Args:
5264
5546
  value: The numeric value to set
5547
+ unit: Optional unit string (for compatibility with base class)
5265
5548
 
5266
5549
  Returns:
5267
5550
  TorqueSetter: A setter with unit properties like .meters, .inches, etc.
@@ -5273,7 +5556,7 @@ class Torque(TypedQuantity):
5273
5556
  return ts.TorqueSetter(self, value)
5274
5557
 
5275
5558
 
5276
- class TurbulenceEnergyDissipationRate(TypedQuantity):
5559
+ class TurbulenceEnergyDissipationRate(FieldQnty):
5277
5560
  """
5278
5561
  Type-safe turbulence energy dissipation rate quantity with expression capabilities.
5279
5562
 
@@ -5289,10 +5572,11 @@ class TurbulenceEnergyDissipationRate(TypedQuantity):
5289
5572
 
5290
5573
  Available units: "square_foot_per_cubic_second", "square_meter_per_cubic_second"
5291
5574
  """
5575
+
5292
5576
  __slots__ = ()
5293
5577
  _setter_class = ts.TurbulenceEnergyDissipationRateSetter
5294
- _expected_dimension = dim.TURBULENCE_ENERGY_DISSIPATION_RATE
5295
-
5578
+ _dimension = dim.TURBULENCE_ENERGY_DISSIPATION_RATE
5579
+
5296
5580
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
5297
5581
  """
5298
5582
  Initialize turbulence energy dissipation rate quantity.
@@ -5311,13 +5595,15 @@ class TurbulenceEnergyDissipationRate(TypedQuantity):
5311
5595
  super().__init__(name_or_value, unit, name, is_known=is_known)
5312
5596
  else:
5313
5597
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
5598
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
5314
5599
 
5315
- def set(self, value: int | float) -> ts.TurbulenceEnergyDissipationRateSetter:
5600
+ def set(self, value: float, unit: str | None = None) -> ts.TurbulenceEnergyDissipationRateSetter:
5316
5601
  """
5317
5602
  Create a setter for this turbulence energy dissipation rate quantity.
5318
5603
 
5319
5604
  Args:
5320
5605
  value: The numeric value to set
5606
+ unit: Optional unit string (for compatibility with base class)
5321
5607
 
5322
5608
  Returns:
5323
5609
  TurbulenceEnergyDissipationRateSetter: A setter with unit properties like .meters, .inches, etc.
@@ -5329,7 +5615,7 @@ class TurbulenceEnergyDissipationRate(TypedQuantity):
5329
5615
  return ts.TurbulenceEnergyDissipationRateSetter(self, value)
5330
5616
 
5331
5617
 
5332
- class VelocityAngular(TypedQuantity):
5618
+ class VelocityAngular(FieldQnty):
5333
5619
  """
5334
5620
  Type-safe velocity, angular quantity with expression capabilities.
5335
5621
 
@@ -5345,10 +5631,11 @@ class VelocityAngular(TypedQuantity):
5345
5631
 
5346
5632
  Available units: "degree_per_minute", "degree_per_second", "grade_per_minute"
5347
5633
  """
5634
+
5348
5635
  __slots__ = ()
5349
5636
  _setter_class = ts.VelocityAngularSetter
5350
- _expected_dimension = dim.VELOCITY_ANGULAR
5351
-
5637
+ _dimension = dim.VELOCITY_ANGULAR
5638
+
5352
5639
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
5353
5640
  """
5354
5641
  Initialize velocity, angular quantity.
@@ -5367,13 +5654,15 @@ class VelocityAngular(TypedQuantity):
5367
5654
  super().__init__(name_or_value, unit, name, is_known=is_known)
5368
5655
  else:
5369
5656
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
5657
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
5370
5658
 
5371
- def set(self, value: int | float) -> ts.VelocityAngularSetter:
5659
+ def set(self, value: float, unit: str | None = None) -> ts.VelocityAngularSetter:
5372
5660
  """
5373
5661
  Create a setter for this velocity, angular quantity.
5374
5662
 
5375
5663
  Args:
5376
5664
  value: The numeric value to set
5665
+ unit: Optional unit string (for compatibility with base class)
5377
5666
 
5378
5667
  Returns:
5379
5668
  VelocityAngularSetter: A setter with unit properties like .meters, .inches, etc.
@@ -5385,7 +5674,7 @@ class VelocityAngular(TypedQuantity):
5385
5674
  return ts.VelocityAngularSetter(self, value)
5386
5675
 
5387
5676
 
5388
- class VelocityLinear(TypedQuantity):
5677
+ class VelocityLinear(FieldQnty):
5389
5678
  """
5390
5679
  Type-safe velocity, linear quantity with expression capabilities.
5391
5680
 
@@ -5401,10 +5690,11 @@ class VelocityLinear(TypedQuantity):
5401
5690
 
5402
5691
  Available units: "foot_per_hour", "foot_per_minute", "foot_per_second"
5403
5692
  """
5693
+
5404
5694
  __slots__ = ()
5405
5695
  _setter_class = ts.VelocityLinearSetter
5406
- _expected_dimension = dim.VELOCITY_LINEAR
5407
-
5696
+ _dimension = dim.VELOCITY_LINEAR
5697
+
5408
5698
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
5409
5699
  """
5410
5700
  Initialize velocity, linear quantity.
@@ -5423,13 +5713,15 @@ class VelocityLinear(TypedQuantity):
5423
5713
  super().__init__(name_or_value, unit, name, is_known=is_known)
5424
5714
  else:
5425
5715
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
5716
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
5426
5717
 
5427
- def set(self, value: int | float) -> ts.VelocityLinearSetter:
5718
+ def set(self, value: float, unit: str | None = None) -> ts.VelocityLinearSetter:
5428
5719
  """
5429
5720
  Create a setter for this velocity, linear quantity.
5430
5721
 
5431
5722
  Args:
5432
5723
  value: The numeric value to set
5724
+ unit: Optional unit string (for compatibility with base class)
5433
5725
 
5434
5726
  Returns:
5435
5727
  VelocityLinearSetter: A setter with unit properties like .meters, .inches, etc.
@@ -5441,7 +5733,7 @@ class VelocityLinear(TypedQuantity):
5441
5733
  return ts.VelocityLinearSetter(self, value)
5442
5734
 
5443
5735
 
5444
- class ViscosityDynamic(TypedQuantity):
5736
+ class ViscosityDynamic(FieldQnty):
5445
5737
  """
5446
5738
  Type-safe viscosity, dynamic quantity with expression capabilities.
5447
5739
 
@@ -5457,10 +5749,11 @@ class ViscosityDynamic(TypedQuantity):
5457
5749
 
5458
5750
  Available units: "centipoise", "dyne_second_per_square_centimeter", "kilopound_second_per_square_meter"
5459
5751
  """
5752
+
5460
5753
  __slots__ = ()
5461
5754
  _setter_class = ts.ViscosityDynamicSetter
5462
- _expected_dimension = dim.VISCOSITY_DYNAMIC
5463
-
5755
+ _dimension = dim.VISCOSITY_DYNAMIC
5756
+
5464
5757
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
5465
5758
  """
5466
5759
  Initialize viscosity, dynamic quantity.
@@ -5479,13 +5772,15 @@ class ViscosityDynamic(TypedQuantity):
5479
5772
  super().__init__(name_or_value, unit, name, is_known=is_known)
5480
5773
  else:
5481
5774
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
5775
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
5482
5776
 
5483
- def set(self, value: int | float) -> ts.ViscosityDynamicSetter:
5777
+ def set(self, value: float, unit: str | None = None) -> ts.ViscosityDynamicSetter:
5484
5778
  """
5485
5779
  Create a setter for this viscosity, dynamic quantity.
5486
5780
 
5487
5781
  Args:
5488
5782
  value: The numeric value to set
5783
+ unit: Optional unit string (for compatibility with base class)
5489
5784
 
5490
5785
  Returns:
5491
5786
  ViscosityDynamicSetter: A setter with unit properties like .meters, .inches, etc.
@@ -5497,7 +5792,7 @@ class ViscosityDynamic(TypedQuantity):
5497
5792
  return ts.ViscosityDynamicSetter(self, value)
5498
5793
 
5499
5794
 
5500
- class ViscosityKinematic(TypedQuantity):
5795
+ class ViscosityKinematic(FieldQnty):
5501
5796
  """
5502
5797
  Type-safe viscosity, kinematic quantity with expression capabilities.
5503
5798
 
@@ -5513,10 +5808,11 @@ class ViscosityKinematic(TypedQuantity):
5513
5808
 
5514
5809
  Available units: "centistokes", "millistokes", "square_centimeter_per_second"
5515
5810
  """
5811
+
5516
5812
  __slots__ = ()
5517
5813
  _setter_class = ts.ViscosityKinematicSetter
5518
- _expected_dimension = dim.VISCOSITY_KINEMATIC
5519
-
5814
+ _dimension = dim.VISCOSITY_KINEMATIC
5815
+
5520
5816
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
5521
5817
  """
5522
5818
  Initialize viscosity, kinematic quantity.
@@ -5535,13 +5831,15 @@ class ViscosityKinematic(TypedQuantity):
5535
5831
  super().__init__(name_or_value, unit, name, is_known=is_known)
5536
5832
  else:
5537
5833
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
5834
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
5538
5835
 
5539
- def set(self, value: int | float) -> ts.ViscosityKinematicSetter:
5836
+ def set(self, value: float, unit: str | None = None) -> ts.ViscosityKinematicSetter:
5540
5837
  """
5541
5838
  Create a setter for this viscosity, kinematic quantity.
5542
5839
 
5543
5840
  Args:
5544
5841
  value: The numeric value to set
5842
+ unit: Optional unit string (for compatibility with base class)
5545
5843
 
5546
5844
  Returns:
5547
5845
  ViscosityKinematicSetter: A setter with unit properties like .meters, .inches, etc.
@@ -5553,7 +5851,7 @@ class ViscosityKinematic(TypedQuantity):
5553
5851
  return ts.ViscosityKinematicSetter(self, value)
5554
5852
 
5555
5853
 
5556
- class Volume(TypedQuantity):
5854
+ class Volume(FieldQnty):
5557
5855
  """
5558
5856
  Type-safe volume quantity with expression capabilities.
5559
5857
 
@@ -5569,10 +5867,11 @@ class Volume(TypedQuantity):
5569
5867
 
5570
5868
  Available units: "acre_foot", "acre_inch", "barrel_us_liquid"
5571
5869
  """
5870
+
5572
5871
  __slots__ = ()
5573
5872
  _setter_class = ts.VolumeSetter
5574
- _expected_dimension = dim.VOLUME
5575
-
5873
+ _dimension = dim.VOLUME
5874
+
5576
5875
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
5577
5876
  """
5578
5877
  Initialize volume quantity.
@@ -5591,13 +5890,15 @@ class Volume(TypedQuantity):
5591
5890
  super().__init__(name_or_value, unit, name, is_known=is_known)
5592
5891
  else:
5593
5892
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
5893
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
5594
5894
 
5595
- def set(self, value: int | float) -> ts.VolumeSetter:
5895
+ def set(self, value: float, unit: str | None = None) -> ts.VolumeSetter:
5596
5896
  """
5597
5897
  Create a setter for this volume quantity.
5598
5898
 
5599
5899
  Args:
5600
5900
  value: The numeric value to set
5901
+ unit: Optional unit string (for compatibility with base class)
5601
5902
 
5602
5903
  Returns:
5603
5904
  VolumeSetter: A setter with unit properties like .meters, .inches, etc.
@@ -5609,7 +5910,7 @@ class Volume(TypedQuantity):
5609
5910
  return ts.VolumeSetter(self, value)
5610
5911
 
5611
5912
 
5612
- class VolumeFractionOfI(TypedQuantity):
5913
+ class VolumeFractionOfI(FieldQnty):
5613
5914
  """
5614
5915
  Type-safe volume fraction of "i" quantity with expression capabilities.
5615
5916
 
@@ -5625,10 +5926,11 @@ class VolumeFractionOfI(TypedQuantity):
5625
5926
 
5626
5927
  Available units: "cubic_centimeters_of_i_per_cubic_meter_total", "cubic_foot_of_i_per_cubic_foot_total", "cubic_meters_of_i_per_cubic_meter_total"
5627
5928
  """
5929
+
5628
5930
  __slots__ = ()
5629
5931
  _setter_class = ts.VolumeFractionOfISetter
5630
- _expected_dimension = dim.VOLUME_FRACTION_OF_I
5631
-
5932
+ _dimension = dim.VOLUME_FRACTION_OF_I
5933
+
5632
5934
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
5633
5935
  """
5634
5936
  Initialize volume fraction of "i" quantity.
@@ -5647,13 +5949,15 @@ class VolumeFractionOfI(TypedQuantity):
5647
5949
  super().__init__(name_or_value, unit, name, is_known=is_known)
5648
5950
  else:
5649
5951
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
5952
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
5650
5953
 
5651
- def set(self, value: int | float) -> ts.VolumeFractionOfISetter:
5954
+ def set(self, value: float, unit: str | None = None) -> ts.VolumeFractionOfISetter:
5652
5955
  """
5653
5956
  Create a setter for this volume fraction of "i" quantity.
5654
5957
 
5655
5958
  Args:
5656
5959
  value: The numeric value to set
5960
+ unit: Optional unit string (for compatibility with base class)
5657
5961
 
5658
5962
  Returns:
5659
5963
  VolumeFractionOfISetter: A setter with unit properties like .meters, .inches, etc.
@@ -5665,7 +5969,7 @@ class VolumeFractionOfI(TypedQuantity):
5665
5969
  return ts.VolumeFractionOfISetter(self, value)
5666
5970
 
5667
5971
 
5668
- class VolumetricCalorificHeatingValue(TypedQuantity):
5972
+ class VolumetricCalorificHeatingValue(FieldQnty):
5669
5973
  """
5670
5974
  Type-safe volumetric calorific (heating) value quantity with expression capabilities.
5671
5975
 
@@ -5681,10 +5985,11 @@ class VolumetricCalorificHeatingValue(TypedQuantity):
5681
5985
 
5682
5986
  Available units: "british_thermal_unit_per_cubic_foot", "british_thermal_unit_per_gallon_uk", "british_thermal_unit_per_gallon_us"
5683
5987
  """
5988
+
5684
5989
  __slots__ = ()
5685
5990
  _setter_class = ts.VolumetricCalorificHeatingValueSetter
5686
- _expected_dimension = dim.VOLUMETRIC_CALORIFIC_HEATING_VALUE
5687
-
5991
+ _dimension = dim.VOLUMETRIC_CALORIFIC_HEATING_VALUE
5992
+
5688
5993
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
5689
5994
  """
5690
5995
  Initialize volumetric calorific (heating) value quantity.
@@ -5703,13 +6008,15 @@ class VolumetricCalorificHeatingValue(TypedQuantity):
5703
6008
  super().__init__(name_or_value, unit, name, is_known=is_known)
5704
6009
  else:
5705
6010
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
6011
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
5706
6012
 
5707
- def set(self, value: int | float) -> ts.VolumetricCalorificHeatingValueSetter:
6013
+ def set(self, value: float, unit: str | None = None) -> ts.VolumetricCalorificHeatingValueSetter:
5708
6014
  """
5709
6015
  Create a setter for this volumetric calorific (heating) value quantity.
5710
6016
 
5711
6017
  Args:
5712
6018
  value: The numeric value to set
6019
+ unit: Optional unit string (for compatibility with base class)
5713
6020
 
5714
6021
  Returns:
5715
6022
  VolumetricCalorificHeatingValueSetter: A setter with unit properties like .meters, .inches, etc.
@@ -5721,7 +6028,7 @@ class VolumetricCalorificHeatingValue(TypedQuantity):
5721
6028
  return ts.VolumetricCalorificHeatingValueSetter(self, value)
5722
6029
 
5723
6030
 
5724
- class VolumetricCoefficientOfExpansion(TypedQuantity):
6031
+ class VolumetricCoefficientOfExpansion(FieldQnty):
5725
6032
  """
5726
6033
  Type-safe volumetric coefficient of expansion quantity with expression capabilities.
5727
6034
 
@@ -5737,10 +6044,11 @@ class VolumetricCoefficientOfExpansion(TypedQuantity):
5737
6044
 
5738
6045
  Available units: "gram_per_cubic_centimeter_per_kelvin_or_degree_celsius", "kilogram_per_cubic_meter_per_kelvin_or_degree_celsius", "pound_per_cubic_foot_per_degree_fahrenheit_or_degree_rankine"
5739
6046
  """
6047
+
5740
6048
  __slots__ = ()
5741
6049
  _setter_class = ts.VolumetricCoefficientOfExpansionSetter
5742
- _expected_dimension = dim.VOLUMETRIC_COEFFICIENT_OF_EXPANSION
5743
-
6050
+ _dimension = dim.VOLUMETRIC_COEFFICIENT_OF_EXPANSION
6051
+
5744
6052
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
5745
6053
  """
5746
6054
  Initialize volumetric coefficient of expansion quantity.
@@ -5759,13 +6067,15 @@ class VolumetricCoefficientOfExpansion(TypedQuantity):
5759
6067
  super().__init__(name_or_value, unit, name, is_known=is_known)
5760
6068
  else:
5761
6069
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
6070
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
5762
6071
 
5763
- def set(self, value: int | float) -> ts.VolumetricCoefficientOfExpansionSetter:
6072
+ def set(self, value: float, unit: str | None = None) -> ts.VolumetricCoefficientOfExpansionSetter:
5764
6073
  """
5765
6074
  Create a setter for this volumetric coefficient of expansion quantity.
5766
6075
 
5767
6076
  Args:
5768
6077
  value: The numeric value to set
6078
+ unit: Optional unit string (for compatibility with base class)
5769
6079
 
5770
6080
  Returns:
5771
6081
  VolumetricCoefficientOfExpansionSetter: A setter with unit properties like .meters, .inches, etc.
@@ -5777,7 +6087,7 @@ class VolumetricCoefficientOfExpansion(TypedQuantity):
5777
6087
  return ts.VolumetricCoefficientOfExpansionSetter(self, value)
5778
6088
 
5779
6089
 
5780
- class VolumetricFlowRate(TypedQuantity):
6090
+ class VolumetricFlowRate(FieldQnty):
5781
6091
  """
5782
6092
  Type-safe volumetric flow rate quantity with expression capabilities.
5783
6093
 
@@ -5793,10 +6103,11 @@ class VolumetricFlowRate(TypedQuantity):
5793
6103
 
5794
6104
  Available units: "cubic_feet_per_day", "cubic_feet_per_hour", "cubic_feet_per_minute"
5795
6105
  """
6106
+
5796
6107
  __slots__ = ()
5797
6108
  _setter_class = ts.VolumetricFlowRateSetter
5798
- _expected_dimension = dim.VOLUMETRIC_FLOW_RATE
5799
-
6109
+ _dimension = dim.VOLUMETRIC_FLOW_RATE
6110
+
5800
6111
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
5801
6112
  """
5802
6113
  Initialize volumetric flow rate quantity.
@@ -5815,13 +6126,15 @@ class VolumetricFlowRate(TypedQuantity):
5815
6126
  super().__init__(name_or_value, unit, name, is_known=is_known)
5816
6127
  else:
5817
6128
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
6129
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
5818
6130
 
5819
- def set(self, value: int | float) -> ts.VolumetricFlowRateSetter:
6131
+ def set(self, value: float, unit: str | None = None) -> ts.VolumetricFlowRateSetter:
5820
6132
  """
5821
6133
  Create a setter for this volumetric flow rate quantity.
5822
6134
 
5823
6135
  Args:
5824
6136
  value: The numeric value to set
6137
+ unit: Optional unit string (for compatibility with base class)
5825
6138
 
5826
6139
  Returns:
5827
6140
  VolumetricFlowRateSetter: A setter with unit properties like .meters, .inches, etc.
@@ -5833,7 +6146,7 @@ class VolumetricFlowRate(TypedQuantity):
5833
6146
  return ts.VolumetricFlowRateSetter(self, value)
5834
6147
 
5835
6148
 
5836
- class VolumetricFlux(TypedQuantity):
6149
+ class VolumetricFlux(FieldQnty):
5837
6150
  """
5838
6151
  Type-safe volumetric flux quantity with expression capabilities.
5839
6152
 
@@ -5849,10 +6162,11 @@ class VolumetricFlux(TypedQuantity):
5849
6162
 
5850
6163
  Available units: "cubic_feet_per_square_foot_per_day", "cubic_feet_per_square_foot_per_hour", "cubic_feet_per_square_foot_per_minute"
5851
6164
  """
6165
+
5852
6166
  __slots__ = ()
5853
6167
  _setter_class = ts.VolumetricFluxSetter
5854
- _expected_dimension = dim.VOLUMETRIC_FLUX
5855
-
6168
+ _dimension = dim.VOLUMETRIC_FLUX
6169
+
5856
6170
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
5857
6171
  """
5858
6172
  Initialize volumetric flux quantity.
@@ -5871,13 +6185,15 @@ class VolumetricFlux(TypedQuantity):
5871
6185
  super().__init__(name_or_value, unit, name, is_known=is_known)
5872
6186
  else:
5873
6187
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
6188
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
5874
6189
 
5875
- def set(self, value: int | float) -> ts.VolumetricFluxSetter:
6190
+ def set(self, value: float, unit: str | None = None) -> ts.VolumetricFluxSetter:
5876
6191
  """
5877
6192
  Create a setter for this volumetric flux quantity.
5878
6193
 
5879
6194
  Args:
5880
6195
  value: The numeric value to set
6196
+ unit: Optional unit string (for compatibility with base class)
5881
6197
 
5882
6198
  Returns:
5883
6199
  VolumetricFluxSetter: A setter with unit properties like .meters, .inches, etc.
@@ -5889,7 +6205,7 @@ class VolumetricFlux(TypedQuantity):
5889
6205
  return ts.VolumetricFluxSetter(self, value)
5890
6206
 
5891
6207
 
5892
- class VolumetricMassFlowRate(TypedQuantity):
6208
+ class VolumetricMassFlowRate(FieldQnty):
5893
6209
  """
5894
6210
  Type-safe volumetric mass flow rate quantity with expression capabilities.
5895
6211
 
@@ -5905,10 +6221,11 @@ class VolumetricMassFlowRate(TypedQuantity):
5905
6221
 
5906
6222
  Available units: "gram_per_second_per_cubic_centimeter", "kilogram_per_hour_per_cubic_foot", "kilogram_per_hour_per_cubic_meter"
5907
6223
  """
6224
+
5908
6225
  __slots__ = ()
5909
6226
  _setter_class = ts.VolumetricMassFlowRateSetter
5910
- _expected_dimension = dim.VOLUMETRIC_MASS_FLOW_RATE
5911
-
6227
+ _dimension = dim.VOLUMETRIC_MASS_FLOW_RATE
6228
+
5912
6229
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
5913
6230
  """
5914
6231
  Initialize volumetric mass flow rate quantity.
@@ -5927,13 +6244,15 @@ class VolumetricMassFlowRate(TypedQuantity):
5927
6244
  super().__init__(name_or_value, unit, name, is_known=is_known)
5928
6245
  else:
5929
6246
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
6247
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
5930
6248
 
5931
- def set(self, value: int | float) -> ts.VolumetricMassFlowRateSetter:
6249
+ def set(self, value: float, unit: str | None = None) -> ts.VolumetricMassFlowRateSetter:
5932
6250
  """
5933
6251
  Create a setter for this volumetric mass flow rate quantity.
5934
6252
 
5935
6253
  Args:
5936
6254
  value: The numeric value to set
6255
+ unit: Optional unit string (for compatibility with base class)
5937
6256
 
5938
6257
  Returns:
5939
6258
  VolumetricMassFlowRateSetter: A setter with unit properties like .meters, .inches, etc.
@@ -5945,7 +6264,7 @@ class VolumetricMassFlowRate(TypedQuantity):
5945
6264
  return ts.VolumetricMassFlowRateSetter(self, value)
5946
6265
 
5947
6266
 
5948
- class Wavenumber(TypedQuantity):
6267
+ class Wavenumber(FieldQnty):
5949
6268
  """
5950
6269
  Type-safe wavenumber quantity with expression capabilities.
5951
6270
 
@@ -5961,10 +6280,11 @@ class Wavenumber(TypedQuantity):
5961
6280
 
5962
6281
  Available units: "diopter", "kayser", "reciprocal_meter"
5963
6282
  """
6283
+
5964
6284
  __slots__ = ()
5965
6285
  _setter_class = ts.WavenumberSetter
5966
- _expected_dimension = dim.WAVENUMBER
5967
-
6286
+ _dimension = dim.WAVENUMBER
6287
+
5968
6288
  def __init__(self, name_or_value: str | int | float, unit: str | None = None, name: str | None = None, is_known: bool = True):
5969
6289
  """
5970
6290
  Initialize wavenumber quantity.
@@ -5983,13 +6303,15 @@ class Wavenumber(TypedQuantity):
5983
6303
  super().__init__(name_or_value, unit, name, is_known=is_known)
5984
6304
  else:
5985
6305
  raise ValueError("Must provide either just name (unknown) or value, unit, and name (known)")
6306
+ self.set_arithmetic_mode('expression') # Default expression mode for backward compatibility
5986
6307
 
5987
- def set(self, value: int | float) -> ts.WavenumberSetter:
6308
+ def set(self, value: float, unit: str | None = None) -> ts.WavenumberSetter:
5988
6309
  """
5989
6310
  Create a setter for this wavenumber quantity.
5990
6311
 
5991
6312
  Args:
5992
6313
  value: The numeric value to set
6314
+ unit: Optional unit string (for compatibility with base class)
5993
6315
 
5994
6316
  Returns:
5995
6317
  WavenumberSetter: A setter with unit properties like .meters, .inches, etc.