OpenFoam-dev waveAlpha for multiple phases
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 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! |
Quote:
Is the way to achieve this by making changes to waveAlphaFvPatchScalarField.C? Thank you! |
I guess this can be achieved by the following
Code:
inlet Thank you. |
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. |
All times are GMT -4. The time now is 00:50. |