#4582 closed enhancement (fixed)
Units of measure in output matlab file
Reported by: | massimo ceraolo | Owned by: | Lennart Ochel |
---|---|---|---|
Priority: | normal | Milestone: | 1.13.0 |
Component: | Run-time | Version: | |
Keywords: | Cc: |
Description
I have a tool which, among other things, can read Dymola and OM output (matlab) files and allows plotting, looking at numerical data, exporting selected variables, exporting plots of various types, doing post-processing (including fourier Analysis), etc.
It is intended to be used by people that want to share simulation results with others, which don't want to install large (as OM) or commercial (as Dymola) programs just to read and post-process outputs.
I will distribute this tool for free.
The only issue I currently have regards units of measure.
Dymola outputs units of measure appending them to the elements of the "description" matrix. OM does not.
Is it possible to do the same OM? This would avoid to distribute an additional output file (i.e. the xml) just to read units of measure.
Attachments (3)
Change History (17)
comment:1 by , 7 years ago
Summary: | Unist of measure in output matlab file → Units of measure in output matlab file |
---|
follow-up: 3 comment:2 by , 7 years ago
comment:3 by , 7 years ago
Replying to lochel:
I support this request. Can you elaborate how the extended description matrix should look like?
Very good!
I learned the mat file from Dymola and OM looking at the txt file produced by Dymola.
In enclose for instance a RL.mo, and the corresponding txt RL.txt as created by Dymola when requiring text output.
The structure of the mat file is practically identical, except for obvious difference and exchange rows<->columns. Moreover in the txt file there are comments that allowed me to understand the binary mat file structure.
You see that the rows (in the txt file) of description-matrix in dymola are the actual descriptions present in the mo file (see RL.png) with the addition of the units of measure within brackets.
I propose to replicate this in OM.
Naturally OM should be able to interpret this changed mat structure.
I mean, probably it should drop back again these units of measure when it reads mat files. I noted that OM is already capable to read dymolas's mat files, but does not retrieve the descriptions. Is this because it finds these units of measure at their end?
by , 7 years ago
by , 7 years ago
by , 7 years ago
comment:4 by , 7 years ago
@lochel
Are my information and the file supplied sufficient? Do I need to add something else?
Thanks.
comment:5 by , 7 years ago
Sorry, I missed your message. I think the information is sufficient. However, I will come back to you if needed.
First, I have to check if the unit information are available at runtime or not.
comment:6 by , 7 years ago
Owner: | changed from | to
---|---|
Status: | new → accepted |
I added unit information to the new mat file implementation that will be available soon: OMCompiler#1952.
comment:7 by , 7 years ago
@ceraolo Unit information are now available. Please do some testing if it works as expected.
comment:10 by , 7 years ago
I've checked. I can read units of measure of all variables very well.
However, I miss units of measure for parameters. As you can see they are present in RL.txt.
Can they be added as well?
Thank you.
comment:11 by , 7 years ago
Oops! You are right, I forgot to implement it for the parameters. Thanks for testing.
follow-up: 13 comment:12 by , 7 years ago
Unit information for parameters are now available (see OMCompiler#1964). However, I just realized that there are still no unit information for alias variables...
comment:13 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
Aliases are now handled as well (see OMCompiler#1965).
comment:14 by , 7 years ago
Everything is ok with RL-mo.
Just for those that are curious, my plotting and postprocessing tools can be retrieved from:
http://www.dsea.unipi.it/Members/ceraolow/Software/mcs-plotxy/
The Modelica-specific documentation is at page 47 of tutorial.pdf.
The same link will be available soon slso from the modelica.org Internet site.
A final note: OM shows as unit of measure of der(i) in RL "s-1.A", which is wrong (should be "A/s"
or A.s-1. But this is not directly related to this ticket, since this the unit I see also from OMEdit.
I support this request. Can you elaborate how the extended description matrix should look like?