-
-
Notifications
You must be signed in to change notification settings - Fork 232
Closed
Labels
Description
E.g. this fails:
using ModelingToolkit, DynamicQuantities
@parameters p [unit = u"L/s"] d [unit = u"s^(-1)"]
@parameters t [unit = u"s"]
@variables X [unit = u"L"]
D = Differential(t)
eqs =[D(X) ~ p - d*X]
ModelingToolkit.validate(eqs) # Does not work.
Instead, one have to do:
using ModelingToolkit, DynamicQuantities
@parameters p [unit = u"m^3/s"] d [unit = u"s^(-1)"]
@parameters t [unit = u"s"]
@variables X [unit = u"m^3"]
D = Differential(t)
eqs =[D(X) ~ p - d*X]
ModelingToolkit.validate(eqs) # Does not work.
These are identical. For highly composite units, rather cumbersome expressions will be generated. Allowing composite units should be very desirable (and was how things used to work).