CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

topoSet rotatedBoxToCell: Bug or lack of understanding?

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By olesen

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 10, 2021, 05:42
Default topoSet rotatedBoxToCell: Bug or lack of understanding?
  #1
Senior Member
 
Join Date: Dec 2019
Location: Cologne, Germany
Posts: 355
Rep Power: 8
geth03 is on a distinguished road
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?
geth03 is offline   Reply With Quote

Old   December 12, 2021, 08:51
Default
  #2
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,685
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by geth03 View Post
scenario 2:
origin (0 0 0);
i (1 0 0);
j (0 1 0);
k (0 0 -1);
when i execute topoSet,...
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.
geth03 likes this.
olesen is offline   Reply With Quote

Reply

Tags
rotatedboxtocell, toposetdict


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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 12:56
bug : topoSet STOP RESPONDING while trying to make cellzones near to a surface. sk11 OpenFOAM Bugs 0 March 1, 2021 11:49
Lack of memory or bug? kit607 OpenFOAM Running, Solving & CFD 0 June 7, 2018 09:31
Understanding memory handling of GeometricFields / posible bug in chriss85 OpenFOAM Programming & Development 1 May 7, 2015 10:57
Lack of understanding? Spatial OF Schemes hxaxtma OpenFOAM Running, Solving & CFD 1 April 30, 2014 07:15


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