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

Posts

Posts

Oct-15-12 14:47:35
Simulation hangs forever, problem might be related to Ticket #1866

Hi again,


Ok now I have tried to enter the magic stopTime = 5s, then the simulation works.
Weird though because it does not work for stopTime = 4s and stopTime = 6s

/Klaus

Oct-15-12 10:53:00
Simulation hangs forever, problem might be related to Ticket #1866

Hi,

I am trying to simulate a system that is able to harvest energy from a rotating device.
The model is a double pendulum with an ac generator attached via the generator chasis to the second joint of the pedulum.
On the generator axel there is a 5 kg mass attached, to counter the motion of the double pendulum.
The output of the generator is attached to a full wave rectifier to convert the AC output of the generator to a DC.
Link to the model code is provided here: https://docs.google.com/folder/d/0B-y_X … ZlMXc/edit

The problem is that the model hangs infinite when I try to simulate it e.g. when I set simulation time > 0.3s.
Can anybody help me with why the simulation hangs?


I think the problem might be related to https://trac.openmodelica.org/OpenModelica/ticket/1866.


Hope someone can help with this issue.

/Klaus

Oct-04-12 16:29:41
When trying to simulate my EMF3 component simulation never ends

Hi Adrian,

Thanks for your reply.
Unfortunately the fix of changing the friction is not applicable as the motor does not have a friction of 1nm (effect of changing  tau_pos = [0,0.001;5,0.005] to tau_pos = [0,0.001;5,1]).

I am looking forward to a response from the backend developers you refer to :-)

/Klaus

Oct-03-12 16:16:08
When trying to simulate my EMF3 component simulation never ends

Hi,

I am trying to create a model of a 3 phase AC EMF component similar to the Modelica.Electrical.Analog.Basic.EMF component.
The EMF3 component, as I have named it, seems to work until the component reaches steady state (emf31.w stabilizes).

The component reaches steady state when simulation time has passed 10s.
This means that when running simulate from OMEdit with stopTime = 10, then the simulation returns with a result.
But if you run the same simulation, only now with stopTime = 11s the OMEdit Simulation dialog newer returns, but instead hangs forever.
See https://docs.google.com/folder/d/0B-y_X … huX1U/edit for the files (for some reason I cannot attach files therefore this link instead).

Can someone explain why OMEdit does not return when stopTime = 11s?


/Klaus

Oct-02-12 12:11:27
Followed Installing MDT guideline, Error Creating Modelica project

Hi Adrian,

I have tried the following configurations successfully.
Java 7 32 bit, Eclipse 4.2.1 32bit  --> works
Java 7 64 bit, Eclipse 4.2.1 64bit --> works

The only install that did not work for me was the one described in MDT guideline i.e. the following configuration:
Java 7 32 bit, Eclipse 3.51 32bit --> Did not work for me

Maybe the guideline needs a configuration update.
Thanks for your help Adrian :-)

Best regards
Klaus

Oct-02-12 11:28:59
Followed Installing MDT guideline, Error Creating Modelica project

Hi,

I am on Windows 7 64bit.
I am running java 7 32bit, with Eclipse 3.5.1 32bit.

I will try out your suggestion of running eclipse 4.2.1.

/Klaus

Oct-02-12 10:48:42
Followed Installing MDT guideline, Error Creating Modelica project

Hi,

I have followed the MDT guideline on installing MDT https://trac.openmodelica.org/documents … ngMDT.pdf.
I.e. used Eclipse classic 3.5.1 and installed plugin using http://www.ida.liu.se/~pelab/modelica/OpenModelica/MDT via eclipse option Help->Install New Software ...

My problem now is that when I select File -> New -> Modelica Project then I get a "Problem Occurred" dialog, telling me that "The selected wizard could not be started"
Details of the dialog contents are below:

The selected wizard could not be started.
  Plug-in org.modelica.mdt.ui was unable to load class org.modelica.mdt.ui.wizards.NewProjectWizard.
  An error occurred while automatically activating bundle org.modelica.mdt.ui (198).

Hopefully someone can help me on what I am doing wrong. :-)


/Klaus

