Skip to main content

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:

ControlDescription
PlayStart or resume the simulation
PauseFreeze the simulation at the current state
ResetReturn all components to their initial state
SpeedAdjust time dilation from 0.0667x (slow motion) to 15x (fast forward)
TimestepSet 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:

ParameterDescriptionDefault
TemperatureAmbient temperature in °C25°C
Temperature VarianceRandom variation as a percentage0%
Air Flow SpeedCooling airflow in m/s0 m/s
Air Flow VarianceRandom variation in airflow0%

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:

ValueDescription
VoltageVoltage at each terminal
CurrentCurrent flowing through the component
PowerInstantaneous power dissipation in Watts
TemperatureComponent temperature in °C
StatusNormal, 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:

  1. Select Measure Voltage mode
  2. Click on the first terminal or node
  3. Click on the second terminal or node
  4. 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 typeWhat it records
Voltage pairsCustom voltage measurements between two points
Component currentCurrent through selected components
Edge currentCurrent through specific wires
TemperatureComponent temperatures over time
Power dissipationPower consumed by components
Failure eventsOvercurrent, overvoltage, overheating, short circuit, open circuit
Collaboration eventsUser 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 typeTrigger
OvercurrentCurrent exceeds the component's maximum rated current
OvervoltageVoltage exceeds the component's maximum rated voltage
OverheatingTemperature exceeds the component's maximum operating temperature
Short circuitUnintended low-resistance path detected
Open circuitBroken 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).