We calculate air flow in a channel with a narrowed center, and see the pressure oscillation due to Helmholtz resonance.
The flow enters from the region "inlet" with a mass flow rate 0.0001 kg/s and exits from the region "outlet". The region "walls" is the stationary wall with zero velocity and the region "symmetry" is the symmetric boundary.
Model geometry
Summary for model geometry
And, the following settings are made in the file resolved/system/controlDict, and pressure sampling is performed at five locations. The sampling results are saved in the file resolved/postProcessing/probes/0/p.
The meshes are as follows, and the number of mesh is 30816.
Meshes
Meshes (XY-plane)
The calculation result is as follows.
Flow velocity at final time (U)
Pressure at final time (p)
Time series of pressure at sampling point (-0.01, 0, 0) (p)
Position of sampling point (-0.01, 0, 0)
Commands
cp -r $FOAM_TUTORIALS/compressible/rhoPimpleFoam/laminar/helmholtzResonance helmholtzResonance
cd helmholtzResonance
# Required to use the command "cloneCase"
. $WM_PROJECT_DIR/bin/tools/RunFunctions
# Create a case from the template file
cd system
ln -s blockMeshDict.resolvedBlocks blockMeshDict.caseBlocks
ln -s blockMeshDict.resolvedBoundary blockMeshDict.caseBoundary
cd ../
cloneCase . resolved
# Calculate the case we created
cd resolved
blockMesh
decomposePar
mpirun -np 4 rhoPimpleFoam -parallel
reconstructPar
paraFoam
# Plot the time variation of pressure, with the first column as the horizontal axis and the fourth column minus 100000 as the vertical axis.
gnuplot
gnuplot> set xlabel "Time (s)"
gnuplot> set ylabel "Guage pressure in the neck (Pa)"
gnuplot> plot "postProcessing/probes/0/p" using 1:($4-1e5) title "Resolved Plenum" with lines