Starting from a dipole field and a given distribution of footpoint displacement of field lines on the photosphere, we find axisymmetric, force-free field solutions in spherical coordinates that have the same distribution of normal field on the photosphere and magnetic topology as the dipole field. A photospheric shear is introduced in the azimuthal direction in a region that strides across the equator and ends at latitude lambda(s). The footpoint displacement has a sine distribution in latitude and a peak amplitude of rho(m). The magnetic energy E, azimuthal flux F-rho, and magnetic helicity H-T in the solar corona are then calculated for each force-free field solution. It is found that for a given shear region range lambda(s), all of the three quantities increase monotonically with increasing rho(m). In particular, both F rho and H-T have a linear dependence on rho(m.) When rho(m) reaches a certain critical value rho(mc), the force-free field loses equilibrium, leading to a partial opening of the field and the appearance of a current sheet in the equatorial plane. At this point, E, F-rho and H-T reach their maximum values, E, F-rho, and H-T. E-c increases, and F-rho c and H-Tc decrease with decreasing lambda(s). It is found that E-c is always smaller than the open field energy, in agreement with the Aly conjecture. Of the three critical parameters, E-c has the weakest dependence on lambda(s). Therefore, if one is interested in the transition of a magnetic configuration from a stable state to a dynamic one, the magnetic energy is probably the most appropriate marker of the transition.