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

LinkBack  Thread Tools  Search this Thread  Display Modes 
September 10, 2011, 13:35 
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: 13 
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... 

September 12, 2011, 03:48 

#2 
Senior Member
omid
Join Date: Apr 2011
Posts: 102
Rep Power: 12 
Hi
what is your problem that you want to solve? where do you want use this CEL? 

September 12, 2011, 12:25 

#3 
Senior Member
Join Date: Apr 2009
Posts: 531
Rep Power: 18 
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.


September 12, 2011, 13:18 

#4  
New Member
mohamad ali
Join Date: Jul 2010
Posts: 6
Rep Power: 13 
Quote:
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. 

September 12, 2011, 13:43 

#5  
New Member
mohamad ali
Join Date: Jul 2010
Posts: 6
Rep Power: 13 
Quote:
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. 

September 12, 2011, 14:32 

#6 
Senior Member
Join Date: Apr 2009
Posts: 531
Rep Power: 18 
Have you considered solving it as a 2way FSI case (see the oscillating plate tutorial for an example)?


September 13, 2011, 11:36 

#7  
New Member
mohamad ali
Join Date: Jul 2010
Posts: 6
Rep Power: 13 
Quote:
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 2way FSI solver is not necessary. 

September 13, 2011, 12:55 

#8 
Senior Member
Join Date: Apr 2009
Posts: 531
Rep Power: 18 
Perhaps I'm missing something here... if the tube moves as a rigid body in the ydirection 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.


September 13, 2011, 15:11 

#9 
Member
anonymous
Join Date: Jun 2011
Posts: 58
Rep Power: 12 
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 

September 20, 2011, 10:44 

#10  
New Member
mohamad ali
Join Date: Jul 2010
Posts: 6
Rep Power: 13 
Quote:
Hi Doginal I tried it but finally I made the simulation with the menu of rigid body. thank you guies 

October 9, 2011, 02:01 

#11  
New Member
mohamad ali
Join Date: Jul 2010
Posts: 6
Rep Power: 13 
Quote:
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 BodyDynamicsExternal Force DefinitionLinear Spring ConstantY 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=(vnewvold)/timestep vnew=dy/dt=(ynewyold)/timestep m*((ynewyold)/timestepvold)/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. 

October 19, 2011, 05:30 

#12 
New Member
hongcaizhuo
Join Date: Oct 2011
Location: China
Posts: 1
Rep Power: 0 
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


Tags 
cel, rigid body 
Thread Tools  Search this Thread 
Display Modes  


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 