In this example we shall investigate a problem of rapid opening of a pipe valve
close to a pressurised liquid-filled tank. The prominent feature of the result in
such cases is the propagation of pressure waves which must therefore be modelled
as a compressible liquid.
This tutorial introduces the following OpenFOAM features for the first
time:
The domain is 2 dimensional and consists of
a tank with a small outflow pipe as shown in Figure 3.9
Figure 3.9:
Geometry of a tank with outflow pipe
Governing equations
This problem requires a model for compressibility in
the fluid in order to be able to resolve waves propagating at a finite speed. A
barotropic relationship is used to relate density and pressure are
related to .
In order to improve the numerical accuracy, we shall use the reference level of
1 for the pressure field. Note that both the internal field level and the
boundary conditions are offset by the reference level.
Before we commence the setup of the calculation, we need to consider the
characteristic velocity of the phenomenon we are trying to capture. In the case
under consideration, the fluid velocity will be very small, but the pressure wave
will propagate with the speed of sound in water. The speed of sound is calculated
as:
(3.18)
For the mesh described above, the characteristic mesh size is approximately
2 (note the scaling factor of in the blockMeshDict file). Using
(3.19)
a reasonable time step is around , giving the number of
, based on the speed of sound. Also, note that the reported number by
the code (associated with the convective velocity) will be two orders of magnitude
smaller. As we are interested in the pressure wave propagation, we shall set the
simulation time to . For reference, the controlDict file is quoted
below.
The user can run the case and view results in dxFoam. The liquid flows out
through the nozzle causing a wave to move along the nozzle. As it reaches the
inlet to the tank, some of the wave is transmitted into the tank and some
of it is reflected. While a wave is reflected up and down the inlet pipe,
the waves transmitted into the tank expand and propagate through the
tank. In Figure 3.10, the pressures are shown as contours so that the
wave fronts are more clearly defined than if plotted as a normal isoline
plot.
If the simulation is run for a long enough time for the reflected wave to return
to the pipe, we can see that negative absolute pressure is detected. The modelling
permits this and has some physical basis since liquids can support tension, i.e.
negative pressures. In reality, however, impurities or dissolved gases in
liquids act as sites for cavitation, or vapourisation/boiling, of the liquid
due to the low pressure. Therefore in practical situations, we generally
do not observe pressures falling below the vapourisation pressure of the
liquid; not at least for longer than it takes for the cavitation process to
occur.
Looking at the evolution of the resulting pressure field in time, we can clearly
see the propagation of the pressure wave into the tank and numerous reflections
from the inside walls. It is also obvious that the pressure wave is smeared over a
number of cells. We shall now refine the mesh and reduce the time step to obtain
a sharper front resolution. Simply edit the blockMeshDict and increase the number
of cells by a factor of 4 in the and directions, i.e. block 0 becomes
(120 80 1) from (30 20 1) and so on. Run blockMesh on this file. In
addition, in order to maintain a Courant number below 1, the time step
must be reduced accordingly to . The second simulation
gives considerably better resolution of the pressure waves as shown in
Figure 3.11.