CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM

Different boundary conditions between OF-1.6 and OF-1.7.1 for interFoam

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   October 28, 2010, 07:11
Default Different boundary conditions between OF-1.6 and OF-1.7.1 for interFoam
  #1
aha
New Member
 
Join Date: Sep 2010
Posts: 5
Rep Power: 6
aha is on a distinguished road
I try to model a gravity--driven free surface flow down an inclined open channel (inlcuding capillary effects) and succeded with OF-1.6, based on the damBreak case of the tutorials. The obtained results are in a very good agreement with experiments.

I used the same case with OF-1.7.1 after adopting the differences (p->p_rgh) to be able to compare the results between the two versions. Unfortunately I am not able to reproduce the results obtained from OF-1.6. In OF-1.7.1 The channel "fills" (completely) from the outlet, which does not make sense at all (see attaches pictures for a simple 2d simulation after t=5s, inclination angle 40).



Here are my boundary conditions (for the simplified 2d version):

U:
inlet -> groovyBC with parabolic velocity profile (also tried fixedValue)
outlet -> zeroGradient
substrate -> fixedValue; value uniform (0 0 0);
atmosphere -> pressureInletOutletVelocity; value uniform (0 0 0);

p_rgh:
inlet -> buoyantPressure; value uniform 0;
outlet -> zeroGradient
substrate -> buoyantPressure; value uniform 0;
atmosphere -> totalPressure; p0 uniform 0; U U; phi phi; rho rho; psi none; gamma 1; value uniform 0;

alpha:
inlet -> zeroGradient
outlet -> zeroGradient
substrate -> zeroGradient
atmosphere -> inletOutlet; inletValue uniform 0; value uniform 0;

Since in OF-1.7.1 p_rgh is the sum of the dynamic and the static pressure, I already changed the p_rgh boundary conditions without succes. How do I have to change the boundary conditions to have the same results as in OF-1.6?

Thanks in advance.
Attached Images
File Type: jpg channel_2d_OF16.jpg (11.1 KB, 278 views)
File Type: jpg channel_2d_OF171.jpg (10.7 KB, 243 views)
aha is offline   Reply With Quote

Old   October 28, 2010, 07:19
Default
  #2
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Rotterdam, The Netherlands
Posts: 1,595
Rep Power: 24
ngj will become famous soon enoughngj will become famous soon enough
Hi

I have not tried either of the versions, however I think I have an idea.

What is the value of the vertical coordinate, say z, at the surface elevation at the outlet? If it differs from zero try to make a translation of your mesh, so the interface exits the outlet at z = 0.

Best regards,

Niels
ngj is online now   Reply With Quote

Old   October 28, 2010, 07:26
Default
  #3
aha
New Member
 
Join Date: Sep 2010
Posts: 5
Rep Power: 6
aha is on a distinguished road
Quote:
Originally Posted by ngj View Post
Hi

I have not tried either of the versions, however I think I have an idea.

What is the value of the vertical coordinate, say z, at the surface elevation at the outlet? If it differs from zero try to make a translation of your mesh, so the interface exits the outlet at z = 0.

Best regards,

Niels

For the simulated 2d case, the film height is 2.5 mm and is located at z=2.5mm. However, in the simulations I will also vary the flow rate and therefore the interface located at z=0 would leed to a time dependent mesh ...
aha is offline   Reply With Quote

Old   October 28, 2010, 07:35
Default
  #4
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Rotterdam, The Netherlands
Posts: 1,595
Rep Power: 24
ngj will become famous soon enoughngj will become famous soon enough
I see, I just had experienced that having the outlet interface at z=0 was the best setup.

One other thing, it typically does not go well to have a Dirichlet condition at both pressure and velocity at the inlet and zeroGradient at the outlet on both quantities.

- Niels
ngj is online now   Reply With Quote

Old   October 28, 2010, 07:42
Default
  #5
aha
New Member
 
Join Date: Sep 2010
Posts: 5
Rep Power: 6
aha is on a distinguished road
I just had implemented Neumann boundary conditions (zeroGradient) for the pressure on both, the inlet and the outlet. The problem of the "channel filling" still remains. From my point of view the source of the problem is the redefinition of the pressure to p_rgh.
aha is offline   Reply With Quote

Old   October 28, 2010, 08:48
Default
  #6
