Friction is usually considered as a non-conservative force, but by considering the microscopic movement of particles which produce the friction, it seems we can model friction as conservative force field (the lost energy transform in kinetic energy of microparticles, what we call "heat").
For example, consider the uni-dimensional movement of a macroscopic solid block sliding on the floor, let call its position as $X(t)$. On the other hand, the floor is modeled as a huge collection of $N$ material particles, like a thermal reservoir/bath, interacting with each other and with the block. As these particles move very little from their equilibrium position $x_i = 0$, we can approximate the potential energy associated with their interaction by a Taylor series up to quadratic terms:
$$V(x_i) = \frac{1}{2}\sum_{i, j=1}^N k_{ij}x_ix_j $$
The interaction of the block and the floor is assumed to be represented by a potential $V_f(x_i,X,\dot{X})$ ("potential associated with friction"). So, the Lagrangian of this system would be:
$$L(X,x_i,\dot{X},\dot{x}_i) = \frac{M}{2}\dot{X}^2 + \frac{m_i}{2}\sum_{i=1}^N \dot{x}_i^2 - V_f(x_i,X,\dot{X}) - \frac{1}{2} \sum_{i, j=1}^N k_{ij}x_ix_j .$$
Then for almost every solution with initial conditions $\dot{x}_i = 0$ the energy flows to the floor and we have $\dot{X}\to 0$.
My question are:
What forms could the potential $V_f(x_i,X,\dot{X})$ take?
How could we show that most solutions (with the above-mentioned initial conditions) end up with the block stopped on the floor?
My guess for the question 1 is that $$V_f(x_i,X,\dot{X}) = -(\alpha\ \text{sgn}(\dot{X})X) \sum_{i=1} \text{rect}(X-x_i)$$ or some modification will work, because this guarantees that each particle only produces influence during the time there is contact between the block and itself.