Thermodynamic framework for damage-healing-plasticity of granular materials and net damage variable