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

Moving meshes/Rotating Domains

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By singer1812

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 28, 2011, 11:42
Default Moving meshes/Rotating Domains
  #1
New Member
 
James
Join Date: Jul 2010
Posts: 25
Rep Power: 15
bramdiff is on a distinguished road
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 sub-domain?

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
bramdiff is offline   Reply With Quote

Old   March 1, 2011, 14:15
Default
  #2
New Member
 
James
Join Date: Jul 2010
Posts: 25
Rep Power: 15
bramdiff is on a distinguished road
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 = xNew-x
xNew = ((x-x0)*cos(FlapAngle)-(y-y0)*sin(FlapAngle))+x0
y0 = 0 [m]
yDisp = yNew-y
yNew = ((x-x0)*sin(FlapAngle)+(y-y0)*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
bramdiff is offline   Reply With Quote

Old   March 1, 2011, 16:56
Default
  #3
Senior Member
 
Edmund Singer P.E.
Join Date: Aug 2010
Location: Minneapolis, MN
Posts: 511
Rep Power: 20
singer1812 is on a distinguished road
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 = ((x-X0)-Total Mesh Displacement X)*cos(alpha)+((y-Y0)-Total Mesh Displacement Y)*sin(alpha)+X0
New Y = -((x-X0)-Total Mesh Displacement X)*sin(alpha)+((y-Y0)-Total Mesh Displacement Y)*cos(alpha)+Y0
Z0 = 0[mm]
New Z = ((z-Z0)-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
singer1812 is offline   Reply With Quote

Old   March 2, 2011, 03:09
Default
  #4
New Member
 
James
Join Date: Jul 2010
Posts: 25
Rep Power: 15
bramdiff is on a distinguished road
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...

http://www.cfd-online.com/Forums/cfx...e-v12-0-a.html

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
bramdiff is offline   Reply With Quote

Old   March 9, 2011, 05:56
Default
  #5
New Member
 
James
Join Date: Jul 2010
Posts: 25
Rep Power: 15
bramdiff is on a distinguished road
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
bramdiff is offline   Reply With Quote

Old   March 9, 2011, 09:23
Default
  #6
Senior Member
 
Edmund Singer P.E.
Join Date: Aug 2010
Location: Minneapolis, MN
Posts: 511
Rep Power: 20
singer1812 is on a distinguished road
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 = ((x-X0)-Total Mesh Displacement X)*cos(alpha1)+((y-Y0)-Total Mesh Displacement Y)*sin(alpha1)+X0
New Y = -((x-X0)-Total Mesh Displacement X)*sin(alpha1)+((y-Y0)-Total Mesh Displacement Y)*cos(alpha1)+Y0
Z0 = 0[mm]
New Z = ((z-Z0)-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 = (((x-X1)-Total Mesh Displacement X)*cos(alpha2)+((y-Y1)-Total Mesh Displacement Y)*sin(alpha2)+X1)+New X
New Y1 = (-((x-X1)-Total Mesh Displacement X)*sin(alpha2)+((y-Y1)-Total Mesh Displacement Y)*cos(alpha)+Y1)+New Y
Z1 = ZZ[mm]
New Z1 = (((z-Z1)-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.
LXH029803 likes this.
singer1812 is offline   Reply With Quote

Old   March 9, 2011, 10:12
Default
  #7
New Member
 
James
Join Date: Jul 2010
Posts: 25
Rep Power: 15
bramdiff is on a distinguished road
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=(x-Total Mesh Displacement X)*cos(NearAngle)+(y-Total Mesh Displacement Y)*sin(NearAngle)+((x-x0)-Total Mesh Displacement X)*cos(FlapAngle)+((y-y0)-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
bramdiff is offline   Reply With Quote

Old   March 9, 2011, 10:17
Default
  #8
Senior Member
 
Edmund Singer P.E.
Join Date: Aug 2010
Location: Minneapolis, MN
Posts: 511
Rep Power: 20
singer1812 is on a distinguished road
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.
singer1812 is offline   Reply With Quote

Old   July 8, 2011, 04:46
Default
  #9
New Member
 
James
Join Date: Jul 2010
Posts: 25
Rep Power: 15
bramdiff is on a distinguished road
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
bramdiff is offline   Reply With Quote

Old   July 8, 2011, 15:44
Default
  #10
New Member
 
Stefan
Join Date: May 2011
Posts: 5
Rep Power: 14
Logan86 is on a distinguished road
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:
Attached Images
File Type: jpg deform.jpg (63.2 KB, 294 views)
File Type: jpg err-int.jpg (49.7 KB, 243 views)
File Type: jpg exp.jpg (46.1 KB, 238 views)
File Type: jpg setup.jpg (61.4 KB, 257 views)
Logan86 is offline   Reply With Quote

Old   July 11, 2011, 05:47
Default
  #11
New Member
 
James
Join Date: Jul 2010
Posts: 25
Rep Power: 15
bramdiff is on a distinguished road
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 = ((x-X0)-Total Mesh Displacement X)*cos(alpha)+((y-Y0)-Total Mesh Displacement Y)*sin(alpha)+X0
New Y = -((x-X0)-Total Mesh Displacement X)*sin(alpha)+((y-Y0)-Total Mesh Displacement Y)*cos(alpha)+Y0
Z0 = 0[mm]
New Z = ((z-Z0)-Total Mesh Displacement Z) + Z0

x0 y0 z0 is the center of your subdomain.

Hope this helps

James
bramdiff is offline   Reply With Quote

Old   July 11, 2011, 09:36
Default
  #12
New Member
 
Stefan
Join Date: May 2011
Posts: 5
Rep Power: 14
Logan86 is on a distinguished road
Thank you!!
Now it works, perfect!
Logan86 is offline   Reply With Quote

Old   July 13, 2011, 13:09
Default
  #13
Member
 
anonymous
Join Date: Jun 2011
Posts: 58
Rep Power: 14
Doginal is on a distinguished road
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 Z-plane. Isn't the Total Mesh Deformation Z = 0 leading to Z New = z

Last edited by Doginal; July 15, 2011 at 13:55.
Doginal is offline   Reply With Quote

Reply


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
HELP - Moving car simulation in fluent Brad Wells FLUENT 7 January 4, 2018 19:55
[snappyHexMesh] jagged, ragged edges... ziemowitzima OpenFOAM Meshing & Mesh Conversion 138 July 23, 2012 23:41
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


All times are GMT -4. The time now is 12:31.