American Journal of Mechanical Engineering
ISSN (Print): 2328-4102 ISSN (Online): 2328-4110 Website: https://www.sciepub.com/journal/ajme Editor-in-chief: Kambiz Ebrahimi, Dr. SRINIVASA VENKATESHAPPA CHIKKOL
Open Access
Journal Browser
Go
American Journal of Mechanical Engineering. 2026, 14(1), 14-22
DOI: 10.12691/ajme-14-1-3
Open AccessArticle

Visualization of Permanent Magnet Motor Hydrodynamics

Peizheng Ma1, , Benjamin Ma2 and Nianhua Guo3

1Department of Computer Science, Stony Brook University, Stony Brook, USA

2Ward Melville High School, East Setauket, USA

3LISVH, Stony Brook University, Stony Brook, USA

Pub. Date: March 09, 2026

Cite this paper:
Peizheng Ma, Benjamin Ma and Nianhua Guo. Visualization of Permanent Magnet Motor Hydrodynamics. American Journal of Mechanical Engineering. 2026; 14(1):14-22. doi: 10.12691/ajme-14-1-3

Abstract

This paper presents a real-time interactive system for simulating and visualizing motor-driven fluid hydrodynamics. The framework integrates a torque-based motor model with Heightfield and Smoothed Particle Hydrodynamics (SPH) fluid simulations. Utilizing modern OpenGL and an ImGui-based control interface, the system achieves consistent real-time performance on a CPU-based laptop and effectively illustrates the differences between surface-only and volumetric fluid models. Quantitative evaluation on a consumer-grade laptop demonstrates real-time performance near 60 FPS for SPH simulations up to approximately 2,000 particles, and interactive rates (15–30 FPS) up to about 5,000 particles. These results validate the system’s suitability for interactive visualization, education, and exploratory research under modest hardware constraints, while acknowledging limitations due to weakly compressible SPH, simplified boundary handling, and heuristic impeller–fluid coupling.

Keywords:
Fluid simulation Smoothed Particle Hydrodynamics (SPH) Heightfield model Real-time graphics OpenGL Motor-driven flow Interactive visualization Computer graphics

Creative CommonsThis work is licensed under a Creative Commons Attribution 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/

Figures

Figure of 5

References:

[1]  https://dearimgui.com [Accessed Feb. 4, 2026].
 
[2]  https://github.com/ocornut/imgui [Accessed Feb. 4, 2026].
 
[3]  Olajos, Rikard. “Real-time rendering of volumetric clouds.” LU-CS-EX 2016-42 (2016).
 
[4]  Castro, Guilherme Cattani de. CG Guide: a modern openGL and computer graphics teaching application. 2021.
 
[5]  Hughes, Austin, and Bill Drury. Electric motors and drives: fundamentals, types and applications. Newnes, 2019.
 
[6]  Liu, Tian-Hua. “Design and Control of Electrical Motor Drives.” Energies 14, no. 22 (2021): 7717.
 
[7]  Štulrajter, Marek, Valeria Hrabovcova, and Marek Franko. “Permanent magnets synchronous motor control theory.” Journal of electrical engineering 58, no. 2 (2007): 79-84.
 
[8]  Wang, Xiaokun, Yanrui Xu, Sinuo Liu, Bo Ren, Jirí Kosinka, Alexandru C. Telea, Jiamin Wang et al. “Physics-based fluid simulation in computer graphics: Survey, research trends, and challenges.” Computational Visual Media 10, no. 5 (2024): 803-858.
 
[9]  Hartmann, Kay. Implementation of an Interactive Real-Time Eulerian Fluid Simulation. 2024.
 
[10]  Foster, Nick, and Dimitri Metaxas. “Realistic animation of liquids.” Graphical models and image processing 58, no. 5 (1996): 471-483.
 
[11]  Stam, Jos. “Stable Fluids,” in Proceedings of SIGGRAPH 1999, pp. 121–128.
 
[12]  Kass, Michael, and Gavin Miller. “Rapid, stable fluid dynamics for computer graphics.” In Proceedings of the 17th annual conference on Computer graphics and interactive techniques, pp. 49-57. 1990.
 