Senior Member
 
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 235
Rep Power: 9
olivierG is on a distinguished road
hello,

I think that your outlet BC is wrong for p_rgh. I would try to use outletinlet for inlet/outlet with p_rhg.
Another solution is to use buoyantPressure (like inlet).

olivier
olivierG is offline   Reply With Quote

Old   October 28, 2010, 10:32
Default
  #7
aha
New Member
 
Join Date: Sep 2010
Posts: 5
Rep Power: 6
aha is on a distinguished road
Quote:
Originally Posted by olivierG View Post
hello,

I think that your outlet BC is wrong for p_rgh. I would try to use outletinlet for inlet/outlet with p_rhg.
Another solution is to use buoyantPressure (like inlet).

olivier
I agree with you that the boundary condition wich was fine for p (OF-1.6) is probably wrong for p_rgh (OF-1.7.1). I have attached some different variations in the boundary conditions for p_rgh, namely prgh_inletType_outletType.jpg.

What in my opinion leads to the filling is that p_rgh is getting larger and larger at the outlet resulting in fluid transported upwards.

aha
Attached Images
File Type: jpg prgh_bouyant_buoyant.jpg (8.8 KB, 148 views)
File Type: jpg prgh_outletInlet_outletInlet.jpg (9.1 KB, 138 views)
File Type: jpg prgh_zeroGradient_buoyant.jpg (9.6 KB, 127 views)
File Type: jpg prgh_zeroGradient_outletInlet.jpg (9.0 KB, 138 views)
File Type: jpg prgh_zeroGradient_zeroGradient.jpg (9.1 KB, 146 views)

Last edited by aha; October 28, 2010 at 10:50.
aha is offline   Reply With Quote

Old   October 29, 2010, 05:33
Default
  #8
Senior Member
 
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 9
colinB is on a distinguished road
This is an interesting problem, for it might be that this problem is related to mine.

My first guess was that you might have set the setFieldsDict/blockMeshDict file wrong, so that the water at the inlet has a higher still water level than the rest of the domain.

But then I thought about my problem which is actually the same, maybe, but in 3D.
I have regular incoming waves in my domain coming from the (water)inlet and I don't know where they are coming from. Actually I thought I have non reflective BC everywhere, but that seems not to be the case. Some might say its due to blockage from the solid for it is too close to the inlet, but in that case I would expect different waves and no such regular waves as it is the case here.

Attached you find a picture of the wave pattern and a table with my BC form the 0
folder.
It would be great if you could leave me a comment on this.

thanks for your trouble
best regards
Colin
Attached Images
File Type: jpg wavepattern35.jpg (14.8 KB, 214 views)
Attached Files
File Type: pdf BC_overview.pdf (17.6 KB, 210 views)
colinB is offline   Reply With Quote

Old   November 2, 2010, 07:18
Default
  #9
aha
New Member
 
Join Date: Sep 2010
Posts: 5
Rep Power: 6
aha is on a distinguished road
Actually I can only guess what your problem might be, based on the given information.

How high is your interface level from the setFieldsDict. In some stability calculations with surface waves I had unphysical waves when the interface was to close from the atmosphere bc.

Have you tried to solve it in the stable (laminar) regime (without all the k,nut,nuTilda,R variables)?

Did you solve the same case with OF-1.6?

Also you might compare with the following setup: instead of using two boundaries for the two phases (e.g. inlet and airinlet), have you tried to use groovyBC?
aha is offline   Reply With Quote

Old   November 2, 2010, 07:35
Default
  #10
Senior Member
 
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 9
colinB is on a distinguished road
Hi,

thank you for your comments on my case.

1) no I didn't try to solv it with OF 1.6.x

2) my alpah1 level with 0.5 is 0.001 m thick.

3) No I haven't tried to solve it with laminar flow
I directly went into turbulent flow.

4) hm groovyBC heard that before but I'm not sure what that is and how to implement them. But I will have a look at them.

Anyway, thanks for your trouble

regards
Colin
colinB is offline   Reply With Quote

Old   November 5, 2010, 11:23
Default
  #11
Senior Member
 
Arne Stahlmann
Join Date: Nov 2009
Location: Hanover, Germany
Posts: 209
Rep Power: 8
Arnoldinho is on a distinguished road
Colin,

are you trying to model regular waves coming from the inlet (BTW., where is it?), or normal inflow - with waves magically been generated inside the model?

