|
[Sponsors] |
topoSet rotatedBoxToCell: Bug or lack of understanding? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 10, 2021, 06:42 |
topoSet rotatedBoxToCell: Bug or lack of understanding?
|
#1 |
Senior Member
Join Date: Dec 2019
Location: Cologne, Germany
Posts: 367
Rep Power: 8 |
Hi all,
i tried to use rotatedBoxToCell as source in topoSetDict (OF version 7). i see a strange behaviour as outcome for 2 scenarios that should yield the same result. i do not know if i use the utility wrong or if it is actually i bug. my case is rather simple: scenario 1: origin (0 0 -1); i (1 0 0); j (0 1 0); k (0 0 1); when i execute topoSet, it finds 519k cells. scenario 2: origin (0 0 0); i (1 0 0); j (0 1 0); k (0 0 -1); when i execute topoSet, it finds zero cells. what i did in scenario 2 is just, i moved the origin in positive z-direction and also changed the k-vector in the other direction, same magnitude. in the end i have the same corner points for my two boxes, but in scenario 2 i do not get any cells. i checked the points based on the following code from the source code // Define a cell for the box pointField boxPoints(8); boxPoints[0] = origin_; boxPoints[1] = origin_ + i_; boxPoints[2] = origin_ + i_ + j_; boxPoints[3] = origin_ + j_; boxPoints[4] = origin_ + k_; boxPoints[5] = origin_ + k_ + i_; boxPoints[6] = origin_ + k_ + i_ + j_; boxPoints[7] = origin_ + k_ + j_; https://github.com/OpenFOAM/OpenFOAM...tedBoxToCell.C the points are the same, but not the order of points. from my understanding i,j and k are just vectors pointing in directions and therefor it should not matter in which relationship i enter those values, bc in the end points are calculated that are corner points for the rotated box. why do i get two different results from the same corner points? |
|
December 12, 2021, 09:51 |
|
#2 |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,714
Rep Power: 40 |
You have just defined a box using a lefthand coordinate system! If you work through the code you will probably come to the conclusion that this corresponds to an inverted (negative volume) bounding box. Seems perfectly legitimate that it doesn't find any cells enclosed by that volume.
|
|
Tags |
rotatedboxtocell, toposetdict |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
fail to run series of runApplication topoSet -dict | jiahui_93 | OpenFOAM Programming & Development | 1 | May 25, 2022 13:56 |
bug : topoSet STOP RESPONDING while trying to make cellzones near to a surface. | sk11 | OpenFOAM Bugs | 0 | March 1, 2021 12:49 |
Lack of memory or bug? | kit607 | OpenFOAM Running, Solving & CFD | 0 | June 7, 2018 10:31 |
Understanding memory handling of GeometricFields / posible bug in | chriss85 | OpenFOAM Programming & Development | 1 | May 7, 2015 11:57 |
Lack of understanding? Spatial OF Schemes | hxaxtma | OpenFOAM Running, Solving & CFD | 1 | April 30, 2014 08:15 |