The influence of wing deformation in animal propulsion and motion is an intriguing phenomenon that has contributed to a growing interest in biomimetics in both academia and industry. The study focuses on developing a robust numerical tool for analyzing the motion of biological systems in fluid flows, crucial to understanding fluid-structure interaction (FSI) phenomena. The research introduces a new mesh deformation solver, dynamicOversetZoneFvMesh, designed to address limitations in OpenFOAM's conventional Overset method. This solver enables the application of both rigid body motion and deformation at specified patches within certain zones, allowing for more complex motion scenarios. Through meticulous verification, parallelization, validation, and mesh convergence studies, the modified Overset solver's reliability is confirmed. Two cases are examined: a rigid-body flapping foil and a flexible foil with leading-edge deformation. Results demonstrate the adapted solver's proficiency in managing complex fluid dynamics and accommodating simultaneous motion and deformation. Furthermore, the study reveals that leading-edge flexibility improves the power extraction efficiency of flapping foils, aligning with previous literature. Overall, the research lays the foundation for advancing FSI simulations and opens avenues for addressing previously challenging problems in the field.