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

CEL code for simulating the equation of motion of a vibrating rigid body

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 10, 2011, 13:35
Post CEL code for simulating the equation of motion of a vibrating rigid body
  #1
New Member
 
mohamad ali
Join Date: Jul 2010
Posts: 6
Rep Power: 15
mohamadaliv is on a distinguished road
Hello everybody
I need a CEL code to develop the the equation which describing the motion of a vibrating rigid body:

my"+ cy'+ ky = F(t)

with F(t) being the hydrodynamic force acting on the surface of the rigid body, m being the mass, c the damping factor and k the spring stiffness.
Thanks so much...
mohamadaliv is offline   Reply With Quote

Old   September 12, 2011, 03:48
Default
  #2
Senior Member
 
omid
Join Date: Apr 2011
Posts: 105
Rep Power: 14
omidiut is on a distinguished road
Hi
what is your problem that you want to solve? where do you want use this CEL?
omidiut is offline   Reply With Quote

Old   September 12, 2011, 12:25
Default
  #3
Senior Member
 
Join Date: Apr 2009
Posts: 531
Rep Power: 20
stumpy is on a distinguished road
Take a look at the ball valve tutorial in version 12.1. In version 13.0 it was switched to a rigid body instead. Of course you can just use a rigid body instead of CEL too.
stumpy is offline   Reply With Quote

Old   September 12, 2011, 13:18
Default
  #4
New Member
 
mohamad ali
Join Date: Jul 2010
Posts: 6
Rep Power: 15
mohamadaliv is on a distinguished road
Quote:
Originally Posted by omidiut View Post
Hi
what is your problem that you want to solve? where do you want use this CEL?
Hi Omid
Thanks for replying.
There's two coaxial tubes and a fluid flows through the space between them; the inner is fixed and the outer is free to oscillate in transverse direction, I mean y direction in this problem.
At first the outer tube is replaced a little from its initial position and then is left to vibrate in y direction.
I want the outer tube to follow the ODE equation my"+ cy'+ ky = F(t) during its motion.
mohamadaliv is offline   Reply With Quote

Old   September 12, 2011, 13:43
Default
  #5
New Member
 
mohamad ali
Join Date: Jul 2010
Posts: 6
Rep Power: 15
mohamadaliv is on a distinguished road
Quote:
Originally Posted by stumpy View Post
Take a look at the ball valve tutorial in version 12.1. In version 13.0 it was switched to a rigid body instead. Of course you can just use a rigid body instead of CEL too.
Hi stumpy
I've studied it before.
I explained my problem above. I used rigid body and a spring force to simulate the vibrating nature of the outer tube but the questionable part is that in my project I should work with natural frequency not the mass of tube "m" and spring stiffness "k". I tried to determine m and k to have the desired natural frequency but I have several choices and each one will lead to different response.
mohamadaliv is offline   Reply With Quote

Old   September 12, 2011, 14:32
Default
  #6
Senior Member
 
Join Date: Apr 2009
Posts: 531
Rep Power: 20
stumpy is on a distinguished road
Have you considered solving it as a 2-way FSI case (see the oscillating plate tutorial for an example)?
stumpy is offline   Reply With Quote

Old   September 13, 2011, 11:36
Default
  #7
New Member
 
mohamad ali
Join Date: Jul 2010
Posts: 6
Rep Power: 15
mohamadaliv is on a distinguished road
Quote:
Originally Posted by stumpy View Post
Have you considered solving it as a 2-way FSI case (see the oscillating plate tutorial for an example)?
Yes dude, I've read it before.
In my problem the outer tube is a rigid body and wouldn't undergo any deformation during the oscillation; with regarding this fact I think a 2-way FSI solver is not necessary.
mohamadaliv is offline   Reply With Quote

Old   September 13, 2011, 12:55
Default
  #8
Senior Member
 
Join Date: Apr 2009
Posts: 531
Rep Power: 20
stumpy is on a distinguished road
Perhaps I'm missing something here... if the tube moves as a rigid body in the y-direction then I guess you are assuming there are frictionless supports at the two ends of the tube. If you use the rigid body solver, providing the mass of the tube, then it would move at whatever frequency it wants to - is that what you mean by the natural frequency? If your tube has a spring or damper attached then go ahead and include that too. If the frequency you see doesn't match the expected frequency then I would say some assumptions or the setup is wrong.
stumpy is offline   Reply With Quote

Old   September 13, 2011, 15:11
Default
  #9
Member
 
anonymous
Join Date: Jun 2011
Posts: 58
Rep Power: 14
Doginal is on a distinguished road
I'm not really sure of how you plan to actually apply it all but from what i see it looks like you want to use a moving mesh for your boundary at the pipe's wall and your looking for the equations of motions of the mesh at the wall.

The one issue you may have is using a CEL function to define the acceleration of the wall when dealing with the momentum term of the force function. The rest should not be that difficult to derive however I may be wrong with this.

F(t) = my" + cy' + ky

