|
[Sponsors] |
October 16, 2017, 19:04 |
OpenFoam-dev waveAlpha for multiple phases
|
#1 |
New Member
Join Date: Oct 2017
Location: USA
Posts: 9
Rep Power: 9 |
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; } 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! |
|
October 17, 2017, 12:27 |
|
#2 | |
New Member
Join Date: Oct 2017
Location: USA
Posts: 9
Rep Power: 9 |
Quote:
Is the way to achieve this by making changes to waveAlphaFvPatchScalarField.C? Thank you! |
||
October 17, 2017, 12:59 |
|
#3 |
New Member
Join Date: Oct 2017
Location: USA
Posts: 9
Rep Power: 9 |
I guess this can be achieved by the following
Code:
inlet { type waveAlpha; U U; inletOutlet true; liquid no; } Thank you. |
|
October 18, 2017, 11:44 |
|
#4 |
New Member
Join Date: Oct 2017
Location: USA
Posts: 9
Rep Power: 9 |
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. |
|
May 23, 2024, 12:32 |
|
#5 |
Senior Member
Giles Richardson
Join Date: Jun 2012
Location: Cambs UK
Posts: 102
Rep Power: 14 |
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. |
|
Tags |
alpha.air, openfoam-dev, setwaves, wavealpha |
|
|
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 |