$FOAM_TUTORIALS/compressible/rhoPimpleFoam/laminar/helmholtzResonance
We calculate air flow in a channel with a narrowed center, and see the pressure oscillation due to Helmholtz resonance.
The region "plenum" is modeled using the boundary condition type "plenumPressure" to reduce the calculation amount by omitting the upstream part of the channel. The fluid flows out of the region "outlet". The region "walls" is set to be a stationary wall with zero velocity and the region "symmetry" is set to a symmetric boundary.
Model geometry
The boundary condition type "plenumPressure" is defined in the file modelled/0/p as follows. The boundary condition type "plenumPressure" can be used to simulate the plenum pressure at the inlet.
plenum
{
type plenumPressure;
gamma 1.4;
R 287.04;
supplyMassFlowRate 0.0001;
supplyTotalTemperature 300;
plenumVolume 0.000125;
plenumDensity 1.1613;
plenumTemperature 300;
inletAreaRatio 1.0;
inletDischargeCoefficient 0.8;
timeScale 1e-4;
value uniform 1e5;
}
And, the following settings are made in the file modelled/system/controlDict, and pressure sampling is performed at five locations. The sampling results are saved in the file modelled/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 13632.
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)
A comparison of the pressures at the sampling points (-0.01, 0, 0) with the case where the plenum pressure is not modeled but calculated over the entire field including the upstream part (tutorial "Helmholtz Resonance") is shown below.
Comparison of entire field calculation (Resolved Plenum: magenta) and modeled calculation (Modelled Plenum: cyan)
9.48 seconds *4 parallel, Inter(R) Core(TM) i7-8700 CPU @ 3.20GHz 3.19GHz