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

Re: Type55-Maximum



 Jeff,
thank you very much for your help. Yes, Parameter 3 should be 8 and I need the calculated maximum on 10:00 pm on the same day to 10:00 am on the next day. 
The new Fortran code is great! I have found an other acceptable solution: I can use the Input value recall some hours later and compare it with the current value in the Equation mode. So I get always the highest value from the last day. But this might be not acceptable for all technical problems, so your Fortran code is much more comfortable. 
kindly regards,
Henrik




Henrik, 

I am confused by your e-mail. Are you saying that you would like the 
periodic integrator to calculate the maximum value of an input from 11:00 
am to 7:00 pm and then use this calculated output as an input to another 
component during the hours of 10:00 pm to 10:00 am the next day? (Parameter 
3 should be 8 by the way) 

Assuming that this is your intent, I ran a simple input file to test what 
TYPE 55 is doing. You are correct in that the periodic integrator is 
resetting the outputs at midnight - or 24 hours from the start of the 
simulation as you have specified in your parameter list. After discussing 
this with several of my colleagues, we have decided that the best thing is 
to change type 55 to do as you suggest - reset the values every 24 hours 
after the start of the summary period - and not every 24 hours after the 
start time of the simulation. While the old method wasn't wrong - the new 
change that we have made will make the program a little more flexible..... 
If you have a FORTRAN compiler the OLD and NEW FORTRAN code is supplied 
below. Otherwise contact your TRNSYS distributor in a few days for the 
latest source code. 

With kindest regards, 

Jeff 
(Type 55 author) 

OLD CODE 

C SET THE INITIAL VALUE OF THE RESET TIME 
IF(MONTH3(I)) THEN 
RESET(I)=MONTH(KEEP(I)) 
NEWVAL(I)=RESET(I) 
ELSE 
CNB CHECK IF PERIOD IS LONGER THAN A DAY 
IF((TON(I)+LENGTH(I)).GT.RESET(I)) THEN 
NEWVAL(I)=TON(I)+RESET(I) 
ELSE 
NEWVAL(I)=TIME0+RESET(I) 
ENDIF 
ENDIF 

NEW CODE 

C SET THE INITIAL VALUE OF THE RESET TIME 
IF(MONTH3(I)) THEN 
RESET(I)=MONTH(KEEP(I)) 
NEWVAL(I)=RESET(I) 
ELSE 
NEWVAL(I)=TON(I)+RESET(I) 
ENDIF 



********************************************************************************* 
Thermal Energy System Specialists (TESS) 
Jeff Thornton 2916 Marketplace Drive 
Principal Suite 104 
Phone: (608) 274-2577 Madison WI 53719 
Fax: (608) 278-1475 USA 
E-mail: thornton@tess-inc.com 
Web Page: www.tess-inc.com 





------------------------------------------------
Join Excite! - http://www.excite.com
The most personalized portal on the Web!