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

Posts

Posts

Apr-07-13 15:51:48
OMEdit crashes directly after flash window is visible

In release r15749 OMEdit works again on a mac computer:-)

Feb-25-13 23:34:53
OMEdit crashes

OMEdit crashes when starting!

I frequently install the nightly builds op openmodelica for the mac using ports.

Using omc and OMShell works oke. But for version 1.9 i was not able to get OMEdit working. It is there under applications/macports/. OMShell is also there in applications/macports/ and runs oke. Two folders are there, applications/macports/, Python 2.7 and Qt4.

It seems that there is a problem with Qt4. Do i need to set some environment variables?

kind regards
Dick

Dec-31-12 13:57:12
OMEdit crashes directly after flash window is visible

I'm using Ports to install that latest build of Open Modelica. The OMshell and the omc work oké. The OMshell and OMEdit are installed in the application directory. Until now i used emacs to develop and compile (omc) the modelica models, using the scripting (mos) files. This way i got some insight and experience with Modelica. Now it's time to switch to a graphical environment (OMShell)

When I start OMEdit on the Mac I get the following error. What could be wrong? (oh: I did not add any environment variables)

Code:


Process:         OMEdit [34197]
Path:            /Applications/MacPorts/OMEdit.app/Contents/MacOS/OMEdit
Identifier:      com.yourcompany.OMEdit
Version:         0
Code Type:       X86-64 (Native)
Parent Process:  launchd [134]
User ID:         501

Date/Time:       2012-12-31 11:46:06.653 +0100
OS Version:      Mac OS X 10.8.2 (12C3006)
Report Version:  10

Interval Since Last Report:          295455 sec
Crashes Since Last Report:           13
Per-App Crashes Since Last Report:   4
Anonymous UUID:                      1F164ED6-7FE9-C60B-2427-8D9D823B302E

Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000

