|
[Sponsors] |
February 23, 2015, 04:58 |
topoSetDict. rotate box
|
#1 |
Senior Member
Join Date: Jan 2015
Posts: 150
Rep Power: 11 |
Is there a way to rotate box defined in the topoSetDict ?
I want to define a set of faces with a boxside not parallel to any of x, y, z axis |
|
February 23, 2015, 05:07 |
|
#2 |
Senior Member
|
Hi,
Yes, there is, it is called rotatedBoxToCell, here's an example Code:
{ name c0; type cellSet; action new; source rotatedBoxToCell; sourceInfo { origin (-0.0312 -0.0202 -1); i (0.009238795325112868 -0.003826834323650898 0); j (0.022961005941905387 0.0554327719506772 0); k (0 0 2); } } |
|
February 23, 2015, 07:03 |
|
#3 |
Senior Member
Join Date: Jan 2015
Posts: 150
Rep Power: 11 |
Can you explain the meaning of each parameter ?
Because all I want is to specify the center point, the length, axis of rotation and the angle of rotation. But I don't understand how using the rotatedBoxToCell specify the rotated box in this way... |
|
February 23, 2015, 07:12 |
|
#4 | |
Senior Member
|
Hi,
if you go to $FOAM_SRC/meshTools/sets/cellSources/rotatedBoxToCell and open rotatedBoxToCell.C file, you will see these lines: Code:
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_; Quote:
|
||
March 6, 2015, 16:22 |
|
#5 |
Senior Member
Join Date: Jan 2015
Posts: 150
Rep Power: 11 |
I've tried to use the rotatedBoxToCell with defining the origin and i,j,k components, but I've got strange results... topoSet says that "0 cells are selected"... I've attached the Image with my geometry and original point (shown as green) and i,j,k points.
The coordinates of origin point were used "as is". i,j,k components were defined with subtraction of components. For example for j component j=(j_x - origin_x; j_y - origin_y; j_z - origin_z). Mathematically it is OK, because according to the source code of the rotatedBoxToCell there values of components will be added with the values of the origin point (addition of vectors). But why topoSet gives me "0 cells are selected"... ? Maybe someone had this problem before ?... |
|
March 6, 2015, 16:48 |
|
#6 | |
Senior Member
Derek Mitchell
Join Date: Mar 2014
Location: UK, Reading
Posts: 172
Rep Power: 13 |
Quote:
__________________
A CHEERING BAND OF FRIENDLY ELVES CARRY THE CONQUERING ADVENTURER OFF INTO THE SUNSET |
||
March 7, 2015, 03:03 |
|
#7 |
Senior Member
|
Hi,
@Svensen, if you provide more details (real values of i, j, k and location of (0, 0, 0) point on the picture) the answer could be more precise. Usually topoSet selects 0 cells if volume of box is negative (or maybe you just miss the scale of the mesh?). |
|
March 7, 2015, 04:18 |
|
#8 |
Senior Member
Join Date: Jan 2015
Posts: 150
Rep Power: 11 |
I've already founded the solution for this problem: I redefined the vectors to form right-hand system of vectors.
|
|
March 13, 2015, 15:38 |
|
#9 | |
Senior Member
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 21 |
Quote:
Cheers, Alex
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in! |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
The sampled data is not restricted to the defined zone in topoSetDict | jiaodanuma | OpenFOAM Post-Processing | 1 | August 14, 2018 07:25 |
Initial values and boundary condition for LES simulation of a box | SaddamH | OpenFOAM Running, Solving & CFD | 1 | July 31, 2018 02:21 |
I get different results when I scale the 'falling box' tutorial | Hossein1 | FLUENT | 7 | August 19, 2017 02:52 |
[DesignModeler] simply model, empty box | conquer | ANSYS Meshing & Geometry | 0 | March 28, 2014 18:26 |
Immersol Simulation of a Heated Box | Dong | Phoenics | 0 | March 2, 2006 21:20 |