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/)
-   -   [snappyHexMesh] Problem using refineMesh, topoSet and snappyHexMesh (https://www.cfd-online.com/Forums/openfoam-meshing/221074-problem-using-refinemesh-toposet-snappyhexmesh.html)

Rasmusiwersen October 3, 2019 04:33

Problem using refineMesh, topoSet and snappyHexMesh
 
2 Attachment(s)
Hi all,

Working on ubuntu 18.14 in OpenFOAM version 7 (openFoam.org), I am having trouble refining a case with waves passing a cylinder.

To get a proper resolution of the solution, I need to refine the mesh around the cylinder as well as in the free surface area. My strategy is to use snappyHexMesh to refine around the cylinder, and use refineMesh & topoSet to resolve the free surface properly.

Having used the DTCHullWave tutorial as a standpoint, I have created some different topoSetDictionaries and using a single refineMeshDict, since all topoSets needs to be refined in the same directions.

running the sequence:

# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions

runApplication surfaceFeatures

runApplication blockMesh

for i in 1 2 3 4
do
runApplication -s $i \
topoSet -dict system/topoSetDict.${i}

runApplication -s $i \
refineMesh -dict system/refineMeshDict -overwrite
done

runApplication snappyHexMesh -overwrite

i cannot get past the error message:
--> FOAM FATAL ERROR:
cell 1590 of level 0 uses more than 8 points of equal or lower level
Points so far:8(2024 2025 2035 2036 2134 2135 2145 2146)

I've established that this happens at the interface between the initial mesh created in blockMeshDict and the first refinement region, topoSet 1 (please see attached .zip case)

Also, a screenshot is taken to visualize what the "physical" problem is. The problem cell is not a hexahedron as it is connected to more than 8 (10) vertices. How do i get past this? I've tried enabling "useHextopology" in the refineMeshDict (and then disabling the geometric cutting), with no luck. Also I've tried to refine the initial mesh, which is purely hexahedrons i might add. My domain is 30 meters in x direction, and subdivided into 80 cells, i.e. one cell is 37.5 cm. This is exactly the length of the cell in the attached picture, hence i know the problem occurs in the transition from initial mesh to the region defined in the topoSetDict.1.

In addition, I've tried to reduce the size of nCellsBetweenLayers, change the refinement levels in snappy as well as the regions specified in topoSet (in case they were exceeding the bounding box by the order of computational accuracy). Nothing helps, and the same cell is the problem each time.

Any suggestions?

Thanks
/Rasmus


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