Safwan, 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. Regards, David On 8/21/2014 19:59, safwan ahmed wrote:
-- *************************** 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 d.bradley@tess-inc.com http://www.tess-inc.com http://www.trnsys.com |