ThermofluidStream
ThermofluidStream copied to clipboard
Use 'redeclare' instead of 'final redeclare' for FluidConstants
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 fluidConstantsin classThermofluidStream.Media.myMedia.IdealGases.Common.SingleGasNasa. - Attempted modification at component context:
ThermofluidStream.Media.myMedia.Air.DryAirNasa.fluidConstantsinThermofluidStream.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.
There are principally two possible solutions:
- short way: delete
finalin redeclaration ofFluidConstantsinTFS.Media.myMedia.IdealGases.Common.SingleGasNasa - more effort but reliable: copy
Modelica.Mediaof the next MSL release intoTFS.Media.myMedia- since the "final redeclare" issue was resolved in https://github.com/modelica/ModelicaStandardLibrary/pull/3764. This is even reasonable when https://github.com/modelica/ModelicaStandardLibrary/pull/3825 would be merged and then the mass fraction function becomes standard inModelica.Mediapackage.
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.