CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[mesh manipulation] BlockMesh cellSet refineMesh

Register Blogs Community New Posts Updated Threads Search

Like Tree17Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 29, 2019, 16:47
Default
  #41
Senior Member
 
Ali Shayegh
Join Date: Oct 2015
Posts: 131
Rep Power: 11
amuzeshi is on a distinguished road
Quote:
Originally Posted by zp_chem View Post
Hi:
I want to konw have you solved this problem?
Hi.
Who are u talking with?
amuzeshi is offline   Reply With Quote

Old   April 7, 2020, 10:32
Default
  #42
New Member
 
amir mofakham
Join Date: Feb 2011
Posts: 14
Rep Power: 15
amir.mofakham is on a distinguished road
I just want to add if you want to use refineMesh more than one time make sure to set the startFrom in controlDict to latestTime. Because each time refineMesh creates a mesh at a new time step and if startFrom is not set to latestTime refineshMesh does not read the refined mesh.

Cheers.

Quote:
Originally Posted by nlinder View Post
Yes i use a script.
You need several cellSet files called cellSetDict.1, cellSetDict.2 .... I created them manually.
Then I use the following script (credits to the one who wrote it, I actually don't know)

Code:
refineMeshByCellSet()
{
   while [ $# -ge 1 ]
   do
      echo "creating cell set for primary zone - $1"
      cp system/cellSetDict.$1 system/cellSetDict
      cellSet > log.cellSet.$1 2>&1

      echo "refining primary zone - $1"
      refineMesh -dict -overwrite > log.refineMesh.$1 2>&1
      shift
   done
}

runApplication blockMesh
echo "BlockMesh finish"
refineMeshByCellSet 1 2 3
echo "refineMeshByCellSet finish"
The second last line defines how often it will be refined..

Greetings
amir.mofakham is offline   Reply With Quote

Reply


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
[blockMesh] Multi-region Blockmesh - Refinemesh issues. Doug68 OpenFOAM Meshing & Mesh Conversion 3 February 18, 2016 21:09
[blockMesh] Multi-region Blockmesh - Refinemesh issues. Doug68 OpenFOAM Meshing & Mesh Conversion 0 February 17, 2016 04:39
[mesh manipulation] multiple calls to refineMesh parallel w/ dict failing Regis_ OpenFOAM Meshing & Mesh Conversion 2 June 4, 2015 14:44
[mesh manipulation] refineMesh from a cellSet issue gfilip OpenFOAM Meshing & Mesh Conversion 0 September 28, 2010 14:14
Bug in mesh tools: cellSet, refineMesh, ...? alexm OpenFOAM Bugs 0 August 10, 2009 13:46


All times are GMT -4. The time now is 06:45.