CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

setWaves with compressibleMultiphaseInterFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 18, 2017, 12:31
Default setWaves with compressibleMultiphaseInterFoam
  #1
New Member
 
Join Date: Oct 2017
Location: USA
Posts: 9
Rep Power: 9
MattS is on a distinguished road
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 OpenFoam-dev waveAlpha for multiple phases) 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 is offline   Reply With Quote

Old   October 19, 2017, 11:59
Default
  #2
New Member
 
Join Date: Oct 2017
Location: USA
Posts: 9
Rep Power: 9
MattS is on a distinguished road
/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.

Last edited by MattS; October 20, 2017 at 10:59.
MattS is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On



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