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

[snappyHexMesh] rotate searchableBox

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 3 Post By KKV_88

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 17, 2017, 10:15
Question rotate searchableBox
  #1
Member
 
Fridrik Magnusson
Join Date: Aug 2017
Location: Denmark
Posts: 34
Rep Power: 9
Fridrik is on a distinguished road
Hallo Everyone

Im trying to rotate a searchableBox 60 deg (pi/3) with the following command:

Code:
refinementBox4
  {
    type searchableBox;  
    min (0.355 0.190 -0.01);
    max (0.485 0.250 0.12);
    transform
            {
                coordinateSystem
                {
                    type    cartesian;
                    origin  (0 0 0); 
                    coordinateRotation
                    {
                      type    localAxesRotation;
                      e3      (60 0 0);
                    }
                }
            }
  }
but it is not rotating at all, can anybody give me a hint of what im doing wrong ?
Fridrik is offline   Reply With Quote

Old   August 12, 2018, 08:41
Default
  #2
New Member
 
KAWA
Join Date: Mar 2018
Posts: 4
Rep Power: 8
KMM080 is on a distinguished road
Quote:
Originally Posted by Fridrik View Post
Hallo Everyone

Im trying to rotate a searchableBox 60 deg (pi/3) with the following command:

Code:
refinementBox4
  {
    type searchableBox;  
    min (0.355 0.190 -0.01);
    max (0.485 0.250 0.12);
    transform
            {
                coordinateSystem
                {
                    type    cartesian;
                    origin  (0 0 0); 
                    coordinateRotation
                    {
                      type    localAxesRotation;
                      e3      (60 0 0);
                    }
                }
            }
  }
but it is not rotating at all, can anybody give me a hint of what im doing wrong ?

Hi Fridrik,
Have you solved this problem, I have exactly the same problem?

Regards
KMM080 is offline   Reply With Quote

Old   November 9, 2019, 10:56
Default
  #3
New Member
 
Kristina
Join Date: May 2018
Posts: 4
Rep Power: 8
KKV_88 is on a distinguished road
Quote:
Originally Posted by KMM080 View Post
Hi Fridrik,
Have you solved this problem, I have exactly the same problem?

Regards
I'm posting my solution in the following. Hope it will help someone.

I rotated searchableBox for 45 deg. around y-axes.

Code:
zone1
    {
		name zone1;
        	type searchableRotatedBox;
        	span    (1 1 1); //dimensions of the box
        	origin  (0 0 -0.707); //first corner of the box - origin of local coordinate system

		//definition of the axes of the local coordinate system (cartesian, left-handed coordinate system)
                
		e1      (0.707 0 0.707); //relationship of e1 local axes and global coord.system
                e3      (-0.707 0 0.707); //relationship of e3 local axes and global coord.system
    }
hogsonik, allanZHONG and davcrisp like this.
KKV_88 is offline   Reply With Quote

Old   July 31, 2023, 04:19
Default
  #4
New Member
 
Join Date: Jun 2023
Location: Brest
Posts: 21
Rep Power: 3
CFDUser29 is on a distinguished road
Quote:
Originally Posted by KKV_88 View Post
I'm posting my solution in the following. Hope it will help someone.

I rotated searchableBox for 45 deg. around y-axes.

Code:
zone1
    {
		name zone1;
        	type searchableRotatedBox;
        	span    (1 1 1); //dimensions of the box
        	origin  (0 0 -0.707); //first corner of the box - origin of local coordinate system

		//definition of the axes of the local coordinate system (cartesian, left-handed coordinate system)
                
		e1      (0.707 0 0.707); //relationship of e1 local axes and global coord.system
                e3      (-0.707 0 0.707); //relationship of e3 local axes and global coord.system
    }
Your solution is very interesting, but it seems that with you solution you can't decide where in your domain your box is. If I understood correctly, you set the length of each dimension of the box, then the origin for the rotation and the two vectors for the rotation.

Suppose my box is located with : min(x1, y1, z1), max(x2, y2, z2), and that the origin for the rotation is outside my box. How do I do that?

If you have a solution, I would be glad because I could not find anything relevant but your post.
CFDUser29 is offline   Reply With Quote

Old   July 31, 2023, 06:42
Default
  #5
Senior Member
 
M
Join Date: Dec 2017
Posts: 703
Rep Power: 13
AtoHM is on a distinguished road
Cool - I was not aware this is possible.


However - I would not approach this on the snappy-Level, but build this kind of geometry in a CAD tool where I can convince myself visually that it comes out right, export that to stl and use it as a refinement region.
AtoHM is offline   Reply With Quote

Old   August 1, 2023, 05:19
Default
  #6
New Member
 
Join Date: Jun 2023
Location: Brest
Posts: 21
Rep Power: 3
CFDUser29 is on a distinguished road
I guess this is the simplest way and a no-echec solution, but that can take a lot of time if there is 3 internal refined meshes to rotate for 12 different angles. Good solution though. Thanks
CFDUser29 is offline   Reply With Quote

Reply

Tags
rotating, searchablebox, shm


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
[Gmsh] Rotate and duplicate mesh! tareqkh OpenFOAM Meshing & Mesh Conversion 1 December 23, 2019 14:01
Rotate frame reference in transient simulation wjy-c CFX 4 September 4, 2013 22:20
How to rotate a pointScalarField? carowjp OpenFOAM Programming & Development 5 January 27, 2013 20:49
surfaceTransformPoints -rotate ynos OpenFOAM Post-Processing 1 July 11, 2012 16:35
[GAMBIT] Rotate and revolute possible ? Ijaz ANSYS Meshing & Geometry 19 January 27, 2012 00:36


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