CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > SU2

Rotating frame does not rotate about the center of rotation

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 10, 2020, 04:33
Default Rotating frame does not rotate about the center of rotation
  #1
New Member
 
Jose Daniel
Join Date: Jun 2020
Posts: 11
Rep Power: 2
jdp810 is on a distinguished road
Hello,

I am trying to create a flow field around a sphere where there is incoming air and the reference frame where the sphere sits is rotating.

I have set the following lines in the config file:
Code:
% ----------------------- DYNAMIC MESH DEFINITION -----------------------------%
%
% Type of dynamic mesh (NONE, RIGID_MOTION, ROTATING_FRAME,
%                       STEADY_TRANSLATION,
%                       ELASTICITY, GUST)
GRID_MOVEMENT= ROTATING_FRAME
%
% Motion mach number (non-dimensional). Used for initializing a viscous flow
% with the Reynolds number and for computing force coeffs. with dynamic meshes.
%MACH_MOTION= 0.2
%
% Coordinates of the motion origin
MOTION_ORIGIN= 0.0 0.0 0.0
%
% Angular velocity vector (rad/s) about the motion origin
ROTATION_RATE = 0.0 0.0 0.01745
%
where the (x,y,z) = (0,0,0) is the center of the sphere. However, after the code finishes running, I post processed the flow field to see if the rotation was introduced successfully. For that, I got the velocity field in paraview by dividing Momentum/Density, then subtracting the set x velocity to the x component of the velocity in the flow field and creating a new vector with this new x velocity anc the original y and z velocity. The attached image is the vector field top view of this magnitude.

As you can see, the rotation center is not at (x,y,z) = (0,0,0) as I wanted but at the left boundary. Also, it seems that the flow is doing strange things at the right boundary. How can I place the rotating centre at the (x, y, z) = (0, 0, 0) correctly?

Thank you,
Jose Daniel

PD: I've attached the config file and the mesh in case you want to run the case yourself
Attached Images
File Type: png Capture.PNG (46.3 KB, 15 views)
Attached Files
File Type: zip t_rotsphere.zip (166.5 KB, 6 views)
jdp810 is offline   Reply With Quote

Old   June 11, 2020, 04:32
Default
  #2
Member
 
Akshay Koodly
Join Date: Aug 2017
Location: The Netherlands
Posts: 36
Rep Power: 5
akoodlyr is on a distinguished road
Hello,


You can set grid velocity as one of the output quantities by adding something like this in your config file
VOLUME_OUTPUT= (COORDINATES, PRIMITIVE, GRID_VELOCITY)


When I run the test case, the grid velocities appear to be correct though. I have attached an image here.
Attached Images
File Type: jpg grid_vel.jpg (54.0 KB, 13 views)
akoodlyr is offline   Reply With Quote

Old   June 11, 2020, 06:13
Default
  #3
New Member
 
Jose Daniel
Join Date: Jun 2020
Posts: 11
Rep Power: 2
jdp810 is on a distinguished road
Thank you Akshay for the quick reply. I checked it and the grid is moving correctly as you said.

However, the flow is not following the path it is supposed to. It is supposed to turn in the y direction and, after it passes x = 0, it should decrease its velocity and turn in the other direction. What you can see is that the velocity does not do that... Any idea why?
jdp810 is offline   Reply With Quote

Old   June 11, 2020, 09:40
Default
  #4
pcg
Senior Member
 
Pedro Gomes
Join Date: Dec 2017
Posts: 221
Rep Power: 5
pcg is on a distinguished road
What are you trying to simulate exactly? A rotating sphere and the flow comes left to right?
If that is what you want you should specify a moving wall (there are examples in the TestCases folder), with what you have at the moment the inlets are also "spinning around".
pcg is offline   Reply With Quote

Old   June 11, 2020, 10:05
Default
  #5
Member
 
Akshay Koodly
Join Date: Aug 2017
Location: The Netherlands
Posts: 36
Rep Power: 5
akoodlyr is on a distinguished road
It could be because of the mesh. I tried it with a first order scheme gives a solution (looks like a flow around a cylinder). MUSCL schemes don't converge to any solution. Can you refine the mesh somewhat and try again?



I am not quite sure what you are trying to simulate here. With this current set-up, your entire domain including the sphere is in rotating reference frame. Is this what you want to do or did you want only the sphere to be rotating?
Attached Images
File Type: jpg momentum_stramlines.jpg (174.4 KB, 7 views)
akoodlyr is offline   Reply With Quote

Old   June 11, 2020, 11:03
Default
  #6
New Member
 
Jose Daniel
Join Date: Jun 2020
Posts: 11
Rep Power: 2
jdp810 is on a distinguished road
Yes, it is what I want to do. I'm trying to simulate the instant when an aircraft is yawing, but I want the steady state flow field, not the transient effect, that is why I am simulating the flow field from the rotational frame point of view with a uniform incoming flow. I am using the sphere just to simplify everything.

