Helmholtz Resonance (entire field)

Update: December 17, 2018
OpenFOAM 4.x

Case directory

$FOAM_TUTORIALS/compressible/rhoPimpleFoam/laminar/helmholtzResonance

Summary

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 Model geometry
Summary for 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.

functions
{
	probes
	{
		libs ( "libsampling.so" );
		type probes;
		name probes;
		writeControl timeStep;
		writeInterval 1;
		fields ( p );
		probeLocations
		(
			( -0.045  0     0)
			( -0.045  0.020 0)
			( -0.010  0     0)
			(  0.0125 0     0)
			(  0.0125 0.020 0)
		);
	}
}

The meshes are as follows, and the number of mesh is 30816.

Mesh Meshes
Meshes (XY-plane) Meshes (XY-plane)

The calculation result is as follows.

Flow velocity at final time (U) Flow velocity at final time (U)
Pressure at final time (p) Pressure at final time (p)
Time series of pressure at sampling point (-0.01, 0, 0) (p) Time series of pressure at sampling point (-0.01, 0, 0) (p)
Position of sampling point (-0.01, 0, 0) 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

Calculation time

22.69 seconds *4 parallel, Inter(R) Core(TM) i7-8700 CPU @ 3.20GHz 3.19GHz

Reference