ModelicaStandardLibrary icon indicating copy to clipboard operation
ModelicaStandardLibrary copied to clipboard

Missing concept for handling the initial conditions of capacitances

Open beutlich opened this issue 6 years ago • 4 comments

See https://github.com/modelica/ModelicaStandardLibrary/issues/2146#issuecomment-387703451.

beutlich avatar Oct 23 '19 09:10 beutlich

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.

christiankral avatar Oct 29 '19 11:10 christiankral

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.

beutlich avatar Oct 30 '19 13:10 beutlich

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?

christiankral avatar Oct 30 '19 17:10 christiankral

I believe, the unused parameter UIC of Modelica.Electrical.Spice3.Basic.C_Capacitor also belongs here.

beutlich avatar Nov 13 '19 20:11 beutlich