
[Sponsors] 
February 28, 2011, 12:42 
Moving meshes/Rotating Domains

#1 
New Member
James
Join Date: Jul 2010
Posts: 25
Rep Power: 8 
Dear All,
I am writing as I am having trouble with rotating objects in CFX. In the attached image, case 1 refers to what I am trying to model. This is a flap rotating about its centroid, at a fixed user specified angular velocity, as well as also rotating about the global Z axis, at another user specified angular velocity. If I understand correctly I am unable to use the rotating domain option twice, as the region around the flap is rotating about an axis that is moving, so I have started to try and learn moving mesh. I set up a simpler model case 2, to try and get moving mesh to work. Using two domains and cylindrical components to specify mesh displacement the model ran fine. However this was still displacement relative to a fixed rotational axis. So what I have been trying to do (and here is where the errors start flying in) is specify the same mesh rotation using Cartesian components, so it can all be relative to the global coordinate system. Would anyone be able to help me with the equations for the x,y,z components of displacement, or am I being naive and is it a lot harder than that? I am also unsure as to whether i should (for case 2 in the attached image) have two domains with an interface like a normal rotating domain problem, or one domain with a subdomain? The error message is that negative elements are being created, so I’m guessing my expressions aren’t correct and that the mesh is deforming, as mentioned when I ran it with cylindrical components the mesh rotated fine. Any ideas/ help is greatly appreciated, and if you need more information about the problem just let me know! Thanks, James MovingMesh.jpg 

March 1, 2011, 15:15 

#2 
New Member
James
Join Date: Jul 2010
Posts: 25
Rep Power: 8 
Hi all,
as an update to my original questions... these are the expressions I am using for my mesh rotation. In a transient run, it will solve for a few iterations, but the rotating mesh gets smaller each time, until an error occurs. EXPRESSIONS: FlapAngVel = 1 [rad s^1] FlapAngle = FlapAngVel*t x0 = 0.15 [m] xDisp = xNewx xNew = ((xx0)*cos(FlapAngle)(yy0)*sin(FlapAngle))+x0 y0 = 0 [m] yDisp = yNewy yNew = ((xx0)*sin(FlapAngle)+(yy0)*cos(FlapAngle))+y0 xDisp and yDisp are the expressions I enter in the mesh movement panel (specified displacement)... and the z component is set to zero. At the moment I have used two domains, and tomorrow will try using a subdomain but am still unsure about which way is better to go. If anyone has any advice/ideas on how to get rid of the errors that would be great! Thanks, James 

March 1, 2011, 17:56 

#3 
Senior Member
Edmund Singer P.E.
Join Date: Aug 2010
Location: Minneapolis, MN
Posts: 512
Rep Power: 12 
Dont have time to totally look through your ccl but I have done the same thing but used Specified location instead:
Expressions: Y0 = 0 [mm] X0 = 0 [mm] New X = ((xX0)Total Mesh Displacement X)*cos(alpha)+((yY0)Total Mesh Displacement Y)*sin(alpha)+X0 New Y = ((xX0)Total Mesh Displacement X)*sin(alpha)+((yY0)Total Mesh Displacement Y)*cos(alpha)+Y0 Z0 = 0[mm] New Z = ((zZ0)Total Mesh Displacement Z) + Z0 X0,Y0,Z0 is location of rotation center. The above expression can rotate around x and y and hold z. In domain for the wall motion: BOUNDARY: Wall Boundary Type = WALL Location = Fin Bottom BOUNDARY CONDITIONS: HEAT TRANSFER: Option = Adiabatic END MESH MOTION: Location X Component = New X Location Y Component = New Y Location Z Component = New Z Option = Specified Location END WALL INFLUENCE ON FLOW: Option = No Slip END END END 

March 2, 2011, 04:09 

#4 
New Member
James
Join Date: Jul 2010
Posts: 25
Rep Power: 8 
Hi Thanks for your reply.
I have tried using your expressions for the specified location, but am having trouble using the variable Total Mesh Displacement. I am using v12.0 so am guessing I am in the same boat as these guys... Total Mesh Displacement X not available in v12.0?? Do you (or anyone else dfor that matter) know of a way of getting around this? Thanks very much your help is greatly appreciated!! James 

March 9, 2011, 06:56 

#5 
New Member
James
Join Date: Jul 2010
Posts: 25
Rep Power: 8 
Hi singer1812
I spoke to Ansys and 'total mesh displacement' isnt available as a variable in v12.0 I have since upgraded to v12.1 and the above expressions worked many thanks!! new problem now though... the above expressions work for rotation about the fixed point (x0,y0,z0), and if i take out x0 y0 etc i can rotate it about the global axis, I have tried combining these two expressions so that the rotation is about both axis' (case 1 in the diagram in my initial post), but havent got this working yet. Do you (or anyone else) have any suggestions on how to get this working? Im still unsure as to whether I should use a seperate domain for the inner rotation, or create a subdomain, I have tried both, but i think because of my expressions neither are working. Thanks for your help so far! James 

