Lagrangian effective material constants for the modeling of thermal behavior of acoustic waves in piezoelectric crystals. I. Theory.