Message Boards Message Boards

0
|
6012 Views
|
1 Reply
|
1 Total Likes
View groups...
Share
Share this post:
GROUPS:

My first model is a big failure

I  running System Modeler on my very forst tome. Tried to simulate a simple IC system
 
 model Model1
   annotation(Documentation(info="<p>THis is my forst Model</p>", revisions=""), Diagram(coordinateSystem(extent={{-148.5,-105.0},{148.5,105.0}}, preserveAspectRatio=true, initialScale=0.1, grid={5,5})));
   Modelica.Electrical.Analog.Basic.Ground ground1 annotation(Placement(visible=true, transformation(origin={-75.0,-45.0}, extent={{-10.0,-10.0},{10.0,10.0}}, rotation=0)));
   Modelica.Electrical.Analog.Basic.Resistor resistor1(R=2) annotation(Placement(visible=true, transformation(origin={-85.0,50.0}, extent={{-10.0,-10.0},{10.0,10.0}}, rotation=0)));
   Modelica.Electrical.Analog.Basic.Capacitor capacitor1(C=0.02) annotation(Placement(visible=true, transformation(origin={-25.0,12.5}, extent={{-12.5,-12.5},{12.5,12.5}}, rotation=-90)));
   Modelica.Electrical.Analog.Basic.Capacitor capacitor2(C=45) annotation(Placement(visible=true, transformation(origin={17.5,10.0}, extent={{-12.5,-12.5},{12.5,12.5}}, rotation=-90)));
   Modelica.Electrical.Analog.Sources.ConstantVoltage constantVoltage1(V=12) annotation(Placement(visible=true, transformation(origin={-123.0739,10.0}, extent={{-10.0,-10.0},{10.0,10.0}}, rotation=-90)));
   Modelica.Electrical.Analog.Sensors.VoltageSensor voltageSensor1 annotation(Placement(visible=true, transformation(origin={60.0,12.9953}, extent={{-10.0,-10.0},{10.0,10.0}}, rotation=-270)));
  Modelica.Electrical.Analog.Basic.Resistor resistor2(R=1000) annotation(Placement(visible=true, transformation(origin={-55.0,10.0}, extent={{-10.0,-10.0},{10.0,10.0}}, rotation=-90)));
  Modelica.Electrical.Analog.Semiconductors.Diode diode1 annotation(Placement(visible=true, transformation(origin={103.3373,12.9796}, extent={{-10.0,-10.0},{10.0,10.0}}, rotation=-90)));
equation
  connect(diode1.n,ground1.p) annotation(Line(visible=true, origin={43.8915,-22.3401}, points={{59.4458,25.3197},{59.4458,-12.6599},{-118.8915,-12.6599}}, color={0,0,255}));
  connect(diode1.p,resistor1.n) annotation(Line(visible=true, origin={43.8915,40.9932}, points={{59.4458,-18.0136},{59.4458,9.0068},{-118.8915,9.0068}}, color={0,0,255}));
  connect(constantVoltage1.p,resistor1.p) annotation(Line(visible=true, origin={-135.5739,37.6562}, points={{12.5,-17.6562},{12.5,12.3438},{27.5,12.3438},{40.5739,12.3437}}, color={0,0,255}));
  connect(resistor1.n,capacitor2.p) annotation(Line(visible=true, origin={-18.0,59.5}, points={{-57.0,-9.5},{-7.0,-9.5},{-7.0,-9.5},{35.5,-9.5},{35.5,-37.0}}, color={0,0,255}));
  connect(capacitor1.p,resistor1.n) annotation(Line(visible=true, origin={-41.6667,41.6667}, points={{16.6667,-16.6667},{16.6667,8.3333},{-33.3333,8.3333}}, color={0,0,255}));
  connect(capacitor2.n,capacitor1.n) annotation(Line(visible=true, origin={-18.0,-21.5}, points={{35.5,19.0},{35.5,-13.5},{-57.0,-13.5},{-7.0,-13.5},{-7.0,21.5}}, color={0,0,255}));
  connect(ground1.p,constantVoltage1.n) annotation(Line(visible=true, origin={-112.5,-41.6338}, points={{37.5,6.6338},{37.5,6.6338},{-10.5739,8.1865},{-10.5739,41.6338}}, color={0,0,255}));
  connect(voltageSensor1.p,capacitor2.n) annotation(Line(visible=true, origin={35.8126,-27.0019}, points={{24.1874,29.9972},{24.1874,9.5766},{24.1874,-7.9981},{-18.3,-7.9981},{-18.3126,24.5019}}, color={0,0,255}));
  connect(voltageSensor1.n,capacitor2.p) annotation(Line(visible=true, origin={49.95,44.1009}, points={{10.05,-21.1057},{10.05,-5.6143},{10.05,5.8991},{-32.7,5.8991},{-32.45,-21.6009}}, color={0,0,255}));
  connect(resistor2.p,resistor1.n) annotation(Line(visible=true, origin={-61.6667,40.0}, points={{6.6667,-20.0},{6.6667,10.0},{-13.3333,10.0}}, color={0,0,255}));
  connect(resistor2.n,ground1.p) annotation(Line(visible=true, origin={-61.6667,-23.3333}, points={{6.6667,23.3333},{6.6667,-11.6667},{-13.3333,-11.6667}}, color={0,0,255}));
end Model1;
I ran teh simulation.  Plot the current  n in capacitor 1, but then tried to alsoplot the current in capacitorr 2, the system crashed!!! 

Please, help me on this.
POSTED BY: Jose Calderon
Posted 11 years ago
Hi Jose,
One way to solve the problem is to add the to capacitors together into one.
Also your second capacitor is very big, 45F, is that intended?

Hope that helps!
Johan
POSTED BY: Johan Rhodin
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract