CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

problem getting interFoam to behave

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 10, 2011, 18:49
Default problem getting interFoam to behave
  #1
New Member
 
Dave West
Join Date: Mar 2011
Location: US
Posts: 12
Rep Power: 15
Terp is on a distinguished road
Hey all,
I'm trying to learn to use interFoam, so I decided to try to see if I can get the results for a test case on the Flow3D site here:

http://www.flow3d.com/cfd-101/cfd-10...luid-flow.html

First I tried laminar, and it seems to work pretty well for the first half a second or so. But then the water goes too high up the step and interferes with the waterfall, and never gives the smooth flow from the Flow3D article. The first 2 images show my laminar case at 0.5 and 6.3 seconds. Then I tried with ke turbulence, and the even more non-physical result shown in the third picture.

Any thoughts on where to start looking for what's going wrong and keeping me from getting a good result?

Thanks for your assistance!
Attached Images
File Type: jpg 0.5 sec.jpg (10.6 KB, 122 views)
File Type: jpg 6.3 sec.jpg (12.8 KB, 119 views)
File Type: jpg 8.3 keSpillway.jpg (12.2 KB, 123 views)
Terp is offline   Reply With Quote

Old   April 11, 2011, 12:59
Default
  #2
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
It looks like the solution is becoming unstable. It would be useful to know what numerical setup you are using (fvSchemes). If you took it from tutorials, change the div scheme for U from "linear" to a bounded scheme (limitedLinearV 1) or an upwind scheme (linearUpwindV Gauss linear).

Best,
Alberto
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   April 11, 2011, 16:02
Default
  #3
New Member
 
Dave West
Join Date: Mar 2011
Location: US
Posts: 12
Rep Power: 15
Terp is on a distinguished road
Alberto,
Thank you for the suggestions. I was using linear for the div U term. I tried both suggestions, and the answers are definitely different from before. With the linearLimitedV, the flow attaches to the face of the step, and the upwind is similar, but with a trapped bubble. So I'm still missing something. I attached my fvSchemes and fvSolution files, which now look a lot like the laminar damBreak tutorial.
Attached Images
File Type: jpg limitedlinearV 10s.jpg (10.2 KB, 47 views)
File Type: jpg limitedUpwindV 10s.jpg (9.7 KB, 44 views)
Attached Files
File Type: txt fvSchemes.txt (1.4 KB, 74 views)
File Type: txt fvSolution.txt (1.6 KB, 61 views)
Terp is offline   Reply With Quote

Old   April 11, 2011, 21:59
Default
  #4
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
OK. Could you share your case?

P.S. I saw you are not solving the momentum predictor. Turn that on too. Additionally, you might want to check if residuals are actually converging.
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   April 11, 2011, 22:58
Default
  #5
New Member
 
Dave West
Join Date: Mar 2011
Location: US
Posts: 12
Rep Power: 15
Terp is on a distinguished road
I am more than happy to share the files. I really appreciate your help with this. I have turned on the momentum predictor and it is currently running.

Terp
Attached Files
File Type: zip spillway.zip (6.2 KB, 44 views)
Terp is offline   Reply With Quote

Old   April 12, 2011, 23:13
Default
  #6
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
Hi,

I ran your case, and made some changes to it. In particular, the original case sets the top to a wall, and the side on the oulet as Neumann condition. I fixed the mesh to do that.

The top part of the step is a slip condition.

They model turbulence with RNK-k-epsilon, so I turned that on.

All these changes affect the solution, but do not change the final result a lot. To see something similar to what Flow-3D shows, I had to double the mesh and change these settings in fvSolutions

Code:
PISO
{
    momentumPredictor yes;
    nCorrectors     3;
    nNonOrthogonalCorrectors 0;
    nAlphaCorr      1;
    nAlphaSubCycles 4;
    cAlpha          1;
}
You find the case and a snapshot taken at 10s attached. Not exactly the same, but better than before. I also changed the numerical schemes and switched to GAMG as linear solver for the pressure (much faster).

You find a movie here to see the evolution: http://www.youtube.com/watch?v=ZXUsrlRJUT0

Best,
Attached Images
File Type: jpg RNG.jpg (21.0 KB, 122 views)
Attached Files
File Type: gz spillwayRNG.tar.gz (3.2 KB, 120 views)
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.

Last edited by alberto; April 13, 2011 at 02:02. Reason: Added note and link to video.
alberto is offline   Reply With Quote

Old   April 13, 2011, 15:29
Default
  #7
New Member
 
Dave West
Join Date: Mar 2011
Location: US
Posts: 12
Rep Power: 15
Terp is on a distinguished road
Thank you for doing all this!

I didn't think the top boundary or the slip condition on the top step would have much affect, and they don't seem to. I'm a little concerned by how easy it is to change the flow behavior by changing the choice of solvers, and that the turn of the water flow towards the right seems to defy gravity. I thought this would be an easy case to model. I guess we're not ready to give up experiments yet.

