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 'redeclare' instead of 'final redeclare' for FluidConstants #72

Open
tobolar opened this issue Mar 7, 2023 · 1 comment
Open

Use 'redeclare' instead of 'final redeclare' for FluidConstants #72

tobolar opened this issue Mar 7, 2023 · 1 comment
Labels
p::Media Concerns package Media

Comments

@tobolar
Copy link
Contributor

tobolar commented Mar 7, 2023

Dymola's pedantic check complains the following.

Use 'redeclare' instead of 'final redeclare', since there are modifiers for components of the class FluidConstants.

  • Component declared as FluidConstants fluidConstants in class ThermofluidStream.Media.myMedia.IdealGases.Common.SingleGasNasa.
  • Attempted modification at component context: ThermofluidStream.Media.myMedia.Air.DryAirNasa.fluidConstants in ThermofluidStream.Media.myMedia.Air.DryAirNasa (and a plenty of single gas models).

Problem detected in (actually where DryAirNasa is used, not necessary to change the following models):

  • ThermofluidStream.ThermofluidStream.Examples.SimpleGasTurbine.mo, line 5
  • ThermofluidStream.ThermofluidStream.Examples.SimpleCoolingCycle.mo, line 9
  • ThermofluidStream.ThermofluidStream.Examples.VaporCycle.mo, line 5
  • etc.

Possible solution: deleting final in redeclaration of FluidConstants in class Media.myMedia.IdealGases.Common.SingleGasNasa could fix the problem.

@tobolar tobolar added this to the next_minor milestone Mar 7, 2023
@tobolar
Copy link
Contributor Author

tobolar commented Jul 31, 2023

There are principally two possible solutions:

  1. short way: delete final in redeclaration of FluidConstants in TFS.Media.myMedia.IdealGases.Common.SingleGasNasa
  2. more effort but reliable: copy Modelica.Media of the next MSL release into TFS.Media.myMedia - since the "final redeclare" issue was resolved in Do not use redeclare final here either. modelica/ModelicaStandardLibrary#3764. This is even reasonable when Add mass fraction functions to Modelica.Media modelica/ModelicaStandardLibrary#3825 would be merged and then the mass fraction function becomes standard in Modelica.Media package.

Which of the two solutions will be realized depends on when MSL and TFS will be released, and shall be decided right before the next TFS release.

@tobolar tobolar added the p::Media Concerns package Media label Sep 6, 2023
@tobolar tobolar modified the milestones: 1.1.0, next-MINOR-version Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p::Media Concerns package Media
Projects
None yet
Development

No branches or pull requests

1 participant