ModelingToolkitStandardLibrary.jl icon indicating copy to clipboard operation
ModelingToolkitStandardLibrary.jl copied to clipboard

Add units to component parameters

Open bauglir opened this issue 1 year ago • 3 comments

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.

bauglir avatar Aug 11 '23 09:08 bauglir

Seems related to #90 (this one is newer and hence the duplicate).

bauglir avatar Nov 09 '23 16:11 bauglir

#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

ven-k avatar Jan 24 '24 10:01 ven-k

Related:

  • https://github.com/JuliaSymbolics/Symbolics.jl/pull/1104
  • https://github.com/SciML/ModelingToolkit.jl/pull/2583

ven-k avatar May 03 '24 09:05 ven-k