The mean gas temperature is required for the calculation of heat release.
For a polytropic process1:
`p V_n = constant` (Equation 1)
`T_2/T_1=(V_1/V_2)^(n-1)=(p_2/p_1)^((n-1)/n)` (Equation 2)
hence:
`T_2=T_1(V_1/V_2)^(n-1)=T_1(p_2/p_1)^((n-1)/n)` (Equation 3)
for a known reference location, such as inlet valve closure:
`p_(ref) V_(ref) = n R T_(ref)` (Equation 4)
rearranging gives:
`T_(ref)/(p_(ref) V_(ref))=1/(n R)` (Equation 5)
to calculate the temperature at an arbitrary position between inlet valve closure and exhaust valve opening:
`T_(calc)=p_(calc) V_(calc) 1/(n R)` (Equation 6)
assuming n and R remain constant, equation 5 can be substituted into equation 6:
`T_(calc)=p_(calc) V_(calc) T_(ref)/(p_(ref) V_(ref))` (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.