Search code examples
pipefluidmodelica

Dynamic pipe in Modelica


I can't understand the benefit of the nNodes parameter in the .Modelica.Fluid.Pipes.DynamicPipe component. How can we choose this parameter and from the point of view of physics, what does it mean?

Now, i`m trying to realize, how this model works to use it in my project.


Solution

  • nNodes determines the order of the dynamic response — for instance for a change in inlet temperature.

    Setting nNode=1 gives a first-order response where the outlet temperature starts rising immediately after a step change in input temperature. This is also the case if the pipe is very long.

    Setting nNodes=200 gives a 200th order response which looks like a time delay followed by a steeper rise in outlet temperature. This is closer to the true physical response of a (long) pipe where you would expect a delayed response depending on pipe length and flow velocity. A high value of nNodes increases computational time, so you should make a tradeoff between physical accuracy (if this aspect is important for your application) and computational speed.

    In either case the pipe time constant is almost identical.

    Alternative pipe models, such as the PlugFlowPipe model in Modelica Buildings Library implement the delay with the spatialDistribution operator which reduces the model order and is suitable for "transmission line" pipe models.

    The figures below shows the effect of varying nNodes between 1 and 200. The number of equations in the model varies between 149 and 13283.

    Diagram Step responses