CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   Boundary Condition for an Open Channel in InterFoam (https://www.cfd-online.com/Forums/openfoam-pre-processing/128582-boundary-condition-open-channel-interfoam.html)

CFD-Cat January 16, 2014 04:52

Boundary Condition for an Open Channel in InterFoam
 
Hi,
I'm trying to setup an open channel case in Interfoam but I found some problem with the boundary condition.

I couldn't find a BC for the inlet that allows water and air to enter in the domain (with a defined free surface level) in a quantity that has to be calculated from the flow rate imposed at outlet.

To make it more clear:
Domain: you can imagine it as a sink
Inlet: water and air with imposed free surface level (I prefer to don't split the boundary in water_Inlet an air_Inlet to make it easier to change the free surface level)
Outlet: imposed massflowrate (mainly water with some air ingestion).

I tried to setup the inlet as InletOutlet and outlet as a negative flowRateInletVelocity but I had serious problem with convergence.

I'll really appreciate any advice. Probably the solution will be straight forward and I don't know it because I'm new to OF.

Thank you in advance.

alexeym January 16, 2014 05:24

Hi,

To fix water level at the inlet you can set calculated BC for alpha1 (so it will use values of alpha1 set initially with setFields), then you can set for example fixedValue (calculated from inflow rate) for velocity.

For outlet you can try variableHeightFlowRate, which will calculate velocity from water level (using alpha1) and discharge rate. Though AFAIR I had problems with turbulence model equations divergence with this BC.

CFD-Cat January 16, 2014 05:39

Thank you for your reply.
I forgot to write it but I've already set the Inlet alpha1 as calculated. The problem is related to how to impose the flow rate for the air because it will depends on the system solution if there will be air ingestion or not.

Another important think that i forgot to clarify is that the inlet has a x normal while the outlet has a z normal and is completely submerged. (as in a sink)

CFD-Cat January 20, 2014 04:06

don't you have any suggestion?

alexeym January 20, 2014 07:56

It's rather difficult to have suggestions without knowing the whole problem.

From what you've said I can guess that the inlet is something with two phases and you'd like to set the speed of these phases independently. I can not propose a way to do this without whether using two different patches with different BCs, or implementing your own BC, or using codedFixedValue.

For the outlet I again can try to guess something though I can't yet imagine what's going on with outlet from your description.

So, in short: no, I don't have any ;)

CFD-Cat January 20, 2014 09:06

Quote:

Originally Posted by alexeym (Post 470872)
It's rather difficult to have suggestions without knowing the whole problem.

From what you've said I can guess that the inlet is something with two phases and you'd like to set the speed of these phases independently. I can not propose a way to do this without whether using two different patches with different BCs, or implementing your own BC, or using codedFixedValue.

For the outlet I again can try to guess something though I can't yet imagine what's going on with outlet from your description.

So, in short: no, I don't have any ;)

The problem is nothing special, you can simply imagine it as a sink at the end of a channel.The inlet provide water and air as much as exit from the outlet. The flux is driven by the Outlet. From this BC exit mainly water but if the submergence is not enough there can be air ingestion.

CFD-Cat January 20, 2014 09:18

I start to think that it can be also a problem related to time step and fvschemes.
Because I have some problem of divergence and because the k start to be bounded since few iterations after the beginning.
I'm using this setting for adjustable time step

Code:


adjustTimeStep  yes;

maxCo          0.5;// [max courant number]

maxAlphaCo      0.5; // [

maxDeltaT      0.05; // [s]

and this fv schemes for divergence

Code:

divSchemes
{
  div(rho*phi,U) Gauss upwind;
    div(phi,alpha)  Gauss vanLeer;
    div(phirb,alpha) Gauss interfaceCompression;
    div(phi,k)      bounded Gauss upwind;
    div(phi,omega)  bounded Gauss upwind;
    div((muEff*dev(T(grad(U))))) Gauss linear;
}

Do I have to impose a lower Courant Number?


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