Copilot
›
Simulator Tool
Flux Simulator Tool
Flux includes a powerful simulator tool (currently in beta) that allows you to perform SPICE circuit simulations directly from the chat interface. This tool helps you quickly verify circuit behavior, troubleshoot design issues, and optimize component values without having to set up a separate simulation environment.
Overview
The simulator tool enables you to:
- Simulate electronic circuits using standard SPICE netlist syntax powered by Ngspice
- Simulate your existing schematic by pulling component values directly from your design
- Run transient, AC, DC, and operating point analyses
- Get automatic extraction of key metrics like -3dB frequency, ripple, and gain
- Generate plots and visualizations (Bode plots, waveforms, etc.)
- Rerun or modify previous simulations without starting from scratch
- Access a built-in library of SPICE models for common components

How to Use the Simulator Tool
To simulate circuits using Flux, use the @simulator tool in your chat query:
@simulator Create a simple RC low-pass filter with R=1k and C=1uF and simulate its frequency response
@simulator Simulate my schematic and check the voltage at the output node
@simulator Rerun the previous simulation with C1 changed to 10nF
When you use the @simulator tool, Flux will:
- Analyze your request to understand the circuit you want to simulate
- Search the built-in SPICE model library and reference templates for relevant examples
- Generate a SPICE netlist based on your description (or your existing schematic)
- Run the simulation using Ngspice
- Automatically extract structured metrics (e.g., -3dB frequency, ripple, gain)
- Iterate if errors occur — fixing syntax, convergence, or time step issues and retrying automatically
- Generate plots or visualizations if requested
- Provide a detailed interpretation of results
Simulating Your Existing Schematic
One of the most powerful features of the simulator tool is the ability to simulate circuits you have already designed in Flux. When you ask the simulator to analyze your schematic, Flux reads the exact component values, net connections, and topology from your design — so simulations use your actual R, C, L, and voltage source values rather than assumed defaults.
@simulator Simulate the frequency response of my low-pass filter
@simulator Check the voltage ripple on the 3.3V rail in my power supply circuit
@simulator What is the gain of my amplifier stage at 1kHz?
Supported Analysis Types
The simulator tool supports the following Ngspice analysis types:
AC Analysis
Frequency-domain analysis for filters, amplifiers, and frequency response characterization. The tool automatically extracts:
- -3dB cutoff frequency
- DC gain and peak gain (in dB)
- Roll-off slope (dB/decade)
@simulator Analyze the frequency response of a low-pass filter with R=1k and C=0.1uF
@simulator Generate a Bode plot for my amplifier circuit
Transient Analysis
Time-domain analysis for step responses, switching circuits, and waveform characterization. The tool automatically extracts:
- Voltage ripple measurements (Vpp, ripple %)
- Min, max, and average values for each signal
- Steady-state behavior
@simulator Simulate the step response of this RLC circuit
@simulator Check the ripple voltage in my buck converter circuit
DC Analysis
DC sweep analysis for transfer characteristics, bias point verification, and operating point analysis.
@simulator Verify if this voltage divider with R1=10k and R2=5k produces 3.3V from a 5V source
@simulator Sweep the input voltage from 0V to 5V and show the output of my amplifier
Operating Point Analysis
Static DC operating point analysis to check node voltages and branch currents throughout a circuit.
@simulator Find the operating point of my transistor amplifier
@simulator What are the DC voltages at each node in my circuit?
Plots and Visualizations
The simulator tool can generate plots and charts from simulation results. You can request visualizations like Bode plots, transient waveforms, or any other graphical representation of simulation data.
@simulator Plot the Bode plot (magnitude and phase) for my RC filter
@simulator Show me the transient waveform of the output voltage
@simulator Compare the frequency response of two filter configurations and plot them together
When you request a plot, the simulator generates it automatically and displays it inline in the chat.
Rerunning and Modifying Simulations
After running a simulation, you can ask the simulator to rerun it with modifications. The tool reuses the working netlist from the previous simulation and only changes what you request, making iterations fast and reliable.
@simulator Rerun the simulation but change C1 to 10nF
@simulator Run the same circuit again with a higher frequency sweep range
@simulator Try the previous simulation with R2 increased to 20k
SPICE Model Library
The simulator tool has access to a built-in library of SPICE models covering common components like op-amps, comparators, MOSFETs, and more. When your simulation requires a specific component model, the tool searches the library and includes the appropriate model automatically.
You do not need to provide SPICE models yourself — just describe the component you want to use (e.g., "TL072 op-amp" or "LM393 comparator"), and the tool will find and include the correct model.
SPICE Netlist Format
If you prefer, you can provide your own SPICE netlist directly. The simulator tool works with standard SPICE netlist syntax. Here's a simple example:
- Simple RC circuit V1 1 0 DC 1V R1 1 2 1k C1 2 0 1u .tran 0.1u 10u .print tran v(2) .end
Important notes:
- Always include a
.printdirective to specify which node voltages or branch currents to output - End the netlist with
.end - Include appropriate analysis commands (e.g.,
.tran,.ac,.dc,.op)
Example Use Cases
Here are some common use cases for the simulator tool:
Passive Filter Analysis
@simulator Design and simulate an RC low-pass filter with a 1kHz cutoff frequency. Show me the Bode plot and the -3dB point.
@simulator Simulate an LC bandpass filter centered at 10MHz and plot the frequency response
Active Filter Analysis
@simulator Simulate a Sallen-Key low-pass filter using a TL072 op-amp with a 5kHz cutoff
@simulator Analyze the frequency response of my active bandpass filter stage
Current Analysis
@simulator What is the current through R3 in my circuit?
@simulator Measure the current draw from the 5V supply in my schematic
Voltage and Current Ripple
@simulator Check the output voltage ripple of my power supply circuit
@simulator Simulate the input current ripple of my buck converter at full load
RC Timing and Oscillators
@simulator Simulate a 555 timer in astable mode with R1=10k, R2=47k, C=100nF and find the output frequency
@simulator Analyze the RC timing circuit and find the time constant
Comparing Circuit Designs
@simulator Compare the frequency response of a first-order and second-order low-pass filter
@simulator Which resistor value gives better voltage regulation: 100 ohm or 220 ohm?
Tips for Effective Simulations
To get the most out of the simulator tool:
- Be specific about component values — Specify resistance, capacitance, and other component values with appropriate units (e.g., 1k, 10uF, 100nH).
- Describe the circuit topology — Clearly explain how components are connected, or let the tool read from your schematic.
- Specify the analysis type — Mention whether you want a transient, AC, DC, or operating point analysis.
- Ask for specific metrics — Tell the tool what you want to measure (e.g., "-3dB frequency", "output ripple", "gain at 1kHz").
- Request visualizations — Ask for Bode plots, waveforms, or comparison charts to see your results graphically.
- Iterate on results — Use the rerun capability to quickly explore different component values or circuit configurations.
- Break down complex circuits — For very complex circuits, consider simulating smaller subsections first.
Automatic Error Handling
The simulator tool automatically handles common simulation issues by iterating on the netlist:
Syntax Errors
If the netlist has syntax errors, the tool will:
- Identify the specific error in the Ngspice output
- Generate a corrected version of the netlist
- Retry the simulation with the corrected netlist
Convergence Issues
For convergence problems, the tool will:
- Identify potential causes of convergence failure
- Add appropriate
.OPTIONSstatements (e.g.,RELTOL,ABSTOL,ITL1,ITL4) - Adjust initial conditions or component values if necessary
- Retry with alternative simulation parameters
Time Step Issues
If time step errors occur, the tool will:
- Adjust
.TRANparameters to use smaller time steps - Add
.OPTIONSstatements for tolerance control - Retry the simulation with adjusted parameters
Limitations
While the simulator tool is powerful, it has some limitations to be aware of:
- Simulations are powered by Ngspice and are limited to circuits that Ngspice can handle
- Certain specialized or proprietary SPICE models may not be available in the built-in model library
- Very large circuits with many components may take longer to simulate
- Simulations cover electrical behavior only — thermal, mechanical, and electromagnetic effects are not included
- The tool works best with analog and mixed-signal circuits; purely digital simulations are not supported
Related Features
The simulator tool works well with other Flux chat capabilities:
- Flux Code Tool — Generate Python scripts for advanced data analysis or custom visualizations
- Flux File Tool — Extract information from component datasheets
- Flux Calculator Tool — Perform engineering calculations
- Flux Help Tool — Search Flux Editor documentation for guidance