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

David Bradley bradley at tess-inc.com
Wed Apr 28 12:30:42 PDT 2010


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 at alumnos.uc3m.es 
> <mailto:100075609 at alumnos.uc3m.es>>
> Date: 2010/4/26
> Subject: Error using more than one type
> To: trnsys-users at cae.wisc.edu <mailto:trnsys-users at 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 at cae.wisc.edu
> https://www-old.cae.wisc.edu/mailman/listinfo/trnsys-users
>    
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/attachments/20100428/b863969b/attachment-0005.htm>


More information about the TRNSYS-users mailing list