Text this: Modeling of internal combustion engine thermodynamics, valve dynamics and valve flow