February 04, 2015

Solving the pressure pulse traveling in a tube with sonicFoam

4.2.15 Posted by Florin No comments
This is the shock tube problem solved 1D using OpenFOAM.
Problem description: a cylindrical tube is separated at the middle with a non-deformable membrane; in right hand side chamber the pressure is 10 000 Pa and temperature is 248 K; in the left hand side chamber the pressure is 100 000 Pa and temperature 402 K. These are the initial conditions.
The membrane disappears suddenly and the gas starts to move; compute the distributions for pressure, temperature and velocity 7 milliseconds after the membrane is removed.
Velocity field after 7 milliseconds
The case files can be copied from your local installation folder: user>OpenFOAM>tutorials>compressible>sonicFoam>laminar>shockTube.

The analysis workflow is the following:
change the number of cells in blockMeshDict
blockMesh: three meshes are made 100, 1 000 and 10 000 cells
setFields
sonicFoam
change the number of points in sampleDict to 1 000 or more
foamCalc mag U
sample
change extension of *.xy to *.csv
plot in Excel or LibreOffice Calc

Mesh:
Initial pressure:
Initial temperature:
Final pressure:
Final temperature:
Final velocities:
Charts for data made in LibreOffice Calc:
Pressure:
Temperature:
Velocity:

Discussion:
Only using 10 000 cells we can express the perturbation in the fields of pressure, temperature and velocity; on the temperature chart, the 100 cells mesh give very bad results.
If you have any questions about this case please leave a comment below.




0 comments:

Post a Comment