- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » External files
External files
Re: External files
Use external C functions:
Described in Peter Fritzson's book, section 9.4.
Or http://www.modelica.org/documents/ModelicaSpec32.pdf section 12.9 (and 12.9.7 for external objects if using those is simpler for you).
You can either declare it as parameter and read an array that you use in the simulation. Or open a file and read more data during some samples; depends on the problem.
- sjoelund.se
- 1700 Posts
Re: External files
Thanks, I'll study this!
It would be great if anybody could share both the modelica-code, C-code and table format required to read data at sample interval (eg. hourly meteo data) in the simulation. I'have absolutely no C-experience, so I'm reluctant to learn another language just for reading data into Modelica.
Regards,
Roel
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » External files