qnty 0.0.7__py3-none-any.whl → 0.0.9__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.
- qnty/__init__.py +140 -58
- qnty/_backup/problem_original.py +1251 -0
- qnty/_backup/quantity.py +63 -0
- qnty/codegen/cli.py +125 -0
- qnty/codegen/generators/data/unit_data.json +8807 -0
- qnty/codegen/generators/data_processor.py +345 -0
- qnty/codegen/generators/dimensions_gen.py +434 -0
- qnty/codegen/generators/doc_generator.py +141 -0
- qnty/codegen/generators/out/dimension_mapping.json +974 -0
- qnty/codegen/generators/out/dimension_metadata.json +123 -0
- qnty/codegen/generators/out/units_metadata.json +223 -0
- qnty/codegen/generators/quantities_gen.py +159 -0
- qnty/codegen/generators/setters_gen.py +178 -0
- qnty/codegen/generators/stubs_gen.py +167 -0
- qnty/codegen/generators/units_gen.py +295 -0
- qnty/codegen/generators/utils/__init__.py +0 -0
- qnty/equations/__init__.py +4 -0
- qnty/equations/equation.py +257 -0
- qnty/equations/system.py +127 -0
- qnty/expressions/__init__.py +61 -0
- qnty/expressions/cache.py +94 -0
- qnty/expressions/functions.py +96 -0
- qnty/expressions/nodes.py +546 -0
- qnty/generated/__init__.py +0 -0
- qnty/generated/dimensions.py +514 -0
- qnty/generated/quantities.py +6003 -0
- qnty/generated/quantities.pyi +4192 -0
- qnty/generated/setters.py +12210 -0
- qnty/generated/units.py +9798 -0
- qnty/problem/__init__.py +91 -0
- qnty/problem/base.py +142 -0
- qnty/problem/composition.py +385 -0
- qnty/problem/composition_mixin.py +382 -0
- qnty/problem/equations.py +413 -0
- qnty/problem/metaclass.py +302 -0
- qnty/problem/reconstruction.py +1016 -0
- qnty/problem/solving.py +180 -0
- qnty/problem/validation.py +64 -0
- qnty/problem/variables.py +239 -0
- qnty/quantities/__init__.py +6 -0
- qnty/quantities/expression_quantity.py +314 -0
- qnty/quantities/quantity.py +428 -0
- qnty/quantities/typed_quantity.py +215 -0
- qnty/solving/__init__.py +0 -0
- qnty/solving/manager.py +90 -0
- qnty/solving/order.py +355 -0
- qnty/solving/solvers/__init__.py +20 -0
- qnty/solving/solvers/base.py +92 -0
- qnty/solving/solvers/iterative.py +185 -0
- qnty/solving/solvers/simultaneous.py +547 -0
- qnty/units/__init__.py +0 -0
- qnty/{prefixes.py → units/prefixes.py} +54 -33
- qnty/{unit.py → units/registry.py} +73 -32
- qnty/utils/__init__.py +0 -0
- qnty/utils/logging.py +40 -0
- qnty/validation/__init__.py +0 -0
- qnty/validation/registry.py +0 -0
- qnty/validation/rules.py +167 -0
- qnty-0.0.9.dist-info/METADATA +199 -0
- qnty-0.0.9.dist-info/RECORD +63 -0
- qnty/dimension.py +0 -186
- qnty/equation.py +0 -216
- qnty/expression.py +0 -492
- qnty/unit_types/base.py +0 -47
- qnty/units.py +0 -8113
- qnty/variable.py +0 -263
- qnty/variable_types/base.py +0 -58
- qnty/variable_types/expression_variable.py +0 -68
- qnty/variable_types/typed_variable.py +0 -87
- qnty/variables.py +0 -2298
- qnty/variables.pyi +0 -6148
- qnty-0.0.7.dist-info/METADATA +0 -355
- qnty-0.0.7.dist-info/RECORD +0 -19
- /qnty/{unit_types → codegen}/__init__.py +0 -0
- /qnty/{variable_types → codegen/generators}/__init__.py +0 -0
- {qnty-0.0.7.dist-info → qnty-0.0.9.dist-info}/WHEEL +0 -0
qnty/__init__.py
CHANGED
@@ -2,17 +2,25 @@
|
|
2
2
|
Qnty - High-Performance Unit System for Engineering
|
3
3
|
====================================================
|
4
4
|
|
5
|
-
A fast, type-safe unit system library for Python with dimensional safety
|
6
|
-
and optimized unit conversions for engineering calculations.
|
5
|
+
A fast, type-safe unit system library for Python with dimensional safety and optimized unit conversions for engineering calculations.
|
7
6
|
"""
|
8
7
|
|
9
|
-
from .
|
10
|
-
|
11
|
-
from .
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
8
|
+
# from . import (quantity, expressions)
|
9
|
+
|
10
|
+
from .expressions import (
|
11
|
+
abs_expr,
|
12
|
+
cond_expr,
|
13
|
+
cos,
|
14
|
+
exp,
|
15
|
+
ln,
|
16
|
+
log10,
|
17
|
+
max_expr,
|
18
|
+
min_expr,
|
19
|
+
sin,
|
20
|
+
sqrt,
|
21
|
+
tan,
|
22
|
+
)
|
23
|
+
from .generated.quantities import (
|
16
24
|
AbsorbedDose,
|
17
25
|
Acceleration,
|
18
26
|
ActivationEnergy,
|
@@ -27,6 +35,9 @@ from .variables import (
|
|
27
35
|
Concentration,
|
28
36
|
Dimensionless,
|
29
37
|
DynamicFluidity,
|
38
|
+
ElectricalConductance,
|
39
|
+
ElectricalPermittivity,
|
40
|
+
ElectricalResistivity,
|
30
41
|
ElectricCapacitance,
|
31
42
|
ElectricCharge,
|
32
43
|
ElectricCurrentIntensity,
|
@@ -35,9 +46,6 @@ from .variables import (
|
|
35
46
|
ElectricInductance,
|
36
47
|
ElectricPotential,
|
37
48
|
ElectricResistance,
|
38
|
-
ElectricalConductance,
|
39
|
-
ElectricalPermittivity,
|
40
|
-
ElectricalResistivity,
|
41
49
|
EnergyFlux,
|
42
50
|
EnergyHeatWork,
|
43
51
|
EnergyPerUnitArea,
|
@@ -119,56 +127,130 @@ from .variables import (
|
|
119
127
|
VolumetricFlowRate,
|
120
128
|
VolumetricFlux,
|
121
129
|
VolumetricMassFlowRate,
|
122
|
-
Wavenumber
|
130
|
+
Wavenumber,
|
123
131
|
)
|
124
|
-
|
125
|
-
# Register all units to the global registry
|
126
|
-
register_all_units(registry)
|
127
|
-
|
128
|
-
# Finalize registry after all registrations
|
129
|
-
registry.finalize_registration()
|
132
|
+
from .problem import Problem
|
130
133
|
|
131
134
|
# Define public API
|
132
135
|
__all__ = [
|
133
|
-
|
134
|
-
"
|
135
|
-
"
|
136
|
-
|
137
|
-
|
138
|
-
"
|
139
|
-
"
|
140
|
-
"
|
141
|
-
|
142
|
-
|
143
|
-
"
|
144
|
-
"
|
145
|
-
"
|
146
|
-
"
|
147
|
-
"
|
148
|
-
"
|
149
|
-
"
|
150
|
-
"
|
151
|
-
"
|
152
|
-
"
|
153
|
-
"
|
154
|
-
"
|
155
|
-
"
|
156
|
-
"
|
157
|
-
"
|
158
|
-
"
|
159
|
-
"
|
160
|
-
"
|
161
|
-
"
|
162
|
-
"
|
163
|
-
"
|
164
|
-
"
|
165
|
-
"
|
166
|
-
"
|
167
|
-
"
|
168
|
-
"
|
169
|
-
"
|
170
|
-
"
|
171
|
-
"
|
136
|
+
"abs_expr",
|
137
|
+
"min_expr",
|
138
|
+
"max_expr",
|
139
|
+
"cond_expr",
|
140
|
+
"sin",
|
141
|
+
"cos",
|
142
|
+
"tan",
|
143
|
+
"sqrt",
|
144
|
+
"ln",
|
145
|
+
"log10",
|
146
|
+
"exp",
|
147
|
+
"Problem",
|
148
|
+
"AbsorbedDose",
|
149
|
+
"Acceleration",
|
150
|
+
"ActivationEnergy",
|
151
|
+
"AmountOfSubstance",
|
152
|
+
"AnglePlane",
|
153
|
+
"AngleSolid",
|
154
|
+
"AngularAcceleration",
|
155
|
+
"AngularMomentum",
|
156
|
+
"Area",
|
157
|
+
"AreaPerUnitVolume",
|
158
|
+
"AtomicWeight",
|
159
|
+
"Concentration",
|
160
|
+
"Dimensionless",
|
161
|
+
"DynamicFluidity",
|
162
|
+
"ElectricalConductance",
|
163
|
+
"ElectricalPermittivity",
|
164
|
+
"ElectricalResistivity",
|
165
|
+
"ElectricCapacitance",
|
166
|
+
"ElectricCharge",
|
167
|
+
"ElectricCurrentIntensity",
|
168
|
+
"ElectricDipoleMoment",
|
169
|
+
"ElectricFieldStrength",
|
170
|
+
"ElectricInductance",
|
171
|
+
"ElectricPotential",
|
172
|
+
"ElectricResistance",
|
173
|
+
"EnergyFlux",
|
174
|
+
"EnergyHeatWork",
|
175
|
+
"EnergyPerUnitArea",
|
176
|
+
"Force",
|
177
|
+
"ForceBody",
|
178
|
+
"ForcePerUnitMass",
|
179
|
+
"FrequencyVoltageRatio",
|
180
|
+
"FuelConsumption",
|
181
|
+
"HeatOfCombustion",
|
182
|
+
"HeatOfFusion",
|
183
|
+
"HeatOfVaporization",
|
184
|
+
"HeatTransferCoefficient",
|
185
|
+
"Illuminance",
|
186
|
+
"KineticEnergyOfTurbulence",
|
187
|
+
"Length",
|
188
|
+
"LinearMassDensity",
|
189
|
+
"LinearMomentum",
|
190
|
+
"LuminanceSelf",
|
191
|
+
"LuminousFlux",
|
192
|
+
"LuminousIntensity",
|
193
|
+
"MagneticField",
|
194
|
+
"MagneticFlux",
|
195
|
+
"MagneticInductionFieldStrength",
|
196
|
+
"MagneticMoment",
|
197
|
+
"MagneticPermeability",
|
198
|
+
"MagnetomotiveForce",
|
199
|
+
"Mass",
|
200
|
+
"MassDensity",
|
201
|
+
"MassFlowRate",
|
202
|
+
"MassFlux",
|
203
|
+
"MassFractionOfI",
|
204
|
+
"MassTransferCoefficient",
|
205
|
+
"MolalityOfSoluteI",
|
206
|
+
"MolarConcentrationByMass",
|
207
|
+
"MolarFlowRate",
|
208
|
+
"MolarFlux",
|
209
|
+
"MolarHeatCapacity",
|
210
|
+
"MolarityOfI",
|
211
|
+
"MoleFractionOfI",
|
212
|
+
"MomentOfInertia",
|
213
|
+
"MomentumFlowRate",
|
214
|
+
"MomentumFlux",
|
215
|
+
"NormalityOfSolution",
|
216
|
+
"ParticleDensity",
|
217
|
+
"Percent",
|
218
|
+
"Permeability",
|
219
|
+
"PhotonEmissionRate",
|
220
|
+
"PowerPerUnitMass",
|
221
|
+
"PowerPerUnitVolume",
|
222
|
+
"PowerThermalDuty",
|
223
|
+
"Pressure",
|
224
|
+
"RadiationDoseEquivalent",
|
225
|
+
"RadiationExposure",
|
226
|
+
"Radioactivity",
|
227
|
+
"SecondMomentOfArea",
|
228
|
+
"SecondRadiationConstantPlanck",
|
229
|
+
"SpecificEnthalpy",
|
230
|
+
"SpecificGravity",
|
231
|
+
"SpecificHeatCapacityConstantPressure",
|
232
|
+
"SpecificLength",
|
233
|
+
"SpecificSurface",
|
234
|
+
"SpecificVolume",
|
235
|
+
"Stress",
|
236
|
+
"SurfaceMassDensity",
|
237
|
+
"SurfaceTension",
|
238
|
+
"Temperature",
|
239
|
+
"ThermalConductivity",
|
240
|
+
"Time",
|
241
|
+
"Torque",
|
242
|
+
"TurbulenceEnergyDissipationRate",
|
243
|
+
"VelocityAngular",
|
244
|
+
"VelocityLinear",
|
245
|
+
"ViscosityDynamic",
|
246
|
+
"ViscosityKinematic",
|
247
|
+
"Volume",
|
248
|
+
"VolumeFractionOfI",
|
249
|
+
"VolumetricCalorificHeatingValue",
|
250
|
+
"VolumetricCoefficientOfExpansion",
|
251
|
+
"VolumetricFlowRate",
|
252
|
+
"VolumetricFlux",
|
253
|
+
"VolumetricMassFlowRate",
|
172
254
|
"Wavenumber",
|
173
255
|
]
|
174
256
|
|