Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register
  • Index
  • » Users
  • » hendrix
  • » Profile

Posts

Posts

Oct-19-15 23:14:07
Is there an example of this function

Not with this file. Nothing happens, as far as I can see.

parLC-modelica.cir

-marcel

Oct-19-15 22:46:02
Is there an example of this function

Is there an example somewhere that shows how to use
the OMEdit (Tools) function that imports an NGSPICE netlist?

-marcel

Thanks a lot!

I couldn't (graphically) see what was wrong with my circuit, or what was different in your version,
but yours worked correctly and mine didn't.

I went to the text file and there it's obvious:

  connect(resistor1.p, resistor1.n) annotation(Line(points = {{-22, 18}, {-2, 18}}, color = {0, 0, 255}));

The resistor is shorted. Apparently an invisible line is stuck behind.
I fixed it by deleting and re-inserting another one. Merely moving or rotating
didn't fix the problem.

Well, I am used to editing netlists by hand, so it's not a problem.

Is there a way to have plots with multiple axes (like Volts left, current right)?

-marcel

Dear Ceraolo,

> These circuits normally work wonderfully in OM.
> From your message it is not clear which initial conditions
> you want to impose.

12V on the one, 10V on the other, 1.4 and 6.1 mA through the
two inductors. I have edited the post and added the Modelica
file. Is there a better way?

> You added spice plots, I suppose. What initial conditions did you set in Spice?

The same as in Modelica.

> I recommend to continue to play with OM, if you simulate circuits.
> You will get a lot of satisfaction!

I am not complaining, these are just beginners errors. If I interpret correctly
what I have read (on Dymola), I have hopes that Modelica should be great for
very large / stiff networks (something like KLU).

-marcel

My first experiment (as a rank beginner!) with Modelica fails with the following warning:

Code:

--------------------------------------

[1] 18:32:30 Translation Warning
fixed Alias set with several free start values
* candidate: capacitor1.v(start = 11.8255
* candidate: capacitor2.v(start = 10.0002)
=> select value from capacitor1.v(start = 11.8255) for variable: capacitor1.v
-----------------------------------------

The example consists of two parallel LC filters, coupled with a single resistor.
https://www.openmodelica.org/images/agorapro/attachments/4689/mini_parLC.png

https://www.openmodelica.org/images/agorapro/attachments/4689/mini_parLC-spice.png

https://www.openmodelica.org/images/agorapro/attachments/4689/mini_parLC-modelica.png

I want to know the step response of this system, so I put a trapezoidal source
with 1us rise-time/10V amplitude on it.

The response is radically different from what I expect (and get from SPICE).
Only two of the eigenvectors are excited, probably because the initial voltage
on the two capacitors is ignored (see message).

-marcel

parLC.mo

  • Index
  • » Users
  • » hendrix
  • » Profile
You are here: