[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TRNSYS-users] Repeating reading weather files



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:

 Dear, TRNSYS users (Cramer Silkworth &Matt Duffy).

 

I have created a new component in FORTRAN that is used for passive cooling of building and it is applied on the roof. The problem that I face is the following:

Every 24 hours the kernel of the new component computes the heat flux of the day (Qday). The calculations for the same day has to be repeated (again from 0:00+dt to 24:00) until the relative deviation of the calculated Qday between two adjacent iterant calculations to be found less than 1%. How can I modify the kernel of my new component in order to read again for the same day the same climatic data (in order to calculate the new Qday until the relative deviation reaches 1%).

 

The component used for reading the weather file is type109-TMY2 and the form of weather file is *.tm2.

 

Thank you for your very helpful advice!

 

Best regards,

 

Artemi Spanaki



Discover the new Windows Vista Learn more!

_______________________________________________ TRNSYS-users mailing list TRNSYS-users@cae.wisc.edu https://www-old.cae.wisc.edu/mailman/listinfo/trnsys-users

-- 
***********************************************************************
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

***********************************************************************