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/)
-   -   setWaves with compressibleMultiphaseInterFoam (https://www.cfd-online.com/Forums/openfoam-solving/194560-setwaves-compressiblemultiphaseinterfoam.html)

MattS October 18, 2017 11:31

setWaves with compressibleMultiphaseInterFoam
 
I posted this in the main OpenFOAM forum and got no replies, I am hoping it was just the wrong spot for the question:

I am currently trying to use the new wave toolbox in OpenFoam-dev with compressibleMultiphaseInterFoam. (I have previously used waves2Foam with OF2.1)

I want to use compressibleMultiphaseInterFoam to be able to solve for the temperature field in addition to the velocity field. The simulation is a simple channel flow with a water phase and an overlying air phase, think numerical wave tank.

I am setting the waves with setWaves and the boundary condition for the liquid phase (phase.water) appears to work fine, straightforward:


Code:

inlet
    {
        type            waveAlpha;
        U                U;
        inletOutlet    true;

    }

I am also using setFields with fieldToCell based on alpha.water to initialize the rho for the air and water phases and that appears ok.

However, I am having trouble with the inlet boundary condition for the air phase. After some research (see other thread https://www.cfd-online.com/Forums/op...le-phases.html) I settled on using the inlet BC for the air phase (phase.air) as follows:

Code:


inlet
    {
        type            waveAlpha;
        U                U;
        inletOutlet    true;
        liquid          no;
 }

I am initializing the waves by running
setWaves -alpha alpha.water
then
setWaves -alpha alpha.air

But with this, while everything appears to initialize correctly, as the simulation goes on, the inlet switches back to the water phase (instead of air), essentially my alpha.air and my alpha.water at the inlet have the same value at t > 0 with the above inlet boundary conditions for alpha.water and alpha.air, respectively.

I would so much appreciate any leads on how to troubleshoot this. Could this maybe be a bug in the waveAlpha condition?

Thank you!

(I am not allowed to post a picture, sorry)

MattS October 19, 2017 10:59

/start_edit At this point, I am not sure if the above is the intended use for a flow with multiple phase alphas or not. I will say that waves2Foam is a lot easier to understand and use, especially with regards to usage and setting of specific waves (and there is a paper!). And I guess since my question relates to the CFDDirect OpenFOAM-dev, this is not the right forum to ask. I did not know that. As for waves2Foam, I have found it not to be forward compatible for my setup, but I may try again and ask related questions in the relevant thread.
/end_edit


Which brings me back to the question I asked in the other thread.

Since in addition to the alpha for the water phase I need an alpha.air for the air phase
for this simulation, I need a boundary condition at the inlet that mirrors the boundary condition for alpha.water.

So wherever I have 1 for alpha.water, I need 0 for alpha.air etc.

I would so much appreciate any leads, I am at a bit of an impasse.

Thank you.


All times are GMT -4. The time now is 23:43.