In the case of two-stroke diesel engine high pressure and temperature happen in combustion stage which releases Q_combustion and Q_loss.
So I look for these two parameters formuals and equations to fulfill this general formula as below:
Q_loss +Q_combustion -W_done= dU/dt
I am doing programming by MATLAB and the topic is simulation of high pressure curve in two-stroke diesel engine.