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

OpenFOAM: Interesting cases of bad meshes and bad initial conditions

Register Blogs Community New Posts Updated Threads Search

Rating: 5 votes, 4.80 average.

OpenFOAM: Interesting cases of bad meshes and bad initial conditions

Posted September 15, 2013 at 06:03 by wyldckat

This year (2013) has been an interesting one for me, regarding OpenFOAM. Even beyond the amazing features that OpenFOAM 2.2 brought to the world (at least to my world) and everything that I keep discovering about it.

This blog post is about the various threads/posts were I took the time to diagnose what was specifically wrong with the case and where the bad results are astonishingly wrong... simply because the details were not easily seen. The list might get updated along time, as I occasionally do with my blog posts.

Note: These deductions could not have been possible if the respective member hadn't posted their test cases for me to play with!


Case one - January 2013: When the initial boundary conditions are extremely important

The thread in question is this one: http://www.cfd-online.com/Forums/ope...ity-field.html

sharonyue's objective was to test the behaviour of interFoam with a tank half-full in 2D (yes, basically it's a simulation about a cup being both half-full of water and half-full of air ).
  • In the first post, a very strange result is shown in the images. The reason for this is explained in post #5: the mesh was not uniform, leading to a distortion in the flow.
  • Then in the next post, it was indicated that the results were still very strange. The explanation to that is given in the post next to it, namely post #7. The problem was simple: the initial fields were defined as if there was no gravity and when the simulation starts, the gravity was suddenly turned on to full power.


Case two - June to August 2013: When mesh refinement can turn against you if you don't use it correctly

The thread in question is this one: http://www.cfd-online.com/Forums/ope...interfoam.html

mgdenno's objective was to simulate an example case of a 3D water tank that injects and extracts water at a fixed and exact rate, with the same pipe diameters. The outlet pipe was considerably lower in the tank than the inlet pipe.
This case was discussed over a long period of time and only came to a (partial) conclusion around 2 months later, in post #17.

This was a particularly awesome case, because the effect caused by a simple change of mesh resolution somewhat near the outlet, resulted in having a mild vortex turned into a typhoon and making it possible for an outlet to both extract and inject water!
It was so awesome, that in that post you can find the links to the images that shown the flow being reversed.


Case Three - September 2013: How much wobbling can a droplet of 1mm of diameter do?

The thread in question is this one: http://www.cfd-online.com/Forums/ope...lat-plate.html

At the time of this writing (15th of September, 2013), this case isn't completely solved yet. But it's an interesting case, where mebinitap wants to simulate a droplet of water located on top of a plate. And this plate is mean to be vibrating.
Problem is that the droplet wasn't wobbling the way it is expected to.

In post #10, I described the test I had made by using the plate in a fixed position. Some of the reasons for the wrong wobbling were:
  • The incorrect initial fields, where: the reference pressure was 1 atmosphere and not absolute pressure; as well as the pressure field was not correctly initialized, since the droplet has got enough volume to have a pressure difference between the top and bottom of itself... and because there is gravity.
  • Starting the plate to vibrate without first making sure the droplet was already in a steady-state position, introduces unwanted effects.
Beyond this, there isn't enough information yet to know for certain what else is wrong when the plate is starting to vibrate.


The very curious case here is that the contact angle between the droplet and the plate are actually simulated! So the droplet actually does deform into an igloo-like shape and wobbles a little while trying to reach steady-state.


Case Four - September 2013: How bad can tetrahedral meshes really be?

Sometime ago, Symscape published this very interesting blog post: Polyhedral, Tetrahedral, and Hexahedral Mesh Comparison
The conclusion was in it's essence that: polyhedral meshes are awesome and should be used more often. And that even though tetrahedral meshes are excellent for FEM, they are lousy for CFD.

But the thing is that polyhedral meshes can derive from tetrahedral meshes, simply because of the duality of these two kinds of meshes. I won't into detail on this topic, since this is very well explained in a lot of other places, such as Wikipedia: http://en.wikipedia.org/wiki/Dual_polyhedron

As for the case in question, it's this thread: http://www.cfd-online.com/Forums/ope...-boundary.html

bryant_k needs to simulate an interesting kind of cases where a 2D square domain, with cyclic patches on all 4 sides, can preserve a particular flow structure, diminishing only in it's kinetic energy and pressure levels, due to the loss by viscous forces of the fluid itself.

The problem was that even though the velocity field was essentially OK, the pressure field was not. The reason? The mesh was composed by tetrahedral cells, in a non-evenly distribution and size, and were therefore inducing some very crazy local pressure differences, so that the mass-flow would be preserved, as shown on post #6.

One quick fix was to use OpenFOAM's polyDualMesh to convert the mesh to it's counter dual part, resulting in a mesh that is a lot better than the original one... albeit not perfect, since the original was not uniform.
« Prev     Main     Next »
Total Comments 3

Comments

  1. Old Comment
    m9819348's Avatar
    Nice post Wyldckat!
    permalink
    Posted September 18, 2013 at 03:21 by m9819348 m9819348 is offline
  2. Old Comment
    SergeAS's Avatar
    How about this old problem ? There are changes?
    permalink
    Posted October 4, 2013 at 14:48 by SergeAS SergeAS is offline
  3. Old Comment
    Hi SergeAS,

    Quote:
    Originally Posted by SergeAS View Comment
    How about this old problem ? There are changes?
    I've never had a close look into this, but from their description on that page, the problem seems to be related to the modelling itself, not a mesh issue.

    My guess is that no one has approached OpenCFD to request a support contract on properly implementing such simulations. And I remember reading on the forum that there were several limitations to the "sonic" solvers in OpenFOAM, but I have no idea how that has been progressing so far.

    Either way, it looks like "AeroFoam" already solves the problem Although they should seriously consider renaming it: http://www.openfoam.com/legal/trademark-guidelines.php
    Quote:
    For example, if Archimedes wished to develop an application to simulate hydrostatics in OpenFOAM, we would strongly discourage project names such as “hydrostaticFoam” and “OpenFOAM Hydrostatics”.
    Best regards,
    Bruno
    permalink
    Posted October 5, 2013 at 07:36 by wyldckat wyldckat is offline
 

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