4

I started to use openmodelica few days ago. I created a lot of tables where Data is defrost efficiency, first row is Air temperature which is my first input and first column is Leaving water temperature from the condenser which is my second input. I created this kind of matrix for five humidity level and for 4 number of compressor so I have 20 matrix.

I would like to create a modelica block with 4 inputs:

  • Air temperature
  • Leaving water temperature
  • number of compressor
  • humidity level

and as output the defrost efficiency which is in the tables. Can someone help me please ?

I can't use the block CombiTable2dv which is in open modelica because i have 4 input and 20 tables. I found modelon article which speaks about a library but I don't know how to use it.

Priyanka
  • 559
  • 3
  • 13
dav
  • 41
  • 3
  • 1
    The SDF library mentioned by Markus A. is the newest version of the HDF5Table Library you linked in the paper. The library was renamed to SDF in the meantime. There are also Python and Matlab implementations available on https://github.com/ScientificDataFormat – marco Mar 18 '19 at 12:30
  • May you explain how to use NDTable block ? I created a SDF file using Dymola SDF Edtor but i don't manage to use it. Thanks you – dav Mar 19 '19 at 10:12
  • related: https://stackoverflow.com/questions/45736504/n-dimensional-linear-interpolation-on-external-table-in-modelica – matth Mar 28 '19 at 09:00

2 Answers2

4

In Dymola there is the (free) SDF library for this purpose. In case you don't have Dymola some information can be found here: SDF-Paper. For testing you can download a free demo here (you need to register).

Markus A.
  • 6,300
  • 10
  • 26
  • May you explain how to use NDTable block ? I created a SDF file using Dymola SDF Edtor but i don't manage to use it. Thanks you – dav Mar 19 '19 at 10:09
  • 1
    Did you take a look at the example in "SDF.Examples.TabledDiode"? Some things to consider: (1) nin corresponds to the numbers of scales you attached to the dataset, (2) if you already have the file it is easier to leave "readFromFile = true", (3) instead of the "loadResource" function you can use an absolute path, (4) datasets always start with a "/" – Markus A. Mar 19 '19 at 10:23
  • Thanks you for the help. I managed to use a 3-D Database. Now I would like to use a 4-D Database but I can't create it with Dymola SDF Editor because the max dimension is 3. In your opinion Should I use groupes to add a dimension, or try to generate a 4-D Database using Python or something else ? – dav Mar 20 '19 at 10:57
  • 1
    I would go for Python. There is a small but useful intro at https://github.com/ScientificDataFormat/SDF-Python. Manually going beyond 3D isn't very convenient anyway. As an alternative you can use MATLAB as well https://github.com/ScientificDataFormat/SDF-MATLAB. – Markus A. Mar 20 '19 at 11:24
  • 1
    Do you know if dymola can use unstructured tables indeed i have a dataframe where the values of a scale change with other parameter. For this reason I guess that I can't create a SDF file and so I can't use *SDF library. Can you advice me something ? – dav Mar 27 '19 at 12:24
  • Markus, could you comment on "free"? Is it free as in beer, or free as in speech? The code on github is BSD3, but it seems the C part and the Modelica part is missing. Is that available under an OSI certified license as well? – matth Mar 28 '19 at 09:03
  • Actually my "(free)" was referring to SDF coming with Dymola without additional cost, but as Dymola is coming with costs the whole package is not free. For the C and Modelica part: There is a discussion ongoing on the licensing. But I expect this to take quite some time... – Markus A. Apr 01 '19 at 07:10
2

N-dimensional table interpolation is missing in the Modelica Standard Library indeed. The developers are aware of the need and discussed it previously, however could not converge towards some data input format for multi-dimensional arrays. What would your requirement (or even proposal) be like?

tbeu
  • 1,235
  • 7
  • 12