SciML / SciML/ModelingToolkitStandardLibrary.jl
Add units
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 171
- Forks
- 49
- Avg merge
- 15h 50m
- Merged PRs (30d)
- 10
Description
MTK now supports units (via Unitful).
The standard library should support these as well:
# Parameters:
- `T`: [K] Fixed temperature boundary condition
"""
function FixedTemperature(; name, T)
@named port = HeatPort()
pars = @parameters T = T [unit=u"K"]
eqs = [
port.T ~ T,
]
ODESystem(eqs, t, [], pars; systems = [port], name = name)
end
better yet, inputs should allow units:
@named fixed = FixedTemperature(T=30u"°C")
with unit translation done internally.
Best would be for MTK to deal with units (and not require inputs to be stripped)
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
No source file, test, or entry point is identified in the issue. First clarify whether unit handling belongs in the standard library or MTK, and define the supported input and translation behavior. Done should include standard-library support for units and a clear decision on whether inputs such as T=30u"°C" are accepted without stripping units.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100