|
[Sponsors] |
interFoam, can I just set velocity of water if the inlet boundary has air and water m |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 26, 2020, 11:52 |
interFoam, can I just set velocity of water if the inlet boundary has air and water m
|
#1 |
New Member
Z. Cao
Join Date: May 2020
Posts: 2
Rep Power: 0 |
hi, guys, I want to simulate a simple ocean flow within a box domain. I am using interFoam. The alpha.water was defined by setField, and the rest is air. Can I only set the velocity of water? If I set the U.inlet a value, means both air and water have same inlet velocoty. That causes the interface between air and water unsteady. Is it possible to set U.water and U.air separately? Thank you.
|
|
May 26, 2020, 15:35 |
Usage of coded boundary condition
|
#2 | |
Senior Member
Carlos Rubio Abujas
Join Date: Jan 2018
Location: Spain
Posts: 127
Rep Power: 11 |
Quote:
If you really want to model two separate momemtum equations for each of the phases you need to use an Eulerian approach (multiphaseEulerianFoam, for example). In this solver you have those U.water/U.air files to handle, but this approach may be a little overkill as it is computationally more expensive. As you have already two well separated phases you may want to use some kind of special boundary condition that only impose a velocity in a specific region. You can add an additional patch on the bottom of the domain and implement the velocity there. Other option is to just code in a boundary condition that suits your requirements. For example you can quickly do some test using rather codedFixedValue of codedMixed boundary conditions. Code:
leftWall { type codedFixedValue; value uniform (0 0 0); name leftWall; code #{ const fvPatch& boundaryPatch = patch(); const vectorField& Cf = boundaryPatch.Cf(); vectorField& field = *this; const scalar ymax = 0.2; // Max Height to apply cond const scalar addV = 0.3; // X-Velocity [m/s] forAll(Cf, faceI) { field[faceI] = Cf[faceI].y() < ymax ? vector(vx, 0, 0) : vector(0, 0, 0); } #}; Code:
leftWall { type codedFixedValue; value uniform (0 0 0); name leftWall; code #{ label ownName = this->patch().boundaryMesh().findPatchID("leftWall"); const fvPatch& boundaryPatch = patch(); const vectorField& Cf = boundaryPatch.Cf(); const volScalarField& alphaW = db().lookupObject<volScalarField>("alpha.water"); const scalarField aWPatch(alphaW.boundaryField()[ownName]); const scalar minVOF = 0.2; // Max Height to apply cond const scalar addV = 0.3; // X-Velocity [m/s] forAll(Cf, faceI) { field[faceI] = aWPatch[faceI] > minVOF ? vector(vx, 0, 0) : vector(0, 0, 0); } #}; |
||
May 26, 2020, 15:48 |
|
#3 |
New Member
Z. Cao
Join Date: May 2020
Posts: 2
Rep Power: 0 |
Thank you. I think this will help me to define the region. I will try it. If other questions came out, I will come back.
|
|
October 13, 2021, 11:56 |
|
#4 |
New Member
Join Date: Sep 2021
Posts: 6
Rep Power: 5 |
I am applying the same boundary condition on inlet but it gives me that error
Cannot find patchField entry for outlet |
|
October 19, 2021, 10:43 |
|
#5 |
Senior Member
Carlos Rubio Abujas
Join Date: Jan 2018
Location: Spain
Posts: 127
Rep Power: 11 |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
CFD analaysis of Pelton turbine | amodpanthee | CFX | 31 | April 19, 2018 19:02 |
mass flow in is not equal to mass flow out | saii | CFX | 12 | March 19, 2018 06:21 |
Multiphase flow - incorrect velocity on inlet | Mike_Tom | CFX | 6 | September 29, 2016 02:27 |
Wrong flow in ratating domain problem | Sanyo | CFX | 17 | August 15, 2015 07:20 |
air bubble is disappear increasing time using vof | xujjun | CFX | 9 | June 9, 2009 08:59 |