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 fluid pump model

Simple fluid pump model

I am a Modelica novice and I am trying build the simplest of fluid models. The model has a pressure boundary inlet, a controlled pump and a partially filled tank. The model fails to solve at time t=0. Can someone help me out with this please.

Re: Simple fluid pump model

sgopal1,

You don't give us too much information to help you out. An attached model or error message could have been useful.

However, assuming you are using components from Modelica.Fluid, since the model fails to solve at t=0 it is probably due to bad initial values. Try to set you initial values better.

BR
Rene Just Nielsen

Re: Simple fluid pump model

I thought I had attached the model. But I see that I had not clicked on the "Add attachment to post". Another rookie mistake.



Thanks in advance.

Re: Simple fluid pump model

sgopal1,

I made a few modifications to your model (attached). Also see commented code lines in the file.

1) the parameter use_portsData was unspecified. I set it to false (indicating no pressure drop through the tank port(s).
2) I didn't quite understand your initializations in the code. I used the massDynamics/energyDynamics parameters in the System model to initialize the model with a fixed tank level instead
3) with a fixed tank pressure (1 bar) and no pressure drop through the tank port, it's not possible to let the pump control the outlet pressure (since this is already given by the tank model). So I let the pump control the mass flow rate.

You should note that if you run the simulation for long enough time the tank will overflow, causing the simulation to fail. You can avoid this by adding some sort of drain to the tank.

Best regards,
Rene Just Nielsen
Test3-revised.mo

Attachments:

Re: Simple fluid pump model

Rene,
Thank you very much for the help.

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