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

simpleFoam serious mass balance issue

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 6, 2011, 05:50
Exclamation simpleFoam serious mass balance issue
  #1
Senior Member
 
Phoevos
Join Date: Mar 2009
Posts: 104
Rep Power: 17
fivos is on a distinguished road
Hi to everyone,

I am facing a strange issue with simpleFoam, where the solver calculates a large mass unbalance through inlets and outlet. I would be gratefull if anyone could take a look.

The geometry is shown in geometry2.png and geometry3.png. The geometry of the case consists of two inlets, at the back of this tank, and one outlet at the front (painted with black). The upper part of the tank is considered as a free-slip wall (blue), whereas all the rest walls are no-slip walls. In geometry3.png is a slice of the geometry at the symmetry plane, showing a pipe with yellow (no-slip wall too).

A view of the mesh is visible in mesh.png. The mesh is a hybrid mesh of hexahedra, wedges, prisms, tets, etc created in gambit and imported with fluent3DMeshToFoam. The mesh passes the checkMesh without any errors (no wrong oriented faces, negative volumes). Please see the checkMesh log in run.tar.gz. The mesh is scaled correctly (it was generated in meters so there is no need for scaling).

I have set up the case for water, using RNGkEpsilon model, fixed velocities at inlets and pressure at outlet (see run.tar.gz for detailed set up at the beginning of the run). SimpleFoam runs without any divergence, or bounding for k/e. Residuals are going down as you can see from res.png.

However the volume flow rate (and consequently mass flux) is much larger than the flow rate at inlets. The flow rate from both inlets should be ~2m^3/sec. This would result to a velocity at outlet ~4m/s. But I get velocities at outlet that increase as the solver runs; at 200 iteration velocity at outlet is 13.9m/s (vol. flow rate 6.86m^3s) and at 1000 iteration velocity is 39m/s (vol. flow rate 20m^3/s) !!!

I have tightened convergence tolerances at all solvers (see in run.tar.gz -> system -> fvsolution), added non-orthogonal correctors, but nothing, the same issue persists.

Does anyone have a single clue what might be happening? Did I do something wrong, and due to my frustration I can' t see it?

Any ideas are welcome. Thanks in advance.


PS. I have tried the same mesh, for the same boundary conditions using Fluent, CFX and star ccm+. All programs gave reasonable results, so I doubt this being a mesh problem.
Attached Images
File Type: jpg geometry2.jpg (14.4 KB, 67 views)
File Type: jpg geometry3.jpg (16.0 KB, 66 views)
File Type: jpg mesh.jpg (72.2 KB, 73 views)
File Type: png res.png (22.1 KB, 87 views)
Attached Files
File Type: gz run.tar.gz (82.7 KB, 26 views)
fivos is offline   Reply With Quote

Old   November 6, 2011, 08:38
Default
  #2
Senior Member
 
Felix L.
Join Date: Feb 2010
Location: Hamburg
Posts: 165
Rep Power: 18
FelixL is on a distinguished road
Hi, Phoevos,


the problem might be the blue boundary patch. You want it to be a slip-wall, i.e. impenetrable but without any friction, right?
In 0/U you specified zeroGradient as the velocity boundary condition at your slip-wall. This does not prevent in/outflow through this patch! So I suppose during your simulation you get fluid also flowing through the slip-wall-batch which adds up to the volume flux of the real inflow patches and eventually yields the higher volume flux at the outlet.

Try a symmetry or slip BC for that patch. These are basically the same and the fluid velocity is always parallel to the patch faces then, so you won't have the problem of unwanted inflow anymore.


Greetings,
Felix
FelixL is offline   Reply With Quote

Old   November 6, 2011, 09:21
Thumbs up You are right
  #3
Senior Member
 
Phoevos
Join Date: Mar 2009
Posts: 104
Rep Power: 17
fivos is on a distinguished road
Felix you are absolutely right! It was the zeroGradient at the slipwall. On slip walls you have zero gradient at the parallel velocities to the wall and NOT for the normal one. That's why I got this large flux at outlet, since there was inflow from the "slip wall".

I was banging my head on that but couldn't find the problem. I really appreciate your help. Thank you very, very much.
fivos is offline   Reply With Quote

Reply

Tags
mass balance error, simplefoam


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
mass flow in is not equal to mass flow out saii CFX 12 March 19, 2018 06:21
OpenFoam vs CFX5 mass balance in OpenFoam tangd OpenFOAM Running, Solving & CFD 33 May 23, 2010 17:36
particle, parcel and mass flow rate balance flybird FLUENT 0 May 24, 2007 11:44
DEFINE_SOURCE, injection in one Cell, mass balance Vitali FLUENT 2 April 27, 2007 17:39
mass balance of single species antonietta FLUENT 0 November 11, 2005 12:11


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