Knut Erik, Sorry for the delay in getting back to you. Since almost all of the outputs that TRNSYS deals with are averages over the timestep, the input values that are passed to your components are the averages at the previous timestep and so your component doesn't really have to compute what those values are. If your component has some capacitance (thermal or electrical storage) to it then you do need to get what the value of certain inputs at the end of the last timestep were in order to calculate what the outputs at the end of the current timestep are. One typical way of handling the job of keeping track of those is to use the "getStorageVars()" and "setStorageVars()" subroutines. If you have to call the Differential Equation subroutine from within your Type, it will return the average and final value for the time step. You can then store that final value and use it as the initial value for the next time step. Kind regards, David knut.erik.enerstvedt@niva.no wrote:
-- *********************************************************************** Thermal Energy System Specialists (TESS), LLC David BRADLEY 22 N. Carroll Street - Suite 370 Partner Madison, WI 53703 USA P: +1.608.274.2577 F: +1.608.278.1475 E-mail: bradley@tess-inc.com Web Pages: http://www.tess-inc.com and http://www.trnsys.com *********************************************************************** |