Josephson junctions with an intrinsic phase shift of pi, so-called pi Josephson junctions, can be realized by a weak link of a d-wave superconductor with an appropriate boundary geometry. A model for the pairing potential of an according weak link is introduced which allows for the calculation of the influence of geometric parameters and temperature. From this model, current-phase relations and the critical current of the device are derived. The range of validity of the model is determined by comparison with selfconsistent solutions.