[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [TRNSYS-users] Iwent your help
Habtamu,
I am not sure that I follow exactly what you are trying to
accomplish. However, two thoughts might help you. First, TRNSYS
iterates automatically in order to find its solution at the current
time step. The seventh spot in the INFO() array carries the iteration
number at the current call. If INFO(7) = 2 then the component has
been called three times so far this time step (one initial call and
two iterative calls). You could add some code that says something like:
IF (INFO(7).EQ.0) THEN
calculate the output using the initially assumed values
ELSE
calculate the output using the last calculated values
ENDIF
Often times, however, it is important to continue calculating the
final value of an output based not on the last calculated value but
based on the final value of that output at the previous time step. In
order to accomplish that, it is best to use the functions
getStorageVars() and setStorageVars(). Information on the use of
those functions can be found in the 08-Programmers Guide manual.
Kind regards,
David
At 10:09 8/6/2007, habtamu tkubet wrote:
I went to add a new component and b/s of your help I make it
perfectly and now I will need another help that is I wrote the
equation of the new component and I went to calculate the output
with initially assumed value in other word I went to use the output
of the firest will be the input of the second iteration so any one
besides you having a knowdlege of fortrun pleese help me .
the equation will be as followes
by using this equation you can calculate the initial value of
p1,Tg11,Tg21,Tf11 and Tf21 so I went to use this valu as input How
can I use it
****************************************************************************************
Thermal Energy System Specialists (TESS), LLC
David BRADLEY 2916 Marketplace Drive - Suite 104
Partner Madison, WI 53719
Phone: (608) 274-2577 USA
Fax: (608) 278-1475
E-mail: bradley@tess-inc.com
Web Pages: http://www.tess-inc.com and http://www.trnsys.com
"Providing software solutions for today's energy engineering projects"
****************************************************************************************