Skip to main content
Have a personal or library account? Click to login
pyCAFE: A Finite Element Framework for Solving Acoustic Problems in Python Cover

pyCAFE: A Finite Element Framework for Solving Acoustic Problems in Python

Open Access
|Jun 2026

Figures & Tables

Figure 1

Overall architecture of the pyCAFE framework and main software modules.

Table 1

Eigenfrequency comparison between pyCAFE and the analytical solution for the rectangular rigid-wall cavity. Results are reported for CQUAD4 and CQUAD8 elements using the balanced mesh size h=0.070 m.

MODE (m, n)fan [Hz]fCQUAD4 [Hz]ε4 [%]fCQUAD8 [Hz]ε8 [%]
(1,0)171.5000171.86010.2099171.50030.0002
(0,1)343.0000345.88540.8412343.00960.0028
(2,0)343.0000345.88540.8412343.00960.0028
(1,1)383.4857386.22870.7153383.49440.0023
(2,1)485.0753489.15580.8412485.08900.0028
(3,0)514.5000524.26221.8974514.57170.0139
(3,1)618.3520628.08251.5736618.41800.0107
(0,2)686.0000709.19653.3814686.29680.0433
(4,0)686.0000709.19653.3814686.29680.0433
(1,2)707.1126729.72293.1976707.40090.0408
Mean error1.6880%0.0163%
Figure 2

Histogram comparing the first 10 eigenfrequencies of the rectangular rigid-wall cavity obtained from the analytical solution, pyCAFE CQUAD4, and pyCAFE CQUAD8. The lower panel reports the relative error with respect to the analytical solution for the balanced mesh size h=0.070 m.

Table 2

h-refinement convergence study for the rectangular rigid-wall cavity. The table reports the number of nodes, the mean relative eigenfrequency error over the first 10 modes, and the corresponding solver time for CQUAD4 and CQUAD8 elements.

h [m]CQUAD4CQUAD8
NODESMEAN ERR. [%]TIME [s]NODESMEAN ERR. [%]TIME [s]
0.2001810.29960.00452.48860.01
0.140405.88770.001070.18510.01
0.100663.31360.011810.06060.02
0.0701201.68800.013370.01630.04
0.0502310.82500.026610.00400.09
0.0354500.40660.0513050.00100.20
Figure 3

h-refinement convergence of the mean eigenfrequency error over the first 10 modes. The dashed lines indicate the theoretical convergence rates O(h2) for CQUAD4 and O(h4) for CQUAD8. The solver time associated with each mesh is annotated next to the corresponding marker.

pyCAFEFEniCSx
Element typeCQUAD8 serendipity (p=2)Lagrange Q2 tensor-product
MeshGmsh structured CQUAD8create_rectangle 14×7
DOFs, modal337435
Hard-wall BCNatural NeumannNatural Neumann
Table 3

Comparison of the eigenfrequencies obtained with pyCAFE CQUAD8, FEniCSx Q2, and the analytical solution.

MODE (m, n)fan [Hz]fFEniCSx [Hz]εF [%]fpyCAFE [Hz]εP [%]
(1,0)171.5000171.50030.0002171.50030.0002
(0,1)343.0000343.00960.0028343.00960.0028
(2,0)343.0000343.00960.0028343.00960.0028
(1,1)383.4857383.49430.0023383.49440.0023
(2,1)485.0753485.08880.0028485.08900.0028
(3,0)514.5000514.57170.0139514.57170.0139
(3,1)618.3520618.41700.0105618.41800.0107
(0,2)686.0000686.29680.0433686.29680.0433
(4,0)686.0000686.29680.0433686.29680.0433
(1,2)707.1126707.40070.0407707.40090.0408
Mean error0.0163%0.0163%
Figure 4

Left: Grouped bar chart of the first 10 eigenfrequencies obtained from the analytical solution, FEniCSx Q2, and pyCAFE CQUAD8. Right: Modal comparison summary normalised by the FEniCSx values. Ratios below one indicate smaller values for pyCAFE.

Figure 5

