[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [TRNSYS-users] Fwd: Error using more than one type
Hello everyone.
I also encountered similar problems several times before even though I have
added the statements as suggested by David in my source code. I find that the
problems seem to relate to the model requiring data storage (in my case). To
solve the problems, I have to modify the component which allows me to handle
multiple equipment or processes within a single component. Then everything
resumes normal.
Best Regards
LEE, Chun Kwong
Division of Building Science and Technology
City University of Hong Kong
Quoting David Bradley <bradley@tess-inc.com>:
> 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
> > <mailto:100075609@alumnos.uc3m.es>>
> > Date: 2010/4/26
> > Subject: Error using more than one type
> > To: trnsys-users@cae.wisc.edu <mailto: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愒 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
> >
>