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
  • » agrgal
  • » Profile

Posts

Posts

Oh, that error was solved but now, I can run the simulation process but after picking up a variable to plot down, initialize it and launch it, I confronted with other error again:

Code:

DDASRT: The code has encountered trouble from which it cannot recover. 

Excuse me, I don't want to be a pain in your neck. But, what's wrong now, please? Maybe it's my fault. I don't konw.

In the other hand, I don't find any stable package to download for Ubuntu 10.10 since the downloading process is controlled by apt-get repository tool. Or maybe I should use a source distribution?

So do you mean I must re-install openmodelica and will be solved? I've just come across Openmodelica and would be very useful in my classes. THX!

Ok, after some reading, I struggled to draw a circuit in OMEdit (1.7 under Ubuntu 10.10 64 bits). A simple two capacitors in parallel with a Sine Voltage (suppose to have defined parameters correctly). But i stuck at the same error.

Code:

---- Error 1 : 20:47:50 ----

Unable to simulate the Model 'prueba'
Following Error has occurred.

Error building simulator. Buildlog: perl /usr/share/omc/scripts/convert_lines.pl prueba.cpp prueba.conv.cpp.tmp
g++ -I. -o prueba prueba.conv.cpp prueba_functions.cpp -L"/home/aurelio/Escritorio"  "-L/usr/lib/omlibrary/msl31/Resources/Library/linux-x86_64" "-L/usr/lib/omlibrary/msl31/Resources/Library/linux64" "-L/usr/lib/omlibrary/msl31/Resources/Library" -lModelicaExternalC -lsim -linteractive  -I"/usr/include/omc" -O3 -falign-functions -march=native -mfpmath=sse  -Wl,-Bsymbolic-functions -lsendData -lQtNetwork -lQtCore -lQtGui -lrt -lpthread -L"/usr/lib/omc" -lc_runtime -Wl,-Bstatic -lf2c -Wl,-Bdynamic prueba_records.c
prueba.cpp: In function ‘void init_Alias(DATA*)’:
prueba.cpp:225: error: ‘$Psinevoltage1$PsignalSource$Py’ was not declared in this scope
prueba.cpp:228: error: ‘$Pcapacitor2$Pp$Pv’ was not declared in this scope
make: *** [prueba] Error 1

What's wrong? Please help...

Writing the model

model prueba
  Modelica.Electrical.Analog.Basic.Ground ground1 annotation(Placement(visible = true, transformation(origin = {2,-61}, extent = {{-15,-15},{15,15}}, rotation = 0)));
  Modelica.Electrical.Analog.Basic.Capacitor capacitor2(C = 32) annotation(Placement(visible = true, transformation(origin = {-4,53.5}, extent = {{-15,-15},{15,15}}, rotation = 0)));
  Modelica.Electrical.Analog.Basic.Capacitor capacitor1(C = 23.2) annotation(Placement(visible = true, transformation(origin = {38.5,5}, extent = {{-15,15},{15,-15}}, rotation = -90)));
  Modelica.Electrical.Analog.Sources.SineVoltage sinevoltage1(V = 50, phase = 0, freqHz = 10) annotation(Placement(visible = true, transformation(origin = {-45.5,4}, extent = {{-15,15},{15,-15}}, rotation = -90)));

equation
  connect(ground1.p,capacitor1.n) annotation(Line(points = {{2,-46},{2,-45.5},{38,-45.5},{38,-10},{38.5,-10}}));
  connect(capacitor2.n,capacitor1.n) annotation(Line(points = {{11,53.5},{65.5,53.5},{65.5,-10},{38.5,-10},{38.5,-10}}));
  connect(sinevoltage1.p,capacitor2.p) annotation(Line(points = {{-45.5,19},{-45.5,19},{-45.5,54},{-19,54},{-19,53.5}}));
  connect(capacitor1.n,sinevoltage1.n) annotation(Line(points = {{38.5,-10},{38.5,-10},{38.5,-29.5},{-45,-29.5},{-45,-11},{-45.5,-11}}));
  connect(sinevoltage1.p,capacitor1.p) annotation(Line(points = {{-45.5,19},{-45.5,19},{-45.5,32.5},{38.5,32.5},{38.5,20},{38.5,20}}));
end prueba;

Solved by installing libf2ce-dev package. THX.

First program in Openmodelica and I faced an irritating error:

record SimulationResult
    resultFile = "",
    simulationOptions = "startTime = 0.0, stopTime = 4.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'HelloWorld', storeInTemp = false, noClean = false, options = '', outputFormat = 'mat', variableFilter = '.*', measureTime = false",
    messages = "Simulation failed for model: HelloWorld
Error: Error building simulator. Buildlog: perl /usr/share/omc/scripts/convert_lines.pl HelloWorld.cpp HelloWorld.conv.cpp.tmp
g++ -I. -o HelloWorld HelloWorld.conv.cpp HelloWorld_functions.cpp    -lsim -linteractive  -I\"/usr/include/omc\" -O3 -falign-functions -march=native -mfpmath=sse  -Wl,-Bsymbolic-functions -lsendData -lQtNetwork -lQtCore -lQtGui -lrt -lpthread -L\"/usr/lib/omc\" -lc_runtime -Wl,-Bstatic -lf2c -Wl,-Bdynamic HelloWorld_records.c
/usr/bin/ld: cannot find -lf2c
collect2: ld returned 1 exit status
make: *** [HelloWorld] Error 1

",
    timeFrontend = 0.0,
    timeBackend = 0.0,
    timeSimCode = 0.0,
    timeTemplates = 0.0,
    timeCompile = 0.0,
    timeSimulation = 0.0,
    timeTotal = 0.0
end SimulationResult;




What's wrong in it? I'm completely in a mess! Is there a package left? Using Ubuntu 10.10

THX!

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