$FOAM_TUTORIALS/compressible/sonicFoam/laminar/shockTube
The shock tube is a device that generates shock wave by quick removing the diaphragm between different pressures fluids (mainly gas), which is sealed by the diaphragm.
In this tutorial, the shock tube is modeled in one dimension, with the high pressure side at 100000 Pa and the low pressure side at 10000 Pa, and the diaphragm is removed at time 0. We calculate the generating shock wave for 0.007 seconds.
The turbulence model is not used.
The initial conditions are specified in the file system/setFieldsDict as follows.
defaultFieldValues ( volVectorFieldValue U (0 0 0) volScalarFieldValue T 348.432 volScalarFieldValue p 100000 ); regions ( boxToCell { box (0 -1 -1) (5 1 1) ; fieldValues ( volScalarFieldValue T 278.746 volScalarFieldValue p 10000 ) ; } );
And 1000 sampling points on the X-axis are specified in the file constant/sample as follows. The sampling is done after the calculation.
type sets; libs ("libsampling.so"); interpolationScheme cellPoint; setFormat raw; sets ( data { type uniform; axis x; start (-4.995 0 0); end (4.995 0 0); nPoints 1000; } ); fields (T mag(U) p);
The mesh is shown below. The domain from -5 to 5 in X direction is divided into 1000 sections.
The calculation result is as follows.
The flow velocity and pressure are as follows. Note that the calculation is done in one dimension.
The results of the sampling are as follows.
We can see the shock wave traveling from the high pressure direction to the low pressure direction.
The command "setFields" sets the initial conditions, and the command "postProcess" samples from the calculation results.
1.7 seconds *Single, Inter(R) Core(TM) i7-8700 CPU @ 3.20GHz 3.19GHz