<br><font size=2 face="sans-serif">Jeff,</font>
<br>
<br><font size=2 face="sans-serif">Thanks again for your answer. However,
since my solution is known only for Ti and Tf and nowhere between, any
attempt at integrating numerically over the time step and dividing by the
time step length will result in a linear approximation for Tavg as before.
I can of course solve the equation to find T at the midpoint of the time
step, and then use a three-point numerical integration rule. I can't  think
of anything else at the moment.</font>
<br>
<br><font size=2 face="sans-serif">Kind regards,</font>
<br><font size=2 face="sans-serif">Knut Erik</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">From:</font>
<td><font size=1 face="sans-serif">"Jeff Thornton" <thornton@tess-inc.com></font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">To:</font>
<td><font size=1 face="sans-serif">knut.erik.enerstvedt@niva.no</font>
<tr>
<td valign=top><font size=1 color=#5f5f5f face="sans-serif">Cc:</font>
<td><font size=1 face="sans-serif">trnsys-users@engr.wisc.edu</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">Date:</font>
<td><font size=1 face="sans-serif">08/31/2009 07:04 PM</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">Subject:</font>
<td><font size=1 face="sans-serif">Re: [TRNSYS-users] "Average value
over time step" in TRNSYS Types</font></table>
<br>
<hr noshade>
<br>
<br>
<br><tt><font size=2><If I solve the model equation for the time  t(i-1/2),
would this be a<br>
correct approach to find Tavg? I can then solve for both Tavg and Tf, and<br>
use Tf as Ti in the next time step. Is this how it's done in the<br>
standard/TESS TRNSYS components? ><br>
<br>
No - in the TRNSYS components that have mass we solve for the average<br>
temperature over the timestep and don't approximate it with a linear<br>
solution or a solution at the midpoint of the timestep.<br>
<br>
Take your solution for the temperature and integrate it over the timestep<br>
and then divide by the timestep to get the average value.  Refer to
the<br>
Programmers guide in the section for differential equations for a more<br>
detailed explanation when you have a simple linear DiffEq.<br>
<br>
Jeff<br>
<br>
<br>
Jeff Thornton<br>
President - TESS, LLC<br>
<br>
22 North Carroll Street - Suite 370<br>
Madison WI 53703 USA<br>
<br>
Phone: 608-274-2577<br>
Fax: 608-278-1475<br>
E-mail: thornton@tess-inc.com<br>
Web: </font></tt><a href="www.tess-inc.com"><tt><font size=2>www.tess-inc.com</font></tt></a><tt><font size=2><br>
<br>
</font></tt>
<br>
<br><font size=2 face="sans-serif"><br>
------------------------------------------------------------------------------------------------------------<br>
Meld deg på vårt nyhetsbrev på </font><a href=www.niva.no><font size=2 face="sans-serif">www.niva.no</font></a>