[TRNSYS-users] Repeating reading weather files

David Bradley bradley at tess-inc.com
Thu Feb 19 07:10:36 PST 2009


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! 
> <http://search.msn..com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE>
> ------------------------------------------------------------------------
>
> _______________________________________________
> TRNSYS-users mailing list
> TRNSYS-users at 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 at tess-inc.com 
Web Pages:  http://www.tess-inc.com    and      http://www.trnsys.com

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/attachments/20090219/4fb180bd/attachment-0001.htm>


More information about the TRNSYS-users mailing list