Group Abstract Group Abstract

Message Boards Message Boards

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

Bespoke Modelica.Fluid.DynamicPipe model

Posted 1 year ago

Hi,
I am need to modify the Fluid.DynamicPipe model for a specific application (it cannot be done with the flow model, but needs to be the DynamicPipe).
While this was easy enough with MSL3.x where I could just make a copy in my local MSL and modify it there. With this, the extends worked nicely. Yet with MSL4.x, one cannot modify the library.

This leaves me having to make a local copy in my own model structure. It is here that issues arrive. The my modified code is below. With the changes I made, I would expect the compiler to look at the original MSL4.x models as needed, but it doesn’t seem to want to - if returns the message below. Could anyone suggest a solution?

Note that PartialStraightPipe, PartialTwoPortFlow, PartialStraightPipe, PartialTwoPort, PartialDistributedVolume do not need to be modified.
I would like to use my own FlowModels and HeatTransfer models, but this is the next stage. - yet guidance would be helpful.


model w2DynamicPipe1 "Dynamic pipe model with storage of mass and energy"
  import Modelica.Fluid.Types.ModelStructure;
  // extending PartialStraightPipe
  extends Modelica.Fluid.Pipes.BaseClasses.PartialStraightPipe(final port_a_exposesState = modelStructure == ModelStructure.av_b or modelStructure == ModelStructure.av_vb, final port_b_exposesState = modelStructure == ModelStructure.a_vb or modelStructure == ModelStructure.av_vb);
  // extending PartialTwoPortFlow
  extends Modelica.Fluid.Pipes.BaseClasses.PartialTwoPortFlow (final lengths = fill(length / n, n), final crossAreas = fill(crossArea, n), final dimensions = fill(4 * crossArea / perimeter, n), final roughnesses = fill(roughness, n), final dheights = height_ab * dxs);
  // Wall heat transfer

[86] 12:23 Validation of w2DynamicPipe1 finished
Notification: Modelica.Fluid.Interfaces.PartialTwoPort [3:5-3:5] Missing inner. Outer declaration system is missing a corresponding inner declaration. An inner declaration will be added using the outer declaration.
Error: Modelica.Fluid.Interfaces.PartialDistributedVolume [34:5-34:5] Invalid instantiation. Modelica.Media.Interfaces.PartialMedium.BaseProperties is partial.
Validation of model w2_Models.w2pipes.w2DynamicPipe1 completed with 1 error.

Thanks for the help.

POSTED BY: Chris Benson
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