Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parameterization of port placement for interface classes in Fluid #1781

Open
AntoineGautier opened this issue Aug 29, 2023 · 4 comments · Fixed by #1782
Open

Parameterization of port placement for interface classes in Fluid #1781

AntoineGautier opened this issue Aug 29, 2023 · 4 comments · Fixed by #1782
Assignees

Comments

@AntoineGautier
Copy link
Contributor

This is a feature enhancement request to allow specifying the location for outside connectors in interface classes.
Currently, if one want to increase the icon size when extending such classes the only option is using IconMap.
However, this rescales the connector icons as well and connection lines in the diagram layer are also improperly set by some Modelica tools like in the screenshot below (Dymola diagram view).

Capture d’écran 2023-08-28 à 10 09 38

For instance the Fluid.Interfaces.PartialTwoPort will be modified with:

  constant Integer port_a_x = -100
    "x-coordinate of port_a center";
  constant Integer port_a_y = 0
    "y-coordinate of port_a center";

  Modelica.Fluid.Interfaces.FluidPort_a port_a
    ...
    "Fluid connector a (positive design flow direction is from port_a to port_b)"
    annotation (Placement(transformation(extent={{port_a_x-10,port_a_y-10},{port_a_x+10,port_a_y+10}})));

(Using a constant instead of a parameter does not result in any change in the parameter dialogs and the constant is not part of an FMU export.)

The modifications are backward compatible.

@justnielsen
Copy link

As a side note, I reported the Dymola icon drawing bug in April. I have been told that it has been corrected and that the fix will be available in Dymola 2024x

@mwetter
Copy link
Contributor

mwetter commented Aug 29, 2023

This would be a good addition in the base classes.

@AntoineGautier AntoineGautier changed the title Parameterization of port location for interface classes in Fluid Parameterization of port placement for interface classes in Fluid Sep 2, 2023
@AntoineGautier AntoineGautier reopened this Feb 7, 2024
@AntoineGautier
Copy link
Contributor Author

AntoineGautier commented Feb 7, 2024

Reopening this issue as the changes that were implemented in #1782 and then reverted due to a bug in Dymola 2023 (#1795) are now fully supported by Dymola 2024x.

@AntoineGautier
Copy link
Contributor Author

@justnielsen On a side note, after initial testing, it seems that the bug with IconMap and DiagramMap has not been fixed in Dymola 2024x. Incorrect graphical annotations are generated when connecting connectors which placement has been modified with IconMap or DiagramMap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants