|
[Sponsors] |
[openFuelCell] DecomposePar generates internal holes |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 22, 2018, 17:16 |
DecomposePar generates internal holes
|
#1 |
Senior Member
Lasse Brams Vinther
Join Date: Oct 2015
Posts: 118
Rep Power: 11 |
Hello dear openFOAM'ers,
I'm working with some HTPEM modelling based upon the source code found at: http://openfuelcell.sourceforge.net/. Currently having a working case running with a single processor, however, when I decompose the case it generates internal empty regions as shown in the attachments, one pre decomposition and the other decomposed. The regions is only generated in the processor to processor plane (where they meet). I have tried with simple decomposition method, manual (based upon a cellID generation from the previously mentioned code) and scotch. Scotch resulted in no visible regions, however, the simulation could not run due to naming issues caused by the decomposition. The base mesh is generated in snappyHexMesh and I noticed this issue when trying to reconstruct the regions of a parallel simulation I got the following error when reconstructing the point fields: Incomplete patch point addressing Thanks for any support in advance and please let me know if any additional information is required for support on this issue. Best regards Lasse |
|
December 22, 2018, 18:26 |
|
#2 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Quick answer: This looks like a rendering bug, not an OpenFOAM bug... see this entry on the FAQ to see what I mean: https://openfoamwiki.net/index.php/F...is_in_ParaView
As for the "Incomplete patch point addressing", I suspect that is due to something else entirely... but without more specific steps and the file names themselves, along with complete error outputs, it's hard to diagnose the issue here.
__________________
|
|
December 23, 2018, 06:47 |
|
#3 |
Senior Member
Lasse Brams Vinther
Join Date: Oct 2015
Posts: 118
Rep Power: 11 |
Hello Bruno,
thanks for the quick response. I just suspected the gaps as the same tendencies aren't observed in a similar case from the source code. The mesh is generated through the following. Code:
blockMesh surfaceFeatureExtract rm -rf system/decomposeParDict mv system/decomposeParDictMesh system/decomposeParDict decomposePar mpirun -np $NPROCS snappyHexMesh -overwrite -parallel reconstructParMesh -constant rm -rf processor* mv system/decomposeParDict system/decomposeParDictMesh ##------------------------------------------------------------------------------- echo -e " - Split mesh into the single regions" splitMeshRegions -cellZones -overwrite #------------------------------------------------------------------------------- echo -e " - Create file for paraview" touch paraview.foam #------------------------------------------------------------------------------- echo -e " - Rename air and fuel patches" createPatch -region fuel -overwrite createPatch -region air -overwrite rm -rf 0 cp -a 0.org 0 topoSet -region air topoSet -region fuel topoSet -region electrolyte Code:
cp system/decomposeParDictSim system/decomposeParDict cp -rf system/decomposeParDict system/air/. cp -rf system/decomposeParDict system/fuel/. cp -rf system/decomposeParDict system/abp/. cp -rf system/decomposeParDict system/cbp/. cp -rf system/decomposeParDict system/electrolyte/. decomposePar -force decomposePar -region air decomposePar -region fuel decomposePar -region electrolyte decomposePar -region abp decomposePar -region cbp mpirun -np $NPROCS foamExec splitMeshRegions -cellZones -parallel @ I = 0 while ( $I < $NPROCS ) cp -rf processor$I/1/. processor$I/constant/. rm -rf processor$I/1 @ I++ end rm -rf processor*/constant/polyMesh/sets processor*/constant/polyMesh/*Zones # air zones # mpirun -np $NPROCS foamExec setSet -batch ./config/make.setAir -region air -constant -noVTK -parallel mpirun -np $NPROCS foamExec setsToZones -noFlipMap -region air -constant -parallel # fuel zones # mpirun -np $NPROCS foamExec setSet -batch ./config/make.setFuel -region fuel -constant -noVTK -parallel mpirun -np $NPROCS foamExec setsToZones -noFlipMap -region fuel -constant -parallel # electrolyte zones # mpirun -np $NPROCS foamExec setSet -batch ./config/make.setElectrolyte -region electrolyte -constant -noVTK -parallel mpirun -np $NPROCS foamExec setsToZones -noFlipMap -region electrolyte -constant -parallel I am able to reconstruct the thin blue center region in the middle and the outer grey and red regions. Those three regions are all solids. Let me know if there is any other information you require. Last edited by Swagga5aur; December 23, 2018 at 09:07. |
|
December 23, 2018, 16:34 |
|
#4 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Quick answers:
|
|
December 23, 2018, 17:51 |
|
#5 |
Senior Member
Lasse Brams Vinther
Join Date: Oct 2015
Posts: 118
Rep Power: 11 |
1. I'll use that from now on didn't realize that was a possibility. You are correct I am using OpenFOAM 6.
2. Yes that is correct, I rename two patches to from min, max to inlet and outlet of the respective regions (both fuel and air). I could try renaming some of the patches of the regions that I can reconstruct, to see if it provokes the issue. 3. Just used the same approach as in the source code example cases, it would make more sense to just overwrite and remove the step with copying and remove the 1 folder. 4. Same as no.3 same approach as the examples, just wanted to make something that works. I will use topoSet in my future cases as its more straight forward. 5. Hmm, well the current case I'm working on is based upon some confidential geometries, just reduced the domain with the size of blockMesh but having the original stl files in the directory. I will try to make a dummy case before new year which is share able for further debugging. Let me know if you want me to test something in the mean time. I'm going to make the same case where no renaming/createPatch is required to see if this solves the issue. I forgot to mention that I also run a renaming script for the decomposed case as the createPatch renaming is lost during decomposition and I believe that might be the main issue. Code:
@ I = 0 while ( $I < $NPROCS ) set DESTA = processor$I/constant/air/polyMesh set DESTF = processor$I/constant/fuel/polyMesh sed -i 's/minZ/airInlet/' $DESTA/* sed -i 's/maxZ/airOutlet/' $DESTA/* sed -i 's/minZ/fuelInlet/' $DESTF/* sed -i 's/maxZ/fuelOutlet/' $DESTF/* echo "processor"$I "done" @ I++ end Last edited by Swagga5aur; December 23, 2018 at 18:31. Reason: Forgot to mention some renaming |
|
December 23, 2018, 19:15 |
|
#6 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Quote:
Furthermore, createPatch can also be executed in parallel as you do with the other applications. Therefore, you should not use the hack relying on "sed -i" to hack inside all files within "polyMesh". So there are now two possible reasons for the problem in reconstruction:
|
||
December 25, 2018, 11:12 |
|
#7 |
Senior Member
Lasse Brams Vinther
Join Date: Oct 2015
Posts: 118
Rep Power: 11 |
That solved it, thanks Bruno and merry christmas!
What I did for now was just overwriting the splitMesh created decomposed directories with the individual decomposition of the respective regions such that they maintained there createPatch and topoSet modifications. I could also just apply the createPatch and topoSet in parallel instead. |
|
Tags |
decomposepar, parallel, snappyhexmesh |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Structured domain with internal holes | Alexl93 | Pointwise & Gridgen | 3 | March 22, 2019 17:44 |
[snappyHexMesh] snap stage generates internal triangles | Svensen | OpenFOAM Meshing & Mesh Conversion | 0 | May 20, 2016 16:03 |
using chemkin | JMDag2004 | OpenFOAM Pre-Processing | 2 | March 8, 2016 23:38 |
[snappyHexMesh] Snap generates holes in the mesh | Svensen | OpenFOAM Meshing & Mesh Conversion | 0 | March 25, 2015 04:20 |
decomposePar gives errors | of_user_ | OpenFOAM | 1 | July 4, 2011 06:27 |