topoSetDict. rotate box
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 |
Hi,
Yes, there is, it is called rotatedBoxToCell, here's an example Code:
{ |
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... |
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); Quote:
|
1 Attachment(s)
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 ?... |
Quote:
|
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?). |
I've already founded the solution for this problem: I redefined the vectors to form right-hand system of vectors.
|
Quote:
Cheers, Alex |
All times are GMT -4. The time now is 19:04. |