3D Potential Flow Panel Method & Actuator Disk Airflow Solver
Overview & Scope
Desktop computers are usually custom built, but they aren't optimized for best performance through thermo-fluid analysis compared to pre built laptop computers. This leaves users to optimize their component selection, placement, and overall layout of the desktop casing.
Traditionally, predicting thermal performance involved running high-fidelity Conjugate Heat Transfer (CHT) simulations, which is computationally expensive, taking hours per layout iteration. Therefore, the only alternative is to either rely on heuristic methods or performing trial and error assemblies until the configuration of the best performance is conceived.
As the final year project of my mechanical engineering degree, I have partnered with 2 other students to find a solution for this problem. I was individually responsible for designing, formulating, and programming the entire Fluid Dynamics Simulation Engine. The engine is a reduced-order potential flow framework coupling a 2D/3D Panel Method Solver with an iterative Actuator Disk Model (ADM).
The framework evaluates complex 3D enclosure flow fields in seconds, achieving 13% to 15% relative velocity error against physical hot-wire anemometer sensor measurements near cooling fans.
3D Airflow Streamlines through 80mm CPU fan generated from panel method solver and visualized via ParaView
Potential Flow Panel Method
Formulation & Boundary Discretization
Potential flow theory assumes an inviscid, incompressible, and irrotational flow field governed by Laplace's equation for the velocity potential:
By applying Green's Second Identity (Green's Theorem), the volume integral for velocity potential everywhere in the fluid domain is transformed into a boundary surface integral over the body geometry :
To solve this surface integral numerically, the continuous boundary geometry is discretized into discrete panel elements. Based on how singularity strength is distributed across each element, four primary panel types can be formulated:
- Point Panel: Singularity concentrated at the panel centroid .
- Constant Panel: Uniform singularity strength across panel endpoints to .
- Linear Panel: Linear strength variation from node to .
- Quadratic Spline Panel: Higher-order quadratic strength variation incorporating mid-node .
2D Panel Method Solver Experimentations
Constant Source Panels vs. OpenFOAM Validation
Panel method was first implemented in 2D to test which order panels are most suitable. As the ground truth, results from the potentialFOAM solver from OpenFOAM suite was used. For the constant source panels, cylinder geometry showed good accuracy but it failed when rounded rectangle geometry was used as the test case.
Linear Source Panels vs. OpenFOAM Validation
As the natural progression, linear source panels were implemented and tested against OpenFOAM. The results showed that linear source panels are more accurate than constant source panels for both cylinder and rounded rectangle geometries. This established linear source panels as the canonical choice for non-lifting geometries in the 2D panel method solver. This plot shows the comparison of constant and linear panel results against potentialFOAM result.
Singularity Type Accuracy Benchmark
Apart from source panels, vortex, and source doublet combinations panels were also implemented and tested. Source doublet combination panels use sources to cancel out free stream while using doublets to account for the flow change due to solid body. Their relative error RMS for the edge velocity were as follows.
| Solver Formulation | Relative Vt RMS Error |
|---|---|
| Linear Source | 3.71% |
| Linear Vortex | 3.77% |
| Constant Source | 50.74% |
| Source Doublet | 50.87% |
| Linear Source Doublet | 50.90% |
Constant source panels produced ~50% RMS error on bluff bodies, establishing linear source and vortex panels as the canonical choice for non-lifting and lifting geometries.
2D Viscous Boundary Layer Solver
Von Kármán Momentum Integral Formulation
To evaluate local velocity envelopes along heatsink channels, I built a 2D Von Kármán Momentum Integral BL Solver driven by potential edge velocity inputs :
The solver includes automatic stagnation point detection via sign-change interpolation and analytical patching. Four classic velocity profile closures were implemented:
Boundary layer velocity fields calculated from these profiles were compared against results from high-fidelity ANSYS Fluent SST viscous simulations (). The results show that our boundary layer implementation shows remarkable accuracy near the stagnation point and better part of the flow facing side of the cylinder. However, profiles often fails to capture the flow velocities near the separation point.
Profile Error Benchmark
Quantitative error comparison against Fluent shows that Pohlhausen and Thwaites profiles shows the best accuracy. However, this deviation ( ) is still too large for downstream thermal boundary layer calculations, aimed to be done through BDIM solver to find the surface heat transfer rates.
Corner Separation Limits
Boundary layer growth over filleted corners shows that flow seperates immediately in the first corner, leaving no way to approximate flow filed around 3/4 of the area of the square.
Due to these limitations, it was decided to use other empirical methods to calculate the heat transfer using edge velocities and not to pursue full boundary layer evaluation.
3D Panel Method Solver Implementation
3D Discretization & Numba JIT Acceleration
Extending the potential flow solver to 3D computer cases required discretizing complex STEP/STL CAD models into quadrilateral and triangular surface panels. I wrote a custom Gmsh CAD Reader supporting surface meshing, quad recombination algorithms, and degenerated triangle-panel handling.
Singularity influence coefficient matrices represent double integrals over 3D panel geometry. To make solving feasible in Python, I vectorized matrix assembly and accelerated computations using Numba JIT compilation.
Mesh Convergence Study
3D Constant-Source panel solver error convergence plot across multiple surface grid resolutions shows that the velocity convergence happens when No. of panels reaches 10,000.
Mesh levels of the Sphere
To evaluate the 3D panel solver, a mesh convergence test was carried out using the velocity at a fixed point as the parameter.
Actuator Disk Model (ADM) Solver Engine
Iterative Fan Pressure-Jump Coupling
Cooling fans generate pressure jumps that depend non-linearly on flow rate . To simulate fan propulsion without meshing rotating blades, I developed an iterative Actuator Disk Model (ADM) wrapped around the 3D panel solver:
The doublet sheet strength across the disk plane is updated iteratively until static pressure jump matches the empirical manufacturer P-Q fan curve, converging within 15–30 iterations for multi-fan enclosures.
Ducted Vent Contour
To test the ADM implementation, a ducted vent geometry was simulated and compared against ANSYS Fluent. The results show that the ADM implementation is able to capture the flow distribution and pressure jump near the fan accurately.
Centerline Profile
Velocity (Top) and Gauge pressure (Bottom) distribution along vent centerline: Comparing ADM solver output against Ansys Fluent.
Physical Experimental Airflow Setup
Physical Testbed & Hot-Wire Anemometry
To establish a physical ground truth for both our reduced-order solver and high-fidelity CFD models, an EWISPro7600 desktop computer enclosure was instrumented with hot-wire anemometer probe and K-type thermocouples.
Airflow velocities were measured at key probe locations near the CPU heatsink inlet and RAM module channels across varying fan RPM operating conditions. Thermocouples were used to measure heatsink RAM, and exhaust flow temperatures.
HwInfo software was used to collect the data related to desktop operting conditions such as internal CPU temperature, and fan RPM.
Desktop Enclosure Setup & Domain Discretization
CAD Modeling of the Experimental Rig
To model the exact experimental setup numerically, the EWISPro7600 enclosure geometry—including the motherboard, CPU heatsink fins, RAM modules, power supply unit, and side ventilation ports—was reconstructed in CAD using SolidWorks. The CAD model was then exported to STEP format for meshing and simulation in ANSYS Fluent.
The CAD model was simplified to remove small features that do not significantly affect airflow, such as screw holes and minor fillets, and wiring.
ANSYS Fluent Poly-Hexcore Mesh
Computational domain meshing was performed in ANSYS Fluent Meshing using a high-density poly-hexcore volume grid with boundary layer inflation layers near solid walls to resolve viscous boundary layers and wake regions near internal components. The figure shows (from left to right) cross sectional view of intake vent, CPU heatsink with RAM cards and closeup view of boundary layers in heatsink.
Gmsh Quadrilateral Surface Mesh Discretization
To discretize the 3D desktop computer case geometry for the 3D panel method solver, a custom surface meshing workflow was executed using Gmsh.
The enclosure surfaces were discretized predominantly into quadrilateral panel elements with quad recombination algorithms, handling degenerated triangular panels at complex geometric junctions. This surface mesh allows evaluating flow influence coefficients without generating 3D interior volume meshes.
Full Enclosure Flow Results & 3-Way Validation
Dual-Fan ADM Operating Point Convergence
Convergence plot demonstrating how iterative doublet surface strength updates iterate across manufacturer P-Q fan curves for both 120mm intake and 80mm CPU fans until flow rate and pressure jump equilibrium is achieved in our ADM solver engine.
ANSYS Fluent Residual Convergence
Residual convergence history for the Navier-Stokes CHT simulation in ANSYS Fluent, demonstrating continuity, velocity, and energy equation convergence across iterations for the full desktop enclosure.
Panel Solver Streamline Visualizations (ParaView)
3D velocity field results from our reduced-order Panel Method + ADM solver were exported to VTK format and rendered in ParaView. The solver captures the primary air suction trajectory drawn through the side intake fan disk and its downstream propagation into the case interior.
Additional vector visualizations examine the flow field from multiple perspectives, illustrating how air enters through side vents and moves toward the top exhaust vent.
CPU Fan Axis Velocity Profile
To quantitatively evaluate solver accuracy, velocity along the axis of the CPU fan from our Panel + ADM Solver was benchmarked directly against ANSYS Fluent CHT results. The results shows that panel method sightly over predicts the velocity magnitude at the fan axis, but captures the overall flow distribution and trends accurately. We hypothize this a direct result of invicid assumptions in the panel method, which caused the frictional losses of the air to be neglected.
Near quasi-steady flow regions (CPU fan inlet probe), the panel+ADM solver achieved an average relative error of 15.11% (compared to Fluent's 8.89%), confirming that reduced-order potential flow captures primary macro-scale flow distribution within seconds.
Intake Streamlines (Side View)
Side view of 3D streamlines entering the enclosure through the side fan disk (Panel Solver + ParaView).
ANSYS Fluent Streamline Field
Full Navier-Stokes streamline paths generated in ANSYS Fluent for the side intake fan configuration, showing turbulent recirculation zones in unguided corners.
Intake to Exhaust Streamline Trajectory
Full enclosure streamline paths originating at the side intake fan and exiting through the rear exhaust vent.
Fluent Temperature Distribution (CPU & RAM)
Conjugate heat transfer (CHT) temperature contour plot across the CPU heatsink and RAM modules from ANSYS Fluent.
3D Streamline Animation: 120mm Side Intake Fan
3D velocity streamline comparison demonstrating ambient air intake pulled through the side ventilation disk and propelled across the PC interior. Left: Panel Method Solver, Right: ANSYS Fluent CFD. The animation was generated using ParaView visualization suite.
80mm CPU Heatsink Fan Animation
3D streamline animation passing through the 80mm CPU heatsink fan actuator disk plane. Top: Panel Method Solver, Bottom: ANSYS Fluent CFD. The animation was generated using ParaView visualization suite.
Air Velocity Near the CPU Fan
Airflow speed predictions vs. physical anemometer sensor readings just before the CPU fan.
Air Velocity Near the RAM
Airflow speed predictions vs. physical anemometer sensor readings at RAM probe location.
Software Architecture & Codebase
Class Hierarchy
Object-oriented Python solver hierarchy (`Panel2D`, `Panel3D`, `BoundaryLayerSolver`, `ActuatorDiskSolver`).
Object-oriented Python solver hierarchy (Velocity Profile Class).
Framework Workflow
End-to-end simulation workflow pipeline from Gmsh CAD import to VTK export.
Source Code & Simulation Framework
Complete Python source code for 2D/3D potential flow panel solvers, Numba JIT influence matrix calculators, Actuator Disk Model fan iterators, boundary layer solvers, PyVista 3D visualizers, and YAML simulation case definitions.