[TRNSYS-users] dynamic data

Flore Marion fmarion at andrew.cmu.edu
Wed Apr 22 16:35:16 PDT 2009


Dear Trnsys users,
I  am getting lost!

I want to built a component that read 3 external files based on 
experimental results of cogeneration system.

I have values for 2 modes  of operation : winter of summer ( represented 
by a hot water set point value 40 or 90C).
for 3 different building load for each mode ( 20000  50000 80000 in 
winter and in summer).
and for 4 different electric power production of the nominal power ( 25 
50 75 100%) for 3 building load for each mode.
I end up with a 24 rows by 14 column that I cut in 3 table of 24 rows 
and 5, 4 and 5 columns

the hot water value will either be 40 or 90 the model does not have to 
interpolate value in between.
I actually tried several component to read in one file with 14 Y,
2 files with 9Y and 5 Z,
 and 3 files with 5Y 4Z and 5W,
 all runs but don t read values correctly
I kept the same NX and X since they are the same for the 2 files
Q1 : is that a mistake ?
Q2 : some one has an example of a more complicated component ( more than 
2 X)than the one in the manual that I could try to identify to ?
Q3 :it seems like it does not read the value for 90 and give the last 
line of 40 instead ,even if I put 90 as an input . Is there something in 
the external file about jumping lines or punctuation sign that I don t 
see ??
Q4: I assigned a different number my self in the studio, in the 
parameters  section to each logical unit , I feel like TRNSYS does it 
automatically for the component already existing . should I add a line 
in the code to get TRNSYS to assign a logical number, instead of the one 
that I picked ??
Q5: is there a typo  in the manual or not ? I have read about that in 
former trnsys users email but I am not sure if that s true


here is a part of the code
    INTEGER NX(3)
    DOUBLE PRECISION X(3),Y(5),Z(4),W(5)

    NX(1)=4
    NX(2)=3
    NX(3)=2
    X(1)=elec_load_percent
    X(2)=bldg_load
    X(3)=hot_water_set_point_temp

      CALL DYNAMICDATA(LU_1,2,NX,5,X,Y,INFO,*10)
         CALL LINKCK('TYPE 274','DYNAMICDATA',1,274)
10       IF(ErrorFound()) RETURN 1
C        Co engine inlet temperature
        CO_ENGINE_IN_T=Y(1)
C         Co engine Flow rate
        CO_ENGINE_FR=Y(2)
    ......
    CALL DYNAMICDATA(LU_2,2,NX,4,X,Z,INFO,*20)
         CALL LINKCK('TYPE 274','DYNAMICDATA',1,274)
20       IF(ErrorFound()) RETURN 1

 C         Co HX outlet temperature
        CO_HX_OUT_T=Z(1)
C         Co radiator inlet temperature
        CO_RAD_IN_T=Z(2)

      CALL DYNAMICDATA(LU_3,2,NX,5,X,W,INFO,*30)
         CALL LINKCK('TYPE 274','DYNAMICDATA',1,274)
30       IF(ErrorFound()) RETURN 1

    HW_IN_T=W(1)
    HW_FR=W(2)

here is the beginning of an external file:

40    90    !hot water set point  temperature
20000    50000    80000    !building load                   
25    50    75    100! electric load                   
35.52167757    119.1914489    82.2    81.7    119.1914489    !Coolant 
engine intlet Temperature    Coolant Engine FR    Coolant engine outlet 
Temperature    Coolant heat exchanger intlet Temperature    Coolant heat 
exchanger FR    for 25%  elec load for a 20000 kJ/hr bldg load for a 40C 
hot water set point
34.17709697    175.1046126    83.3    82.8    175.1046126    ! !Coolant 
engine intlet Temperature    Coolant Engine FR    Coolant engine outlet 
Temperature    Coolant heat exchanger intlet Temperature    Coolant heat 
exchanger FR    for 50%  elec load for a 20000 kJ/hr bldg load for a 40C 
hot water set point

.... and so one for25% for 50000kJ/hr at 40C ... and then again 25% for 
20000kJ/hr for 90C and so on.

If anyone has just an opinion on that, that would be great!

thanks!

Flore


Flore A Marion
Research Associate

MMCH,school of architecture
Carnegie Mellon University
5000 Forbes Ave
Pittsburgh, PA 15213

fmarion at andrew.cmu.edu
412.268.3939
http://www.cmu.edu/iwess/




More information about the TRNSYS-users mailing list