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

refineMesh

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

Reply
 
LinkBack Thread Tools Display Modes
Old   September 30, 2013, 07:22
Default refineMesh
  #1
Member
 
Yu CAO
Join Date: May 2013
Posts: 74
Rep Power: 4
cctv is on a distinguished road
Hi
I am wondering if openfoam could unrefine 2D mesh? and how to do so. In addition, could it refine mesh with curves?
Thanks
cctv is offline   Reply With Quote

Old   September 30, 2013, 08:06
Default
  #2
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 12
Bernhard is on a distinguished road
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.
Bernhard is offline   Reply With Quote

Old   September 30, 2013, 16:35
Default
  #3
Member
 
Yu CAO
Join Date: May 2013
Posts: 74
Rep Power: 4
cctv is on a distinguished road
Quote:
Originally Posted by Bernhard View Post
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?
cctv is offline   Reply With Quote

Old   October 1, 2013, 07:09
Default
  #4
Senior Member
 
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 165
Rep Power: 14
GerhardHolzinger will become famous soon enoughGerhardHolzinger will become famous soon enough
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.
GerhardHolzinger is offline   Reply With Quote

Old   October 1, 2013, 09:11
Default
  #5
Member
 
Yu CAO
Join Date: May 2013
Posts: 74
Rep Power: 4
cctv is on a distinguished road
Quote:
Originally Posted by GerhardHolzinger View Post
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?
cctv is offline   Reply With Quote

Old   October 1, 2013, 11:15
Default
  #6
Senior Member
 
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 165
Rep Power: 14
GerhardHolzinger will become famous soon enoughGerhardHolzinger will become famous soon enough
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.
GerhardHolzinger is offline   Reply With Quote

Old   October 1, 2013, 12:10
Default
  #7
Member
 
Yu CAO
Join Date: May 2013
Posts: 74
Rep Power: 4
cctv is on a distinguished road
Quote:
Originally Posted by GerhardHolzinger View Post
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?
cctv is offline   Reply With Quote

Old   October 2, 2013, 02:32
Default
  #8
Senior Member
 
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 165
Rep Power: 14
GerhardHolzinger will become famous soon enoughGerhardHolzinger will become famous soon enough
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.
GerhardHolzinger is offline   Reply With Quote

Old   October 5, 2013, 06:59
Default
  #9
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,251
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
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
wyldckat is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
checkMesh Erros after refineMesh mgdenno OpenFOAM Mesh Utilities 10 October 14, 2014 05:16
refineMesh inverses face normals? RoE OpenFOAM Meshing & Mesh Conversion 3 August 3, 2012 11:41
checkMesh Errors after refineMesh mgdenno OpenFOAM 0 July 30, 2012 21:39
refineMesh -parallel crashes (in cavity tutorial) andras OpenFOAM Mesh Utilities 0 August 8, 2010 14:52
Cannot refineMesh with useHexTopology true ver141 naoki OpenFOAM Bugs 5 June 11, 2008 04:07


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