Modelling water flow, nitrogen uptake and production for wheat