Oct-01-12 09:08:43
Why do visualize return false in the BouncingBall user guide example
Category: Programming

Ok,

I will try tomorrow on a nightly build then :-)

Sep-28-12 16:41:08
Why do visualize return false in the BouncingBall user guide example
Category: Programming

Hi,

I am trying to learn 3D animation with Modelica.
As entry point I am using the "OpenModelica Users Guide Version 2012-09-14".
The example I am trying to run is the BouncingBall animation example from section 3.4.2 of the attached userguide.

For some reason the last statement in OMNotebook i.e. the visualize(BouncingBall) just returns false.
This leaves me somewhat puzzled on what to do? since the BouncingBall is a write off from the userguide and since it compiles and simulates.

Hope someone can help me on what I am doing wrong :-)



<!DOCTYPE OMNotebook>
<Notebook>
  <GroupCell closed="false">
    <TextCell style="Text">
      <Text><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
<table border="0" style="-qt-table-type: root; margin-top:5px; margin-bottom:5px; margin-left:5px; margin-right:5px;">
<tr>
<td style="border: none;">
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; font-size:38pt; font-weight:600; color:#000000;">BouncingBall</span></p></td></tr></table></body></html></Text>
    </TextCell>
    <TextCell style="Text">
      <Text><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
<table border="0" style="-qt-table-type: root; margin-top:5px; margin-bottom:5px; margin-left:5px; margin-right:5px;">
<tr>
<td style="border: none;">
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><img src="C:/Users/kpe/Google Drev/Arbejde/R&amp;D/Opgaver/ROMO Wind/Modelica/Models/OMNotebook_tempfiles/1.png" /></p></td></tr></table></body></html></Text>
      <Rule name="TextAlignment">Center</Rule>
    </TextCell>
    <GraphCell style="Graph" closed="false">
      <Input>model BouncingBall
  import Modelica.SimpleVisual.*;
  parameter Real e = 0.7 "coefficient of restitution";
  parameter Real g = 9.81 "gravity acceleration";
  Real h(start = 10) "height of ball";
  Real v "velocity of ball";
  Boolean flying(start = true) "true, if ball is flying";
  Boolean impact;
  Real v_new;
  annotation(experiment(StartTime = 0.0, StopTime = 5.0, Tolerance = 1e-06));
  SimpleVisual.PositionSize ball "color=red;shape=sphere;";
equation
  ball.size[1] = 5;
  ball.size[2] = 5;
  ball.size[3] = 5;
  ball.frame_a[1] = 0;
  ball.frame_a[2] = h + ball.size[2] / 2;
  ball.frame_a[3] = 0;
  impact = h <= 0.0;
  der(v) = if flying then -g else 0;
  der(h) = v;
  when {h <= 0.0 and v <= 0.0,impact} then
      v_new = if edge(impact) then -e * pre(v) else 0;
    flying = v_new > 0;
    reinit(v, v_new);
 
  end when;
end BouncingBall;</Input>
      <Output>{BouncingBall}</Output>
    </GraphCell>
    <GraphCell style="Graph" closed="false">
      <Input>loadModel(Modelica)</Input>
      <Output>true</Output>
    </GraphCell>
    <GraphCell style="Graph" closed="false">
      <Input>loadModel(SimpleVisual)</Input>
      <Output>true
OMC-ERROR:
"Warning: Requested package Modelica of version 2.2.1, but this package was already loaded with version 3.1. You might experience problems if these versions are incompatible.
"</Output>
    </GraphCell>
    <GraphCell style="Graph" closed="false">
      <Input>simulate(BouncingBall)</Input>
      <Output>record SimulationResult
    resultFile = "C:/Users/kpe/AppData/Local/Temp/OpenModelica/BouncingBall_res.mat",
    simulationOptions = "startTime = 0.0, stopTime = 5.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'BouncingBall', storeInTemp = false, noClean = false, options = '', outputFormat = 'mat', variableFilter = '.*', measureTime = false, cflags = '', simflags = ''",
    messages = "",
    timeFrontend = 0.634387443072096,
    timeBackend = 0.00993498353302634,
    timeSimCode = 0.00519235019401682,
    timeTemplates = 0.0142337875488665,
    timeCompile = 1.75566108830573,
    timeSimulation = 0.183095446854609,
    timeTotal = 2.60259250671179
