[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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@ehu.es
94 601 8214

MAKINA ETA MOTOR TERMIKOAK SAILA/DEPARTAMENTO DE MÁQUINAS Y MOTORES TÉRMICOS


INGENIARITZA GOI ESKOLA TEKNIKOA/ESCUELA TÉCNICA SUPERIOR DE INGENIERÍA

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

F.: +34 946014283
www.ehu.es

Descripción: http://www.unibertsitate-hedakuntza.ehu.es/p268-content/es/contenidos/informacion/manual_id_corp/es_manual/images/firma_email_upv_euskampus_bilingue.gif

 

 

De: Safizadeh Mohammadreza [mailto:m.safizadeh@nus.edu.sg]
Enviado el: jueves, 04 de abril de 2013 5:56
Para: trnsys-users@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@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!