Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

Want to use record in HX Model as "input" class

Want to use record in HX Model as "input" class

Hello,

I want to create a Plate Heat Exchanger Model by modifying the Default HX Model in Modelica.Fluid. I've modified subclasses and created a record, which contains all relevant geometrical data. These should get connected with the model HeatExchangerSimulation. For example instead of



model HeatExchangerSimulation
  "simulation for the heat exchanger model"

extends Modelica.Icons.Example;

replaceable package Medium =
      Modelica.Media.Water.StandardWaterOnePhase;
      //replaceable package Medium = Modelica.Media.Water.StandardWater;
      //package Medium = Modelica.Media.Incompressible.Examples.Essotherm650;

     Fluid_Test1_PHE_Temp6.Examples.HeatExchanger.BaseClasses.BasicHX HEX(
     c_wall=500,
   ...
   ...

end HeatExchangerSimulation;


there is written now:


model HeatExchangerSimulation
  "simulation for the heat exchanger model"

extends Modelica.Icons.Example;

replaceable package Medium =
      Modelica.Media.Water.StandardWaterOnePhase;
      //replaceable package Medium = Modelica.Media.Water.StandardWater;
      //package Medium = Modelica.Media.Incompressible.Examples.Essotherm650;

     Fluid_Test1_PHE_Temp6.Examples.HeatExchanger.BaseClasses.BasicHX HEX(
     c_wall=PHE_DATA.c_wall,
   ...
   ...

end HeatExchangerSimulation;


("PHE_DATA " is the shortcut of the Modelica path to the record)


But when I let check the model, it tells me, that c_wall is in conflict with an earlier definition. Is there a method to create a kind of hierarchy, where declarations can be overridden?

My intention was, to controll the model from one point (the record) and not to spread all input varibles in subclasses of the model.


Cheers
Georg

There are 0 guests and 0 other users also viewing this topic
You are here: