Quote:
|
Quote:
|
1 Attachment(s)
Quote:
Above are the cells for one faceZone which is marked red. So you say for one faceZone the slaveCells should be all on the same side. I thought it is normal if the cells are on different sides marking one side as positive and the other as negative and consider this for the flux calculation. The question is why are some cells on the right side? Below is the code from topoSetDict I use for creating the zones. Code:
actions |
Greetings to all!
@Daniel: If I remember this correctly, in order to define a "faceZone", one needs to have a "faceSet" and a "cellSet", where:
This is basically because a "set" only indicates a selection and a "zone" indicates a part of the mesh that acts as a ghostly geometry/mesh sub-domain, which means that the normals to that geometry are important. Best regards, Bruno |
Quote:
Afterwards I create the inte_*SlaveCells cellSets with topoSetDict by specifying the faceZones. So it seems instead of selecting just one side (the slave side as specified in topoSetDict) the cells on all sides are selected. |
You can diagnose which exact cells have been selected by running:
Code:
foamToVTK -cellSet inte_1SlaveCells |
Quote:
|
Quote:
And since I didn't know which reader for ParaView you were using, I assumed the worst case scenario, hence suggesting foamToVTK. Then the picture in the post #18 is of the cellSet from which the faceZones are derived from? If so, is that cellSet created by HyperMesh? Because if it is, then it's a bug in HyperMesh. I say this because the normals for the faceZones are calculated based on the centers of the cells on the provided cellSet. |
Quote:
I also do not understand why I have to create the slaveCells cellSet as the face orientations are already there. In the faceZones file exported there is a flipMap after each faceZone which defines the orientation of the individual faces. |
Hi Daniel,
Sorry for making you repeated yourself once again :( I re-read the posts now and had a better look into the case you had shared with me. Hopefully I didn't miss anything this time. And my conclusion is the same as Bernhard's: Quote:
Now, in order to fix this problem, the change will likely have to be done prior to running the simulation :( Although if the renumber is identical, you might be able to copy the fixed "faceZones" file from a another case folder where the mesh was renumbered from the original. As for the fixed renumbered mesh, I have not tested this, but it seems that renumberMesh can use a dictionary file, as exemplified at "applications/utilities/mesh/manipulation/renumberMesh/renumberMeshDict": https://github.com/OpenFOAM/OpenFOAM...numberMeshDict - it seems to have options that might helped preserve the flipMaps for the faceZones. As for the necessity for the cellSets by swak4Foam: I have no idea. I can only guess that the pre-identified cells can help have a faster calculation, instead of having to infer said set from the faceZones... possibly at the start or on each iteration. Either way, as I wrote before, there is a relation between faceZones and cellSets, and that's for assigning the normals to the faceZones. Best regards, Bruno |
Quote:
A B 1 2 C D Now if A is the owner of 1 and D the owner of 2 then the faceNormal of 1 points down and 2 up (or the other way round; I keep forgetting). That means in order to get consistent mass flows we need the flip-field. For a faceZone this is already defined and swak is content (of course you depend on the preprocessing utility to define it correctly. If the programmer was lazy the flip is set to some arbitrary value). No cellSet needed faceSets have no flip-information. Therefor the slave-cellSet is needed (in our case that would be either AB or CD) to get directional information. The cellSet is only used by swak the first time that the flip-map is constructed |
Quote:
However one strange thing happened: If you remember the table with the results for the different postprocessing methods I posted in comment #16. The results for case Swak4Foam2 were I did not use flip were correct. Now without renumbering I get the same wrong results as for the OpenFOAM and Swak4Foam1 method. The results for the other methods remain the same. Maybe this is related to the following observation. The flipMaps from the faceZones exported from Hypermesh all look like this: Code:
flipMap List<bool> 372{1}; To find this out I manually switched the flipMaps back to being all 1 for zone inte_1 and inte_2. Now all postprocessing tools report the same correct mass flow. So it looks like renumberMesh is flipping some orientations it should not flip. However if do not run renumber there is something wrong as well. Am I going crazy? Quote:
|
Quote:
|
Quote:
|
Quote:
The other idea is to fall back to the safest bet: define in HyperMesh the cellSets and faceSets and then use OpenFOAM to create its own faceZones. If this fails, then something veeery wrong is going on :( |
Quote:
Quote:
|
Quote:
|
Quote:
|
1 Attachment(s)
Quote:
From this I did create a faceZone from only the faceSet, another one from the faceSet and the slaveCells and a third one from the faceSet and the ownerCells. Create slaveCells from faceZone: Code:
{ Code:
{ Code:
{ Code:
{ Code:
{ Code:
{ flipMap List<bool> 372{1}; and the flipMaps of the tree created faceZones like this: faceZone1 flipMap List<bool> 372{0}; faceZone2 flipMap List<bool> 372{1}; faceZone3 flipMap List<bool> 372{0}; With renumbering the flipMap of the exported faceZone looks like this: Attachment 26483 and the flipMaps of the tree created faceZones like this: faceZone1 flipMap List<bool> 372{0}; faceZone2 identical to the attached faceZone faceZone3 flipMap List<bool> 372{0}; I don't know which conclusion I should draw from this. faceZone2 from the faceSet and the slaveCells is always identical to the exported or renumbered one. For the other two faceZones the renumbering does not affect the result i.e. they are the same as without renumbering. But I guess only the method which creates faceZone2 is important. |
Greetings to all!
(I hope I didn't miss anything this time.) If my memory doesn't fail me, this geometry wasn't very complex on the face zone locations; more specifically, the faceZones were oriented with a particular axis orientation. Therefore, you can simply do this:
The tutorial "heatTransfer/buoyantSimpleFoam/circuitBoardCooling" is a good example of this. Best regards, Bruno |
All times are GMT -4. The time now is 14:49. |