ModelingToolkitStandardLibrary.jl
ModelingToolkitStandardLibrary.jl copied to clipboard
Add units to component parameters
Many components have nice descriptions for parameters and include the corresponding unit information in their comments, e.g. the Resistor
or the ConstantPermeance
. However, even though this appears to be supported by the @mtkmodel
macro, the unit
of these parameters is not defined. It would be nice if this additional metadata was made available within the component definitions for introspection.
I'm not sure if the same would be possible for states, but if it is then I imagine that'd be useful as well.
Seems related to #90 (this one is newer and hence the duplicate).
#214 is switching to use DynamicQuantities. We need ability to define custom units (like Wb). The foll. PR adds that:
- https://github.com/SymbolicML/DynamicQuantities.jl/pull/107
Related:
- https://github.com/JuliaSymbolics/Symbolics.jl/pull/1104
- https://github.com/SciML/ModelingToolkit.jl/pull/2583