SciML / SciML/ModelingToolkitStandardLibrary.jl

Add units to component parameters

Open
#207 3 comments 5 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.