I run the case without the MUSCL scheme and it does converge. However, if you subtract the incoming velocity in x to see the rotational speed of the flow, you keep seeing that the center of rotation is not at the origin. I also simulated it with a lower speed (M=0.036 to get a velocity of around 12m/s) and I keep getting the same center of rotation of the first picture, which is wrong...

Last edited by jdp810; June 12, 2020 at 04:08.
jdp810 is offline   Reply With Quote

Old   June 16, 2020, 03:45
Default
  #7
New Member
 
Jose Daniel
Join Date: Jun 2020
Posts: 11
Rep Power: 2
jdp810 is on a distinguished road
Do you have any idea why the flow is rotating about the incorrect center of rotation even though the grid is correctly rotating?
jdp810 is offline   Reply With Quote

Old   June 16, 2020, 09:21
Default
  #8
Member
 
Akshay Koodly
Join Date: Aug 2017
Location: The Netherlands
Posts: 36
Rep Power: 5
akoodlyr is on a distinguished road
I am not sure if your problem set up is correct. If you want to simulate a simplified situation similar to aircraft yawing, either set the sphere as moving wall with the required rotational velocity or use the rotating reference frame like you have and set the sphere as moving wall with the opposite rotation. This way the incoming flow is in a rotating reference frame and the sphere is "stationary" in that reference of frame.

At the moment, your entire domain - the inlet, outlet, walls and the sphere are all rotating at the same speed. This is pretty much like not having any rotation at all.
akoodlyr is offline   Reply With Quote

Old   June 16, 2020, 09:32
Default
  #9
New Member
 
Jose Daniel
Join Date: Jun 2020
Posts: 11
Rep Power: 2
jdp810 is on a distinguished road
The moving wall boundary condition in the sphere does not work because the idea is to apply this rotation to an aircraft, where the moving wall does not make any sense.

What I am looking here with this rotation are the inertial forces that appear. That is why the whole grid with the boundary conditions have to rotate. Imagine a coordinated turn situation. How would you simulate that?
jdp810 is offline   Reply With Quote

Old   June 22, 2020, 10:23
Default
  #10
New Member
 
Jose Daniel
Join Date: Jun 2020
Posts: 11
Rep Power: 2
jdp810 is on a distinguished road
I looked at an option to introduce body forces in a direction. Is there anything similar for rotational body forces? That would be something similar to the problem I am looking for.
jdp810 is offline   Reply With Quote

Old   July 22, 2020, 08:10
Default
  #11
New Member
 
Jose Daniel
Join Date: Jun 2020
Posts: 11
Rep Power: 2
jdp810 is on a distinguished road
Having a sphere rotating wasn't probably the best idea to simulate an inertial reference frame. I placed a cube instead and I am getting the same results.

The grid velocity is behaving as expected but the flow is not doing what I would expect it to do, which is to rotate about the center of rotation (the arrows of the velr_y.jpg file show the vector of the velocity once I subtracted 12.2507 from the x velocity).

If any of you could have a look at this, I would appreciate it a lot. I have uploaded the mesh and settings file with the new geometry.

Thanks
Attached Images
File Type: jpg velr_y.jpg (109.4 KB, 6 views)
File Type: jpg vel_grid.jpg (153.5 KB, 4 views)
Attached Files
File Type: zip rotcube.zip (189.8 KB, 1 views)
File Type: txt solver_settings.txt (7.6 KB, 4 views)
jdp810 is offline   Reply With Quote

Old   July 22, 2020, 14:21
Default
  #12
pcg
Senior Member
 
