JuliaPhysics / JuliaPhysics/Unitful.jl
How do I use symbolic variables with Unitful?
- Dominant language
- Julia
- Stars
- 675
- Forks
- 124
- Avg merge
- 3h 38m
- Merged PRs (30d)
- 1
Description
I am trying to do some basic Physics problems using Julia. I have had some success using Unitful, but I do not know how I can solve problems for general parameters (i.e., get a closed form of the solution in terms of the missing variables).
E.g., I want to do something like:
```
force(m, a) = m*a
m = 10u"kg"
@symbol a # pseudocode
a = (a)u"m/s^2" # give it a unit
print(force(m, a))
```
This should print `10*a N`. (`N` is Newton, defined by Unitful).
Of course, this example is trivial, but it is more interesting in bigger problems.
Also posted to the [discourse](https://discourse.julialang.org/t/how-do-i-use-symbolic-variables-with-unitful/56420).
Contributor guide
No contributing guide indexed for this repository
Research direction
The issue names no source files, tests, or entry points. Read the linked Discourse discussion and determine whether symbolic quantities are in scope for Unitful, then clarify the supported approach and completion criteria with maintainers.
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
- 20/100