end SimulationResult;</Output>
    </GraphCell>
    <GraphCell style="Graph" closed="false">
      <Input>visualize(BouncingBall)</Input>
      <Output>false</Output>
    </GraphCell>
  </GroupCell>
</Notebook>

Sep-27-12 10:06:50
Does anybody know why the SMPM_Inverter example does not simulate?

Ok thanks for the quick reply, I will create a ticket for Adeel.

For the time being though I need to be able to get the warning/ error feedback so I can get clues on what I am doing wrong.
So when you say that you use the "regular simulate command()" what does that mean?

Is it the simulate command run from the OMShell? or something else?
When I simulate in the OMShell, or OMEdit I do not get the *.sim file output as you have provided.

If you can explain how you got the simulator to give you those warnings/ errors I would much appreciate it.

/Klaus

Sep-27-12 09:35:53
Does anybody know why the SMPM_Inverter example does not simulate?

Ok I see,

But is the example not suppose to run out of the box? Or am I missing some point on the examples provides i.e. do they require a initialization file?

Another question, how did you create the *.sim file containing the warnings? There do not seem to be any warning, error output in OMEdit, or more correct there is a "Messages" window, but it does not show any of the warnings you have provided in the sim file.

/Klaus

Sep-26-12 16:38:06
Simple pendulum case crashes in v1.9

Where do you put in the the required setMatchingAlgorithm("PFPlusExt"); and setIndexReductionMethod("dynamicStateSelection"); method calls?

Sep-26-12 15:00:34
Does anybody know why the SMPM_Inverter example does not simulate?

Hi,

I am using OMEdit 1.8.1, OpenModelica Beta1 (r12739).

I am trying to simulate the SMPM_Inverter example to get a clue on how to use the SM_PermanentMagnet model.
The SMPM_Inverter example should show this, but I am not able to succesfully simulate the example.
When I hit simulate with default parameters, a list of variables is created as a result of the simulation, but the variables seems to be invalid as they all show 0 from time 0 to 1e-9. Time 0  to 1e-9 seems wrong as the simulation should run for 1.5s.

Additionally simulating the example using the OMShell produces the following:
>> simulate(Modelica.Electrical.Machines.Examples.SMPM_Inverter, stopTime=1.5, numberOfIntervals=1500)
record SimulationResult
    resultFile = "C:/Users/kpe/AppData/Local/Temp/OpenModelica/Modelica.Electrical.Machines.Examples.SMPM_Inverter_res.mat",
    simulationOptions = "startTime = 0.0, stopTime = 1.5, numberOfIntervals = 1500, tolerance = 1e-006, method = 'dassl', fileNamePrefix = 'Modelica.Electrical.Machines.Examples.SMPM_Inverter', storeInTemp = false, noClean = false, options = '', outputFormat = 'mat', variableFilter = '.*', measureTime = false, cflags = '', simflags = ''",
    messages = "warning | Error solving nonlinear system residualFunc71 (size 3) at time 1e-006
DASSL--  AT T (=R1) AND STEPSIZE H (=R2) THE
      In above,  R1 =   .0000000000000E+00   R2 =   .1562500000000E-07
DASSL--  ITERATION MATRIX IS SINGULAR
warning | DDASRT: The matrix of partial derivatives is singular.
info    | DASRT can't continue. time = 0.001000
[:0:0-0:0:writable] warning | Simulation call assert() at time 0.000000
Level : error
Message : Model error: Argument of sqrt should be >= 0
info    | model terminate | Simulation terminated at time 9.53674e-010
",
    timeFrontend = 1.29787288003565,
    timeBackend = 0.807052447945161,
    timeSimCode = 0.0845395225483412,
    timeTemplates = 0.113381182361317,
    timeCompile = 2.65507079530592,
    timeSimulation = 0.439061781041785,
    timeTotal = 5.39709771853612
end SimulationResult;

Does anybody know why the SMPM_Inverter example does not work out of the box, in both OMEdit and OMShell?

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