Dave
Terp is offline   Reply With Quote

Old   April 13, 2011, 15:53
Default
  #8
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
Quote:
Originally Posted by Terp View Post
Thank you for doing all this!

I didn't think the top boundary or the slip condition on the top step would have much affect, and they don't seem to.
Hi, the problem is not in the top BC, but you were setting the same pressure BC at the outlet, which is not true, since the top could be atmospheric (I set it to a wall as they say in the link of Flow3D), however you will have a different behavior at the outlet. In other words, I set the problem exactly as in the case reported in the link.

Quote:
I'm a little concerned by how easy it is to change the flow behavior by changing the choice of solvers, and that the turn of the water flow towards the right seems to defy gravity.
The influence of the turbulence model is expected, since it affects the viscosity of the flow. The flow conditions are hardly laminar.

The only major changes to the solver I made are the two parameters on the surface tracking (alphaSubCycles and cAlpha), which are set as in the RAS/damBreak case. The number of sub-cycles ensures alpha is solved accurately, and is key.

The rest of the changes I made are mainly for efficiency (GAMG solver and tolerances).

Best,
Alberto
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   April 14, 2011, 15:01
Default
  #9
Senior Member
 
santiagomarquezd's Avatar
 
Santiago Marquez Damian
Join Date: Aug 2009
Location: Santa Fe, Santa Fe, Argentina
Posts: 452
Rep Power: 24
santiagomarquezd will become famous soon enough
Alberto, is using alphaSubCycles > 0 mandatory even when Co < 0.2 is assured from adjustTimeStep?. I've read that the sub cycling is needed when you want to use larger timesteps in momentum equation, but in case that global timestep is "low" is it still necessary to sub cycle?

Regards.
__________________
Santiago MÁRQUEZ DAMIÁN, Ph.D.
Research Scientist
Research Center for Computational Methods (CIMEC) - CONICET/UNL
Tel: 54-342-4511594 Int. 7032
Colectora Ruta Nac. 168 / Paraje El Pozo
(3000) Santa Fe - Argentina.
http://www.cimec.org.ar
santiagomarquezd is offline   Reply With Quote

Old   April 14, 2011, 17:24
Default
  #10
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
I would say that at least 2 sub-cycles are recommended, but it depends on the application. See the tutorials: with Co = 0.2, correctors are in the 2-4 range.

Best,
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   April 14, 2011, 22:23
Default
  #11
Senior Member
 
santiagomarquezd's Avatar
 
Santiago Marquez Damian
Join Date: Aug 2009
Location: Santa Fe, Santa Fe, Argentina
Posts: 452
Rep Power: 24
santiagomarquezd will become famous soon enough
Aha, I checked the tutorials and things are as you indicated, thx for the ref. I was studying the influence of all other parameters but missed this one (really I didn't find much influence). It seems for Co_mom ~ 0.2 => Co_alpha=0.2/2 or 0.2/4, which is quite conservative even for an explicit time integrator like MULES. I have to suppose that this is due the influence of alpha in momentum equation moreover avoiding divergence of MULES time integrator.

1. Is that right?
2. Are there another reasons?
3. Which is a common evidence of too few alphaSubCycles?

Regards
__________________
Santiago MÁRQUEZ DAMIÁN, Ph.D.
Research Scientist
Research Center for Computational Methods (CIMEC) - CONICET/UNL
Tel: 54-342-4511594 Int. 7032
Colectora Ruta Nac. 168 / Paraje El Pozo
(3000) Santa Fe - Argentina.
http://www.cimec.org.ar
santiagomarquezd is offline   Reply With Quote

Old   April 15, 2011, 01:17
Default
  #12
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
Quote:
Originally Posted by santiagomarquezd View Post
Aha, I checked the tutorials and things are as you indicated, thx for the ref. I was studying the influence of all other parameters but missed this one (really I didn't find much influence). It seems for Co_mom ~ 0.2 => Co_alpha=0.2/2 or 0.2/4, which is quite conservative even for an explicit time integrator like MULES. I have to suppose that this is due the influence of alpha in momentum equation moreover avoiding divergence of MULES time integrator.

1. Is that right?
2. Are there another reasons?
3. Which is a common evidence of too few alphaSubCycles?

Regards
Correctors on alpha only affect the evaluation of alpha, not the alpha-U-p coupling, which is left to the PISO loop.

Symptoms of insufficient correctors are a not accurate solution for alpha. Try reducing them :-)
minh khang likes this.
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   April 19, 2011, 09:36
Default Reference sea level
  #13
Member
 
Antonio Liggieri
Join Date: Aug 2010
Posts: 76
Rep Power: 15
alfa_8C is an unknown quantity at this point
Hy,

I’m using interFoam in a relatively simple setup. I have a tank filled with water. The top of the tank is open to atmosphere. Close to the bottom the tank has an outlet into a large resevoir of water. The free surface lavel of the reservoir is at -1m. As far as I know the BC for the pressure at the outlet has to be set to 0, as no hydrostatic pressure has to be considered. BUT!!! How can I make the code understand, that my free surface level outside the domain is at -1m? This must be given for sure but I don’t know where.

Could anybody give me a hint?

Thanks in advance, Toni
alfa_8C is offline   Reply With Quote

Old   April 19, 2011, 12:04
Default
  #14
Senior Member
 
santiagomarquezd's Avatar
 
Santiago Marquez Damian
Join Date: Aug 2009
Location: Santa Fe, Santa Fe, Argentina
Posts: 452
Rep Power: 24
santiagomarquezd will become famous soon enough
Hi, could you please post a little sketch of your problem?

Regards.
__________________
Santiago MÁRQUEZ DAMIÁN, Ph.D.
Research Scientist
Research Center for Computational Methods (CIMEC) - CONICET/UNL
Tel: 54-342-4511594 Int. 7032
Colectora Ruta Nac. 168 / Paraje El Pozo
(3000) Santa Fe - Argentina.
http://www.cimec.org.ar
santiagomarquezd is offline   Reply With Quote

Old   April 19, 2011, 12:51
Default
  #15
Member
 
Antonio Liggieri
Join Date: Aug 2010
Posts: 76
Rep Power: 15
alfa_8C is an unknown quantity at this point
Untitled.jpg

very simplyfied - hope this is clear enough
alfa_8C is offline   Reply With Quote

Old   April 19, 2011, 19:09
Default
  #16
Senior Member
 
santiagomarquezd's Avatar
 
Santiago Marquez Damian
Join Date: Aug 2009
Location: Santa Fe, Santa Fe, Argentina
Posts: 452
Rep Power: 24
santiagomarquezd will become famous soon enough
Hmm, it depends on the FOAM version you're using, in 1.6 (which is what I'm using) real pressure have to be used, so you have to set the hydrostatic profile at the outlet. In 1.5 and 1.7 things are different (and even different between them I think).

