[TRNSYS-users] How to call all inputs at the same time in MATLAB?

Safizadeh Mohammadreza m.safizadeh at nus.edu.sg
Thu Apr 4 20:43:58 PDT 2013

Dear Ivan
Many thanks for kind email.
Indeed, I want TRNSYS-MATLAB to link with each other; means Matlab processes the all inputs (6000 data for each input) at the same time from previous Type, and gives all data as outputs to next Type.
Reza Safi
NUS, Singapore

From: Ivan Flores Abascal [mailto:ivan.flores at ehu.es]
Sent: Thursday, April 04, 2013 8:25 PM
To: 'TRNSYS users mailing list at the Solar Energy Lab, UW-Madison'
Subject: Re: [TRNSYS-users] How to call all inputs at the same time in MATLAB?

Dear Reza:

If the inputs from TRNSYS are independent of the outputs from MATLAB, one solution could be this one:
Run the case in TRNSYS and export the results (e.g. T_ambient) to a xls file.
Load the data with MATLAB and make the mathematical process.
Write the results  from Matlab in another xls file.

If you need to postprocess these data in TRNSYS, you can read them from the xls file and run again the project.

Sure there is a better way to do it, but this manner is quite simple and fast, and you do not need to change your case a lot.

Best regards

Ivan Flores Abascal
Lecturer of heat transfer
ivan.flores at ehu.es<mailto:ivan.flores at ehu.es>
94 601 8214


Alameda Urkijo s/n| 48013 BILBAO
T.: +34 946014028|
F.: +34 946014283

[cid:image001.gif at 01CE31F2.DC3A7BB0]

De: Safizadeh Mohammadreza [mailto:m.safizadeh at nus.edu.sg]
Enviado el: jueves, 04 de abril de 2013 5:56
Para: trnsys-users at cae.wisc.edu<mailto:trnsys-users at cae.wisc.edu>
Asunto: [TRNSYS-users] How to call all inputs at the same time in MATLAB?

Dear all TRNSYS users and Happy Spring;

If I use Matlab code alone, I can load my whole data e.g T_ambient (every second) as my input data (6000) using "Load" command; and since I use some partial difference equations, I interpolate these 6000 data base on very small time step (dt=0.01 second). Thereafter, Matlab processes these 600,000 data in "for loop" and produces the outputs at the end of "for loop".

My problems is that: If I link Matlab and TRNSYS together:

base on my initial understanding from Trnsys's example, Trnsys call Only "one data" in each time step and process that only input to produce only one output. I want Trnsys to call all my data (6000) (like load command in Matlab) and pass these 6000 data to Matlab, and get 6000 output data from Matlab after mathematical process. Exactly like the command "Load" in Matlab to call my all inputs.

I am looking your favorable email very soon :)

Sincerely Yours

Reza Safi ;

PhD Condidate :: NGS - NUS Graduate School for Integrative Sciences and Engineering :: National University of Singapore, m.safizadeh at nus.edu.sg<mailto:m.safizadeh at nus.edu.sg> (E) :: https://sites.google.com/site/safizadehedu/ (w)

Important: This email is confidential and may be privileged. If you are not the intended recipient, please delete it and notify us immediately; you should not copy or use it for any purpose, nor disclose its contents to any other person. Thank you.

 P Let's Go Green... Please think before you print!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/attachments/20130405/501644eb/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 6359 bytes
Desc: image001.gif
URL: <http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/attachments/20130405/501644eb/attachment-0001.gif>

More information about the TRNSYS-users mailing list