Artemi, I think I can see two ways of doing this - the idea of both approaches is that over the course of the simulation day, you need to store hourly (or timesteply) values of all the weather data that your Type cares about. Then, on the next simulation day, all of that data needs to get overwritten by the new day's weather data. One approach would be to modify your existing Type so that it takes the weather data directly as inputs and stores each value for each hour (or timestep) using the "SetStorageVars()" routine. Use the stored weather values for your iterative calculations with the "GetStorageVars()" routine. Then on the "post convergence" call (when INFO(13) = 1) but only at the end of the day, wipe out all the weather data for the day and start over again. Be careful here because there is of course a post-convergence call after each timestep and you do not want to wipe out the stored data until a new day has started. The other approach is basically the same but avoids the calls to "setStorageVars()" and "getStorageVars()." You would create another Type that takes the weather data and writes an output file containing hourly (or timesteply) values of the weather data that your Type needs. Then your existing component would read that file (it would already be open) as many times as it needs in order to make its iterative calculation, then delete the data once it had arrived at a value of Qday. I am sure that there are some things that I have not thought of and perhaps even some reasons why the above approaches would not work but hopefully they or something like them will... Kind regards, David Artemi Spanaki wrote:
-- *********************************************************************** Thermal Energy System Specialists (TESS), LLC David BRADLEY 22 N. Carroll Street - Suite 370 Partner Madison, WI 53703 USA P: +1.608.274.2577 F: +1.608.278.1475 E-mail: bradley@tess-inc.com Web Pages: http://www.tess-inc.com and http://www.trnsys.com *********************************************************************** |