Help - Search - Members - Calendar
Full Version: Modelling a pipe for chemical reactions
Modelica Forum > Modelica > Modelica
footwork
Hi,
I've been trying to create a model of a pipe, ie something which has no volume in which I can extract a certain amount of substance. This may sound trivial but it become quite hard to come up with a description which is sufficiently robust for practical use. It has a singulirity when flow is zero, I find this difficult to understand as the amount consumed is the zero at this point, setting the consumption to zero as a parameter allows the pipe model to work in both directions and zero flow.

My requirements are:
1. the pipe must be bi-directional. It's not really quite a three port junction, flow can only pass from left to right or right to left.
2. Tthe amount of substance removed is constrained to be less than or equal to the amount of substance entering. It should be possible to add substance through this mechanism also.
3. Specific enthalpy at the exit port should equal the entry port.
4. It should be based on the Modelica.Media.* so it can work with multi species substances, in particular PartialMediumMixture.

Any thoughts, anyone tried something similar.

The main driver for this is avoid having many small volumes in my model as this inherently makes a model stiff.

Thanks in advance for any suggetsions/offerings.

Regards

Mark


footwork
Well that bumped....! smile.gif

Attached is my (failed) attempt at a solution.
I know I should have done this to start off with but it wasn't in a very convienient package. This is my attempt at a solution. It appears to work in the direction of design flow ( a to cool.gif, though problems occur at zero and negative flow.

In particular, at reverse flow, the concentrations don't add up to one but I can't see quite how to solve this.

Secondly, I need to subtract an amount of enthalpy for the balance to be sensible, ie removing mass shouldn't affect temperature significantly. This was also causing problems as the specific enthalpy seems to be singular at zero flow but I think I have a(slightly convoluted) way around this using an external sensor block and calculate it with the "consumption" vetcor.

The "Info" section for the whole package shows some plot commands (for users of Dymola) that demostrate the problems.
For others,
plotting

Time vs the individual species flows for both port_a and _b of the pipe

Time vs the individual species concentrations of the pipe at port_a and _b.

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.