A simple model of local density approximation in nonconducting systems. Application to argon and silicon