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

OpenFoam-dev waveAlpha for multiple phases

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 16, 2017, 18:04
Default OpenFoam-dev waveAlpha for multiple phases
  #1
New Member
 
Join Date: Oct 2017
Location: USA
Posts: 9
Rep Power: 5
MattS is on a distinguished road
Hello,

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

I am using compressibleMultiphaseInterFoam to be able to solve for the temperature field in addition to the velocity field available in interFoam/waves2Foam.

I want to simulate a simple channel flow with a water and an overlying air phase, think numerical wave tank.

After setting the waves in the velocity field with setWaves, I am using setFields with fieldToCell based on alpha.water to initialize the alpha.air and rho and that appears to work fine. However, I am struggling with the inlet boundary condition for the air phase. The inlet boundary in alpha.water is straightforward

Code:
inlet
    {
        type            waveAlpha;
        U                U;
        inletOutlet    true;

    }
but how do I set the alpha.air boundary condition at the inlet?
I tried zeroGradient and the code runs but with non-physical results in alpha.air near the inlet.

I would essentially need to get the faceValue at the inlet for alpha.water at a given level and then do a "1-value(alpha.water)" and set that as condition for alpha.air. Is there an easy (or not so easy) way to achieve this?

Any comments are much appreciated.
(I would hate to have to go back to waves2Foam and just add temperature as a scalar, especially since waves2Foam did not work in any version past OF2.1 for my setup.)

Thank you!
MattS is offline   Reply With Quote

Old   October 17, 2017, 11:27
Default
  #2
New Member
 
Join Date: Oct 2017
Location: USA
Posts: 9
Rep Power: 5
MattS is on a distinguished road
Quote:
Originally Posted by MattS View Post
I would essentially need to get the value at the inlet for alpha.water at a given level and time and then do a "1-value(alpha.water)" and set that as condition for alpha.air.
Can someone help me do this?
Is the way to achieve this by making changes to waveAlphaFvPatchScalarField.C?

Thank you!
MattS is offline   Reply With Quote

Old   October 17, 2017, 11:59
Default
  #3
New Member
 
Join Date: Oct 2017
Location: USA
Posts: 9
Rep Power: 5
MattS is on a distinguished road
I guess this can be achieved by the following

Code:
inlet
    {
        type            waveAlpha;
        U                U;
        inletOutlet    true;
        liquid           no;

    }
I should have looked at usage in waveAlphaFvPatchScalarField.H
Thank you.
MattS is offline   Reply With Quote

Old   October 18, 2017, 10:44
Default
  #4
New Member
 
Join Date: Oct 2017
Location: USA
Posts: 9
Rep Power: 5
MattS is on a distinguished road
This is still not working though.

The BC as above with "liquid no" for my light phase (alpha.air) is initializing the phase correctly and everything appears to be ok at time t = 0, then the inlet switches back to the water phase (instead of air) as the simulation goes on.

So 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 am initializing the waves by running
setWaves -alpha alpha.water
then
setWaves -alpha alpha.air

Is this where I am going wrong? Or is there maybe a bug in this brandnew waveAlpha BC?

Can anybody shed any light, any comment on where I should start to look to troubleshoot this?

TYIA

PS: I would attach an image but I am not allowed to do that at my job.
MattS is offline   Reply With Quote

Reply

Tags
alpha.air, openfoam-dev, setwaves, wavealpha

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting Started with OpenFOAM wyldckat OpenFOAM 24 October 2, 2019 21:35
Map of the OpenFOAM Forum - Understanding where to post your questions! wyldckat OpenFOAM 9 March 30, 2017 05:19
UNIGE February 13th-17th - 2107. OpenFOAM advaced training days joegi.geo OpenFOAM Announcements from Other Sources 0 October 1, 2016 19:20
OpenFOAM Training Beijing 22-26 Aug 2016 cfd.direct OpenFOAM Announcements from Other Sources 0 May 3, 2016 04:57
OpenFOAM v3.0.1 Training, London, Houston, Berlin, Jan-Mar 2016 cfd.direct OpenFOAM Announcements from Other Sources 0 January 5, 2016 03:18


All times are GMT -4. The time now is 16:22.