- Updated executable with latest build
- README rewritten in casual tone, fixed UI layout descriptions
- Default profile updated with current configuration
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2 weeks ago
3 changed files with 479 additions and 511 deletions
pyTesla integrates FEMM (Finite Element Method Magnetics) and LTspice to provide electromagnetic and circuit analysis for Tesla coil design. The application features a PyQt5-based GUI with real-time visualization capabilities.
pyTesla uses FEMM and LTspice to simulate Tesla coils. It handles the electromagnetic field analysis (FEMM) and circuit simulation (LTspice) so you can tune your coil design without doing all the math by hand.
### Key Features
- Electromagnetic field analysis using FEMM
- Circuit simulation with LTspice
- Interactive Tesla coil visualization
- Guided simulation workflow
- Profile management for saving designs
### What it does
- Calculates inductance, capacitance, and coupling using FEMM
- Runs circuit simulations in LTspice to find resonant frequencies
- Shows you the coil geometry as you adjust parameters
- Saves your designs as profiles you can load later
---
---
@ -78,8 +77,8 @@ pyTesla integrates FEMM (Finite Element Method Magnetics) and LTspice to provide
- Click "LTspice Only" for circuit analysis
- Click "LTspice Only" for circuit analysis
5. **View Results**
5. **View Results**
- Check the bottom panel for calculated values
- View field plots in the right panel gallery
- Check the results display in the right panel for calculated values
- View field plots in the bottom image gallery
- Use the plotter for frequency response analysis
- Use the plotter for frequency response analysis
---
---
@ -116,8 +115,8 @@ Choose between Dark and Light themes:
3. Click **OK** to apply
3. Click **OK** to apply
**Available Themes:**
**Available Themes:**
- **Dark Theme**: Optimized for extended use in low-light environments
- **Light Theme**: Better visibility in bright environments
- **Dark Theme**: Default theme for low-light environments
- **Light Theme**: Alternative for bright environments
@ -410,7 +420,7 @@ Add voltage, current, or calculated measurements to plot:
#### Measurement Presets
#### Measurement Presets
Predefined sets of measurements for common analysis tasks:
Save groups of measurements you use often:
**Built-in Presets:**
**Built-in Presets:**
- **Power Analysis**: Topload voltage, load current, and power
- **Power Analysis**: Topload voltage, load current, and power
@ -424,7 +434,7 @@ Predefined sets of measurements for common analysis tasks:
#### Plot Configurations
#### Plot Configurations
Complete analysis workflows that combine circuit setup, analysis directives, and measurements:
These bundle together circuit setup, SPICE directives, and measurements into one-click configurations:
**Built-in Configurations:**
**Built-in Configurations:**
@ -434,7 +444,7 @@ Complete analysis workflows that combine circuit setup, analysis directives, and
- **Voltage Distribution**: Voltage at all 10 coil sections across extended frequency range (100kHz-3500kHz)
- **Voltage Distribution**: Voltage at all 10 coil sections across extended frequency range (100kHz-3500kHz)
*Transient Analysis Configurations:*
*Transient Analysis Configurations:*
- **Transient - Time Domain**: Ringdown analysis with sinusoidal excitation and realistic spark load (24" spark)
- **Transient - Time Domain**: Ringdown analysis (transient decay) with sinusoidal excitation and realistic spark load (24" spark)
- **Transient - FFT Example**: Pulse excitation for harmonic analysis with parametric frequency (36" spark)
- **Transient - FFT Example**: Pulse excitation for harmonic analysis with parametric frequency (36" spark)
**Using Plot Configurations:**
**Using Plot Configurations:**
@ -449,27 +459,11 @@ Complete analysis workflows that combine circuit setup, analysis directives, and
4. Set analysis_mode ("ac" or "transient") and display_mode ("time_domain" or "fft")
4. Set analysis_mode ("ac" or "transient") and display_mode ("time_domain" or "fft")
5. Click **Save Current Setup** to save as reusable configuration
5. Click **Save Current Setup** to save as reusable configuration
**Benefits:**
- **Repeatability**: Exact same test every time
- **Documentation**: Named scenarios for reports
- **Comparison**: Quickly switch between AC and transient analysis types
- **Realistic Defaults**: Transient configurations include appropriate spark loads and excitation
Configurations save everything - circuit settings, directives, measurements, and display options - so you can reproduce the same test later or share it.
#### Enhanced Hover System
#### Hover Info
Interactive data inspection with comprehensive value display:
**Features:**
- **Crosshairs**: Vertical and horizontal reference lines on both magnitude and phase plots
- **Multi-Line Display**: Shows values from ALL plotted measurements at once
- **Frequency/Parameter Detection**: Automatically detects sweep type (frequency vs. parametric)
- **Phase Integration**: Displays both magnitude and phase values in single tooltip
- **Smart Positioning**: Tooltip avoids plot edges for visibility
**Using Hover:**
- Move mouse over plot area to see values at that X-axis position
- Tooltip shows frequency/parameter value and all measurement values
- Values snap to actual data points for accuracy
Move your mouse over the plot to see values at that point. The tooltip shows all plotted measurements at once, with crosshairs on both magnitude and phase plots.
#### Plot Controls
#### Plot Controls
@ -498,8 +492,8 @@ Customize plot appearance:
1. Load **Transient - Time Domain** plot configuration
1. Load **Transient - Time Domain** plot configuration
2. Verify circuit parameters and spark load selection
2. Verify circuit parameters and spark load selection
3. Click **Compose & Analyze** to run transient simulation
3. Click **Compose & Analyze** to run transient simulation
4. View time-domain waveform showing exponential decay and oscillation
5. Analyze ringdown time and damping behavior
4. View time-domain waveform showing exponential decay and oscillation (ringdown)
- Button states reflect the profile's simulation status
- Button states reflect the profile's simulation status
@ -615,14 +610,14 @@ profiles/
- Change display units via FEMM Inputs panel
- Change display units via FEMM Inputs panel
- All measurements automatically convert
- All measurements automatically convert
- Supported units: inches, mm, cm, m, mils, ft
- Supported units: inches, mm, cm
### Themes
### Themes
pyTesla includes professional themes designed for optimal readability:
pyTesla includes dark and light themes:
- **Dark Theme**: Default theme optimized for extended use in low-light environments
- **Light Theme**: High-contrast theme for bright environments
- **Dark Theme**: Default theme for low-light environments
- **Light Theme**: Alternative for bright environments
**Changing Themes:**
**Changing Themes:**
1. Go to **Config → Settings**
1. Go to **Config → Settings**
@ -633,7 +628,7 @@ Theme preference is saved automatically and restored on next launch.
### Controller Library
### Controller Library
pyTesla includes a controller template system for DRSSTC and interrupter simulations:
You can add SPICE netlist templates for controllers and interrupters:
**Library Location:**
**Library Location:**
- `library/controllers/` directory (next to executable)
- `library/controllers/` directory (next to executable)
@ -654,68 +649,34 @@ pyTesla includes a controller template system for DRSSTC and interrupter simulat
**Note:** The library directory is created automatically but not pre-populated. Users can create custom controller netlists or obtain templates from the Tesla coil community.
**Note:** The library directory is created automatically but not pre-populated. Users can create custom controller netlists or obtain templates from the Tesla coil community.
### Button State Intelligence
pyTesla uses an intelligent button state tracking system to minimize unnecessary re-simulations:
### Button Colors
**Color-Coded States:**
- **Blue** (Normal): Ready to run, prerequisites satisfied
- **Yellow** (Warning): Parameters changed since last run, needs re-simulation
- **Red** (Running): Simulation currently in progress
- Only triggers re-simulation warnings when parameters actually change
- **Blue**: Ready to run
- **Yellow**: Parameters changed since last run - you should re-run this
- **Red**: Currently running
- **Green**: Done, results are current
**Sequential Invalidation:**
- **Geometric changes** (coil dimensions, topload, etc.): Invalidate all simulations
- **Circuit changes** (MMC, primary current, etc.): Only invalidate LTspice, stress, and modes
- **Frequency changes**: Only invalidate distributed magnetic simulation
- Preserves valid downstream results when possible, saving computation time
This intelligent system ensures you always know which simulations are current and helps optimize your workflow by avoiding redundant calculations.
When you change coil geometry, all simulations turn yellow. When you only change circuit values (like MMC), only the LTspice-related buttons turn yellow. This way you don't have to re-run expensive FEMM simulations when you're just tweaking circuit parameters.
---
---
## Tips for Effective Use
## Tips for Effective Use
### Workflow Optimization
1. **Initial Design Exploration**:
- Use standalone "Lumped" simulation for rapid parameter exploration
- Provides quick frequency and coupling estimates for initial design iterations
2. **Full Distributed Analysis**:
- Click "Distributed" button (automatically runs lumped first for accurate frequency estimate)
- Generates distributed transmission line model with capacitance matrix
- Both Lumped and Distributed results become available for comparison
3. **Manual Convergence Refinement**:
- After successful distributed simulation (green button), adjust frequency manually if needed
- Click "Distributed" again to enter iteration mode
- Iteration mode skips lumped and electrostatic, only refining magnetic + LTspice
- Repeat as needed for convergence without resetting expensive calculations
4. **Model Selection**:
- Use Lumped model for:
- Quick frequency checks
- Basic coupling analysis
- Simple circuit analysis
- Use Distributed model for:
- Accurate voltage distribution
- Parasitic mode analysis
- Spark gap optimization
- Final design validation
5. **Performance Tips**:
- Group parameter changes before running time-consuming simulations
- Use iteration mode for frequency refinement without full re-simulation
- Save known-good designs as profiles for reference
- Choose appropriate section count for Distributed model:
1. **Quick check**: Run "Lumped" first to get a rough frequency estimate. It's fast.
2. **Full analysis**: Click "Distributed" for accurate results. It runs lumped automatically first, then does the full multi-section analysis.
3. **Iterate if needed**: If the distributed button is already green and you want to refine the frequency, click it again. It'll skip the electrostatic calculation and just re-run the magnetic + LTspice parts.