March 9, 2011, 10:23 

#6 
Senior Member
Edmund Singer P.E.
Join Date: Aug 2010
Location: Minneapolis, MN
Posts: 512
Rep Power: 12 
That is pretty complicated motion and I havent dealt with something like that before.
How did you combine the 2 motions? I might try something like the following but have no idea if it would work or not: Define the 2 regions as subdomains. Motion of the outside subdomain is as follows (assuming that is rotating around global center): Y0 = 0 [mm] X0 = 0 [mm] New X = ((xX0)Total Mesh Displacement X)*cos(alpha1)+((yY0)Total Mesh Displacement Y)*sin(alpha1)+X0 New Y = ((xX0)Total Mesh Displacement X)*sin(alpha1)+((yY0)Total Mesh Displacement Y)*cos(alpha1)+Y0 Z0 = 0[mm] New Z = ((zZ0)Total Mesh Displacement Z) + Z0 Motion of the embedded domain (rotating around its center XX,YY,ZZ which is rotating around global): Y1 = YY [mm] X1 = XX [mm] New X1 = (((xX1)Total Mesh Displacement X)*cos(alpha2)+((yY1)Total Mesh Displacement Y)*sin(alpha2)+X1)+New X New Y1 = (((xX1)Total Mesh Displacement X)*sin(alpha2)+((yY1)Total Mesh Displacement Y)*cos(alpha)+Y1)+New Y Z1 = ZZ[mm] New Z1 = (((zZ1)Total Mesh Displacement Z) + Z1)+New Z You might have to form X1,Y1,Z1 in terms of New X, New Y, New Z, or play with using Specified Displacements and get the vector right. This should be doable, you just have to transform the mesh motion for the inner subdomain and have it include the exterior rotation. More math than I am wanting to do right now. 

March 9, 2011, 11:12 

#7 
New Member
James
Join Date: Jul 2010
Posts: 25
Rep Power: 8 
Hi
For the outer rotation I tried using transient rotor stator, and had the inner rotation controlled by mesh motion. so for the newX newY etc I tried just adding the two components together; NewX=(xTotal Mesh Displacement X)*cos(NearAngle)+(yTotal Mesh Displacement Y)*sin(NearAngle)+((xx0)Total Mesh Displacement X)*cos(FlapAngle)+((yy0)Total Mesh Displacement Y)*sin(FlapAngle)+x0 I used similar expressions for newy and newz. if i understand correctly by using a subdomain the mesh will automatically rotate about the global axis, hence the equations that you suggest just rotate the flap about the local axis? I will try your expressions a quick question about XX,YY,ZZ; these wont be fixed points will they I have been setting them as functions of time as the centre of the flap subdomain is moving, these are the expressions ive used for them; ArmRad=0.15[m] x0=ArmRad*cos(NearAngle) y0=ArmRad*sin(NearAngle) Many thanks for your help!! James 

March 9, 2011, 11:17 

#8 
Senior Member
Edmund Singer P.E.
Join Date: Aug 2010
Location: Minneapolis, MN
Posts: 512
Rep Power: 12 
You need to rotate the 2 subdomains separately. By using subdomains, you can control exactly which nodes you want to relocate. The outer subdomain moves with rotation only.
The inner subdomain relocates the nodes via rotation about the global with an additional rotation about the subdomain center. The latter part is what you need to come up with. 

July 8, 2011, 04:46 

#9 
New Member
James
Join Date: Jul 2010
Posts: 25
Rep Power: 8 
Hi
Just for completeness, I have now managed to set up the double rotation, so thought i would post a couple of comments so it might be of any help to anyone else. The problem I was having was appling the correct settings for a subdomain, heres what I have now... Firstly there are 3 regions, Outer1, inner1 and inner2. With this I create two domains, the stationary one which is just outer1, and a rotating one which is inner1 and inner2. Like a standard rotating domain I apply transient rotor stator settings, but also select regions of motion specificied for mesh motion. this gives me both Inner1 and Inner2 rotating at a user defined angular velocity. Next is then to make a subdomain, which uses inner2 geometry, and I used edmunds equations above to specify the location of the nodes in Inner2. The mistake I was making was that I was then selecting the boundary inside my subdomain, and applying the equations twice this is not necessary I now have unspecified mesh motion selected for boundaries inside the sub domain. This will then rotate the subdomain about the points x0,y0,z0, at a user defined speed. Also i had two transient rotor stator interfaces, one between Outer1 and Inner1, and the other between Inner1 and Inner2 Thats it it was actually simpler than I thought it would be to couple both motions together, as the values for the centre (x0,y0,z0) dont need to be changed. Thanks Edmund (and Ansys) for all your help!! Any questions just ask, I will try and post a video of the motion to explain it when i get a chance. James 

