<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-7" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Artemi,<br>
  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. <br>
<br>
 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) <i>but only at the end of the day</i>, 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.<br>
<br>
 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.<br>
<br>
 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...<br>
Kind regards,<br>
 David<br>
<br>
<br>
<br>
Artemi Spanaki wrote:
<blockquote cite="mid:BAY114-W34CE225713B7A295503CE2C7B20@phx.gbl"
 type="cite">
  <style>
..hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
  </style>
  <p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-indent: 27pt;"><span
 style="" lang="EN-US"><font size="3"><font color="#000000"><font
 face="Times New Roman"> </font></font></font></span><font size="3"><font
 color="#000000"><font face="Times New Roman"><span style=""
 lang="EN-US">Dear, TRNSYS users</span><span style="" lang="EN-US">
(Cramer Silkworth &Matt Duffy</span><span style="" lang="EN-US">).<o:p></o:p></span></font></font></font></p>
  <p class="MsoNormal"
 style="margin: 0cm 0cm 0pt; text-indent: 27pt; text-align: justify;"><span
 style="" lang="EN-US"><font size="3"><font color="#000000"><font
 face="Times New Roman"> <o:p></o:p></font></font></font></span></p>
  <p class="MsoNormal"
 style="margin: 0cm 0cm 0pt; text-indent: 27pt; text-align: justify;"><span
 style="" lang="EN-US"><font size="3"><font color="#000000"><font
 face="Times New Roman">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:<o:p></o:p></font></font></font></span></p>
  <p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><font size="3"><font
 color="#000000"><font face="Times New Roman"><span style=""
 lang="EN-US">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 </span><span style="" lang="EN-US">repeated (again from 0:00+dt
to 24:00) until the relative deviation of the calculated Q</span><span
 style="" lang="EN-US">day </span><span style="" lang="EN-US">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%).<o:p></o:p></span></font></font></font></p>
  <p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span style=""
 lang="EN-US"><font size="3"><font color="#000000"><font
 face="Times New Roman"> <o:p></o:p></font></font></font></span></p>
  <p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span style=""
 lang="EN-US"><font size="3"><font color="#000000"><font
 face="Times New Roman">The component used for reading the weather file
is type109-TMY2 and the form of weather file is *.tm2.<o:p></o:p></font></font></font></span></p>
  <p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span style=""
 lang="EN-US"><font size="3"><font color="#000000"><font
 face="Times New Roman"> <o:p></o:p></font></font></font></span></p>
  <p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><font size="3"><font
 color="#000000"><font face="Times New Roman"><span style=""
 lang="EN-US">Thank you for your very helpful advice!</span><span
 style="" lang="EN-US"><o:p></o:p></span></font></font></font></p>
  <p class="MsoNormal"
 style="margin: 0cm 0cm 0pt; text-indent: 27pt; text-align: justify;"><span
 class="ec968122615-13012009"><span style="" lang="EN-US"><font size="3"><font
 color="#000000"><font face="Times New Roman"> <o:p></o:p></font></font></font></span></span></p>
  <p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span
 class="ec968122615-13012009"><span style="" lang="EN-US"><font size="3"><font
 color="#000000"><font face="Times New Roman">Best regards,<br style="">
  <br style="">
  <o:p></o:p></font></font></font></span></span></p>
  <p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span
 class="ec968122615-13012009"><span style="" lang="EN-US"><font size="3"><font
 color="#000000"><font face="Times New Roman"> <o:p></o:p></font></font></font></span></span></p>
  <p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span
 class="ec968122615-13012009"><span style="" lang="EN-US"><font
 color="#000000" face="Times New Roman" size="3">Artemi Spanaki</font></span></span><span
 class="ec968122615-13012009"><span style="" lang="EN-US"><o:p></o:p></span></span></p>
  <br>
  <hr>Discover the new Windows Vista <a moz-do-not-send="true"
 href="http://search.msn..com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE"
 target="_new">Learn more!</a>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
TRNSYS-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:TRNSYS-users@cae.wisc.edu">TRNSYS-users@cae.wisc.edu</a>
<a class="moz-txt-link-freetext" href="https://www-old.cae.wisc.edu/mailman/listinfo/trnsys-users">https://www-old.cae.wisc.edu/mailman/listinfo/trnsys-users</a>
  </pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">-- 
***********************************************************************
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: <a class="moz-txt-link-abbreviated" href="mailto:bradley@tess-inc.com">bradley@tess-inc.com</a> 
Web Pages:  <a class="moz-txt-link-freetext" href="http://www.tess-inc.com">http://www.tess-inc.com</a>    and      <a class="moz-txt-link-freetext" href="http://www.trnsys.com">http://www.trnsys.com</a>

***********************************************************************</pre>
</body>
</html>