# Solution Divergence because of BC?

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

 September 30, 2016, 07:06 Solution Divergence because of BC? #1 New Member   kengo Join Date: Sep 2015 Posts: 2 Rep Power: 0 Hi, everyone. I am solving for external flow of airfoil in 2D using the pisoFoam solver. It consists of a airfoil in a rectangular domain. I use the following BC. Pressure BC inlet:fixedValue outlet:advective top_and_bottom:zero-Gradient(slip) airfoil:zeroGradient front_and_back:empty Velocity BC inlet:fixedValue outlet:advective top_and_bottom:slip airfoil:no-slip fron_and_back:empty My question is 1.When I use following BC it works fine but why above BC doesn't work? 2.It's impossible to use fixedValue of pressure and velocity at inlet? Pressure BC inlet:zeroGradient outlet:fixedMean top_and_bottom:zero-Gradient(slip) airfoil:zeroGradient front_and_back:empty Velocity BC inlet:fixedValue outlet:advective top_and_bottom:slip airfoil:no-slip fron_and_back:empty Thanks for the help.

 October 14, 2016, 06:54 #2 Super Moderator     Tobias Holzmann Join Date: Oct 2010 Location: Augsburg Posts: 2,448 Blog Entries: 6 Rep Power: 46 Dear Kengo, based on the fact that you are solving a linear set of equations for incompressible stuff, your over predict the matrix system, if you apply fixedValue for p and U on the inlet. Finally, there are infty of solutions and hence, your solver should blow up. If you are lucky you get some solution but this is not really accurate and can be non-physical, too. Your question is just related to numerics and how to solve linear systems (matrices). However, you can ask yourself if you set the velocity and pressure at the inlet and adjust the pressure and velocity at the outlet, how many different solutions there are. Hopefully you will realize that you can just play around with the pressure and velocity at the outlet to fulfill the mass conservation. That's, as I already told, the problem in setting up your simulation. If you would simulate some compressible case, it may work. In general, you should think about the case, the numerical behavior and maybe about the characteristics of the problem. I hope you get the answer out of mine. __________________ Keep foaming, Tobias Holzmann

 November 4, 2016, 01:55 #3 New Member   kengo Join Date: Sep 2015 Posts: 2 Rep Power: 0 Dear Tobi, Your answer helps me a lot thanks. And besides I write here what I noticed about those problem. The mesh type OpenFoam uses is not a staggered grid but a collocated grid. All variables are defined at the center of control volume nevertheless I gave pressure and velocity at the same point(inlet). That is why my simulation diverged, right?

 November 8, 2016, 21:10 #4 Senior Member   khedar Join Date: Oct 2016 Posts: 112 Rep Power: 6 fvMesh (openfoam) uses staggered grid, since this is based on fvm and has some parameters at the cell centers and others at the cell face centers.

 December 10, 2016, 20:50 #5 Super Moderator     Tobias Holzmann Join Date: Oct 2010 Location: Augsburg Posts: 2,448 Blog Entries: 6 Rep Power: 46 To make things clear, FOAM stores everything at the cell center (not staggered). However, you can get rid of the problem with some mathematical expression/method (forgot the name). This method is (i guess) implemented in the toolbox. Otherwise it would not be so stable. I might ask my colleague for the theory name. Sent from my HTC One mini using CFD Online Forum mobile app __________________ Keep foaming, Tobias Holzmann

 December 11, 2016, 04:47 #6 Super Moderator     Tobias Holzmann Join Date: Oct 2010 Location: Augsburg Posts: 2,448 Blog Entries: 6 Rep Power: 46 -> Rhie Chow Interpolation - fluxes at the faces. Sent from my HTC One mini using CFD Online Forum mobile app __________________ Keep foaming, Tobias Holzmann

 Tags divergence.bc.pisofoam.