-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
bugSomething isn't workingSomething isn't working
Description
When composing units that algebraically reduce to J/kg (e.g., Pa / (J/(kg·K)) in gas density calculations), the unit simplifier replaces J/kg with Gy (Gray), the SI unit for absorbed radiation dose.
This is dimensionally correct (1 Gy = 1 J kg⁻¹) but semantically misleading outside radiological applications.
Example:
p = 101325 * u.Pa
R = 287.05 * u.J / (u.kg * u.K)
T = 20 * u.degC
dT = T - (0 * u.degC)
rho = p / (R * dT)
print(rho.unit.name)
# -> 'Pa/kGy' # semantically odd, though dimensionally correctExpected:
Either 'kg/m³' or 'Pa/(J/kg)' — not 'Gy'Impact
This affects thermodynamic and mechanical contexts (e.g., gas laws, energy density, specific heat, etc.) where J/kg should not be expressed as Gy.
It doesn’t break dimensional correctness but causes confusing unit labels in outputs and logs.Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working