In a particular implementation(Finite volume advection using upwind) of adaptive mesh refinement the error square estimate for a cell C is given as
$$ \sum_{i = x,y,z} vol * \frac{1}{12} * h^{2} * (\frac{ds}{di})^{2} $$
where $vol $ is the volume of the cell, $h $ is the size of the cell and ${ds}/{di} $ is the derivative of the solution $s $ in each of the direction $i$.
What I still fail to understand that where is this error expression coming from and is the error expression specific for the scheme being implemented which is first order accurate in space or, can it be applied for any other scheme too. I tried to find the truncation error in space for upwind scheme but the expression doesn't matches the expression given above. What i also tried, is to use the same expression for error estimate for a second order accurate central differencing scheme for diffusion scheme( nomal 5 point stencil in 2D or 7 point stencil in 3D) and it seems to work for that though I face feeble issues.
Any other better ideas or pointers for error estimation to dynamically refine the mesh is also welcome.