[TRNSYS-users] TYPE 661 (delayed inputs)

fdominguezm at uma.es fdominguezm at uma.es
Wed Feb 7 12:15:29 PST 2007


Dear TRNSYS users,

Using TYPE661 (input delayer, TESS) I have found some problems, possibly a
bug.

In my model I checked the printer’s outputs from type661 and its behaviour
was as expected. However, the behaviour of other components (some
controllers) using the delayed variables was wrong.



The following table is the result of a run of the attached deck. The
“UsedInCalculation” value is the value of the delayed variable that
Type230 has internally used in its calculations.

TIME  - InputValue -	DelayedValue (Type661 printed output) -
UsedInCalculat (Type230)

1	1	0	0
2	2	1	0 ???
3	3	2	1
4	4	3	2
5	5	4	3
6	6	5	4
7	7	6	5
8	8	7	6
9	9	8	7
10	10	9	8
11	11	10	9
12	0	11	10

In the source code of type661:

IF(INFO(13).GT.0) THEN

 CALL getStorageVars(STORED,ITOT,INFO)
...........................
  DO K=1,N_IN
    OUT(K)=STORED(ISPOT(K)+I_KEEP(K)+1)
  ENDDO
............................
  DO K=1,N_IN
............................
  STORED(ISPOT(K)+1)=XIN(K)
 ENDDO
ENDIF

Imagine that the current time step is “j”. Because the outputs are
modified just at the very end of the time step (info(13)=1), the outputs
of the component during time step “j” were those stored at “j-1”, i.e.,
the input values at “j-2”.

The problem is not detected in the printer because the output’s values are
modified just before the printer prints the results for the current time
step.


Fernando Domínguez Muñoz
University of Málaga (Spain)
----------------------------
ETS Ingenieros Industriales
Plaza El Ejido s/n
29013 Málaga (SPAIN)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TYPE230.zip
Type: application/x-zip-compressed
Size: 17210 bytes
Desc: not available
URL: <http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/attachments/20070207/69b435ac/attachment-0001.bin>


More information about the TRNSYS-users mailing list