A dynamic model for calculating pH inside kraft pulp fibers