Skip to content

Meshing a Raspberry Pi

The July mesh features the meshing of a Raspberry Pi – also known as a raspi. We will show details of a Pointwise mesh, and Computational Fluid Dynamics (CFD) analysis of the thermally driven flow inside a simplified raspi and its protective case (See Figure 1).

I recently purchased a raspi 4, which is the latest model that was only just released for sale. The raspi is great for experimenting with hardware and software, especially as they are very cheap and simple to configure. On a side note, our friends at Pointwise have written a blog on performing CFD with OpenFOAM on a raspi 3. Installing OpenFOAM on my raspi 4 is certainly on the list of things to do, as the raspi 4 is much more powerful than the raspi 3.

Experience has shown that the raspi CPU/GPU temperature can rise pretty high sometimes, even to the point where it shuts down – especially on hot summer days in confined spaces running all 4 cores. Others have also found issues where the raspi can heat up too much, despite the default throttle temperature of 82°C. By the way – the core temperature can be checked at command line:

$ vcgencmd measure_temp

So I thought it would be interesting to perform a CFD air flow analysis to see how well a raspi can self ventilate. It was assumed the raspi has a basic case that is partially open to ventilation. The raspi needs to avoid overheating in a variety of climates, as it may be placed in a hot environment as part of any number of Internet of Things (IoT) applications e.g. hot, confined or outdoor spaces where sunlight can be impacting more than it would be in an office/home situation.

Figure 1 - an actual raspi with a a typical case and the clip on top removed for ventilation
Figure 1 – An actual raspi with a typical case and the clip-on top removed for ventilation

Raspi Mesh Using Pointwise

Some of the geometry features of the raspi (such as small circuits boards, ports etc) were simplified, but the bulk features (the main typical case, CPU, USB and LAN ports and two ventilation openings) have been modelled. The geometry/CAD used is very similar to the real size/layout of the raspi 3 or 4 products.

Triangles are used for the surface mesh (Figure 2). Pointwise does allow for quad dominant surface meshes, however, this would have resulted in an increase in pyramid elements at the top of the T-Rex inflation layers, which the selected solver (ANSYS CFX) tends to dislike in terms of solver robustness. Incidentally, T-Rex is a Pointwise meshing method that generates anisotropic inflation layers from the boundaries of unstructured domains (surfaces of triangles, quads).

Figure 3-7 show various cut planes through CPU/GPU core, and show a range of meshing types being used. T-Rex is used on the walls inside the raspi case, whilst the raspi circuit board is made up of extruded prisms (Figure 7).

Figure 2 - Surface mesh of the raspi, showing CPU/GPU core (solid), circuit board (solid), pins, case structure and USB/LAN ports
Figure 2 – Surface mesh of the raspi, showing CPU/GPU core (solid), circuit board (solid), pins, case structure and USB/LAN ports
Figure 3 - Cut plane through raspi CPU/GPU core, coloured by non-orthogonality.
Figure 3 – Cut plane through raspi CPU/GPU core, coloured by non-orthogonality.
Figure 4 – Horizontal cut plane near raspi CPU/GPU core, coloured by non-orthogonality.
Figure 5 – Horizontal cut plane near raspi CPU/GPU core, coloured by cell type (blue is hexa, red is tet, green is prism, yellow is pyramid).
Figure 6 - Vertical cut plane of raspi CPU/GPU core, coloured by cell type (blue is hexa, red is tet, green is prism, yellow is pyramid). Magenta box is circuit board solid zone, and Aqua box is the baffle walls of the case.
Figure 6 – Vertical cut plane of raspi CPU/GPU core, coloured by cell type (blue is hexa, red is tet, green is prism, yellow is pyramid). Magenta box is circuit board solid zone, and Aqua box is the baffle walls of the case.
Figure 7 - Close up of Figure 6. T-rex mesh wraps around raspi CPU/GPU core, and other walls, except at the openings
Figure 7 – Close up of Figure 6. T-rex mesh wraps around raspi CPU/GPU core, and other walls, except at the openings

CFD Analysis

Using the Pointwise mesh, CFD modelling of the raspi has been performed with ANSYS CFX to understand the internal natural convection driven flow. Further studies are also possible on the size of openings (top and sides) required for suitable ventilation.

The air is treated as an ideal gas, thus providing an accurate representation of buoyancy forces over the full temperature range, rather than using the Boussinesq approximation which can become inaccurate for large temperature gradients.

The simulation considered a hot day scenario where the ambient temperature is 40°C and where the raspi is under a moderate CPU/GPU load. It was assumed the only component producing heat was the CPU/GPU core, at 1W of heat generation.

Figure 8 shows a) streamlines and a slice of the air velocity vector field, coloured by air speed (m/s), and b) the contours of the surface temperature on the CPU/GPU core and the circuit/case walls.

Figure 9 shows a slice of temperature through the air domain and solid domains (CPU/GPU core and circuit board). The fibre glass based circuit board is not very conductive or dense and does not hold or transfer much energy.

Overall the maximum temperature on the CPU/GPU is only 67°C, which is not bad on a hot day. Cooler air flows in through the side gap and out through the top opening like a chimney, keeping the raspi from overheating.

Thanks for reading, the next edition will be later in August 2019. Until then, happy meshing!

To see more about our Pointwise distribution go here, or for a free trial of Pointwise, go here.

  • Darrin Stephens
Monthly Mesh
1. Cricket bat meshing
2. Twin box bridge deck meshing
3. Golf Driver Meshing
4. Frigate Helipad Pointwise unstructured mesh
5. Frigate Helipad – Structured O-H mesh
6. Horizontal wind turbine near a bridge
7. Meshing a Raspberry Pi
8. Scripting Pointwise Meshing
9. 2D meshing with sources in Pointwise
10. Pointwise as a Pre-processor for CFD
11. Mesh Adaption with Caelus and Pointwise
12. Meshing Santa’s Pod Racer Sled
13. Scripting Structured-Unstructured Meshes for Aerospace
14. Mesh Adaptation With Pointwise, Caelus & Python
15. Normal Extrusion Hybrid Meshes for Multi-Element Airfoils
16. Car park Ventilation CFD with Pointwise, Caelus, CFX and FDS
17. Mesh Independence for Car Park Ventilation
18. It’s all in the numbering – mesh renumbering may improve simulation speed
19. Voxel Transition Cell Recombination for OpenFOAM meshes
20. Meshing Santa’s Hat
21. 2D Sources in Meshes in Pointwise 18.4R1
Back To Top
Search