[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [TRNSYS-users] How to compose a new Type component for iterative calculation?
Yun,
From the description of what you are trying to do, it sounds as though a
combination of existing TRNSYS components could be used to control your COMIS
exhaust fans. Please bear in mind that while a component such as Type2 uses the
vocabulary of temperature in its description and documentation, all it does is
compare two values and output a corresponding value or 0 or 1. There are other
models that model proportional and PID controllers. Again, almost all of them
simply compare two values and generate an output based on their relation to one
another.
For your case, you could define one controller that makes a decision by
comparing the infiltration rate with an infiltration rate set point, and
another that makes a decision by comparing pollutant concentration level with a
set point. The output of these two controllers would be combined (either added
or multiplied as appropriate to your control strategy) and connected to the fan
model.
> The question is, first of all, the iterative calculation can be
> occurred at each time step?
> And do I have to use DO LOOP or some special statements(for
> example, needs to use a subroutine or some variables) when I
> compose FORTRAN file?
The TRNSYS kernel takes care of all these iterations for you. If you do write
your own component, your Type simply needs to define how the values of the
component's outputs depend upon the component's inputs. TRNSYS will pass the
defined input values to your component. Your component sets its own outputs and
passes them back to the TRNSYS kernel. The kernel will continue to iterate at a
given time step until the entire set of components in your system converges on
a solution. The 08-Programmer's Guide manual located in the TRNSYS 16
documentation set includes information on how to go about writing a new
component. If you are using TRNSYS 15, the information is in Chapter 2 of the
TRNSYS 15 manual.
Kind regards,
David
--
David BRADLEY
Thermal Energy System Specialists, LLC
2916 Marketplace Drive - suite 104
Madison, WI 53719
ph: +1 608 274 2577
fax: +1 608 278 1475
email: bradley@tess-inc.com