The mean gas temperature is required for the calculation of heat release.
For a polytropic process1:
pVn=constant (Equation 1)
T2T1=(V1V2)n-1=(p2p1)n-1n (Equation 2)
hence:
T2=T1(V1V2)n-1=T1(p2p1)n-1n (Equation 3)
for a known reference location, such as inlet valve closure:
prefVref=nRTref (Equation 4)
rearranging gives:
TrefprefVref=1nR (Equation 5)
to calculate the temperature at an arbitrary position between inlet valve closure and exhaust valve opening:
Tcalc=pcalcVcalc1nR (Equation 6)
assuming n and R remain constant, equation 5 can be substituted into equation 6:
Tcalc=pcalcVcalcTrefprefVref (Equation 7)
catool Implementation: See Return_Temperature_Data() in analysis.c
References:1. Wray, A. P., Ibrahim, S. S., Carrotte, J. F., "Engineering Thermodynamics," Departmental Publication No. 18, AAE Department, Loughborough University, 1997.