Repulsive energy in sodium chloride and potassium chloride crystals