Saarland University
Lehrstuhl für Automatisierungstechnik

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> simulation with no results ??
MOS701
post Feb 19 2009, 10:20 AM
Post #1


Member
**

Group: Members
Posts: 16
Joined: 11-February 09
Member No.: 30,419



can you please tell me what is the best way to use the "import" command ??

regards
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
MOS701
post Feb 19 2009, 08:41 AM
Post #2


Member
**

Group: Members
Posts: 16
Joined: 11-February 09
Member No.: 30,419



Thank you man smile.gif
you are the man smile.gif
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
adrpo
post Feb 18 2009, 05:11 PM
Post #3


Member
**

Group: Members
Posts: 11
Joined: 17-December 07
From: Linköping, Sweden
Member No.: 4,942




Hi,

You should put
getErrorString();
after each command like loadFile(), loadModel(), simulate(), etc.
If the parser encounters a syntactic error it will just try to jump
over the error. That's you should ask for the error string after loading.

Your model is not syntactically correct as you cannot have imports
outside models. This import is wrong: import Modelica.Electrical.Analog;

If you get rid of the impoort and also change:
SI.Conductance to Modelica.SIunits.Conductance.
and use this script:
loadModel(Modelica);
getErrorString();
loadFile("Test.mo");
getErrorString();
simulate(simple_test_1, stopTime=5);
getErrorString();

You will get:
omc.exe Test.mos
true
""
true
""
record SimulationResult
resultFile = "Simulation failed.
Too few equations, underdetermined system. The model has 9 variables and 8 equations
"
end SimulationResult;
""

It seems your model has one equation short.
You should add one more equation to be able to simulate.

Cheers,
Adrian Pop/
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
MOS701
post Feb 17 2009, 08:22 AM
Post #4


Member
**

Group: Members
Posts: 16
Joined: 11-February 09
Member No.: 30,419



Hello to you all !!

i am a newbie to modelica ,i just need to know if you just had have a such a problem, i defined a voltage commanded current source :

""""""""""""""""""""""""""""""""""""""""""""""""""
model VDCS

Modelica.Electrical.Analog.Interfaces.Pin P "positive noeud";
Modelica.Electrical.Analog.Interfaces.Pin N "negative noeud";
Modelica.Electrical.Analog.Interfaces.Pin C "command noeud" ;
parameter SI.Conductance Gain(start=1.0) "Gain parameter";

protected

Real iD;
Real vD;

equation

C.i = 0;
iD = P.i;
iD= Gain*vD;
vD=P.v - N.v;
end VDCS;


"""""""""""""""""""""""""""""""

and when i test this model with a constant voltage on the following test model :
""""""""""""""""""""""""""""""""""""""""""""""""
import Modelica.Electrical.Analog;

model simple_test_1

LAAS_MOS.VDCS S1 (Gain=10) ;
Modelica.Electrical.Analog.Basic.Resistor R1(R1=1);
Modelica.Electrical.Analog.Basic.Resistor R2 (R2=1);
Modelica.Electrical.Analog.Basic.Ground gnd;
Modelica.Electrical.Analog.Sources.ConstantVoltage E(V=5);

equation
connect(R1.p,S1.P);
connect(R1.n,gnd.p);
connect(S1.N,R2.p);
connect(R2.n,gnd.p);
connect(E.n,gnd.p);
connect(S1.C,E.p);

end simple_test_1;
"""""""""""""""""""""""""""""""""""""""""""""""

the simulation is good and the open modelica shell give that the results is in the "simple_test_1.res"
but in this file i only find the time interval with the dummy derivative but with no resulat for none of the model variabels. ?????
and i don't know what to do,

regards
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: 25th June 2019 - 01:25 AM