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

Re: Simulation Timestep



Dear Jade,

Is there a way for a component to 'know' what the
simulation time step is during the first call to it in
a time step?
The simulation time step is stored in the "DELT" variable in the "SIM" common block. You can access that common block from any TRNSYS Type. To do this, you have to add the following lines in the declaration section:

INTEGER IWARN
REAL S,TIME0,TFINAL,DELT
COMMON /SIM/ TIME0,TFINAL,DELT,IWARN

You can then use the "DELT" variable in your equations. You could also use TIME0 (the simulation start time) and TFINAL (the simulation stop time). The common block is always accessible (i.e. also during the first call of a time step).

Kind regards,

Michaël Kummert

--
_________________________________________________________

Michaël Kummert

Solar Energy Laboratory - University of Wisconsin-Madison
1303 Engr Res Bldg, 1500 Engineering Drive
Madison, WI 53706

Tel: +1 (608) 263-1589
Fax: +1 (608) 262-8464
E-mail: kummert@engr.wisc.edu

SEL Web Site: http://sel.me.wisc.edu
TRNSYS Web Site: http://sel.me.wisc.edu/trnsys