Effect of residual stress distribution in a log on lumber warp due to sawing: a numerical simulation based on the beam theory