VM Regions Near 0:
-->
    __TEXT                 000000010eaf5000-000000010eda7000 [ 2760K] r-x/rwx SM=COW  /Applications/MacPorts/OMEdit.app/Contents/MacOS/OMEdit

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   QtGui                             0x00000001113e1b99 QGraphicsDropShadowEffect::draw(QPainter*) + 121
1   QtGui                             0x0000000110e6816d QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) + 509
2   QtGui                             0x0000000110e690c2 QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) + 1346
3   QtGui                             0x0000000110e68ac7 QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) + 2903
4   QtGui                             0x0000000110e690c2 QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) + 1346
5   QtGui                             0x0000000110e68eee QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) + 878
6   QtGui                             0x0000000110e68eee QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) + 878
7   QtGui                             0x0000000110e68ac7 QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) + 2903
8   QtGui                             0x0000000110e690c2 QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) + 1346
9   QtGui                             0x0000000110e68ac7 QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) + 2903
10  QtGui                             0x0000000110dc4567 -[QCocoaView drawRect:] + 3063
11  com.apple.AppKit                  0x00007fff936e9144 -[NSView _drawRect:clip:] + 4217
12  com.apple.AppKit                  0x00007fff936e77a1 -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 1656
13  com.apple.AppKit                  0x00007fff936e7bb9 -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2704
14  com.apple.AppKit                  0x00007fff936e7bb9 -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2704
15  com.apple.AppKit                  0x00007fff936e7bb9 -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2704
16  com.apple.AppKit                  0x00007fff936e57d2 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 817
17  com.apple.AppKit                  0x00007fff936e5223 -[NSThemeFrame _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 314
18  com.apple.AppKit                  0x00007fff936e0e4d -[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] + 4675
19  com.apple.AppKit                  0x00007fff936aad73 -[NSView displayIfNeeded] + 1830
20  com.apple.AppKit                  0x00007fff93767b18 -[NSWindow _reallyDoOrderWindow:relativeTo:findKey:forCounter:force:isModal:] + 1377
21  com.apple.AppKit                  0x00007fff93767138 -[NSWindow _doOrderWindow:relativeTo:findKey:forCounter:force:isModal:] + 940
22  com.apple.AppKit                  0x00007fff93766d1f -[NSWindow orderWindow:relativeTo:] + 159
23  com.apple.AppKit                  0x00007fff9375f7dc -[NSWindow makeKeyAndOrderFront:] + 48
24  QtGui                             0x0000000110dba10b QWidgetPrivate::show_sys() + 619
25  QtGui                             0x0000000110e6c382 QWidgetPrivate::show_helper() + 498
26  QtGui                             0x0000000110e6cd3e QWidget::setVisible(bool) + 718
27  com.yourcompany.OMEdit            0x000000010eaf91c3 main + 3155
28  libdyld.dylib                     0x00007fff908cd7e1 start + 1

Dec-27-12 15:21:51
I tried the example in paragraph 15.2.5 Connector interfaces ...

The problem was caused by the following line:

Code:


beta*(A*u)^2*(inlet.P - outlet.P) = inlet.mdot^2;

The solution method choose for inlet.mdot the negative value as the solution. It should have been the positive value, because the inlet.P pressure is higher than the outlet.P pressure.

So i changed the code to:

Code:


sqrt(beta*(A*u)^2*(inlet.P - outlet.P)) = inlet.mdot

Now all looks oké!

Is there a way of coding that can avoid such programmer "mistakes"?

Dec-26-12 18:20:05
I tried the example in paragraph 15.2.5 Connector interfaces ...

I'm using r14545.

I also get a good result when I use OMShell and your script commands. (a.mo probably should be dck1.mo in your script?)

Although when I use the 'outputformat="csv" I do not get the same values in the 'csv' file!

Could you check this.

Dec-26-12 16:41:16
I tried the example in paragraph 15.2.5 Connector interfaces ...

Below you find a model from the Modelica 2.1 book of Peter Fritzson. It simulates but the results are not oké.

The variable CtrlValveFlow.inlet.mdot looks correct, but the variable pressureEnthalpySource.outlet.p is zero (0) but should be 1.2e5. What could be wrong?

I do get the warning:
[dck1.mo:2:3-7:20:writable] Warning: Connector dck1.FlowConnector is not balanced: The number of potential variables (2) is not equal to the number of flow variables (1).
Is this the problem?


Code:


package dck1
  connector FlowConnector
    import Modelica.SIunits.*;
    Pressure              P;
    flow MassFlowRate     mdot;
    SpecificEnthalpy      h;
  end FlowConnector;

  model PressureEnthalpySource
    import Modelica.SIunits.*;
    FlowConnector outlet;
    parameter Pressure P_0=1.0e5;
    parameter SpecificEnthalpy h_0=300190;
  equation
    outlet.P = P_0;
    outlet.h = h_0;
  end PressureEnthalpySource;

  model ControlledValveFlow
    import Modelica.SIunits;
    import Modelica.Blocks.Interfaces;
    FlowConnector           inlet, outlet;
    Interfaces.RealInput    u;
    parameter SIunits.Area  A = 1e-4;
    parameter Real          beta = 5.0e-5;
  equation
    // Conservation of mass
    0 = inlet.mdot + outlet.mdot;
    // Conservation of energy
    0 = inlet.mdot*inlet.h + outlet.mdot*outlet.h;
    beta*(A*u)^2*(inlet.P - outlet.P) = inlet.mdot^2;
    assert(inlet.P - outlet.P > 0, "Error: model not valid for backflow");
  end ControlledValveFlow;

  model PressureSink
    FlowConnector inlet;
    parameter Modelica.SIunits.Pressure P_0=1.0e5;
  equation
    inlet.P = P_0;
  end PressureSink;

  model CtrlFlowSystem
    import Modelica.Blocks.Sources;
    PressureEnthalpySource   pressureEnthalpySource(P_0=1.2e5);
    Sources.Step             step(offset=1,startTime=0.5,height=-0.5);
    ControlledValveFlow      ctrlValveFlow;
    PressureSink             pressureSink;
  equation
    connect(pressureEnthalpySource.outlet, ctrlValveFlow.inlet);
    connect(ctrlValveFlow.outlet, pressureSink.inlet);
    connect(step.y, ctrlValveFlow.u);
  end CtrlFlowSystem;
end dck1;

Hello,

I' using version 1.9.0 beta 2.

I'm implementing the example Thermodynamics - an air filled control volume with subsystems (paragraph 15.2) from the book of Peter Fritzson. Things work-out oke.

But from paragraph '15.2.5.6 System and Valve Model with interfaces and Externally controlled flow' I get warnings and errors that I cannot solve. The model that started giving trouble is 'CtrlFlowSystem'.  I assume that 'ControlledFlowModel' should be 'ControlledValveFlow' but I get singular system errors and warning on unbalanced connector.

Did any of you implemented this example and did you have the same trouble? How did you solve it?

Nov-11-12 14:31:06
omc does not find my self made package Core

In a directory  i put a model file (Apollo12a.mo).

In a subdirectory named 'Core' i put the package files. package.mo, Body.mo, CelestialBody.mo, Rocket.mo.

In de file Apollo12a.mo i put the import Core; statement.

When i run the command 'omc Moonlanding.mos' i get the error message 'Class Core.CelestialBody not found'.
----
mos file:
loadFile("Moonlanding.mo");
simulate(MoonLanding, stopTime=230);
plot({apollo.altitude,apollo.thrust});

----


package file in the Core directory
------
within ;

encapsulated package Core "Contains the Core classes and models"

end Core;

------

Q: Where does omc look for the 'import Core' statement.

Jul-10-12 09:12:33
Is MDT supported on the MAC
Category: Developer

Adeel,

It works:-) The compiler is recognized.

Thanks very much. It was late last night for you 2:55:48 (early morning).

Dick

Jul-09-12 20:32:40
Is MDT supported on the MAC
Category: Developer

Hi,

I did what you suggested, it did not work. I get the message listed below.

eclipse.buildId=I20120608-1400
java.version=1.6.0_33
java.vendor=Apple Inc.
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=nl_NL
Framework arguments:  -keyring /Users/dbarends/.eclipse_keyring -showlocation
Command-line arguments:  -os macosx -ws cocoa -arch x86_64 -keyring /Users/dbarends/.eclipse_keyring -showlocation

Error
Mon Jul 09 19:23:17 CEST 2012
Unable to read OpenModelica Compiler CORBA object from /tmp/openmodelica.dbarends.objid.mdt

org.modelica.mdt.core.compiler.ConnectException: Unable to read OpenModelica Compiler CORBA object from /tmp/openmodelica.dbarends.objid.mdt
    at org.modelica.mdt.omc.OMCProxy.readObjectFromFile(OMCProxy.java:194)
    at org.modelica.mdt.omc.OMCProxy.init(OMCProxy.java:450)
    at org.modelica.mdt.omc.OMCProxy.sendExpression(OMCProxy.java:534)
    at org.modelica.mdt.omc.OMCProxy.getCompilerVersion(OMCProxy.java:1064)
    at org.modelica.mdt.omc.OMCProxy.getCompilerName(OMCProxy.java:1084)
    at org.modelica.mdt.core.CompilerProxy.getCompilerName(CompilerProxy.java:187)
    at org.modelica.mdt.internal.core.ErrorManager.showCompilerError(ErrorManager.java:154)
    at org.modelica.mdt.ui.text.ModelicaCodeResolver.getClassAt(ModelicaCodeResolver.java:340)
    at org.modelica.mdt.ui.editor.ModelicaEditor.getElementAt(ModelicaEditor.java:821)
    at org.modelica.mdt.ui.editor.ModelicaEditor.computeHighlightRangeSourceReference(ModelicaEditor.java:766)
    at org.modelica.mdt.ui.editor.ModelicaEditor.selectionChanged(ModelicaEditor.java:638)
    at org.modelica.mdt.ui.editor.ModelicaEditor$EditorSelectionChangedListener.selectionChanged(ModelicaEditor.java:513)
    at org.eclipse.jface.text.TextViewer.firePostSelectionChanged(TextViewer.java:2755)
    at org.eclipse.jface.text.TextViewer.firePostSelectionChanged(TextViewer.java:2703)
    at org.eclipse.jface.text.TextViewer$5.run(TextViewer.java:2682)
    at org.eclipse.swt.widgets.Display.timerProc(Display.java:4697)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:5455)
    at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
    at org.eclipse.swt.widgets.Display.applicationNextEventMatchingMask(Display.java:4873)
    at org.eclipse.swt.widgets.Display.applicationProc(Display.java:5239)
    at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
    at org.eclipse.swt.internal.cocoa.NSApplication.nextEventMatchingMask(NSApplication.java:94)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3613)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1022)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:916)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:585)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:540)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1438)

Jul-09-12 19:53:19
Is MDT supported on the MAC
Category: Developer

Hi,

I do get the "Openmodelica compiler null is online"

I use the following environment variables.
OPENMODELICAHOME=/opt/openmodelica
OPENMODELICALIBRARY=/opt/openmodelica/lib/omlibrary
Is this correct?

Dick

Jul-08-12 23:20:17
Is MDT supported on the MAC
Category: Developer

I installed the MDT plugging in eclipse.

I get the warning that it is no officially supported on OSX. Is this correct?

I also get the error "problems while communicating with the Open modelica compiler".
I use eclipse 4.2.0 and OMC 1.8.1.

OMEdit is working:-) So i assume the environment variables are set oké.
But i would like to use the features of MDT.

So the questions are: Should MDT work on the mac? If yes what should i check/adapt to get it working?

kind regards
Dick Barends

Jun-18-11 22:47:51
Topic: OMEdit
Environment variable for link to Modelica STL

What is the correct line for the environment variable to the Standard Modelica Library (STL), so that OMEdit will automatically import the models library.
I downloaded version 3.1 of STL from the Modelica Web site. After unzipping i got a directory 3.1-build-6.

So it is something like: MODELICAPTH=/Users/dbarends/??????????

Could you give me some hints:-)

kind regards
Dick Barends

Jun-18-11 19:22:06
OMShell cannot start OMC and can't find the OPENMODELICAHOME env.

Thanks sjoelund, for the quick response, it solved the problem!

Jun-18-11 19:08:46
OMShell cannot start OMC and can't find the OPENMODELICAHOME env.

I'm using OpenModelica on a MAC. OSX 1.6.7.

OpenModelica devel-8719 and 9308  both say as i start OMShell that OPENMODELICAHOME env. variable is missing.

When i give the command env i see that the variable exists. Below the text from the terminal

"OPENMODELICAHOME=/opt/openmodelica/bin/"

What am i doing wrong?

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