Search code examples
modelicaopenmodelica

Should the number of nodes (nNodes) divided by the length of the dynamic pipe be greater than 1?


I've been using Open Modelica for a few months now, primarily modeling thermo-hydraulic systems. I've noticed that when the ratio of the pipe's length to the number of nodes (nnodes) in the dynamic pipe is less than 1, the model fails to initialize and displays the error "error 0xfffffffffffffff." Have you encountered this issue as well?


Solution

  • The short answer is no. The pipe length and discretization do not depend on each other and there is no problem in having, e.g., a 0.01 metre pipe discretized into 100 nodes.

    However, (and this is not clear from your question), if you are referring to a Modelica.Fluid.Pipes.DynamicPipe then there is a constraint between the parameters nNodes and modelStructure:

    If you choose modelStructure=av_vb the value of nNodes must be at least 2, since the pipe model contains (at least) one volume model at each fluidPort. As the default value of modelStructure is av_vb one can easily set nNodes to 1 without considering this constraint.