SciML / SciML/ModelingToolkitStandardLibrary.jl
Add units to component parameters
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 171
- Forks
- 49
- Avg merge
- 15h 50m
- Merged PRs (30d)
- 10
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked Resistor and ConstantPermeance definitions in src/Electrical/Analog/ideal_components.jl and src/Magnetic/FluxTubes/basic.jl, then inspect the @mtkmodel macro's parameter metadata support. Confirm how units can be exposed for introspection, and determine whether states can receive the same metadata before considering that extension done.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100