A condensed microelectromechanical approach for modeling tetragonal ferroelectrics