Group Abstract Group Abstract

Message Boards Message Boards

0
|
2.6K Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:

Bespoke Modelica.Fluid.DynamicPipe model

Posted 1 year ago
POSTED BY: Chris Benson

Hello Chris,

For my answer I will assume that w2DynamicPipe1 is the result of duplicating Modelica.Fluid.Pipes.DynamicPipe in Model Center, since something seem to have gone wrong with the code you included.

You are receiving the following error message:

Error: Modelica.Fluid.Interfaces.PartialDistributedVolume [34:5-34:5] Invalid instantiation. Modelica.Media.Interfaces.PartialMedium.BaseProperties is partial.

w2DynamicPipe1 depends on Modelica.Fluid.Pipes.BaseClasses.PartialTwoPortFlow which itself depends on Modelica.Fluid.Interfaces.PartialDistributedVolume.

This last model contains a replaceable package definition, which is meant to represent the Medium used in the model. This package, in turn, is used to find the definition of a model representing the BaseProperties of the given medium.

In Modelica.Fluid.Interfaces.PartialDistributedVolume, package Medium is initialised to Modelica.Media.Interfaces.PartialMedium which is just a place holder medium, and whose BaseProperties definition is partial.

I suspect you received the previous error, because when using w2DynamicPipe1 you didn't specify a concrete medium to use. In other words, in the model where you want to use a DynamicPipe you should have a line that looks like the following: w2DynamicPipe1 pipe (redeclare package Medium = Modelica.Media.Water); That is, of course, using the appropriate medium for your model.

I may be mistaken though, if so, could you share a sample of how you used w2DynamicPipe1 in your model?

POSTED BY: Quentin Lambert
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard