Changes between Initial Version and Version 1 of Ticket #6243, comment 6


Ignore:
Timestamp:
2020-11-26T23:33:00Z (4 years ago)
Author:
Francesco Casella

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #6243, comment 6

    initial v1  
    2929    "Substance model to translate data into substance properties"
    3030     annotation (choicesAllMatching = true);
    31     constant Modelica.SIunits.MassFraction Xi_default[nXi]=ones(nXi);
    32     constant Modelica.SIunits.Density default_density = 1000;
     31    constant Modelica.SIunits.MassFraction Xi_default[nXi];
     32    constant Modelica.SIunits.Density default_density;
    3333
    3434    constant stateOfMatter.SubstanceData substanceData[nC]
     
    6060As long as the things that you are adding are compatible with the base class, it's going to be fine. You don't need to write an explicit extends statement for that.
    6161
     62The only thing I'm not sure about is if you can leave default_density without a binding in the base class and then add it in the "virtually extended" one. I guess so. Maybe @perost can comment on that.
     63
    6264This is for sure much better than copying and modifying the Water model from MSL. Although this is technically and legally possible, it is for sure not the best possibile solution.