CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Meshing & Mesh Conversion

boxToCell versus rotatedBoxToCell

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree4Likes
  • 2 Post By engineer_the
  • 2 Post By yourvahid

Reply
 
LinkBack Thread Tools Display Modes
Old   December 30, 2013, 14:47
Default boxToCell versus rotatedBoxToCell
  #1
New Member
 
Join Date: Dec 2013
Posts: 2
Rep Power: 0
engineer_the is on a distinguished road
Hello,

Inside of topoSet I was using rotatedBoxToCell and was getting an unexpected selection of cells. To clarify I started comparing rotatedBoxtoCell (using non-rotated coordinates) with a simple boxToCell. Can anyone help explain why the two examples below result in two vastly different selections?

Code:
{
    name test;
    type cellSet;
    action new;
    source boxToCell;
    sourceInfo
    {
    box (0.03 0.05 0) (1 1 1);
    }
}
versus

Code:
{
    name test;
    type cellSet;
    action new;
    source rotatedBoxToCell;
    sourceInfo
    {
    origin (0.03 0.05 0);
    i (1 0.05 0); 
    j (0.03 1 0); 
    k (0.03 0.05 1);
    }
}

It should be noted that the following definitions give the same selection, which confuses me even more:

Code:
box (0 0 0) (1 1 1);
origin (0 0 0);
i (1 0 0);
j (0 1 0);
k (0 0 1);
engineer_the is offline   Reply With Quote

Old   December 30, 2013, 15:38
Default
  #2
New Member
 
Join Date: Dec 2013
Posts: 2
Rep Power: 0
engineer_the is on a distinguished road
I ended up solving my own problem. The i,j,k vectors are relative to the origin specified, in my example:

box (0.03 0.05 0) (1 1 1);

should be equivalent to

origin (0.03 0.05 0);
i (0.97 0 0);
j (0 0.95 0);
k (0 0 1);
vonboett and chengyu like this.

Last edited by engineer_the; December 30, 2013 at 17:35.
engineer_the is offline   Reply With Quote

Old   August 6, 2014, 14:07
Default
  #3
New Member
 
Vahid E.
Join Date: Jul 2014
Posts: 6
Rep Power: 2
yourvahid is on a distinguished road
Hi,
If you look at the source code it helps you to get it easier, a part of it that I think is helpful and related to your post is shown below:

Code:
     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_;
chengyu and Daneish like this.

Last edited by yourvahid; August 8, 2014 at 06:52.
yourvahid is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
.setSet problems Grimoli OpenFOAM 9 July 31, 2013 13:24
Plot of Solid Volume Fraction versus Height Musa FLUENT 2 February 5, 2012 09:06
Bug? refineMesh boxToCell negative coordinates lindstroem OpenFOAM 2 June 20, 2011 08:06
Properties of air versus temperature AND pressure Vincent Main CFD Forum 5 July 28, 2008 06:28
variable versus time Cesare CFX 1 September 27, 2004 11:00


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