Regards.
__________________
Santiago MÁRQUEZ DAMIÁN, Ph.D.
Research Scientist
Research Center for Computational Methods (CIMEC) - CONICET/UNL
Tel: 54-342-4511594 Int. 7032
Colectora Ruta Nac. 168 / Paraje El Pozo
(3000) Santa Fe - Argentina.
http://www.cimec.org.ar
santiagomarquezd is offline   Reply With Quote

Old   April 19, 2011, 21:08
Default
  #17
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
Just remember the definition of p and p_rgh...
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   April 20, 2011, 06:02
Default
  #18
Member
 
Antonio Liggieri
Join Date: Aug 2010
Posts: 76
Rep Power: 15
alfa_8C is an unknown quantity at this point
@alberto - So p_rgh is simply uniform, but with a value of rho*g*h?
I performed a chart very quickly to avoid misunderstandings...

def_p_rgh.jpg
alfa_8C is offline   Reply With Quote

Old   April 20, 2011, 12:40
Default
  #19
Senior Member
 
santiagomarquezd's Avatar
 
Santiago Marquez Damian
Join Date: Aug 2009
Location: Santa Fe, Santa Fe, Argentina
Posts: 452
Rep Power: 24
santiagomarquezd will become famous soon enough
You have an inverted siphon, choosing 0 as p_rgh gives you an hydrostatic profile at the outlet. Nevertheless BC I suggested is true far from the outlet, because velocity isn't zero in this point. I think the most realistic condition is to simulate a part of the pool near the BC.

Just my 2 cents.

Regards.
__________________
Santiago MÁRQUEZ DAMIÁN, Ph.D.
Research Scientist
Research Center for Computational Methods (CIMEC) - CONICET/UNL
Tel: 54-342-4511594 Int. 7032
Colectora Ruta Nac. 168 / Paraje El Pozo
(3000) Santa Fe - Argentina.
http://www.cimec.org.ar
santiagomarquezd is offline   Reply With Quote

Old   April 20, 2011, 22:58
Default
  #20
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
Quote:
Originally Posted by alfa_8C View Post
@alberto - So p_rgh is simply uniform, but with a value of rho*g*h?
I performed a chart very quickly to avoid misunderstandings...

Attachment 7337
Right. Just set a uniform value at the outlet. Using p_rgh makes actually things a bit simpler in these cases ;-)
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Reply


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
interFoam (OF 1.7.1) in parallel ..need help farhagim OpenFOAM 4 July 26, 2012 17:42
UDF compiling problem Wouter Fluent UDF and Scheme Programming 6 June 6, 2012 05:43
Can I solve this problem by Fluent? Kai_kc FLUENT 1 October 27, 2010 06:29
natural convection problem for a CHT problem Se-Hee CFX 2 June 10, 2007 07:29
Adiabatic and Rotating wall (Convection problem) ParodDav CFX 5 April 29, 2007 20:13


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