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 Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 16, 2017, 19:04
Default OpenFoam-dev waveAlpha for multiple phases
  #1
New Member
 
Join Date: Oct 2017
Location: USA
Posts: 9
Rep Power: 9
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, 12:27
Default
  #2
New Member
 
Join Date: Oct 2017
Location: USA
Posts: 9
Rep Power: 9
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, 12:59
Default
  #3
New Member
 
Join Date: Oct 2017
Location: USA
Posts: 9
Rep Power: 9
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, 11:44
Default
  #4
New Member
 
Join Date: Oct 2017
Location: USA
Posts: 9
Rep Power: 9
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

Old   May 23, 2024, 12:32
Default
  #5
Senior Member
 
Giles Richardson
Join Date: Jun 2012
Location: Cambs UK
Posts: 102
Rep Power: 14
ufocfd is on a distinguished road
did you get anywhere with this MattS?
(I think I have just figured out how to do it)

Last edited by ufocfd; May 24, 2024 at 14:41.
ufocfd is offline   Reply With Quote

Reply

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


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 26 June 21, 2024 07:54
Map of the OpenFOAM Forum - Understanding where to post your questions! wyldckat OpenFOAM 10 September 2, 2021 06:29
UNIGE February 13th-17th - 2107. OpenFOAM advaced training days joegi.geo OpenFOAM Announcements from Other Sources 0 October 1, 2016 20:20
OpenFOAM Training Beijing 22-26 Aug 2016 cfd.direct OpenFOAM Announcements from Other Sources 0 May 3, 2016 05:57
OpenFOAM v3.0.1 Training, London, Houston, Berlin, Jan-Mar 2016 cfd.direct OpenFOAM Announcements from Other Sources 0 January 5, 2016 04:18


All times are GMT -4. The time now is 13:50.