FW: Re: [TRNSYS-users] Bug in TYPE74

Fernando Domínguez Muñoz fdominguezm at uma.es
Mon Jun 27 11:54:30 PDT 2005


Dear David,

the (INFO(1).NE.IUNIT) check is right. The problem comes from the end
point of the IF statement:

c      IF(INFO(1).NE.IUNIT) THEN
        !recall the UNIT and TYPE number
        IUNIT = INFO(1)
	ITYPE = INFO(2)
        !read parameter values
	NS     = JFIX(PAR(1)+0.1)
        XNS    = DBLE(NS)

         ..........
         ..........

        RI     = PAR(12)
        XKL    = PAR(13)

c	ENDIF  <---------- THIS

C    RETRIEVE STORED VARIABLES
      CALL getStorageVars(NStorage,stored,INFO)

I think that the end point of this loop must be the line number 60,
where the program starts reading the inputs. But, the characteristic
parameters of the unit are re-calculated on every interation, and
consequently its values turn incorrect.

Best regards

Fernando.

>Dear Fernando,
>  The line
>
>IF(INFO(1).NE.IUNIT) THEN
>
>is correct. The point of the line is to handle the case in which there 
>is more than one instance of Type74 in the simulation. The variable 
>INFO(1) is always the current instance's UNIT number (specified in the 
>input file). At each time that the Type is called, the value of INFO(1) 
>is stored as a local variable. In this way, if ever INFO(1) and IUNIT do 
>not have the same value, then it can only be because a different 
>instance of the component has been simulated. If a different instance 
>has been simulated, then the component's parameters should be reread and 
>reset to local variables.
>
>In December 2004, a bug fix was made in that component. If your version 
>does not have the comment:
>
>C  12/02/2004 - JWT - Fixed an error with storing variables and added 
>the first call to Tau_Alpha
>
>in the "Revision History" near the top of the file Type74.for then you 
>should contact your distributor to get the latest version.
>Kind regards,
>  David
>
>Fernando Domínguez Muñoz wrote:
>
>>Dear all,
>>
>>I think I have found a bug in TYPE74 (parabolic concentrator solar
>>collector).
>>
>>Where says (Line 207):
>>
>>      IF(INFO(1).NE.IUNIT) THEN
>>
>>Should said:
>>
>>      IF(INFO(1).NE.IUNIT) GO TO 60
>>
>>Best regards.
>>
>>Fernando Domínguez Muñoz
>>University of Málaga (Spain)
>>_______________________________________________
>>TRNSYS-users mailing list
>>TRNSYS-users at engr.wisc.edu
>>https://www.cae.wisc.edu/mailman/listinfo/trnsys-users
>>  
>>



More information about the TRNSYS-users mailing list