Powder bed fusion (PBF) additive manufacturing has enabled unmatched agile manufacturing of a wide range of products from engine components to medical implants. While high-fidelity finite element modeling and feedback control have been identified key for predicting and engineering part qualities in PBF, existing results in each realm are developed in opposite computational architectures wildly different in time scale. Integrating both realms, this paper builds a first-instance closed-loop simulation framework by utilizing the output signals retrieved from the finite element model (FEM) to directly update the control signals sent to the model. The proposed closed-loop simulation enables testing the limits of advanced controls in PBF and surveying the parameter space fully to generate more predictable part qualities. Along the course of formulating the framework, we verify the FEM by comparing its results with experimental and analytical solutions and then use the FEM to understand the melt-pool evolution induced by the in-layer thermomechanical interactions. From there, we build a repetitive control algorithm to greatly attenuate variations of the melt pool width.