A portable device was designed and constructed for studying the properties of biomaterials in physiologically relevant fluids under controllable flow conditions that closely simulate fluid flow inside the body. The device can fit entirely inside a cell incubator; and, thus, it can be used directly under standard cell culture conditions. An impedance-driven pump was built in the sterile flow loop to control the flow rates of fluids, which made the device small and portable for easy deployment in the incubator. To demonstrate the device functions, magnesium (Mg) as a representative biodegradable material was tested in the flow device for immersion degradation under flow versus static conditions, while the flow module was placed inside a standard cell incubator. The flow rate was controlled at 0.17 ± 0.06 ml/s for this study; and, the flow rate is adjustable through the controller module outside of incubators for simulating the flow rates in the ranges of blood flow in human artery (0.05 ∼0.43 ml/s) and vein (0.02 ∼0.08 ml/s). Degradation of Mg under flow versus static conditions was characterized by measuring the changes of sample mass and thickness, and Mg2+ ion concentrations in the immersion media. Surface chemistry and morphology of Mg after immersion under flow versus static conditions were compared. The portable impedance-driven flow device is easy to fit inside an incubator and much smaller than a peristaltic pump, providing a valuable solution for studying biomaterials and implants (e.g. vascular or ureteral stents) in body fluids under flow versus static conditions with or without cells.