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



Hi everybody,

Is there a way to use a two phase medium with multiple substances?
I did not find a way to do so using the Media models.

All the best

Aug-09-20 22:51:06
Topic: noEvent
How does it work? Downsides?

Hi everybody,

I was wondering how the noEvent operator actually works and if it has any downsides using it.
I checked the Modelica Reference and Peter Fritzson's book. I do not really understand how it works.

Turn off event triggering

Real elementary relations within expr are taken literally, i.e., no state or time event is triggered.

smooth vs. noEvent
The noEvent operator implies that real elementary expressions are taken literally instead of generating crossing functions. The smooth operator should be used instead of noEvent, in order to avoid events for efficiency reasons. A tool is free to not generate events for expressions inside smooth. However, smooth does not guarantee that no events will be generated, and thus it can be necessary to use noEvent inside smooth. [Note that smooth does not guarantee a smooth output if any of the occurring variables change discontinuously.]

This explanation does not really help me understand how it is done.
How is it recognized that an expression stated within the noEvent operator becomes true?
And what are the downsides of using the noEvent operator.

Any help would be appreciated.

Thank you current/smile

Jul-17-20 18:06:49
Using ida for the integration method and totalpivot for the linear solver

Thank you very much!
Just in case somebody else wants to use the flag and does not know how. The syntax is a bit different. This is how I think it has to be:

__OpenModelica_simulationFlags(s="ida", ls="totalpivot")

Jul-17-20 14:24:53
Using ida for the integration method and totalpivot for the linear solver

Hello everybody,

I was wondering how I could change the default solvers for a particular model so that it starts with the solver I want it to start.
I would like to change the integration method to IDA and the linear solver to totalpivot.
First I thought that could be done with annotation() but I did not find any matching command.
I am using OMEdit.

Jun-07-20 18:24:43
Fluid library re-simulate does not recognize changed parameters
Category: Developer

And now I replaced it with version 1.14.1 and the problem does not occur anymore.
I believe there has to be an issue with the newer versions of the nightly builds of 1.16.0

Jun-07-20 18:02:49
Fluid library re-simulate does not recognize changed parameters
Category: Developer

I just installed the latest Nightly Build and still have the same problem.
Is this just a problem on my system?

Sweet sweet current/smile
That is exactly what I was looking for!

Thank you again!

Jun-05-20 10:30:54
Fluid library re-simulate does not recognize changed parameters
Category: Developer

With the latest nightly build I cannot re-simulate with changed parameters.
If I change the parameters and re-simulate the changes do not appear in the simulation. I checked for some of the examples in the Fluid library as well as in ThermoPower,
For example:

Lets say I want to change the height of tank1 in Fluid.Exaples.Tanks.EmptyTanks from 1.1 m to 1.2 m. This cannot be done in the nightly build I have.
In simple examples, lets say a small RC network, I can make changes and re-simulate. Since it works there I do not think I have some wrong settings when I compile or simulate.

I have an older version of OM installed on a different PC where it still works and I am also sure it worked with version 1.15 which I had installed till yesterday.

Could somebody check if they have the same issue with the latest nightly build? Is this a bug?
I downloaded nightly build yesterday.

Thank you very much!
That flag would be very useful!

Just one more thing I think would come in handy would be the option to re-simulate using the solution of the initial values of the previous simulation as a flag.
I am starting in steady state and after a few seconds I am running different scenarios. Solving the initialization problem every time again is a little frustrating since it takes quite some time, or is there already a way to avoid that?
I am guessing that what I am doing is done by numerous other users as well.

Thank you very much!
You are wright! current/smile
I trusted the numbers in OMEdit.

Could you also tell me a good way to export only the initial values?
As of now I am using the LOG_SOTI flag but I still have to apply quite some changes by hand. There has to be a better way of doing this.

Well it does work but only if I don't set any value for b in the first place:


model TestOverride

  parameter Real a=1;
  parameter Real b;
  parameter Real c = 3;
  parameter Real d = 3;
  Real x(start=a, fixed=true);
  der(x) = b*c*d*x;
end TestOverride;

Is that the functionality of  the overrideFile flag?
I could try and use that but it is not really practical I think.

I have installed the latest nightly build but it still does not work.

Could tell me if I am doing it the wright way?

In the Simulation Setup under Simulation flags, additional Simulation Flags (Optional) I type:


the file then contains nothing but:

It compiles and simulates but the value of b is not set to 10. I also tried with a backslash instead.

What also does not work is:


Thank you very much!



Is exactly what I do not get to run.
I get:


Simulation process failed. Exited with code -1.

My txt contains only:



Thaks for the hint with the update!
I am downloading the nightly build at the moment...

Thanks for your reply.
The thing is that I want to change initial values using the -overrideFile flag.

I am building a bigger system and (fast) initialization is an issue. Therefore I am creating smaller sub-systems and use the values found for the initialization in the bigger system. So I am trying to export the final solutions of the initialization from the smaller sub-systems and use them in the bigger models.
I do not want to type them by hand.

How do I do this using OMEdit?

Can anyone tell me how to use the -override and the -overrideFile tag?
I am trying with a simple example posted by adrpo but I don't know where I go wrong.


model TestOverride
  parameter Real a = 1;
  parameter Real b = 2;
  parameter Real c = 3;
  parameter Real d = 3;
  Real x(start=a, fixed=true);
  der(x) = b*c*d*x;
end TestOverride;

After compiling and simulating I want to simulate again with modified initial values. Therefore I thought that I need to set the simulation flag:



If I do so nothing happens. No error message and no simulation.
Does anybody know what I am doing wrong? I did not set the flag Evaluate all parameters.
I am having the same problem with -overrideFile

I am using OpenModelica v1.15.0.

Hello everybody,

can anybody tell me what the message and the index mean:

The given system is mixed-determined.   [index = 1]

I also have a simulation that takes rather long and it says that I have a few convergence test failures. Is there any way I can analyse these convergence test failures?

Couldn't find much about it...

I would like to change the number of digits shown in the result file.
For temperatures it is always 6 digits (123.456K for example) which in my case is not enough. I exported the results to see if the export file helps me with that issue but it does not.
Changing the tolerance also does not have an effect.

Any help would be welcome!

What I do now is:
but there has to be a better way than a string...

Apr-19-20 16:57:32
How to use debug flags like bltdump in the openmodelica 1.14 version

I am relatively new to Modelica and I would like to set some compiler flags.
I know how to set Simulation and Translation Flags but for the Compiler flags I do not.
I know where to put them I just don't seem to get them right. I checked the OM Users Guide (Ch. 16) for more information but somehow I still cannot figure out how to use them.
Lets say I want to use the flag: simplifyLoops
How do I set that flag?
I am using OpenModelica 1.14.1

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