Optimal design of 3D architected porous/nonporous microstructures of multifunctional multiphase composites for maximized thermomechanical properties