CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Air compression using multiphase solver (https://www.cfd-online.com/Forums/openfoam-solving/224496-air-compression-using-multiphase-solver.html)

dygu February 21, 2020 16:20

Air compression using multiphase solver
 
1 Attachment(s)
Hello,

I am trying to simulate the compression and expansion of an ideal gas (air) in a multiphase setting where the secondary phase (water) is acting to compress the air. I am using the compressibleInterDyMFoam solver (DyM for future use on dynamic grids; tested using OFv1812 and OFv1912) and I've created a simple 2D test case shown below:

https://i.imgur.com/Tv2kFUg.gif

I am using an oscillating inlet flow rate at the bottom to achieve the up-down motion of the air-water interface. The initial pressure in air is p0=1.79kPa. Here is the air pressure as a function of time sampled at a single probe location:

https://i.imgur.com/8KcRwFH.png

After each compression/expansion cycle, the air pressure continues to increase rather than follow the expected PV^gamma=constant behavior. I found the exact same behavior using the same solver but with just a cube of air that is compressed and expanded by a sinusoidal motion of one of the walls (no water in the cube). I was able to trace the error down to the time integration scheme (Euler). The backward scheme resolved this error but I am unable to use it robustly when two phases are present in the domain, like in this test case. I understand that the backward scheme can be unbounded. I have also tried the CrankNicolson scheme with a range of coefficients but I have found it to be extremely unstable even on this perfect orthogonal grid and the error was still present (but somewhat smaller relative to Euler).

I've attached this same test case and I'd appreciate any hints as to how to proceed in achieving the expected thermodynamic behavior using this multiphase solver.

Thank you


All times are GMT -4. The time now is 22:02.