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/)
-   -   Initial Perturbation of Interface in Rayleigh-Taylor Instability (https://www.cfd-online.com/Forums/openfoam-solving/194094-initial-perturbation-interface-rayleigh-taylor-instability.html)

AMK53 October 10, 2017 10:49

Initial Perturbation of Interface in Rayleigh-Taylor Instability
 
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/GCtQuVbhttps://imgur.com/TP0rx7R

https://imgur.com/mXQDZGIhttps://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?

pete20r2 October 11, 2017 07:05

Can you use a VOF number instead of pure species to smooth the interface?

AMK53 October 11, 2017 23:15

Quote:

Originally Posted by pete20r2 (Post 667409)
Can you use a VOF number instead of pure species to smooth the interface?

Aren't VOF methods generally used for multiphase flows?

dongshancfd March 7, 2018 21:00

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.

Bodo1993 January 13, 2020 11:20

Dear AMK53,

Greetings. I am wondering how did you add the perturbation.

Thanks

ybapat January 14, 2020 05:27

Hello,



As Peter mentioned you can use VOF for RT instability. You can use two different fluid with given gas densities.



Regards,
-Yogesh

pavaninguva January 17, 2020 02:19

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<const IOdictionary&>(dict);
const fvMesh& mesh = refCast<const fvMesh>(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::pow(cos(constant::mathematical::pi*x)*co s(constant::mathematical::pi*x), 2))
{
alpha[i] = 1.;
}
}

Foam::writeEntry(os,alpha);

#};
};
```

This is for openfoam 7.

Bodo1993 January 17, 2020 10:52

Quote:

Originally Posted by pavaninguva (Post 754875)
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<const IOdictionary&>(dict);
const fvMesh& mesh = refCast<const fvMesh>(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::pow(cos(constant::mathematical::pi*x)*co s(constant::mathematical::pi*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.

pavaninguva January 28, 2020 03:31

Quote:

Originally Posted by AMK53 (Post 667231)
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/GCtQuVbhttps://imgur.com/TP0rx7R

https://imgur.com/mXQDZGIhttps://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!!


All times are GMT -4. The time now is 12:35.