CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   how to extend solver compressibleInterFoam to consider ideal gas (http://www.cfd-online.com/Forums/openfoam-programming-development/113446-how-extend-solver-compressibleinterfoam-consider-ideal-gas.html)

 jianfeng February 19, 2013 21:15

how to extend solver compressibleInterFoam to consider ideal gas

Hi, everyone. I am a beginner to use OpenFOAM and my interest is computing the interface between two immiscible compressible gases. It seems that current compressibleInterFoam solver is designed to solve 2 compressible, isothermal immiscible fluids. So if I could extend this solver to consider the interface between two or more ideal gases or real gas? Thanks in advance. I have no idea what should I do at all, please give me some advice.

 mkraposhin February 20, 2013 14:09

Hello, Your question sounds very complex (for me).

You are interested in two-phase flow of immiscible ideal-gases, but interFoam family solvers considers for liquids with large density variation.
Are you sure that assumptions, made in interFoam solvers family are suitable for your task?

If yes, then you can do modifications easily:

1) relate compressibility of each gas to temperature psi = 1/((R/M)*T)
2) rho = psi*p
3) write temperature equation, like this:
fvm::ddt(T) + fvm::div(phi,T) - fvm::Sp(divU,T) == (... some expansion sources ...)

I solved this case and if you need, then we need to examine your problem step by step

 jianfeng February 20, 2013 14:44

Thank Kraposhin. I just intend to calculate the interaction of a shock wave with cylindrical Helium gas inhomogeneities, like the experiment conducted by J.*F. Haas and B. Sturtevant (JOURNAL OF FLUID MECHANICS, 1987). A front tracking code was used to perform this simulation in my previous work. And I hope OpenFOAM will work on the same case.

And which solver did you make the mentioned modifications, interFoam or compressibleInterFoam? Could you please give me a detailed description about where and how in the solver should be modified?

 mkraposhin February 22, 2013 12:25

2 Attachment(s)
Have a nice day, jianfeng
I have good news for you - in my archives i found old version of non-isothermal compressibleInterFoam (see attachment).

i made test case (based on original) and it behaves well.

But! dp/dt works very strange (for me)

 jianfeng February 25, 2013 02:35

Kraposhin, really thank you for your share. I have compiled the attached code successfully and I will test it with my own case. Hope it work fine.

 marzbali February 28, 2013 14:43

OF version

Hi,
Is the solver developed for OF-1.5 dev.?
Thanks

 mkraposhin March 1, 2013 14:52

Quote:
 Originally Posted by marzbali (Post 410719) Hi, Is the solver developed for OF-1.5 dev.? Thanks
this solver was made for OF-2.1

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