I guess your BCs (sides and outlet) are not non-reflective; at least they are not working as non-reflective ones in my case. I'm still struggling with this, as I need a non-reflective BC at the outlet to model waves in a flume. groovyBC works quite well (at least for generating waves at the inlet), although it is not working with tet meshes in my case...

Arne
Arnoldinho is offline   Reply With Quote

Old   November 8, 2010, 08:49
Question
  #12
New Member
 
Olivier Benichou
Join Date: Sep 2010
Location: Brisbane
Posts: 10
Rep Power: 6
olivier78 is on a distinguished road
Hi Aha ,

I have exactly the same problem, I'm trying to run a 2D flume, gravity driven flow, with laminar interFoam solver . When I used the buoyant pressure downstream condition for the p_gh field , the water level slowly rises at the boundary, and backs up in the all domain until it stabilises itself.
I'm still confused as to why it does this ? has it got a physical meaning ? is this effectively an hydraulic jump travelling upstream ?
What other downstream condition can be used ?
Cheers,

Olivier
olivier78 is offline   Reply With Quote

Old   November 8, 2010, 11:22
Default
  #13
Senior Member
 
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 9
colinB is on a distinguished road
Hi Arne

I don't try to model regular incoming waves.
(The inlet is on the right side)

I think I've got the solution to my problem.
I talked to Prof. Jasak showing him these pictures and he told me that the outlet BC are not transmissive, but reflective.
However he gave me the hint to implement a numerical beach at the end to get rid of these waves.
The waves are by the way not generated magically but they come from the ship hull
Appart from that I haven't found a solution to my problem. So currently I try to implement the beach, but appart from one equation I don't have anything yet.
So it seems that my problem is not related to the previous one mentioend in the beginning.

However thanks for your help

regards
Colin
colinB is offline   Reply With Quote

Old   November 9, 2010, 06:37
Default
  #14
Senior Member
 
Arne Stahlmann
Join Date: Nov 2009
Location: Hanover, Germany
Posts: 209
Rep Power: 8
Arnoldinho is on a distinguished road
Hi guys,

am I right when guessing that all the boundary conditions in OF 1.7 (or earlier) used with the interFoam solver are reflective and therefore not transmissive?
Like Olivier, I also want to model a flume - in 3D case but at the moment with only one cell in y direction for first tests. I need waves, currents and later a combination of both. Therefore I use the groovyBC condition.
For waves as input, I already solved the problem of the 'outflow' numerically with cells becoming larger to the end. Sadly, this does not work for a current flow also generated by groovyBC. Here, the water level in the channel rises by time...

Have you already found any solutions?

Arne
Arnoldinho is offline   Reply With Quote

Old   May 15, 2011, 15:56
Default
  #15
New Member
 
Arnout
Join Date: Nov 2010
Posts: 23
Rep Power: 6
The King is on a distinguished road
Dear Aha,

Did you solved this problem? I'm getting exact the same as you, the channel is filling totally.

If I look at your case, what is the Fr number? It looks like an hydraulic jump.

Any other how knows what the correct p_rgh boundary condition is?
In the code I found the UniformDensityHydrostaticPressure BC.


Description
Hydrostatic pressure boundary condition calculated as

pRefValue + rho*g.(x - pRefPoint)


where rho is provided and assumed uniform.


Going to try this. Will keep you informed.


Arnout
The King is offline   Reply With Quote

Old   June 3, 2011, 09:04
Default
  #16
New Member
 
Arnout
Join Date: Nov 2010
Posts: 23
Rep Power: 6
The King is on a distinguished road
This bc for p_rgh worked good for me:

out
{
type totalPressure;
p0 uniform 0;
U U;
phi phi;
rho rho;
psi none;
gamma 1;
value uniform 0;
}
The King is offline   Reply With Quote

Old   August 6, 2012, 06:39
Default
  #17
Member
 
Amin
Join Date: Mar 2012
Posts: 60
Rep Power: 5
amin66 is on a distinguished road
Hi Foamers
what's the meaning of the buoyantpressure BC in openfoam 1.6 ? how does it apply pressure condition?
how can we use that at inlet or outlet boundary?
amin66 is offline   Reply With Quote

Reply

Tags
boundary conditions, channel flow, interfoam, pressure, p_rgh

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On



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