CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Turn an incompressible multiphase solver into compressible (https://www.cfd-online.com/Forums/openfoam-programming-development/244366-turn-incompressible-multiphase-solver-into-compressible.html)

Yupp August 4, 2022 04:57

Turn an incompressible multiphase solver into compressible
 
Hello foamers.

First, I would like to apologize for my bad English, and as I just started programming in OpenFoam, it may be good for me to be pedagogue (I'm still a stranger to this).

There is my problem : I want to turn the 'interCondensatingEvaporatingFoam' multiphase solver from incompressible to compressible. This solver initially uses the PIMPLE algorithm.

Can anyone help me out on how to do this as cleanly as possible? I searched on many forums but couldn't really find it. I was told that a good way to start was to convert volumetric flows to mass flows. For now, I only compiled my new solver in USER_APPBIN.

Thank you!

aliyah. September 5, 2022 13:43

Hello

In my opinion and based on my experience, turning interCondensatingEvaporatingFoam from incompressible to compressible is a really messy work and involves lots of modifications in the code and libraries you use.

I recommend checking out a solver*called TwoPhaseFlow if you require a compressible solver for solving thermal*phase change phenomena, such as boiling or condensation. Conjugate heat transfer between solid and fluid areas is addressed by this solver, which is a hybrid of heatConductionFoam and buoyantFoam. I suggest check out this solver and its*tutorials in GitHub*if you're interested.

Best

überschwupper September 6, 2022 02:22

I wouldnt recommend your idea. it will result into adding new dependencies to the density.

1. equation of state rho=f(p,T) => Adding equation of state and Energy equation
2. pressure-velocity coupling needs a density correction
+more ..


Comppressible and incompressible solvers are different. Its a different approach in solving the N-S-Equations. the role of pressure changes dramaticly in compressible flows. Better approach would be starting from a compressible solver and adding features to that instead of vice versa.


All times are GMT -4. The time now is 14:45.