Skip to content

Configurable simulation temperature for diodes and transistors (#147)#243

Open
esaruoho wants to merge 1 commit intopfalstad:devfrom
esaruoho:v3-temperature-and-comments
Open

Configurable simulation temperature for diodes and transistors (#147)#243
esaruoho wants to merge 1 commit intopfalstad:devfrom
esaruoho:v3-temperature-and-comments

Conversation

@esaruoho
Copy link
Copy Markdown

@esaruoho esaruoho commented Mar 2, 2026

Summary

Rebased onto v3-dev (replaces #225 which targeted master).

  • Adds configurable simulation temperature (default 27°C / 300.15K, matching SPICE)
  • Static temperature and vt (thermal voltage) fields on CirSim
  • setTemperature() recalculates vt = kT/q and refreshes all diode models
  • Temperature control in Other Options dialog (in Celsius)
  • Diode.java, DiodeModel.java, TransistorElm.java use CirSim.vt instead of hardcoded constant

Fixes #147.

Test plan

  • Open Other Options → verify temperature field (default 27°C)
  • Change temperature → verify diode forward voltage shifts
  • Verify transistor behavior changes with temperature
  • Reset to 27°C → verify original behavior restored

🤖 Generated with Claude Code

@esaruoho esaruoho force-pushed the v3-temperature-and-comments branch from 4434f25 to 4a5296c Compare March 3, 2026 09:50
@esaruoho esaruoho changed the base branch from v3-dev to dev April 15, 2026 09:49
@esaruoho esaruoho force-pushed the v3-temperature-and-comments branch from 4a5296c to e52ddf3 Compare April 15, 2026 10:24
Adds a user-settable simulation temperature (in celsius) to the Options
dialog, with updates to Diode, DiodeModel, and TransistorElm so the
thermal voltage (kT/q) they use is derived from CirSim.temperature
rather than a hardcoded 300.15K. Closes pfalstad#147.

The field is placed just before the Auto-Adjust Timestep checkbox so it
is visible regardless of adjustTimeStep state. CirSim.vt is the shared
thermal voltage constant; TransistorElm uses CirSim.vt throughout its
junction-cap/transit-time companion-model math.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@esaruoho esaruoho force-pushed the v3-temperature-and-comments branch from e52ddf3 to 6462b94 Compare April 15, 2026 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant