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

Posts

Posts

Apr-09-14 07:37:55
Using OMEdit or other

I am getting an error similar to the one dexter22 had too(the difference is due to a different model being visualized).

I know that, I'm just saying that I think that it should set the start value because its in the initialization tab.

I have this problem too. r_0 or v_0 can be set at the initialization tab, but then their value is held constant for the whole simulation.

Mar-06-14 23:16:02
Problems with modeling mechanical interfaces

Hi Malen,
in the Compliant model, you wrote

Code:

s_rel = flange_a.s - flange_b.s; 

but it should be:

Code:

s_rel = flange_b.s - flange_a.s; 

you switched between the two flanges, so the spring pushes the mass away from equilibrium, instead of pulling towards it.

Code:


model M1
  parameter Real a = 1;
  parameter Real b = 1;
end M1;

model M0
  parameter Real a = 0;
  parameter Real b = 0;
end M0;

model N
  replaceable M0 m;
end N;

model B
  N n(m.a = 3, redeclare M1 m, m.b = 3);
end B;

I simulated model B in OpenModelica revision19412.
it turned out that:
n.m.a = 3
n.m.b = 1

To my understanding the order of modification should not matter, so I guess this is a bug.
I read the Modelica spec chapter 7, about inheritance, modification, and redeclaration and it doesn't mention combined modification and redeclaration specifically, so I guess B should be equivalent to:
model B
  N n(redeclare M1 m(a = 3,b = 3));
end B;

Feb-17-14 16:27:23
Building model fails on a new xp installation

I found that the enviroment variable PATHEXT of my user was just ".py;.pyc". so I add ".com; .exe;.bat" and it worked.
Then I got another problem, the simulation .exe file did not work (it gave some error that had to do with mingw), I solved it by copying the system PATH to the user PATH.

I think the problem was this: I installed python(x,y)  only for my user, and it created PATH and PATHEXT variables for this user, that override the system variables.

now everything works, but I feel that there is something wrong with my eviroment variables. do you think this is because of a bug in python(x,y)?

Feb-17-14 15:07:13
Building model fails on a new xp installation

Thank you both for the fast replies! I didn't expect that.

I ran omc just as you said and got:

true
""
'"C:/OpenModelica1.9.0//share/omc/scripts/Compile"' is not recongnized as an internal or external command,
operable program or batch file.
record SimulationResult
    resultFile = ""
    ...
end SimulationResult
""

(note i copied that by hand so I probably misprinted a few letters)

I checked and the file exists, but has a .bat extention.
also I had to add .exe when i ran omc:

> c:\OpenModelica1.9.0\bin\omc.exe script.mos

It seems that the problem is that the computer doesn't ignore the filename extention where it should.

Feb-17-14 13:57:28
Building model fails on a new xp installation

I recently installed OpenModelica 1.9.0 on on a windows xp. When I call buildModel in OMShell it returns {"",""} without any error. This happens for any model (even an empty one). It creates the .c .h .xml and .makefile files, but the .exe file is not created.
Any other attempt to run a simulation (with OMNotebook, OMEdit) failed too probably for the same reason.
OpenModelica worked for me on other computers.
Any idea how i can fix this problem?

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