Saarland University
Lehrstuhl für Automatisierungstechnik

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Nested Components
Jasleen
post May 14 2008, 03:11 PM
Post #1


Newbie
*

Group: Members
Posts: 1
Joined: 13-May 08
Member No.: 10,437



Hello,

How is Modelica supposed to handle nested components? Is the following code (for a simple electrical circuit) valid or not?

model Circuit
Modelica.Electrical.Analog.Basic.Ground ground;
Modelica.Electrical.Analog.Sources.SineVoltage sineVoltage;
Modelica.Electrical.Analog.Basic.Ground ground1;
ResistorGroup resistorGroup;
equation
connect (ground.p, sineVoltage.p);
connect (sineVoltage.n, resistorGroup.resistor.p);
connect (resistorGroup.resistor1.n, ground1.p);
end Circuit;


model ResistorGroup
Modelica.Electrical.Analog.Basic.Resistor resistor1;
Modelica.Electrical.Analog.Basic.Resistor resistor;
equation
connect (resistor.n, resistor1.p);
end ResistorGroup;


The code works in Dymola, but OMC (1.4.3) gives the following error:

record
resultFile = "Simulation failed.
Model is structurally singular, error found sorting equations 0.0 = 0.0;
for variables
"
end record


Is this a bug in OMC, and if so, is there a workaround?

Thanks,
Jasleen
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 22nd January 2019 - 12:17 PM