|
[Sponsors] |
[snappyHexMesh] Using stl files with boundaryField |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
New Member
John Wooten, PhD
Join Date: Dec 2020
Location: Oak Ridge TN
Posts: 18
Rep Power: 5 ![]() |
I am trying to combine the roomWithRotatingFan ( minus the fan ), with the hotRoom tutorial. My problem is that I'm getting an error about finding patchField entries for various pieces. I'm using openFoam 2012, BTW.
blockMeshDict contains: scale 1; vertices ( ( -6.0 -0.5 -0.1) ( 0.5 -0.5 -0.1) ( 0.5 5.0 -0.1) ( -6.0 5.0 -0.1) ( -6.0 -0.5 2.9) ( 0.5 -0.5 2.9) ( 0.5 5.0 2.9) ( -6.0 5.0 2.9) ); blocks ( hex (0 1 2 3 4 5 6 7) (65 55 30) simpleGrading (1 1 1) ); edges ( ); boundary ( allBoundary { type patch; faces ( (3 7 6 2) (0 4 7 3) (2 6 5 1) (1 5 4 0) (0 3 2 1) (4 5 6 7) ); } ); IN snappyHexMeshDict I have: castellatedMesh true; snap true; addLayers false; geometry { inlet.stl{ type triSurfaceMesh; name inlet;} outlet.stl{ type triSurfaceMesh; name outlet;} fixedWalls.stl{ type triSurfaceMesh; name fixedWalls;} floor.stl{ type triSurfaceMesh; name floor;} ceiling.stl{ type triSurfaceMesh; name ceiling;} avatar.stl{ type triSurfaceMesh; name avatar;} } castellatedMeshControls { maxLocalCells 100000; maxGlobalCells 8000000; minRefinementCells 0; maxLoadUnbalance 0.10; nCellsBetweenLevels 2; features ( { file "inlet.eMesh"; level 0;} { file "outlet.eMesh"; level 0;} { file "fixedWalls.eMesh"; level 0;} { file "avatar.eMesh"; level 1;} { file "floor.eMesh"; level 1;} { file "ceiling.eMesh"; level 1;} ); refinementSurfaces { inlet{ level (0 0);} outlet{ level (0 0);} fixedWalls{ level (0 0);} avatar{ level (1 1);} floor{ level (1 1);} ceiling{ level (1 1);} } resolveFeatureAngle 30; refinementRegions { } locationInMesh (0.1 0.0 0.01); allowFreeStandingZoneFaces false; } surfaceFeatureExtractDict contains: inlet.stl { extractionMethod extractFromSurface; includedAngle 150; } outlet.stl { extractionMethod extractFromSurface; includedAngle 150; } fixedWalls.stl { extractionMethod extractFromSurface; includedAngle 150; } avatar.stl { extractionMethod extractFromSurface; includedAngle 150; } floor.stl { extractionMethod extractFromSurface; includedAngle 150; } ceiling.stl { extractionMethod extractFromSurface; includedAngle 150; } And in 0.orig: dimensions [0 1 -1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { floor { type noSlip; } ceiling { type noSlip; } fixedWalls { type noSlip; } } Any help identifying where I'm missing something or a place to look to clarify this would be appreciated. |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Member
Petros Ampatzidis
Join Date: Oct 2018
Location: Bath, UK
Posts: 64
Rep Power: 7 ![]() |
Hi,
What is the error message that you get? From a first glance, it seems that you're missing the outlet and avatar patches in the 0.org directory. |
|
![]() |
![]() |
![]() |
![]() |
#3 |
New Member
John Wooten, PhD
Join Date: Dec 2020
Location: Oak Ridge TN
Posts: 18
Rep Power: 5 ![]() |
Cannot find patchField entry for all allBoundary.
I added avatar and inlet, ceiling and floor to snappyHexMeshDict and to surfaceFeatureExtractDict and still get same error When surfaceFeatureExtraction runs it shows allBoundary as created. |
|
![]() |
![]() |
![]() |
![]() |
#4 |
Member
Petros Ampatzidis
Join Date: Oct 2018
Location: Bath, UK
Posts: 64
Rep Power: 7 ![]() |
I see. The problem is that you have to remove the allBoundary entry. This is supposed to be done after you run
Code:
snappyHexMesh -overwrite Best, Petros |
|
![]() |
![]() |
![]() |
![]() |
#5 |
New Member
John Wooten, PhD
Join Date: Dec 2020
Location: Oak Ridge TN
Posts: 18
Rep Power: 5 ![]() |
I'm sorry, do you mean that blockMeshDict should NOT have:
scale 1; vertices ( ( -6.0 -0.5 -0.1) ( 0.5 -0.5 -0.1) ( 0.5 5.0 -0.1) ( -6.0 5.0 -0.1) ( -6.0 -0.5 2.9) ( 0.5 -0.5 2.9) ( 0.5 5.0 2.9) ( -6.0 5.0 2.9) ); blocks ( hex (0 1 2 3 4 5 6 7) (65 55 30) simpleGrading (1 1 1) ); edges ( ); boundary ( allBoundary { type patch; faces ( (3 7 6 2) (0 4 7 3) (2 6 5 1) (1 5 4 0) (0 3 2 1) (4 5 6 7) ); } ); // ************************************************** *********************** // Or, do you mean it should have that but remove it after running snappyHexMesh -overwrite? I do run createPatch. Here is the last part of file I process with: echo "Running blockMesh" runApplication blockMesh if [[ -e "constant/triMesh" ]] then echo "Running snappyHexMesh" runApplication snappyHexMesh -overwrite # - force removal of fields generated by snappy rm -rf 0 # renumber the mesh runApplication renumberMesh -overwrite # - create the inlet/outlet and AMI patches runApplication createPatch -overwrite fi echo "0/T.orig copied to 0/T" cp 0/T.orig 0/T echo "Running setFields" runApplication setFields # - set the initial fields restore0 #---------------------------------------------- #runApplication decomposePar #runParallel $(getApplication) #runApplication reconstructPar echo "Run $(getApplication)" runApplication $(getApplication) #---------------------------------------------- # convert output files to vtk for ParaView foamToVTK I really appreciate your help, BTW! |
|
![]() |
![]() |
![]() |
![]() |
#6 |
New Member
John Wooten, PhD
Join Date: Dec 2020
Location: Oak Ridge TN
Posts: 18
Rep Power: 5 ![]() |
If I remove allBoundary in blockMeshDict entirely from the beginning i get:
Code:
--> FOAM FATAL ERROR: (openfoam-2012) Cannot find file "points" in directory "polyMesh" in times "0" down to constant |
|
![]() |
![]() |
![]() |
![]() |
#7 |
Member
Petros Ampatzidis
Join Date: Oct 2018
Location: Bath, UK
Posts: 64
Rep Power: 7 ![]() |
No you shouldn't remove the allBoundary entry from blockMeshDict. This creates the background mesh where snappyHexMesh will work on.
I will try to summarise the key points you need to satisfy:
In any case, if you study carefully the rotatingFanInRoom tutorial I am sure you will find your answers. Best, Petros |
|
![]() |
![]() |
![]() |
![]() |
#8 |
New Member
John Wooten, PhD
Join Date: Dec 2020
Location: Oak Ridge TN
Posts: 18
Rep Power: 5 ![]() |
I think the problem I'm having is that I started with a tutorial hotRoom.
In that the simple box vertices, edges, faces etc. are in blockMeshDict and allBoundary referred to those. I'm trying to move to solving the same problem, but using stl files as input. Thus, the original blockMeshDict doesn't really describe the geometry as it is in the stl files. So, if I have stl files for floor, ceiling, and fixedWalls, how to I write blockMesh to handle that? I'm trying to automate feeding in different sets of stl files describing ceiling, floor, and fixed walls, then produce if necessary the blockMeshDict, etc. then run pimpleFoalm on the model generated this way. Any suggestions on how to accomplish this? |
|
![]() |
![]() |
![]() |
![]() |
#9 |
Member
Petros Ampatzidis
Join Date: Oct 2018
Location: Bath, UK
Posts: 64
Rep Power: 7 ![]() |
See my previous post. I think it has all the information. All in all, you need to adjust your background mesh to enclose your stl geometry.
|
|
![]() |
![]() |
![]() |
Tags |
blockmeshdict block mesh, boundaryfield, patch |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] How do I put STL files in interFoam? | smj7467 | OpenFOAM Meshing & Mesh Conversion | 1 | January 13, 2021 10:06 |
[snappyHexMesh] With FreeCAD: creating waterproof STL files? | robob | OpenFOAM Meshing & Mesh Conversion | 11 | April 29, 2018 11:33 |
OF 1.6 | Ubuntu 9.10 (64bit) | GLIBCXX_3.4.11 not found | piprus | OpenFOAM Installation | 22 | February 25, 2010 13:43 |
[OpenFOAM] ParaView 3.6.1 & 3.7.0: Can't view STL files | johannes | ParaView | 2 | December 3, 2009 14:07 |
Problems in compiling paraview in Suse 10.3 platform | chiven | OpenFOAM Installation | 3 | December 1, 2009 07:21 |