Open beutlich opened 4 years ago
The title of this ticket suggests that we have a general problem with initialization of capacitors. I suppose this is not the case. How I understand the ticket, this issue is related with the NPN transistor models in the package Analog.Semiconductors
.
@beutlich Is this correct? If yes we may consider to update the title of this ticket.
How I understand the ticket, this issue is related with the NPN transistor
https://github.com/modelica/ModelicaStandardLibrary/issues/2146#issuecomment-387703451 from @kristinmajetta reads:
This concerns other models containing capacitances besides the NPN model.
To me it sounded that it is a rather general issue.
https://github.com/modelica/ModelicaStandardLibrary/issues/2146#issuecomment-387703451 refers to capacitor initial voltages used in textual (semiconductor) models. In PR #3183 it is proposed to used the following initial conditions for both the NPN (where it is already done) and the PNP bipolar transistor:
initial equation
if UIC then
vcs = IC;
end if;
Alternatively it may make sense to use start values for the potential differences of the transistor models:
SI.Voltage vbe(start = 0) "Base-emitter voltage";
SI.Voltage vcs(start = IC, fixed = UIC) "Collector-substrate voltage";
Then the initial conditions of the two voltages described in https://github.com/modelica/ModelicaStandardLibrary/issues/2146#issue-200863231 can be treated in the GUI (of OpenModelica and Dymola) with no issue. Is this a proper solution to solve this ticket?
I believe, the unused parameter UIC
of Modelica.Electrical.Spice3.Basic.C_Capacitor also belongs here.
See https://github.com/modelica/ModelicaStandardLibrary/issues/2146#issuecomment-387703451.