floquation / OF-kva_interfaceProperties

Extension of OpenFOAM's "interfaceProperties" library. A run-time selection mechanism was implemented to select the model for calculating the surface tension force & curvature. These models can reduce spurious currents.
https://www.cfd-online.com/Forums/openfoam-programming-development/189211-attempt-decrease-spurious-currents-vof.html#post653522
GNU General Public License v3.0
22 stars 16 forks source link

Compatibility with OF CFD version #7

Open Bumble-7 opened 1 year ago

Bumble-7 commented 1 year ago

Hi Floquation, I read your explanation regarding the parasitic currents prevailing at the interface, and I liked the idea of using the smoothened alpha field to calculate the curvature. I was planning to use the code and run a couple of cases. But unfortunately, I am using the OF CFD version (1812). Any suggestion on how to compile it the CFD version if you have tried?

Thank you in advance

floquation commented 1 year ago

Hi Bumble,

I haven't used OF in about 6 years, so I really don't recall the details from the top of my head, nor do I want to relearn it to adapt it to the latest OF versions. 😅

But perhaps these things help anyway:

So, to adapt my code to your desired version, I'd recommended opening OF40's interfaceProperties(.C/.H) and my version of OF40's interfaceProperties(.C/.H). Compare the changes I have made to include my curvatureModel library into their interfaceProperties. Then, open your version's interfaceProperties(.C/.H), and try to implement my changes into your desired version. Upon doing so, I reckon my curvatureModel code files should work.

Good luck!

Bumble-7 commented 1 year ago

Hey, Thank you for your response. Yes, I looked at the code, and it can easily be integrated into the existing solvers. I probably took a longer method. I made a new curvature model in the existing solver and used the smoothen function to calculate the k. The alpha is smoothened now.

I am trying to simulate a stationary bubble of size 100 microns in diameter. At this scale, the parasitic currents are dominant and destabilize the bubble. Hence, I was planning to smoothen the alpha and calculate the curvature. Assuming I have correctly used your program, I still see that there are some issues with parasitic currents. I also see some residual alpha where it should not be. I am using the smoothening iterations as 20. I used 2, but still the bubble was moving however there were no nonphysical curvature values. I am attaching the snips to you (alpha and curvature). If you have any comments, please share them if you don't mind. Is it true that the smoothening method works at all scales? Or does the method have a limitation by itself? From my understanding, there should not be any problem at all scales, but please correct me.

At t = 0 image

At t = 0.0005 s image

Thank you

floquation commented 1 year ago

Hey, I recommend you ask this question on the CFD-forums (https://www.cfd-online.com/Forums/). There should be a lot of people there that are very knowledgeable about topics such as this one, whereas I haven't been working on these things for half a decade and thus really do not recall these kind of things from the top of my head. Just make sure you ask your question there as precise as possible, e.g., they'll also want to know what kind of mesh you're using.

Bumble-7 commented 1 year ago

Hey, Sure, that is an excellent way to get input. Thank you for your response.

Take care