- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » How to use tables to read and...
How to use tables to read and interpret data from files?
How to use tables to read and interpret data from files?
Hello,
i'm a real newbie with modelica and look for a clear example for the use of timetables/Combitimetables etc. because all i tried so far didn't work. I'm sure i misunderstood something in the documentations
Syntax: what should a call of the table look like? What should i do to make modelica read a column as a parameter or variable?...
What i want to do exactly is to use and simulate simple data from a csv-file, which includes two columns for time and velocity, both should be declared as parameters of the model. So you can find in the table at a given time t0 in the same row the velocity V(t0) and this is what the program at least should do and if possible give out -as well- the exacte derivative (acceleration at t0) for any t in the given time intervall. This should be a very simple task for modelica but somehow i have no (more) idea how to realize it
I tried avoiding using "tables" or the "DataFile-Library" by using the piecewise-function fom the book of Tiller but the compiler misses a derivative for the velocity-parameter, which was read from the csv-file as a column-variable .
Here is the check-message: "Check of VehicleModel_SA.TestVehiMod completed successfully. Class VehicleModel_SA.TestVehiMod has 10 equation(s) and 10 variable(s).
4 of these are trivial equation(s)."
But the SImulation shows only the first 0,02s with wrong results!
The model is working fine with "programmed" testentries, but once i try to read data from a file i can't simulate it or i get error messages! A simulation of the same file with dymola is giving the error message that a derivative of V is missing!
Ater this flop, i tried reading the (calculated) derivative from also fom a csv-file or calculating it by simple code again without any positiv result .
I tried my best to solve this problem in the presented ways, but couldn't succeed and hope you could give me some helpful hints or advices. All i ask for is a clear advice for one possibility to solve it either using tables or by directly reading data from file and put it in as parameters/variables of the model!
THANX in advance for any helpful Answer!
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » How to use tables to read and...