Structure preserving feedback of port-thermodynamic systems