# Initial Perturbation of Interface in Rayleigh-Taylor Instability

 Register Blogs Members List Search Today's Posts Mark Forums Read

 October 10, 2017, 10:49 Initial Perturbation of Interface in Rayleigh-Taylor Instability #1 New Member   Join Date: Oct 2017 Posts: 12 Rep Power: 6 I am using buoyantPimpleFoam to simulate Rayleigh-Taylor instability of air with a hot gas on the lower portion of the domain (T = 900 K) and cold air on top (T = 300 K). Pressure being 101.325 kPa and g = (0,-9.81,0) m/s^2. I originally tried to perturb the interface by a simple cosine function f(x) = 0.05/2*(1+cos(2*pi*x)), but the mesh resolution created a "stair step" situation where the small steps acted as artificial perturbation surfaces. https://imgur.com/TP0rx7R https://imgur.com/mXQDZGI This a short video of how the "stair stepping" forces the flow to behave: https://imgur.com/TP0rx7R I tried running this at a finer resolution, but the behavior is still the same and becomes economically less practical as you refine this more and more. My next attempt was to apply a perturbation to the y-velocity instead. The idea being that the baroclinic vorticity generation (cause of the RT growth) occurs across the density gradient, thus any "stair stepping" would cause instability growth. Thus as long as the density interface is flat, then the above problems would not be present. The perturbation velocity would then force small fluid motion leading to interface movement without the effects of the mesh present. I did this via the following function: Vy = 0.01/4*(1+cos(2*pi*x))*(1+cos(100*pi*y)) But when I ran this for over a second, the interface had not moved even a little bit. I'm not quite sure why the above didn't work. Is there a different way to perturb the interface in OpenFoam that would avoid the mesh issue? And if my solution is the correct method, then why was I not able to get fluid motion?

 October 11, 2017, 07:05 #2 Senior Member   Peter Baskovich Join Date: Jul 2014 Posts: 127 Rep Power: 9 Can you use a VOF number instead of pure species to smooth the interface?

October 11, 2017, 23:15
#3
New Member

Join Date: Oct 2017
Posts: 12
Rep Power: 6
Quote:
 Originally Posted by pete20r2 Can you use a VOF number instead of pure species to smooth the interface?
Aren't VOF methods generally used for multiphase flows?

 March 7, 2018, 21:00 #4 New Member   Pan Aniu Join Date: Mar 2018 Location: Wuhan Posts: 7 Rep Power: 6 I have a similar problem when I simulated mass transfer of the interface in Fluent. Jagged lines will make the evolution of the sinusoid interface become out of expectation. I wonder whether you have solved the problem and please do me a favor to give me some suggestion.

 January 13, 2020, 11:20 #5 Senior Member   Join Date: Jul 2019 Posts: 148 Rep Power: 4 Dear AMK53, Greetings. I am wondering how did you add the perturbation. Thanks

 January 14, 2020, 05:27 #6 Senior Member   Yogesh Bapat Join Date: Oct 2010 Posts: 102 Rep Power: 13 Hello, As Peter mentioned you can use VOF for RT instability. You can use two different fluid with given gas densities. Regards, -Yogesh

 January 17, 2020, 02:19 #7 New Member   Pavan Inguva Join Date: Dec 2019 Location: Singapore Posts: 7 Rep Power: 4 Hey @Bodo1993! Its possible to use either a codestream in the 0/alpha.water file or use funkySetFields with swak4Foam. To implement the code stream, add this to your 0/alpha.water: ``` internalField #codeStream { codeInclude #{ #include "fvCFD.H" #}; codeOptions #{ -I\$(LIB_SRC)/finiteVolume/lnInclude \ -I\$(LIB_SRC)/meshTools/lnInclude #}; codeLibs #{ -lmeshTools \ -lfiniteVolume #}; code #{ const IOdictionary& d = static_cast(dict); const fvMesh& mesh = refCast(d.db()); scalarField alpha(mesh.nCells(), 0.); forAll(alpha, i) { const scalar x = mesh.C()[i][0]; const scalar y = mesh.C()[i][1]; if (y >= 2.1 + 0.1*Foam:ow(cos(constant::mathematical:i*x)*co s(constant::mathematical:i*x), 2)) { alpha[i] = 1.; } } Foam::writeEntry(os,alpha); #}; }; ``` This is for openfoam 7. MMNCH likes this.

January 17, 2020, 10:52
#8
Senior Member

Join Date: Jul 2019
Posts: 148
Rep Power: 4
Quote:
 Originally Posted by pavaninguva Hey @Bodo1993! Its possible to use either a codestream in the 0/alpha.water file or use funkySetFields with swak4Foam. To implement the code stream, add this to your 0/alpha.water: ``` internalField #codeStream { codeInclude #{ #include "fvCFD.H" #}; codeOptions #{ -I\$(LIB_SRC)/finiteVolume/lnInclude \ -I\$(LIB_SRC)/meshTools/lnInclude #}; codeLibs #{ -lmeshTools \ -lfiniteVolume #}; code #{ const IOdictionary& d = static_cast(dict); const fvMesh& mesh = refCast(d.db()); scalarField alpha(mesh.nCells(), 0.); forAll(alpha, i) { const scalar x = mesh.C()[i][0]; const scalar y = mesh.C()[i][1]; if (y >= 2.1 + 0.1*Foam:ow(cos(constant::mathematical:i*x)*co s(constant::mathematical:i*x), 2)) { alpha[i] = 1.; } } Foam::writeEntry(os,alpha); #}; }; ``` This is for openfoam 7.
Hi pavaninguva,
Thanks a lot for your time. Kindly, it will be very helpful to know the alternative approach as well (the funkySetFields one).
Much appreciated.

January 28, 2020, 03:31
#9
New Member

Pavan Inguva
Join Date: Dec 2019
Location: Singapore
Posts: 7
Rep Power: 4
Quote:
 Originally Posted by AMK53 I am using buoyantPimpleFoam to simulate Rayleigh-Taylor instability of air with a hot gas on the lower portion of the domain (T = 900 K) and cold air on top (T = 300 K). Pressure being 101.325 kPa and g = (0,-9.81,0) m/s^2. I originally tried to perturb the interface by a simple cosine function f(x) = 0.05/2*(1+cos(2*pi*x)), but the mesh resolution created a "stair step" situation where the small steps acted as artificial perturbation surfaces. https://imgur.com/TP0rx7R https://imgur.com/mXQDZGI This a short video of how the "stair stepping" forces the flow to behave: https://imgur.com/TP0rx7R I tried running this at a finer resolution, but the behavior is still the same and becomes economically less practical as you refine this more and more. My next attempt was to apply a perturbation to the y-velocity instead. The idea being that the baroclinic vorticity generation (cause of the RT growth) occurs across the density gradient, thus any "stair stepping" would cause instability growth. Thus as long as the density interface is flat, then the above problems would not be present. The perturbation velocity would then force small fluid motion leading to interface movement without the effects of the mesh present. I did this via the following function: Vy = 0.01/4*(1+cos(2*pi*x))*(1+cos(100*pi*y)) But when I ran this for over a second, the interface had not moved even a little bit. I'm not quite sure why the above didn't work. Is there a different way to perturb the interface in OpenFoam that would avoid the mesh issue? And if my solution is the correct method, then why was I not able to get fluid motion?
Hi @AMK53, any luck with this problem! I have been giving it a go with interFoam to no success. Any ideas from your experience would be immensely helpful! Thanks!!

 Tags buoyantpimplefoam, instability, rayleigh, rayleigh-taylor, taylor