July 8, 2011, 15:44 

#10 
New Member
Stefan
Join Date: May 2011
Posts: 5
Rep Power: 7 
Hi
I have made the same setup as you, but it doesn't work. When I run it like you described i get an error and in post there is an extremely deformed inner rotor part. So i set the mesh deformation of the symmetry plane to stationary.... then the calculation runs a while and after some time I get an error, that the Interface between the domain and the subdomain didn't find any control surfaces. I tried Interface type "None" and "Transient Rotor Stator", with pitch change None or Automatic... everytime the same error. Maybe some of you has an ideo what is wrong with my setup!? Here are some screenshots: 

July 11, 2011, 05:47 

#11 
New Member
James
Join Date: Jul 2010
Posts: 25
Rep Power: 8 
Hi,
For the two rotating parts all the mesh motion options want to be set to unspecified apart from the subdomain setting in which you use specified location, and NewX NewY NewZ etc. Check that the interface settings (side 1 and side 2 etc) also have unspecified mesh motion because I think the default setting is conservative interface flux... Also why do you have two sets of expressions (NewX and NewX1)? You dont need mesh motion to rotate the larger cylinder use the simple rotating domain option. You only need mesh motion for rotating the subdomain These expressions from Singer (see above) work perfectly. Expressions: Y0 = 0 [mm] X0 = 0 [mm] New X = ((xX0)Total Mesh Displacement X)*cos(alpha)+((yY0)Total Mesh Displacement Y)*sin(alpha)+X0 New Y = ((xX0)Total Mesh Displacement X)*sin(alpha)+((yY0)Total Mesh Displacement Y)*cos(alpha)+Y0 Z0 = 0[mm] New Z = ((zZ0)Total Mesh Displacement Z) + Z0 x0 y0 z0 is the center of your subdomain. Hope this helps James 

July 11, 2011, 09:36 

#12 
New Member
Stefan
Join Date: May 2011
Posts: 5
Rep Power: 7 
Thank you!!
Now it works, perfect! 

July 13, 2011, 13:09 

#13 
Member
anonymous
Join Date: Jun 2011
Posts: 58
Rep Power: 7 
Hey Everyone
Thank you very much for posting this information. I was looking into trying to do this a while ago but previously the only way I could find to have a rotating domain within another rotating domain was to use fortran and I know nothing about that. I have a couple questions which I hope you may be able to help. My goal is to be able to simulate a plate moving in a specified path across a 2D plane (so it will have 3 equations of motion, Vx(t) Vy(t) Omega(t)) I know the specific path and i wish to measure the forces (x and y) that act on the plate. My biggest issue is trying to determine a way to "move" the plate across the 2D plane. Taking the route that you have shown seems to be promising. My set up would be as follows. Use the same domain style as bradiff has shown in his first post Case 1. One side of the stationary domain would be an inlet with a varying velocity. The rotation of the inner rotating domain would be used to determine the angle of my plate. The rotation of the outer rotating domain would be used move my plate up and down (Vy(t)) The inlet velocity would be used to define my Vx (t). I would also have to include the Vx component of the rotating domain but that is easily done. My big question is do you know if using this method will produce accurate force measurements on the plate. Thank You EDIT: After looking at the equations above, why do you have a Z New Equation. The equation itself seems more complicated than need be (you have +Z0 and Z0 which would cancel out). Then you have z  Total Mesh Deformation Z. Since the mesh is moving in the 2D Zplane. Isn't the Total Mesh Deformation Z = 0 leading to Z New = z Last edited by Doginal; July 15, 2011 at 13:55. 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
jagged, ragged edges...  ziemowitzima  OpenFOAM Native Meshers: snappyHexMesh and Others  138  July 23, 2012 23:41 
HELP  Moving car simulation in fluent  Brad Wells  FLUENT  6  February 27, 2012 03:14 
Multiple Moving Domains FLUENT 12 UDF  aerospain  Fluent UDF and Scheme Programming  3  July 17, 2010 05:58 
Moving mesh in Fluent  fivos  FLUENT  0  April 2, 2010 09:45 
Multiple Solid Domains  Interfaces  Scott  CFX  8  July 31, 2008 15:20 