Skip to content

Commit

Permalink
Add a variable to the system for capacitor currents. This seemingly s…
Browse files Browse the repository at this point in the history
…mall change means that we don't need to solve for differentials before discretization, which may enable dynamic parameters to work! Partially addressing #94
  • Loading branch information
dsharlet committed Dec 3, 2024
1 parent 238ba01 commit 5398a63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Circuit/Components/Capacitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public static Expression Analyze(Analysis Mna, string Name, Node Anode, Node Cat
V = Mna.AddUnknownEqualTo("V" + Name, V);
// i = C*dV/dt
Expression i = C * D(V, t);
//i = Mna.AddUnknownEqualTo("i" + Name, i);
i = Mna.AddUnknownEqualTo("i" + Name, i);
Mna.AddPassiveComponent(Anode, Cathode, i);
return i;
}
Expand Down

0 comments on commit 5398a63

Please sign in to comment.