Code for modeling TC panel