Simulation
Tebemo's simulation engine lets you run your circuits with realistic physics. Watch current flow in real time, measure voltages, monitor temperatures, and analyze component behavior.
Starting a simulation
Click the Simulate button in the top-right of the editor toolbar. The simulation view opens with your circuit displayed on the canvas alongside control panels.
Simulation controls
The main control bar provides:
| Control | Description |
|---|---|
| Play | Start or resume the simulation |
| Pause | Freeze the simulation at the current state |
| Reset | Return all components to their initial state |
| Speed | Adjust time dilation from 0.0667x (slow motion) to 15x (fast forward) |
| Timestep | Set the simulation accuracy in milliseconds — smaller values are more accurate but slower |
Current flow visualization
When the simulation is running, animated particles flow through the wires showing:
- Direction — particles move in the direction of conventional current
- Magnitude — particle speed and density correspond to current amplitude
- Color coding — current amplitude is represented by particle color
You can adjust the base particle speed (pixels per second at 1 mA) in the visualization settings.
Environment settings
Configure the physical environment that affects component behavior:
| Parameter | Description | Default |
|---|---|---|
| Temperature | Ambient temperature in °C | 25°C |
| Temperature Variance | Random variation as a percentage | 0% |
| Air Flow Speed | Cooling airflow in m/s | 0 m/s |
| Air Flow Variance | Random variation in airflow | 0% |
These settings affect thermal behavior of components. Higher temperatures increase resistance in certain materials, change diode characteristics, and can trigger thermal failures.
Component inspector
Click any component during simulation to open the Component Inspector panel. It displays real-time data:
| Value | Description |
|---|---|
| Voltage | Voltage at each terminal |
| Current | Current flowing through the component |
| Power | Instantaneous power dissipation in Watts |
| Temperature | Component temperature in °C |
| Status | Normal, Warning, or Failure indicator |
The inspector updates in real time as the simulation runs. Use it to verify that components are operating within their rated limits.
Circuit data panel
The circuit data panel shows overall circuit statistics:
- Total power consumption
- Ground reference voltage
- Power source status
- Component count
Voltage measurement
Measure the voltage difference between any two points in your circuit:
- Select Measure Voltage mode
- Click on the first terminal or node
- Click on the second terminal or node
- A voltage measurement appears showing the potential difference
You can create multiple voltage measurements simultaneously. Each measurement is displayed in the logs panel and updates in real time.
Logging system
The simulation includes a comprehensive logging system for tracking circuit behavior over time.
Enabling logs
Toggle logging on/off using the Log button. Open Log Settings to configure what gets logged:
| Log type | What it records |
|---|---|
| Voltage pairs | Custom voltage measurements between two points |
| Component current | Current through selected components |
| Edge current | Current through specific wires |
| Temperature | Component temperatures over time |
| Power dissipation | Power consumed by components |
| Failure events | Overcurrent, overvoltage, overheating, short circuit, open circuit |
| Collaboration events | User join/leave events during collaborative sessions |
Logging interval
Set how often data points are recorded (every N simulation ticks). A lower interval captures more detail but generates more data.
Viewing logs
Click the View Logs button to open the log viewer modal. Logs are displayed chronologically with timestamps and values.
Exporting logs
Click Export to download the simulation log data. Use this for external analysis or documentation.
Saving simulation state
Click Save State to capture a snapshot of the current simulation state. This records the exact values of all nodes, currents, voltages, and temperatures at that moment.
Failure detection
The simulation models realistic component failures:
| Failure type | Trigger |
|---|---|
| Overcurrent | Current exceeds the component's maximum rated current |
| Overvoltage | Voltage exceeds the component's maximum rated voltage |
| Overheating | Temperature exceeds the component's maximum operating temperature |
| Short circuit | Unintended low-resistance path detected |
| Open circuit | Broken connection or failed component |
When a failure occurs, the affected component's status changes to Failure in the inspector, and a failure event is logged (if failure logging is enabled).
Simulation settings persistence
Your simulation settings (environment parameters, logging configuration) can be saved in two ways:
- Per-board defaults — saved with the board so anyone opening it starts with these settings
- Per-user overrides — your personal settings for a specific board, overriding the board defaults
This means you can have your preferred environment setup without affecting other collaborators.
Tips
- Start with slower simulation speed when debugging to observe component behavior step by step
- Use the component inspector to check that no component exceeds its rated values
- Set up voltage measurements across key points before running the simulation
- Enable failure event logging to catch problems early
- Adjust environment temperature to test how your circuit performs under different conditions
- Use Reset to return to initial conditions after making circuit changes
For developer troubleshooting of the legacy matrix Newton solver, the project’s AI_docs/CIRCUIT_JSON_NPN_LED_SIMULATION.md and AI_docs/NEWTON_RAPHSON_REFERENCE_VS_TEBEMO.md describe behavior and diagnostics; in the browser DevTools console, localStorage.setItem('tebemoSimDebug','anomaly') enables structured [tebemo/sim-debug] logs from the simulator (remove the key to turn off).