Problems with BufferStorage in OpenModelica
Created by: Labauke
What is the problem?
BufferStorage is not working in OpenModelica (tested with AixLib-example BufferStorageCharging). It causes the following errors:
- storage_Aixlib.heatTransfer: In modifier redeclare(Medium), class or component Medium not found in <AixLib.Fluid.Storage.BufferStorage$storage_Aixlib.HeatTransfer>.
--> can be fixed by redeclaring medium when heat transfer model is called in BufferStorage.mo L126: HeatTransfer heatTransfer**(redeclare package Medium = Medium)**
after fixing that, the following problem remains:
- Component storage_Aixlib.nLowerPorts of variability CONST has binding integer(max(AixLib.Utilities.Math.Functions.round(0.5 + storage_Aixlib.data.hLowerPorts * /Real/(storage_Aixlib.n) / storage_Aixlib.data.hTank, 0), 1.0)) of higher variability PARAM.
Why do we want to solve it?
- to maintain compatibility for OpenModelica
How do we want to solve it?
- in OpenModelica constants can't be computed from parameters whithin their definition. However, it is allowed within the equations section.