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

use of "abstract" classes #50

Open
dietmarw opened this issue Jun 19, 2023 · 2 comments
Open

use of "abstract" classes #50

dietmarw opened this issue Jun 19, 2023 · 2 comments
Labels
rewrite Something that requires a rewrite of existing models
Milestone

Comments

@dietmarw
Copy link
Collaborator

@boerrebj: Abstract classes (partial classes in Modelica terminology) are useful for collecting common parts of multiple detailed models. As
an example,

  • AbstractPipe basis class for both rigid water column pipe as well as elastic
    water pipe
  • AbstractValve basis class for different types of valves
  • AbstractTurbine basis class for different turbine types
@dietmarw dietmarw added the rewrite Something that requires a rewrite of existing models label Jun 19, 2023
@dietmarw dietmarw added this to the v3.0.0 milestone Jun 19, 2023
@dietmarw
Copy link
Collaborator Author

I would probably tend to call those:

  • BasePipe
  • BaseValve
  • BaseTurbine

@boerrebj
Copy link
Collaborator

boerrebj commented Jun 19, 2023

One possible alternative could be:
AbstractTwoPortElement ->

  • AbstractPipe
  • AbstractSingularLossElement (typical for trash racks, contractions/expansions etc.)
  • AbstractControlledElement (typical for both gates and valves)
  • AbstractTurbine

@dietmarw dietmarw reopened this Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rewrite Something that requires a rewrite of existing models
Projects
None yet
Development

No branches or pull requests

2 participants