https://github.com/thomwright/rusty_circuit
Electronic circuit simulator
https://github.com/thomwright/rusty_circuit
Last synced: about 1 month ago
JSON representation
Electronic circuit simulator
- Host: GitHub
- URL: https://github.com/thomwright/rusty_circuit
- Owner: ThomWright
- License: mit
- Created: 2017-04-09T22:35:05.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-05-30T17:52:27.000Z (almost 8 years ago)
- Last Synced: 2025-01-18T17:57:05.568Z (4 months ago)
- Language: Rust
- Homepage:
- Size: 33.2 KB
- Stars: 5
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rusty_circuit
An electronic circuit simulator, written using an [ECS](https://en.wikipedia.org/wiki/Entity%E2%80%93component%E2%80%93system) in Rust.
## Building
`cargo build --features "dev"` - requires nightly for linting
## TODO
- [x] Non-linear, time-invariant circuit solver
- [x] Circuit elements
- [x] Resistor
- [x] Voltage source
- [x] Current source
- [x] Wire
- [x] Ground
- [x] Transient analysis
- [x] Capacitors
- [ ] Inductors
- [ ] Time-varying sources
- [ ] Assign node IDs based on connector coordinates
- [ ] Interaction events (create, delete, move)## Notes on using `specs`
Anything dependent on `Delta` (i.e. in the 'update' phase of a game loop) I'm writing as a `specs::System`, e.g. solving dynamic circuits, controlling time-varying voltage sources.
Anything outside the 'update' phase (e.g. creating a resistor, initialising circuit equation, rendering) I'm writing using `specs::World`/`specs::Planner` directly.
See [Ruga](https://github.com/thiolliere/ruga) as an example.