{{ message }}
Repository navigation
Fix NPN/PNP transport currents to use NF/NR emission coefficients - #528
Draft
ChrisRackauckas-Claude wants to merge 3 commits into
Draft
ChrisRackauckas-Claude wants to merge 3 commits into
ChrisRackauckas-Claude wants to merge 3 commits into
Conversation
Diffusion capacitances already assume C_DE = Tau_f * ∂ICC/∂V_BE (and the NR analogue); without NF/NR in ICC/IEC those identities fail for NF≠1, unlike Modelica/SPICE Gummel-Poon. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Cursor Agent <noreply@cursor.com> Agent-Harness: Cursor Agent CLI 2026.10.01-14929f9 Agent-Model: auto Agent-Session: local session, transcript at /home/crackauc/sandbox/goals/issue-backlog/orch-ibmtk/sl/jobs/527-cursor/log.txt on amdci2.julia.csail.mit.edu
Asserts C_DE/C_DC equal Tau times the symbolic derivative of the matching transport current for NF/NR ≠ 1 on both NPN and PNP (issue SciML#527). Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Cursor Agent <noreply@cursor.com> Agent-Harness: Cursor Agent CLI 2026.10.01-14929f9 Agent-Model: auto Agent-Session: local session, transcript at /home/crackauc/sandbox/goals/issue-backlog/orch-ibmtk/sl/jobs/527-cursor/log.txt on amdci2.julia.csail.mit.edu
Drop the issue tag from the comment, and assert ICC/IEC equal the NF/NR Gummel-Poon transport expressions directly. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Cursor Agent <noreply@cursor.com> Agent-Harness: Cursor Agent CLI 2026.10.01-14929f9 Agent-Model: auto Agent-Session: local session, transcript at /home/crackauc/sandbox/goals/issue-backlog/orch-ibmtk/sl/jobs/527-cursor/log.txt on amdci2.julia.csail.mit.edu
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Please ignore until reviewed by @ChrisRackauckas.
Summary
NPN/PNP
ICC/IECtransport currents omitted forward/reverse emission coefficientsNF/NRwhile the diffusion capacitances already used them, soC_DE ≠ Tau_f·∂ICC/∂V_BEwheneverNF ≠ 1(and likewise forNR). This matches the Modelica Standard Library v4.0.0 Gummel-Poon NPN/PNP: both currents and capacitances useV/(NF·vt)/V/(NR·vt). DefaultsNF=NR=1leave existing behaviour unchanged.Changes
src/Electrical/Analog/transistors.jl:ICC ~ Is*(exp(V_BE/(NF*V_T))-1)andIEC ~ Is*(exp(V_BC/(NR*V_T))-1)(PNP:V_EB/V_CBanalogues).test/analog.jl: regression testset"BJT emission coefficients"asserting capacitance ≡ Tau × symbolic derivative of the matching transport current forNF∈{1,2},NR∈{1,3}on NPN and PNP.Verification
Fail-before (src fix stashed; test kept; Julia 1.12):
Pass-after (fix restored):
Full
test/analog.jl(scratch test env with package developed from this branch):Commands (env):
Runic
--checkandtyposon the two touched files: pass.Not verified
GROUP=Core/Pkg.test()of every top-level test file).NF≠1beyond the symbolic consistency check.Risk assessment
NF/NR≠ 1; diffusion capacitances and defaultNF=NR=1unchanged0.5 ≈ 1.0at NF=2; pass-after BJT testset 32/32 including directICC == Is*(exp(V/(NF*V_T))-1)assertions; fulltest/analog.jlpreviously green; Runic/typos clean ontest/analog.jlReviewer pushback
ibe; we only changed the ICC/IEC lines the issue names).using Symbolicsat the top ofanalog.jlis preferred over a narrower import.Fixes #527
Please ignore this draft until reviewed by @ChrisRackauckas.
Harness: Cursor Agent CLI 2026.10.01-14929f9; model: auto; transcript: /log.txt