Entropy production in polarizable bodies with internal variables