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

Troubleshooting about Tank modeling

Troubleshooting about Tank modeling

I am a new user of OMEdit. I'm trying to simulate a simple tank with liquid discharge, but I have problems with the connections and ports.

How can I set the number/location of the ports of multiple devices (boundaries, tanks, sources, etc.) ?

How to set the fluid property package (example: liquid water) ? Modelica sometimes gives errors about "Redeclare Package Medium", or error about misconfuration of property package. This information is not clear to set in OpenModelica environment.

Thanks in advance.

Re: Troubleshooting about Tank modeling

Hi Cleiton,
Can you post an example of one of your models in trouble? It would help to know where is the problem.

Re: Troubleshooting about Tank modeling

Thanks for your reply.

The file is in the link below.

tank-basic.mo

Attachments:

Re: Troubleshooting about Tank modeling

Every element of your model coming from Modelica.Fluid needs the specification of the Medium used. In OMEdit it can be done, from version 1.16 I think, using the graphical interface. In the tab 'General' you can select the Medium from the compatible ones charged. Another normal way is to define an alias for a Medium in your model, and make the Medium of each element equal to this alias. I have used both ways in a modified model.
You have connected an external source to the port  T_in of boundary1, but 0.1 ºK doesn't seem a reasonable value, so I think that you probably wanted to specify 0.1 kg/s for the port flow, and I have changed the connection to the m_flow_in port. Nevertheless you need also to specify that you want to take the value received via the connection by checking the box 'use_m_flow_in'.
For the flow characteristic of the valves you have left the default value of OpPoint. In this case you need to give the operation point, this means to fill the nominal pressure drop at the nominal flow, with the nominal opening. In one of the valves I have changed to Kv and specified the Kv of the valve. It was also necessary to supply the apperture to the valve connectors.
In order to better follow the evolutionof the tank I have specified a simulation time of 3600 s.

ModelicaTest34.mo



Attachments:

Re: Troubleshooting about Tank modeling

You will need to erase the lines:

  annotation(
    uses(Modelica(version = "3.2.3")));

at the end of the package, that have been added automatically because I  am using Modelica 3.2.3 and not 4.0.0

Re: Troubleshooting about Tank modeling

Ok, thanks for your help!

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