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

Simple tank and pump system: initialization issues

Simple tank and pump system: initialization issues

Hi,
I am trying to simulate a model, where tank one is initialized with water level and then a valve is attached to it controlled by a signal. The water then flows through a pipe to a pump and is circulated back to tank. The model gets compiled, but when I try to simulate it with valve signal I get initialization errors. I have just started using modellica, any help would be truely appreciated. Attached is my model.

Thanks

Best regards,
Anki

Edited by: ankiagg - Feb-28-20 08:46:36

Re: Simple tank and pump system: initialization issues

Hi,
The problem you are having when going with the valve aperture lower than 0.32 is not a model problem, but a working conditions problem. At aperture of k=0.32, the pressure at valve outlet is just 48.4 mbars. If you close more the valve, you are vaporizing the water, and this is the reported error.
Some other comments are:
A declaration of:
inner Modelica.Fluid.System system;
Is missing in the model, this is the reason of the traslation warnings.
The flow is also very very low (0.0001 kg/s) for the 70 mm. pipe, but it seems that there is no problem.
If you are using OMEdit, better drag the elements to use from the librarries browser, you will be able to edit them graphically.

Regards

Re: Simple tank and pump system: initialization issues

Hi,
Thanks for your reply.

As per your suggestions, I tried with a different valve opening. I also added the system, and increased the value of flow (also tried removing the pipe and connecting pump directly to the valve, but it does not seem to solve the issue. I still get the same errors. Did by changing these values, the model work for you?

Regards

Re: Simple tank and pump system: initialization issues

Hi,
Yes your model was working till k=0.32. I am using OpenModelica 1.14.1 64 bits on Windows 10.
I attach a file with two models, the first is just your model with the constant k changed to 0.32. The second is the one I made in order to be able to edit the parameters with the GUI. In this one I changed the flow to 1 kg/s and the operating point of the valve.

ModelicaTest12.mo

Regards

Attachments:

Re: Simple tank and pump system: initialization issues

Thanks a lot CTG for your help and suggestions.

After a lot of testing and trials, I found out that one of the reasons I was getting error was because of my Openmodellica version, I was using 1.13.1. Now, it started running with the 1.14.1 version. But, now when I replace the input to valve opening from a predefined constant value to a real input interface block (because I would like to give that as an external input), I get errors in compilation.  Attached is the model.


Thanks!
Best regards

Edited by: ankiagg - Mar-03-20 07:46:58

Re: Simple tank and pump system: initialization issues

Hi Anki,
Perhaps you are mixing things. If you just want a more flexible calculation for Valv1.opening, you can just write an equation with its calculation. If what you want is to connect your model with another model that will supply the value for Valve1, the construction is almost OK, but better you drag the RealInput to your model with OMEdit. It will create, in the Icon view, an icon to which you can later connect a RealOutput. Now you can create a new model, drag your first model into it, drag also a model with a RealOutput and its calculation and connect them.

Regards

Carlos

Re: Simple tank and pump system: initialization issues

It works. Thanks a lot Carlos!

Best,
Anki

Edited by: ankiagg - Mar-04-20 10:28:25
There are 0 guests and 0 other users also viewing this topic
You are here: