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

desperately looking for help on stream connectors

desperately looking for help on stream connectors

Hello,

I am very new to OpenModelica. I would like to use the Fluid or Buildings libraries, but found that they use SI units, and that they are hugely convoluted. I would prefer to work in IP units and have a few very simple and manageable components.

In an effort to better learn Modelica, I decided to compile a "micro"-Fluid library with IP units, because all I am interested in for now is pressure, temperature and flow rate of water through a piping network with some heated/cooled pipes. So I created Pump, Splitter, Pipe and Mixer models and seem to have been successful in incorporating them into an overall Network model WITHOUT temperature, where a pump feeds the splitter, the splitter feeds two parallel pipes, the pipes feed a mixer and the mixer feeds back to the pump. I also have a Reference at the pump inlet to set the pressure.

The next step is to take the simple Pressure and Volume Flow Rate (flow) connector to a Pressure, Volume Flow Rate (flow) and Temperature (stream) connector, and to incorporate heating/cooling, i.e. a Network model WITH temperature. Unfortunately, this is where it all falls apart. For the past two weeks, I have been souring the Internet for anything to do with Modelica and Stream, but what I found is more confusing and seemingly contradicting than enlightening. I seem to be particularly confused about splitters and mixers and how to use inStream() with these models, and possibly about how to use inStream() at the overall Network model level. Whatever I have tried so far has failed, usually with a"singularity" problem.

Can anyone provide a complete splitter or mixer model, and ideally also a cooled/heated pipe model (constant heat source or sink) using a stream variable "temperature" (or if need be "enthalpy")?

I can provide a zipped version of my "micro"-Fluid library with IP units, if you so desire.

Thank you kindly!

Re: desperately looking for help on stream connectors

Koch wrote:


Hello,

I am very new to OpenModelica. I would like to use the Fluid or Buildings libraries, but found that they use SI units, and that they are hugely convoluted. I would prefer to work in IP units and have a few very simple and manageable components.

In an effort to better learn Modelica, I decided to compile a "micro"-Fluid library with IP units, because all I am interested in for now is pressure, temperature and flow rate of water through a piping network with some heated/cooled pipes. So I created Pump, Splitter, Pipe and Mixer models and seem to have been successful in incorporating them into an overall Network model WITHOUT temperature, where a pump feeds the splitter, the splitter feeds two parallel pipes, the pipes feed a mixer and the mixer feeds back to the pump. I also have a Reference at the pump inlet to set the pressure.

The next step is to take the simple Pressure and Volume Flow Rate (flow) connector to a Pressure, Volume Flow Rate (flow) and Temperature (stream) connector, and to incorporate heating/cooling, i.e. a Network model WITH temperature. Unfortunately, this is where it all falls apart. For the past two weeks, I have been souring the Internet for anything to do with Modelica and Stream, but what I found is more confusing and seemingly contradicting than enlightening. I seem to be particularly confused about splitters and mixers and how to use inStream() with these models, and possibly about how to use inStream() at the overall Network model level. Whatever I have tried so far has failed, usually with a"singularity" problem.

Can anyone provide a complete splitter or mixer model, and ideally also a cooled/heated pipe model (constant heat source or sink) using a stream variable "temperature" (or if need be "enthalpy")?

I can provide a zipped version of my "micro"-Fluid library with IP units, if you so desire.

Thank you kindly!

Just trying to kick this up the list to see if there really is no one who can answer this? Thanks.

Re: desperately looking for help on stream connectors

Hi Koch,

I'm working with stream connectors (and thermo-hydraulic systems) on a daily basis and I fully understand your frustration. I have only learned how to use stream connectors "the hard way".

Hopefully, this will help you along:

I have put togegher a minimalistic fluid library on https://github.com/justnielsen/ModelicaTutorialshttps://github.com/justnielsen/ModelicaTutorials which might give you some inspiration. I tried to keep the models, connectors, medium model etc. as simple as possible.

Further, in the Wiki section (https://github.com/justnielsen/Modelica … connectors) I have written a few words about stream connectors (why one energy balance must implemented with two equations).

Please feel free to use it as you like.

Best regards,
Rene Just Nielsen

Re: desperately looking for help on stream connectors

Thank you justnielsen! I am delighted to see that this topic is alive after all. Unfortunately, I had to move on to make progress and am now using EPANet, even though I cannot do temperature in (yet?). It has scalar transport capability, which should do the trick, but for some reason does not. So, I will now look into your response, but it will take a few days or weeks to pick up where I left off. For now, thank you so much again for posting your insight!

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