Dynamic model of photochemical smog