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

Tank and pump system

Tank and pump system

Hi,

I modelled a simple tank with a pump, where I had to add the medium manually to the code. However I can't get the model to simulate and I don't understand the error.
You can find my model in attachment.

Thanks


testje.mo

Attachments:

Re: Tank and pump system

Hi Malik,
I think that the model is far from what is needed. You need to specify the number of ports for tank2, as you did for tank1. The tanks cross area must be also fixed.  use_portsData should be made false in order not to need to specify its size and location. You should use the ControlledPump model instead of the Pump model, in order to easily specify the pump flow. I attach your model and a modified one to compare.

ModelicaTest14.mo


Regards

Attachments:

Re: Tank and pump system

Hi,

Thank you very much for your tips!  current/smile

Something else I have been struggling with for a while is: how to insert a pump curve into my model. Do you happen to know how ?




Re: Tank and pump system

Hi,

I'm not used to Modelica.Fluid but, as far as I know, you should use a PrescribedPump, and redeclare the function flowCharacteristic as the function you want to use to correlate head with flow. You can look at how it is done in Examples.PumpingSystem.

Re: Tank and pump system

When simulating your model testje2, I have the scripting error:
Internal error: no tokens left to replace %s with.
Given message was: System.launchParallelTasks: Failed to create thread: %s

How to solve that problem.

Re: Tank and pump system

passas wrote:


When simulating your model testje2, I have the scripting error:
Internal error: no tokens left to replace %s with.
Given message was: System.launchParallelTasks: Failed to create thread: %s

How to solve that problem.

Press on "S" to simulate the model and change "Number of Processors" to 1.

What computer do you have? How much RAM? What CPU? What OS: Windows? Linux? Mac?


Re: Tank and pump system

With the number of processor = 1, it works.
Thank you,

Re: Tank and pump system

One more question:
I want to add a sink has an overflow of the tank one.
But there are error messages. Where should I redeclare the classMedium ?

testje3.mo

Attachments:

Re: Tank and pump system

Just edit the model text and change to:

Code:


Modelica.Fluid.Sources.FixedBoundary Sink(nPorts = 1, redeclare package Medium = Medium)

Re: Tank and pump system

Hi Adrpo
Thank you so much for your help. It is quite hard to beginning alone with openmodelica. My goal is to try o simulate the approach system of a paper machine. So, still a long way to do ...
Now the model is well checked.
Nevertheless, when I try to simulate (after changing some parameters of the pump and others equipments, the message bellow came.
I've understood that it comes from the initial parameter but  how to do to have access to the information "Use -d=bltdump to get more information"

<<
[1] 10:38:50 Scripting Warning
Requested package Modelica of version 3.2.2, but this package was already loaded with version 3.2.3. You might experience problems if these versions are incompatible.

[2] 10:38:50 Symbolic Warning
The model contains alias variables with conflicting start and/or nominal values. It is recommended to resolve the conflicts, because otherwise the system could be hard to solve. To print the conflicting alias sets and the chosen candidates please use -d=aliasConflicts.

[3] 10:38:50 Translation Error
Internal error IndexReduction.pantelidesIndexReduction failed! System is structurally singulare and cannot handled because number of unassigned equations is larger than number of states. Use -d=bltdump to get more information.

[4] 10:38:50 Translation Error
post-optimization module replaceHomotopyWithSimplified (initialization) failed.

[5] 10:38:50 Translation Error
No system for the symbolic initialization was generated

Re: Tank and pump system

What OM version are you running?

Can you share the model? If you want to keep it private you can send it to us for debugging via email to OpenModelica@ida.liu.se and we will delete it after we find the issue.

There are 0 guests and 0 other users also viewing this topic