[13]  Tessendorf, Jerry. “Simulating Ocean Water.” ACM SIGGRAPH course notes SIGGRAPH (1999).
 
[14]  Müller, Matthias, David Charypar, and Markus Gross. “Particle-based fluid simulation for interactive applications.” In Proceedings of the 2003 ACM SIGGRAPH/Eurographics symposium on Computer animation, pp. 154-159. 2003.
 
[15]  Gingold, Robert A., and Joseph J. Monaghan. “Smoothed particle hydrodynamics: theory and application to non-spherical stars.” Monthly notices of the royal astronomical society 181, no. 3 (1977): 375-389.
 
[16]  Solenthaler, Barbara, and Renato Pajarola. “Predictive-corrective incompressible SPH.” In ACM SIGGRApH 2009 papers, pp. 1-6. 2009.
 
[17]  Bender, Jan, Matthias Müller, Miguel A. Otaduy, Matthias Teschner, and Miles Macklin. “A survey on position‐based simulation methods in computer graphics.” In Computer graphics forum, vol. 33, no. 6, pp. 228-251. 2014.
 
[18]  Ihmsen, Markus, Jens Orthmann, Barbara Solenthaler, Andreas Kolb, and Matthias Teschner. “SPH fluids in computer graphics.” Eurographics 2014 – State of the Art Reports, pp. 21–42, 2014.
 
[19]  Rost, Randi J., Bill Licea-Kane, Dan Ginsburg, John Kessenich, Barthold Lichtenbelt, Hugh Malan, and Mike Weiblen. OpenGL shading language. Pearson Education, 2009.
 
[20]  Kessenich, John, Graham Sellers, and Dave Shreiner. OpenGL Programming Guide: The official guide to learning OpenGL, version 4.5 with SPIR-V. Addison-Wesley Professional, 2016.
 
[21]  Khronos Group, OpenGL 4.6 Core Profile Specification, 2019.
 
[22]  Goswami, Prashant, Philipp Schlegel, Barbara Solenthaler, and Renato Pajarola. “Interactive SPH simulation and rendering on the GPU.” in Proceedings of the 5th International Conference on Computer Graphics Theory and Applications, 2010.
 
[23]  Krause, Paul C., Oleg Wasynczuk, Scott D. Sudhoff, and Steven Pekarek. Analysis of electric machinery and drive systems. Vol. 2. New York: IEEE press, 2002.
 
[24]  Fitzgerald, Arthur Eugene, Charles Kingsley, and Stephen D. Umans. Electric machinery. McGraw-Hill, 2003.
 
[25]  Krishnan, Ramu. Electric motor drives: modeling, analysis, and control. Prentice Hall., 2001.
 
[26]  Craig, John J. Introduction to robotics: mechanics and control, 3/E. Pearson Education India, 2009.
 
[27]  Alciatore, David G., and Michael B. Histand. Introduction to mechatronics and measurement systems. Vol. 3. New York: McGraw-Hill, 2007.
 
[28]  Stoker, James Johnston. Water waves: The mathematical theory with applications. Courier Dover Publications, 2019.
 
[29]  Kass, Michael, and Gavin Miller. “Rapid, stable fluid dynamics for computer graphics.” In Proceedings of the 17th annual conference on Computer graphics and interactive techniques, pp. 49-57. 1990.
 
[30]  Hinsinger, Damien, Fabrice Neyret, and Marie-Paule Cani. “Interactive animation of ocean waves.” In Proceedings of the 2002 ACM SIGGRAPH/Eurographics symposium on Computer animation, pp. 161-166. 2002.
 
[31]  Lucy, Leon B. “A numerical approach to the testing of the fission hypothesis.” Astronomical Journal, vol. 82, Dec. 1977, p. 1013-1024. 82 (1977): 1013-1024.
 
[32]  Müller, Matthias, David Charypar, and Markus Gross. “Particle-based fluid simulation for interactive applications.” In Proceedings of the 2003 ACM SIGGRAPH/Eurographics symposium on Computer animation, pp. 154-159. 2003.
 
[33]  Bender, Jan, and Dan Koschier. “Divergence-free SPH for incompressible and viscous fluids.” IEEE Transactions on Visualization and Computer Graphics 23, no. 3 (2016): 1193-1206.