Using a two-dimensional, dissipative magnetohydrodynamic model, this p
aper presents a numerical simulation of the magnetic energy buildup in
a quadrupolar field by photospheric shear motion. When electric curre
nt density is larger than a certain critical value, an anomalous resis
tivity is introduced in order to account for the dissipation caused by
instabilities in high current regions. It is shown that like a bipola
r field, a quadrupolar field can efficiently store magnetic free energ
y through photospheric shear motion. Electric current formed by shear
concentrates on the separatrix and magnetic loops rooted in areas wher
e the shear velocity gradient is large. The atmosphere is heated by an
omalous resistive dissipation during the shear. Both magnetic and ther
mal energy increases nonlinearly with shearing displacement. When the
anomalous resistivity increases or the critical current density decrea
ses, the growth rate reduces for magnetic energy but goes up for therm
al energy.