Closed-loop High-fidelity Simulation Integrating Finite Element Modeling with Feedback Controls in Additive Manufacturing