CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   refineMesh (https://www.cfd-online.com/Forums/openfoam-programming-development/124228-refinemesh.html)

cctv September 30, 2013 07:22

refineMesh
 
Hi
I am wondering if openfoam could unrefine 2D mesh? and how to do so. In addition, could it refine mesh with curves?
Thanks

Bernhard September 30, 2013 08:06

There is no unrefine tool in OpenFOAM as far as I know of. The refine utilities do just cut the cell in pieces, but will not make curves smoother, for that, I would go back to the original mesh generation tool.

cctv September 30, 2013 16:35

Quote:

Originally Posted by Bernhard (Post 454259)
There is no unrefine tool in OpenFOAM as far as I know of. The refine utilities do just cut the cell in pieces, but will not make curves smoother, for that, I would go back to the original mesh generation tool.

Then, could the function mapField could map field from refined mesh to coarse mesh? if not, what is the usage to go back to the original mesh. I have ever seen some projects could using Adaptive methods. how to do this?

GerhardHolzinger October 1, 2013 07:09

If you omit the option -overwrite, then refineMesh creates a new time step which contains the refined mesh. If you used -overwrite, then the old mesh is lost.

You can map Fields from a fine mesh solution to a coarse mesh case.

cctv October 1, 2013 09:11

Quote:

Originally Posted by GerhardHolzinger (Post 454440)
If you omit the option -overwrite, then refineMesh creates a new time step which contains the refined mesh. If you used -overwrite, then the old mesh is lost.

You can map Fields from a fine mesh solution to a coarse mesh case.

Hi
Have you ever tried to unrefine the refined mesh?

GerhardHolzinger October 1, 2013 11:15

There is no such thing as unrefinement. However, if you keep the original mesh when refining you can always go back to your initial mesh.

cctv October 1, 2013 12:10

Quote:

Originally Posted by GerhardHolzinger (Post 454499)
There is no such thing as unrefinement. However, if you keep the original mesh when refining you can always go back to your initial mesh.

Hi
I found that in class dynamicRefineFvMesh, there is a function called
Foam::dynamicRefineFvMesh::unrefine.
Couldn't it be used to unrefine the refined Mesh?
I have ever seen some objects which could adptively refine and unrefine the mesh. Did they use the method of maintaining the original mesh?

GerhardHolzinger October 2, 2013 02:32

One function makes no tool. From the application side of view there is no such thing as unrefineMesh. But nothing keeps you from creating such a utility.

wyldckat October 5, 2013 06:59

Greetings to all!

@cctv: That method is used for dynamic mesh refinement. You can see this in practice in the tutorial "multiphase/interDyMFoam/ras/damBreakWithObstacle". It refines the mesh where the fluid interface between air and water is going through and it will unrefine the path behind it.

But as already explained a few times on this thread, this requires you to start with the coarse mesh. It can then undo the refinement, as long as it knows how the refined cells relate to the original cells.

I vaguely remember reading a thread where 2D meshes were not supported by this algorithm. Let's see what I find:
I can't find the thread I remember reading about :( Anyway, the solution mentioned in the last 2 threads is to use the "symmetry" boundary condition instead of "empty".

Best regards,
Bruno


All times are GMT -4. The time now is 11:56.