[TRNSYS-users] New Type development with very high number of parameters

Jeff Thornton thornton at tess-inc.com
Mon Jul 12 08:55:23 PDT 2021


 

George, 

You may also want to take a look at Type 49. It reads a large array from
an external data file. The one thing to keep in mind is the number of
your new types that will be allowed into a simulation. If it's only ever
just one then you can read in the array into a local storage array in
your new type. If it's more than one then you should store and retrieve
the array from the TRNSYS global array such that each instance gets the
correct data. 

Jeff 

---
Jeff Thornton
President - TESS LLC
3 N. Pinckney Street, Suite 202, Madison WI USA 53703
Office: (608) 274-2577 Fax: (608) 278-1475
www.tess-inc.com
E-Mail: thornton at tess-inc.com

On 07/12/2021 10:12 am, David BRADLEY via TRNSYS-users wrote: 

> George, 
> 
> I think that you are on the correct track with putting the parameter values into an external file that gets read during the start time manipulations section. Your Type could take a parameter that is the logical unit number of the data file containing the values then use pretty standard Fortran "open" and "read" commands to take the data from the file and insert it into whatever data structure you want inside your Type. I'd suggest looking at Type15 for some ideas on implementing the "open" and "read" commands. 
> 
> kind regards, 
> 
> David 
> 
> On 07/12/2021 07:44, George Kyriakarakos via TRNSYS-users wrote: 
> 
>> Hi to all! 
>> 
>> I am trying to develop a new type in TRNSYS. I have done this multiple times in the past successfully but this time I have 512 parameters to pass in the type (essentially an array of 16 lines x 32 columns). This data is calculated externally in MS Excel prior to running any simulation in TRNSYS. 
>> 
>> One approach I have thought about is to make all data in two columns in excel, use that file as an external file to the new type and during "Start Time" Manipulations to read the data and store them in the array I ultimately want to be accessible in the new type. If it gets in there it is easy to manipulate the data / include new arrays / etc. I would follow TYPE90 as a template in accomplishing this. This is not optimal though since I will have a very long list of data (512 lines) instead of having much less lines with more columns (this makes it easier to check as well). 
>> 
>> Is there any way to read a multi-columned external file? Is there a tutorial of some sort or a type I could follow as a template to develop this? 
>> 
>> Do you maybe have another suggestion on how to implement this? 
>> 
>> Thank you in advance, 
>> 
>> George 
>> 
>> -- 
>> 
>> Dr. George Kyriakarakos, Agricultural Engineer
>> PhD, MSc Energy Systems & Renewable Energy Sources
>> Agricultural University of Athens,
>> Dept. of Natural Resources and Agricultural Engineering
>> Iera odos street, 75, Athens 11855, Greece
>> Tel. +30.210.5294046 (direct), Fax:+30.210.5294023
>> Mobile +30.6942.046895
>> e-mail: gk at aua.gr 
>> 
>> Skype: georgekyriak 
>> 
>> _______________________________________________
>> TRNSYS-users mailing list
>> TRNSYS-users at lists.onebuilding.org
>> http://lists.onebuilding.org/listinfo.cgi/trnsys-users-onebuilding.org [1]
> 
> -- 
> ***************************
> David BRADLEY
> Principal
> Thermal Energy Systems Specialists, LLC
> 3 North Pinckney Street - suite 202
> Madison, WI 53703 USA
> 
> P:+1.608.274.2577
> d.bradley at tess-inc.com
> 
> http://www.tess-inc.com [2]
> http://www.trnsys.com [3]
> 
> _______________________________________________
> TRNSYS-users mailing list
> TRNSYS-users at lists.onebuilding.org
> http://lists.onebuilding.org/listinfo.cgi/trnsys-users-onebuilding.org [1]
 

Links:
------
[1]
http://lists.onebuilding.org/listinfo.cgi/trnsys-users-onebuilding.org
[2] http://www.tess-inc.com
[3] http://www.trnsys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/attachments/20210712/976e9a12/attachment.html>


More information about the TRNSYS-users mailing list