Overheating of the windings is one of the major concerns regarding the reliability of motors, generators and transformers. However, thermal modeling of windings is challenging due to the fine and heterogeneous structures. Without adequately addressing the microscopic heat flux field in windings, the commonly used models, even those with conductor insulation accounted for, may give divergent estimations for the equivalent thermal conductivity of windings. Considering the negligible thermal resistance of conductors, a knotted-ribbon model based on the perfect-conductor assumption is proposed for windings formed with rectangular wires, which enables us to derive a closed-form solution to the heat flux field in the impregnation between rectangular wires. From this heat flux solution, the effective thermal resistance of the impregnation, which constitutes the vast majority of that of the whole winding, can then be calculated, based on which a homogenization model is obtained for the anisotropic thermal conductivity of the winding.