[TRNSYS-users] Calling Matlab

David BRADLEY d.bradley at tess-inc.com
Mon Aug 25 09:58:32 PDT 2014


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:
> Dear All,
>
> 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.
> Solar pond's output temperature is the result of accumulate 
> temperature with time at each time step.
> 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.
>
> 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.
>
> I look forward to hearing from you soon.
>
> Regards,
> Safwan Kanan
> The University of Manchester, UK
>
>
> _______________________________________________
> TRNSYS-users mailing list
> TRNSYS-users at lists.onebuilding.org
> http://lists.onebuilding.org/listinfo.cgi/trnsys-users-onebuilding.org

-- 
***************************
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 at tess-inc.com

http://www.tess-inc.com
http://www.trnsys.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/attachments/20140825/69f5685b/attachment-0002.htm>


More information about the TRNSYS-users mailing list