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

Re: [TRNSYS-users] Fwd: Error using more than one type



Marcos,
 The easiest way to solve the problem is to reread the parameters and set their values to your local variables at every iteration. That solution wastes computation time so a better solution is that you check IUNIT against the value of INFO(1). If those two values are different then you know you need to reread the parameter list. If they are the same, you don't. Take a look at Type6.for. There is a section that takes care of this problem:

IF(INFO(1).NE.IUNIT) THEN
  !reset the unit number
  IUNIT  = INFO(1)
  ITYPE  = INFO(2)
  !read the parameter values
  QMAX   = PAR(1)
  CP     = PAR(2)
  UA     = PAR(3)
  HTREFF = PAR(4)                         
ENDIF


of course the problem may be more subtle. If there are local variables that are calculated when you read parameters, those also have to be recalculated if the unit number changes.
Best,
 David

On 4/27/2010 08:12, Marcos Porras wrote:


---------- Forwarded message ----------
From: Marcos Porras <100075609@alumnos.uc3m.es>
Date: 2010/4/26
Subject: Error using more than one type
To: trnsys-users@cae.wisc.edu


Hello everyone,

I developed a type in TRNSYS 16 ,and when I use just one type the simulation runs correctly but when I use more than one the simulation doesn´t run properly, it seems that one type is taking the values of the other, although I've set the IUNIT everytime the iteration starts
has anyone any experience in this kind of error?

Thanks in advance

--
Marcos Porras



--
Marcos Porras
_______________________________________________ TRNSYS-users mailing list TRNSYS-users@cae.wisc.edu https://www-old.cae.wisc.edu/mailman/listinfo/trnsys-users