  We use the Adaptive Mesh Refinement code Enzo to model the interstellar
medium in isolated local disk galaxies. The simulation includes a treatment for
star formation and stellar feedback. We get a highly supersonic turbulent disk,
which is fragmented at multiple scales and characterized by a multi-phase
interstellar medium. We show that a Kennicutt-Schmidt (KS) relation only holds
when averaging over large scales. However, values of star formation rates and
gas surface densities lie close in the plot for any averaging size. This
suggests an intrinsic relation between stars and gas at cell-size scales, which
dominates over the global dynamical evolution. To investigate this effect, we
develop a method to simulate the creation of stars based on the density field
from the snapshots, without running the code again. We also investigate how the
star formation law is affected by the characteristic star formation timescale,
the density threshold and the efficiency considered in the recipe. We find that
the slope of the law might vary from ~1.4 for a free-fall timescale, to ~1.0
for a constant depletion timescale. We further demonstrate that a power-law is
recovered just by assuming that the mass of the new stars is a fraction of the
mass of the cell $m_\star=\epsilon\rho_{\rm gas}\Delta x^3$, with no other
physical criteria required. We show that both efficiency and density threshold
do not affect the slope, but the right combination of them can adjust the
normalization of the relation, which in turn could explain a possible
bi-modality in the law.