Pedro Gomes
Join Date: Dec 2017
Posts: 221
Rep Power: 5
pcg is on a distinguished road
I think you need a translating+rotating reference frame to do what you want (I've done something similar in the past using CCM+ but for incompressible flow).
Or at least the farfield conditions would need to be specified in an absolute frame (not rotating).
I don't think SU2 can do either of those things, at the moment but... we can do multizone simulations, maybe you can have an outer non rotating zone where you specify the farfiled, and an inner rotating zone.
Have a look at TestCases/sliding_interface/rotating_cylinders/, the idea is similar but that case is unsteady and the rotating part actually moves.
I don't know if the sliding interface is compatible with different reference frames... so test it well (e.g. a completely empty inner region should not disturb the flow).
pcg is offline   Reply With Quote

Old   July 24, 2020, 09:48
Default
  #13
New Member
 
Jose Daniel
Join Date: Jun 2020
Posts: 11
Rep Power: 2
jdp810 is on a distinguished road
Hi Pedro, thanks for the reply, I also tried the translating+rotating reference frame, but it has a similar effect. The idea was to translate the rotating centre that seemed to be somewhere else but the centre of rotation, but I couldn't make it to work.

You talked about specifying the farfield conditions in another frame. Is it possible to do that in SU2? Because maybe by rotating the farfield and the volume in different frames but at the same rate would have the effect I want.

I don't think doing an unsteady simulation for a coordinated turn is a good idea, specially for the case I am working on (it is very low speed, I am using the compressible solver just because the incompressible solver does not have the rotating capability).

I am not sure, but I feel that the ROTATING_FRAME is correctly moving the frame but the movement of the frame is not being correctly interpreted by the solver. I dug in past versions and I found that there was a case using the rotating frame, but it is not available in v7.0, do you know what happened with that case?

Thanks

Btw, Alfonso says hi
jdp810 is offline   Reply With Quote

Old   July 25, 2020, 06:20
Default
  #14
pcg
Senior Member
 
Pedro Gomes
Join Date: Dec 2017
Posts: 221
Rep Power: 5
pcg is on a distinguished road
I've been looking at the implementation, SU2 solves everything in the ALE formulation, meaning the equations are solved in rotating frame and the velocities are absolute, i.e. in the inertial frame.
So far as I can tell the far field velocities are correctly imposed (in the inertial frame) which is what you want for your problem, and the grid velocities are computed correctly.

I do not have a good feel for what the solution should look like, or how it should be validated. I thought of looking at the lift for a rotating cylinder, but this would not be the same as rotating just the surface. So yeah in summary I cannot help.
pcg is offline   Reply With Quote

Old   July 27, 2020, 09:06
Default
  #15
New Member
 
Jose Daniel
Join Date: Jun 2020
Posts: 11
Rep Power: 2
jdp810 is on a distinguished road
Well, thanks for your time anyway Pedro. I am going to summarise the problem here in case anyone else wants to take a look at this:



The idea is to do a coordinated turn of an aircraft, but, since I can't upload the entire mesh, I have prepared a minimal working example ("working" ). The problem setting is a steady flow, with the object AND farfield conditions rotating at the same rate around the object. I am doing this with a rotating frame movement.

My intention is to see how the inertial forces affect the fluid and in consequence, the lift, drag and moments. The flow I am simulating is at a Reynolds number of 3e6, a Mach number of 0.036 and at SL conditions, which results in a velocity of around 12.3m/s, but it could be at any velocity. In this example, I am placing the centre of rotation (CoR) at (x, y, z) = (100, 100, 0)m to show that the CoR is correctly placed, but in the actual aircraft, it would be at its own CoR. However, as shown in the picture, even though the grid velocity works as intended, the effect on the flow seems to not be there. The grid velocity looks okay, as it is getting to a maximum velocity of 74m/s (omega=0.1745rad/s and maximum distance from the CoR of 424m). Despite having a maximum grid velocity of 74m/s, the maximum value of the flow velocity is around 13m/s, being almost all of it in the x direction.

If anyone knows why the flow is mostly unaffected, please, let me know.

Thanks!

Edit: I included the image "desired_outcome.PNG", where I added both the velocity of the flow field and the grid velocity, resulting in the expected flow and streamlines (I did it with a rotation velocity of 0.01745 rad/s in order to see something useful). This is not the flow field I get from the solver, but the postprocess summation of the two vectors.
Attached Images
File Type: jpg grid_vel_and_flow_vel.jpg (33.4 KB, 4 views)
File Type: png desired_outcome.PNG (35.2 KB, 3 views)
Attached Files
File Type: zip t_rotcube.zip (192.9 KB, 1 views)

Last edited by jdp810; July 27, 2020 at 09:50. Reason: Extend information
jdp810 is offline   Reply With Quote

Old   July 27, 2020, 10:55
Default
  #16
pcg
Senior Member
 
Pedro Gomes
Join Date: Dec 2017
Posts: 221
Rep Power: 5
pcg is on a distinguished road
Have a look at the equations:
https://openfoamwiki.net/index.php/S...RF_development

The source term does not depend on the linear grid velocities, only on the rotation rate and on the velocities in inertial frame.
pcg is offline   Reply With Quote

Old   July 28, 2020, 02:26
Default
  #17
New Member
 
Jose Daniel
Join Date: Jun 2020
Posts: 11
Rep Power: 2
jdp810 is on a distinguished road
No, that's right, it doesn't depend on the linear velocities, but the velocities that I would expect to see are either ui or ur in that link (third equation line). Whether it is one or another, the velocity SU2 is giving as the output, the term with the rotation times the distance will become a velocity that is seen in the flow field. It won't be completely seen because there are other factors in the equations, but with an omega that big, I expect to see something like the image I uploaded in the edited message.
jdp810 is offline   Reply With Quote

Reply

Tags
frame, rotating, rotation, su2

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
UDF for defining a body force in Singel ROtating Reference Frame teymourj Fluent UDF and Scheme Programming 9 August 18, 2016 15:33
3D design optimization in a rotating frame? ITA91 SU2 Shape Design 2 May 20, 2015 10:01
how to treat the rotating zone in multiple reference frame (MRF) Jiuan FLUENT 4 May 24, 2010 21:58
Multiphase in rotating reference frame M_W FLUENT 0 March 18, 2009 10:24
Rotating Reference frame Ketan FLUENT 0 May 25, 2007 11:58


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