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

[Other] boxToCell versus rotatedBoxToCell

Register Blogs Community New Posts Updated Threads Search

Like Tree14Likes
  • 7 Post By engineer_the
  • 7 Post By yourvahid

Reply
 
LinkBack Thread Tools Search this Thread 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);

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

Old   August 6, 2014, 15:07
Default
  #3
New Member
 
Vahid E.
Join Date: Jul 2014
Posts: 6
Rep Power: 12
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_;

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

Reply


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
How to Plot Average Temperature or Other Variables of a Domain Versus Pipe n CFD-Post Shomaz ul Haq CFX 8 June 6, 2018 19:43
.setSet problems Grimoli OpenFOAM 9 July 31, 2013 14:24
Plot of Solid Volume Fraction versus Height Musa FLUENT 2 February 5, 2012 09:06
Properties of air versus temperature AND pressure Vincent Main CFD Forum 5 July 28, 2008 07:28
variable versus time Cesare CFX 1 September 27, 2004 12:00


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