<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Safwan,<br>
      You need to modify your Matlab code so that it keeps track of
    previous values of the pond's temperature. The TRNSYS kernel has
    some features in it that will allow you to store values that your
    component calculates from timestep to time step. If you want to
    write your Type in Matlab, you have to recreate that functionality.
    In writing the code make sure that you only update the last
    calculated values at the end of a time step and that you base your
    calculations on the value computed at the end of the previous time
    step and not on the value calculated during the last iteration.<br>
    Regards,<br>
     David<br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 8/21/2014 19:59, safwan ahmed wrote:<br>
    </div>
    <blockquote
      cite="mid:1408669161.65289.YahooMailNeo@web160804.mail.bf1.yahoo.com"
      type="cite">
      <div style="color:#000; background-color:#fff;
        font-family:HelveticaNeue-Light, Helvetica Neue Light, Helvetica
        Neue, Helvetica, Arial, Lucida Grande,
        sans-serif;font-size:10pt">
        <div style="" class="">Dear All,</div>
        <div style="" class=""><br style="" class="">
        </div>
        <div class="" style="color: rgb(0, 0, 0); font-size: 13.3333px;
          font-family: HelveticaNeue-Light,Helvetica Neue
          Light,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;
          background-color: transparent; font-style: normal;">I try to
          simulate solar pond connected to absorption chiller with
          building, so I wrote Matlab code for solar pond which is solve
          a transient partial differential equation for heat transfer
          through it. That's mean there is a heat storage in solar pond
          with delay time.</div>
        <div class="" style="color: rgb(0, 0, 0); font-size: 13.3333px;
          font-family: HelveticaNeue-Light,Helvetica Neue
          Light,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;
          background-color: transparent; font-style: normal;">Solar
          pond's output temperature is the result of accumulate
          temperature with time at each time step. <br>
        </div>
        <div class="" style="color: rgb(0, 0, 0); font-size: 13.3333px;
          font-family: HelveticaNeue-Light,Helvetica Neue
          Light,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;
          background-color: transparent; font-style: normal;">I studied
          the example in Trnsys which is used to call solar collector
          Matlab code, however it is quite simple just to calculate
          collector's outlet temperature and useful heat from algebraic
          equations.</div>
        <div class="" style="color: rgb(0, 0, 0); font-size: 13.3333px;
          font-family: HelveticaNeue-Light,Helvetica Neue
          Light,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;
          background-color: transparent; font-style: normal;"><br
            style="" class="">
        </div>
        <div class="" style="color: rgb(0, 0, 0); font-size: 13.3333px;
          font-family: HelveticaNeue-Light,Helvetica Neue
          Light,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;
          background-color: transparent; font-style: normal;">Could you
          please advise me to solve this problem, any information will
          help me for that and if you have any  documents in details
          related to calling Matlab and close to my problem, I will be
          appreciate that.</div>
        <div class="" style="color: rgb(0, 0, 0); font-size: 13.3333px;
          font-family: HelveticaNeue-Light,Helvetica Neue
          Light,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;
          background-color: transparent; font-style: normal;"><br>
        </div>
        <div class="" style="color: rgb(0, 0, 0); font-size: 13.3333px;
          font-family: HelveticaNeue-Light,Helvetica Neue
          Light,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;
          background-color: transparent; font-style: normal;">I look
          forward to hearing from you soon.</div>
        <div class="" style="color: rgb(0, 0, 0); font-size: 13.3333px;
          font-family: HelveticaNeue-Light,Helvetica Neue
          Light,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;
          background-color: transparent; font-style: normal;"><br>
        </div>
        <div class="" style="color: rgb(0, 0, 0); font-size: 13.3333px;
          font-family: HelveticaNeue-Light,Helvetica Neue
          Light,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;
          background-color: transparent; font-style: normal;">Regards,</div>
        <div class="" style="color: rgb(0, 0, 0); font-size: 13.3333px;
          font-family: HelveticaNeue-Light,Helvetica Neue
          Light,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;
          background-color: transparent; font-style: normal;">Safwan
          Kanan</div>
        <div class="" style="color: rgb(0, 0, 0); font-size: 13.3333px;
          font-family: HelveticaNeue-Light,Helvetica Neue
          Light,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;
          background-color: transparent; font-style: normal;">The
          University of Manchester, UK<br>
        </div>
        <div class="" style="color: rgb(0, 0, 0); font-size: 13.3333px;
          font-family: HelveticaNeue-Light,Helvetica Neue
          Light,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;
          background-color: transparent; font-style: normal;"> </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
TRNSYS-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:TRNSYS-users@lists.onebuilding.org">TRNSYS-users@lists.onebuilding.org</a>
<a class="moz-txt-link-freetext" href="http://lists.onebuilding.org/listinfo.cgi/trnsys-users-onebuilding.org">http://lists.onebuilding.org/listinfo.cgi/trnsys-users-onebuilding.org</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
***************************
David BRADLEY
Principal
Thermal Energy Systems Specialists, LLC
22 North Carroll Street - suite 370
Madison, WI  53703 USA

P:+1.608.274.2577
F:+1.608.278.1475
<a class="moz-txt-link-abbreviated" href="mailto:d.bradley@tess-inc.com">d.bradley@tess-inc.com</a>

<a class="moz-txt-link-freetext" href="http://www.tess-inc.com">http://www.tess-inc.com</a>
<a class="moz-txt-link-freetext" href="http://www.trnsys.com">http://www.trnsys.com</a></pre>
  </body>
</html>