CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Question about interface flow and adaptive mesh (https://www.cfd-online.com/Forums/openfoam-solving/59643-question-about-interface-flow-adaptive-mesh.html)

Henry Weller (Henry) January 4, 2005 18:07

The original VOF code Onno de
 
The original VOF code Onno developed based on the initial work of me and Hrvoje ended up being very complicated indeed because the high-order schemes he was developing including CICSAM have a tendency to generate unboundedness in the solution. Onno added layer after layer of post-fix code to try to sort this out. However, the basic principle is as you have described.

Luckyluke (Luckyluke) January 7, 2005 10:41

The adapative solver is also
 
The adapative solver is also my interest. I know the commercial code FLUENT has a excellent implementation for the adaptive feature which can provide boundary, gradient and isovalue adaptions. I want to know if the OpenFOAM provide such features. For example, can the computational domain with triangular or tetrahedral grids be re-fined whithin the region contained shocks? From Jasak's thesis, I find that after refinement the vertexes of the new refined element locate on the centers of the faces of the corresponding coarser mesh. Can this be avoided if using triangular or tetrahedral grids? That is to say, after refinement, no vertex of a element is the center of the face of another cell. If the answer is yes, I want to take FOAM as my research tool.

Can anybody understand me? http://www.cfd-online.com/OpenFOAM_D...part/happy.gif. Please give me some detail instruction of the adaptive solver provided by FOAM. Your help will be great for me.

Mattijs Janssens (Mattijs) January 7, 2005 11:03

> Can this be avoided if usin
 
> Can this be avoided if using triangular or tetrahedral grids?

The refinement methods that have been implemented in Foam all are based on splitting of hexes. This introduces these 'hanging vertices' which are actually no problem numerically.

No work has been done on refining tetrahedra as far as I know but it should not be too hard to implement using the topology change mechanism.

How would you like to refine tetrahedra?
- naive decomposition of tet into 4 subtets? This will make the tets worse aspect ratio every iteration.
- some kind of red-green type refinement (sorry, don't know the theory in 3D, only 2D)

What does Fluent do? Do they remesh (since they have a delaunay mesher)?

Do you want to use an external tet mesher with steerable mesh density? (e.g. tetgen)

Mattijs

Luckyluke (Luckyluke) January 11, 2005 02:00

Thank your for your message,
 
Thank your for your message, Mattijs. I want to use adaptive mesh for my simulation of time-dependent interface-flow. I want to timely change the mesh density in the region containing the interface between two fluids in order to precisely capture the position and shape of the interface. I hope that the FOAM has implemented the similar feature.

Luckyluke (Luckyluke) January 11, 2005 08:19

Hi,Jasak or someone else, can
 
Hi,Jasak or someone else, can you give me a detail description for the implementation of a new time-dependent solver using the adaptive meshing(similar to the example given in jasak's thesis)?

int main()
{
//error estimate?
//markers setting?
//remesh?
//mapping solution?
......
}

I fail to solve my problem with the FLUENT code. I came to know OpenFOAM a few day ago and I want to know if this new and novel code can meet my need. Who can help me? It is somewhat urgent and your help will be great for me.

Thank you in advance!

Mattijs Janssens (Mattijs) January 11, 2005 09:37

Hi Luke, are you sure you w
 
Hi Luke,

are you sure you want to do this fully dynamic? This will be quite difficult, especially with a sensitive algorithm like interface tracking.

If it can be done non-dynamic:
- write a simple application to do an error estimate (either using Hrvoje's error estimation methods or just do some gradient of a field) and collect a 'cellset' from the cells you want to refine
- run the refineMesh -dict
utility to refine all the cells in the cellSet
- run mapFields (see the User Guide) to map the solution from the old to the new mesh.

I have a sample application to write a cellSet based on field values.

Mattijs

Luckyluke (Luckyluke) January 11, 2005 21:00

Dear Mattijs, what your "non-
 
Dear Mattijs, what your "non-dynamics" means? If I condider a tme-dependent flow,you mean that I should obtain a coarse solution first? Then I do an error estimate on the old solution and collect the cells that should refine and run the refineMesh....... Finaly, I should run the main solver once more to compute on the new mesh? Do you mean that? It seems that this will save time and decrease the numerical error compared to do a refinement work each time step.

Is it difficult if I do this fully dynamic? Why?

Luckyluke (Luckyluke) January 12, 2005 01:17

I find the sovler in the foll
 
I find the sovler in the following directory:
"/home/user0/OpenFOAM/adou-1.0/run
/tutorials/lesInterFoam/nozzleFlow2D"

There are two dicts named refineMeshDict and cellSetDict. Can anybody tell me how to run this simulation step by step (in particular I want to know when the utility 'refineMesh' should be run)?It seems that this example contains the "refine" feature.

Chris Greenshields (Chris) January 12, 2005 03:34

All the tutorial application
 
All the tutorial application subdirectories (e.g. tutorials/icoFoam) contain scripts called Allrun and Allclean.

Allrun executes commands to run the cases step by step. Simply look at the contents of the script to see what it does.

Allclean resets the cases, i.e. returns it to its original form in the OpenFOAM release by deleting generated field data etc.

The tutorial directory itself (tutorials) contains both an Allrun and Allclean script that execute in sequence ALL the Allrun and Allclean scripts, respectively, in the subdirectories for each application. So executing the tutorials/Allrun script will run ALL the tutorial cases supplied with OpenFOAM.

Mattijs Janssens (Mattijs) January 13, 2005 04:05

Hi Luke, about doing fully
 
Hi Luke,

about doing fully dynamic mesh adaptation: yes that is still quite difficult.

The alternative way of stopping and refining and mapping and restarting is indeed not perfect but at least already in OpenFOAM1.0.2.

(sample dictionaries, e.g. for refineMesh are usually found in the source directory of the application (so $FOAM_UTILITIES/mesh/manipulation/refineMesh) - we haven't had time to include all these into the FoamX configuration so these applications cannot be used from FoamX)

Mattijs

lr103476 May 31, 2007 09:05

Hi Mattijs, So you have a
 
Hi Mattijs,

So you have a sample application to write a cellSet based on field values (like gradients of velocity...). Could you please share that sample, I would like to play some with the mesh refinement.

Are there any improvement in the new OF version 1.4, such that unsteady (dynamic) mesh refinement will be possible?

Regards, Frank

msrinath80 June 13, 2007 04:12

Hi all, Does anyone know ho
 
Hi all,

Does anyone know how to use adaptive meshing (either dynamic or using cellsets) with interFoam? If so I would appreciate if you could provide some pointers.

Thanks!


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