Mode-shape comparison between pyCAFE CQUAD8 and FEniCSx Q2 for modes 1, 4, 6 and 7.

Figure 6

Left: Grouped bar chart of the first 10 eigenfrequencies for the zero pressure cavity, comparing the analytical solution, FEniCSx Q2, and pyCAFE CQUAD8. Right: Modal comparison metrics normalised by the FEniCSx values.

Figure 7

Mode-shape comparison between pyCAFE CQUAD8 and FEniCSx Q2 for modes 1, 2, 4 and 6 of the pressure-release cavity, with p=0 on all four walls. The comparison confirms that the two solvers reproduce the same spatial pressure patterns.

Table 4

Comparison of the eigenfrequencies obtained with pyCAFE CQUAD8, FEniCSx Q2, and the analytical solution for the pressure-release cavity with p=0 on all walls, using h=0.070 m.

MODE (m, n)fan [Hz]fFEniCSx [Hz]εF [%]fpyCAFE [Hz]εP [%]
(1,1)383.4857383.49430.0023383.49440.0023
(2,1)485.0753485.08880.0028485.08900.0028
(3,1)618.3520618.41700.0105618.41800.0107
(1,2)707.1126707.40070.0407707.40080.0408
(2,2)766.9713767.24110.0352767.24380.0355
(4,1)766.9713767.24110.0352767.24380.0355
(3,2)857.5000857.78050.0327857.79320.0342
(5,1)923.5558924.38220.0895924.38790.0901
(4,2)970.1505970.57030.0433970.60820.0472
(1,3)1043.19381045.31310.20321045.31360.2032
Mean error0.0495%0.0502%
Table 5

Eigenfrequencies, hard-wall cavity (Neumann walls), COMSOL versus pyCAFE CQUAD8 versus analytical (h=0.070 m).

MODE (m, n)fan [Hz]fCOMSOL [Hz]εC [%]fpyCAFE [Hz]εP [%]
(1,0)171.5000171.60200.0595171.50030.0002
(0,1)343.0000343.21080.0615343.00960.0028
(2,0)343.0000343.21310.0621343.00960.0028
(1,1)383.4857383.72190.0616383.49440.0023
(2,1)485.0753485.37500.0618485.08900.0028
(3,0)514.5000514.85990.0699514.57170.0139
(3,1)618.3520618.76970.0675618.41800.0107
(0,2)686.0000686.63360.0924686.29680.0433
(4,0)686.0000686.70410.1026686.29680.0433
(1,2)707.1126707.82040.1001707.40080.0408
Mean error0.0739%0.0163%
Table 6

Eigenfrequencies, zero pressure on all the four sides of the cavity (p=0 on all walls), COMSOL versus pyCAFE CQUAD8 versus analytical (h=0.070 m).

MODE (m, n)fan [Hz]fCOMSOL [Hz]εC [%]fpyCAFE [Hz]εP [%]
(1,1)383.4857383.72190.0616383.49440.0023
(2,1)485.0753485.37500.0618485.08900.0028
(3,1)618.3520618.76970.0675618.41800.0107
(1,2)707.1126707.82040.1001707.40080.0408
(2,2)766.9713767.63330.0863767.24380.0355
(4,1)766.9713767.69530.0944767.24380.0355
(3,2)857.5000858.27920.0909857.79320.0342
(5,1)923.5558924.73700.1279924.38790.0901
(4,2)970.1505971.09640.0975970.60820.0472
(1,3)1043.19381045.93330.26261045.31360.2032
Mean error0.1051%0.0502%
Figure 8

Roadmap of the future works for pyCAFE.

DOI: https://doi.org/10.5334/jors.677 | Journal eISSN: 2049-9647
Language: English
Page range: 48 - 48
Submitted on: Jan 13, 2026
Accepted on: May 28, 2026
Published on: Jun 22, 2026
Published by: Ubiquity Press
In partnership with: Paradigm Publishing Services

© 2026 Daniele Fabbri, Fabio Bruzzone, Carlo Rosso, published by Ubiquity Press
This work is licensed under the Creative Commons Attribution 4.0 License.