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

Problem with simple steady state simulation

Problem with simple steady state simulation

Hello,

I am testing the Open Modelica Editor to see if I could swith to it for most of my usual simulation.
First I have tried a very simple steady state simulation using ThermoSysPro package and connecting :
- a source of steam,
- a steam turbine,
- a sink

This first simulation worked fine, here is the code of the model :

model TAV
  ThermoSysPro.WaterSteam.Machines.StodolaTurbine stodolaturbine1 annotation(Placement(visible = true, transformation(origin = {0, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  ThermoSysPro.WaterSteam.BoundaryConditions.Sink sink1 annotation(Placement(visible = true, transformation(origin = {60, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  ThermoSysPro.WaterSteam.BoundaryConditions.SourcePQ sourcepq1(P0 = 10000000.0, h0 = 3000000.0, Q0 = 110) annotation(Placement(visible = true, transformation(origin = {-60, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
equation
  connect(stodolaturbine1.Cs, sink1.C) annotation(Line(points = {{10.1, 0}, {50.6066, 0}, {50.6066, -1.03986}, {50.6066, -1.03986}}));
  connect(sourcepq1.C, stodolaturbine1.Ce) annotation(Line(points = {{-50, 0}, {-10.052, 0}, {-10.052, -1.03986}, {-10.052, -1.03986}}));
  annotation(Icon(coordinateSystem(extent = {{-100, -100}, {100, 100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2, 2})), Diagram(coordinateSystem(extent = {{-100, -100}, {100, 100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2, 2})));
end TAV;


Then I tried to inverse the problem, fixing the output pressure et letting free the intern coefficient called Cst (that is a very trivial calculation usually done for model calibration).

First I found that I could not add attributes in the block windows, and that it was safer to do it in the modelica code. Here is what I added in the code :

stodolaturbine1(Cst(fixed = false), Ps(fixed = true, start = 4.7e6))

The simulation works but it does not take into account my attribute for "fixed" : Ps is still free and Cst is still fixed to its default value.
If someone can help to solve this difficulty, I would be quite happy.

I would prefer to solve out this simple case before going further with big steady stat or dynamic simulations with OME.

Using OME I also had some problems to save new models in a package. For instance if I do :
- right click on a model
- copy
- type name "newmodel"
- choose the package in which I want to keep it
- modify newmodel
- save it

Then the file newmodel.mo never appears in my package directory, so I cannot figure out how to save it effectively from OME...
I am eager to getting your advices.

Thanks
B



Re: Problem with simple steady state simulation

Hello,

Is this forum still in operation?
Does anyone reads it?

b

Re: Problem with simple steady state simulation

Yes, the forum is in operation but sometimes we are too busy to answer or we really don't know the answer.

Some of these are known bugs and we're working on them.

See: https://trac.openmodelica.org/OpenModelica/ticket/3095
for missing class modifiers:

Code:


stodolaturbine1(Cst(fixed = false), Ps(fixed = true, start = 4.7e6))

For the saving issue, does OMEdit saves your model inside package.mo or it is not saved anywhere?
Maybe you can open a ticket about it and give all the information you have:
https://trac.openmodelica.org/OpenModelica

Cheers,
Adrian Pop/

Re: Problem with simple steady state simulation

Hello,

Thanks a lot for this answer.
Indeed the bug looks like the one treated nb 3095. The bug is classified as blocker, and to my opinion it is the case since it is a classical use for calibration of models.

Concerning the saving issue, I ask to save the model in an independant file, but OMEdit does not save at all. I'll follow your advice and create a ticket.

b


There are 0 guests and 0 other users also viewing this topic
You are here: