CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [mesh manipulation] BlockMesh cellSet refineMesh (https://www.cfd-online.com/Forums/openfoam-meshing/61518-blockmesh-cellset-refinemesh.html)

amuzeshi August 29, 2019 15:47

Quote:

Originally Posted by zp_chem (Post 743378)
Hi:
I want to konw have you solved this problem?

Hi.
Who are u talking with?

amir.mofakham April 7, 2020 09:32

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 (Post 402605)
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



All times are GMT -4. The time now is 09:22.