m, c, and k are predefined by you.

Force = force_y()@Pipe
Y Vel = areaAve(Mesh Velocity X)@Pipe *note: this you could use other functions instead of areaAve, they should all yield the same value if the wall moves rigidly

Y Accel = I really dont know how to define this. The issue here is that it is time dependent and i know that is an issue with CEL funtions. I remember a thread a while asking about it so i suggest looking it up to see if it can be done

Y New = (Force - m*Y Accel - c*Y Vel) / k
Y Mesh New = (Y0 - y - Total Mesh Displacement Y) + Y New

You would use a moving mesh with specified mesh location\

Hope this helps

Good luck

DM
Doginal is offline   Reply With Quote

Old   September 20, 2011, 10:44
Default
  #10
New Member
 
mohamad ali
Join Date: Jul 2010
Posts: 6
Rep Power: 15
mohamadaliv is on a distinguished road
Quote:
Originally Posted by Doginal View Post
I'm not really sure of how you plan to actually apply it all but from what i see it looks like you want to use a moving mesh for your boundary at the pipe's wall and your looking for the equations of motions of the mesh at the wall.

The one issue you may have is using a CEL function to define the acceleration of the wall when dealing with the momentum term of the force function. The rest should not be that difficult to derive however I may be wrong with this.

F(t) = my" + cy' + ky

m, c, and k are predefined by you.

Force = force_y()@Pipe
Y Vel = areaAve(Mesh Velocity X)@Pipe *note: this you could use other functions instead of areaAve, they should all yield the same value if the wall moves rigidly

Y Accel = I really dont know how to define this. The issue here is that it is time dependent and i know that is an issue with CEL funtions. I remember a thread a while asking about it so i suggest looking it up to see if it can be done

Y New = (Force - m*Y Accel - c*Y Vel) / k
Y Mesh New = (Y0 - y - Total Mesh Displacement Y) + Y New

You would use a moving mesh with specified mesh location\

Hope this helps

Good luck

DM

Hi Doginal
I tried it but finally I made the simulation with the menu of rigid body.
thank you guies
mohamadaliv is offline   Reply With Quote

Old   October 9, 2011, 02:01
Default
  #11
New Member
 
mohamad ali
Join Date: Jul 2010
Posts: 6
Rep Power: 15
mohamadaliv is on a distinguished road
Quote:
Originally Posted by Doginal View Post

F(t) = my" + cy' + ky

m, c, and k are predefined by you.

Force = force_y()@Pipe
Y Vel = areaAve(Mesh Velocity X)@Pipe *note: this you could use other functions instead of areaAve, they should all yield the same value if the wall moves rigidly

Y Accel = I really dont know how to define this.

DM
Hello again
Doginal, thanks for your previous reply.
As I said before I did the simulation with the menus of CFX, I mean by applying the force directly on the rigid body menu: Rigid Body-Dynamics-External Force Definition-Linear Spring Constant-Y Component.
But now I need to use the corresponding CEL code without rigid body but with the motion of pipe wall instead; Besides my problem has changed alittle and that is the damping part is eliminated.
I sow your code and found a solution for the acceleration of the pipe; but the code dosen't make the correct answer! What's the wrong with it, Doginal?
This my code and used variables :

equations and the variables:

my"+ky=FlowForce

y"=dv/dt=(vnew-vold)/timestep

vnew=dy/dt=(ynew-yold)/timestep

m*((ynew-yold)/timestep-vold)/timestep+k*ynew=FlowForce

code:

FlowForce=force_y()@pipe

vold=areaAve(Mesh Velocity Y)@pipe

yold=areaAve(Total Mesh Displacement Y)@pipe

ynew=(FlowForce+m*(vold/timestep+yold/timestep^2))/(k+m/timestep^2)

m , k and timestep is determined too.
mohamadaliv is offline   Reply With Quote

Old   October 19, 2011, 05:30
Default
  #12
zhc
New Member
 
hongcaizhuo
Join Date: Oct 2011
Location: China
Posts: 1
Rep Power: 0
zhc is on a distinguished road
hi, how can i get the R of inlet, i used expressions areaAve(total mesh displacement x)@inlet and areaAve(total mesh displacement y)@inlet to get the x and y coordinates of every,then got R by (x^2+y^2)^0.5, but i got no R changed. how can i get a variable R? many thanks
zhc is offline   Reply With Quote

Reply

Tags
cel, rigid body

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
WENO Code (1D Advection Equation) Carolyn Main CFD Forum 6 March 11, 2007 14:21
rigid body code nico FLUENT 0 July 23, 2004 05:25
Design Integration with CFD? John C. Chien Main CFD Forum 19 May 17, 2001 16:56
volumetric conservation equation in PHOENICS code mehdi Phoenics 4 July 31, 2000 15:41
volumetric conservation equation in PHOENICS code mehdi Main CFD Forum 1 July 29, 2000 20:14


All times are GMT -4. The time now is 11:49.