CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

UDF Moving wall preview strange

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 3, 2016, 12:48
Default UDF Moving wall preview strange
  #1
New Member
 
Christian
Join Date: Nov 2015
Posts: 14
Rep Power: 11
Iggy_LR is on a distinguished road
Hello everyone,

im currently trying to implement a UDF for the movement of an ultrasonic horn. So the horn should oscillate along the z-axis. I got this UDF

DEFINE_CG_MOTION(sonotroda,dt,vel,omega,time,dtime )
{
Thread *t;
face_t f; /* define the variables */

t = DT_THREAD(dt); /* get the thread pointer for which the motion is defined */

/* if (!Data_Valid_P())
/* return; /* check if the values of the variables are accessible before you compute the function */

begin_f_loop(f,t) /* loop over each face in the zone to create an array of data */
{
if (time <= 1)
vel[1] = -2* 3.14159 * 20000 * 0.000025 * cos (2 * 3.14159 * 20000 * time); /* define the velocity of the moving zone---*/
else
vel[1] = 0;
}
end_f_loop(f,t)
}

ok when i define which face should move and preview the motion it just looks as if the zylinder elongates a long way and it doesnt look as if it oscillates around its original position. Is that normal or is there something that i did completely wrong? I uploaded a screenshot of it.

Kind regards,
Christian
Attached Images
File Type: jpg weird.jpg (83.7 KB, 26 views)
Iggy_LR is offline   Reply With Quote

Old   February 4, 2016, 06:58
Default
  #2
New Member
 
Christian
Join Date: Nov 2015
Posts: 14
Rep Power: 11
Iggy_LR is on a distinguished road
Is there any Problem with my UDF? Is it theoretically applicable to the case that i described? -> oscillating since its a sonotrode.

Also with this Simulation Cavitation through ultrasound should be simulated.

Any help would be of great help.

Kind Regards,
Christian
Iggy_LR is offline   Reply With Quote

Old   February 5, 2016, 17:32
Default
  #3
`e`
Senior Member
 
Join Date: Mar 2015
Posts: 892
Rep Power: 18
`e` is on a distinguished road
You've applied a sinusoidal motion in the y-direction for the first second of simulation on a particular face. If you've applied this motion to one end of your cylinder then I'd expect this cylinder to elongate. Apply this motion to both end faces to create an oscillatory motion of the cylinder along the y-axis. Is the entire domain a cylinder or are there other sections?
`e` is offline   Reply With Quote

Old   February 5, 2016, 17:41
Default
  #4
New Member
 
Christian
Join Date: Nov 2015
Posts: 14
Rep Power: 11
Iggy_LR is on a distinguished road
Hello and thanks for your answer `e`,

i already found out today what the problem was. When i set the timestep to xe-6 or even lower then the domain that should moved in this wave pattern moved as it was intended to do. It seems that for bigger time steps the motion gets registered in a weird way and thus the cylinder elongates endlessly.

so the solution was just to decrese the timestep to sth xe-6.

xe-5 was already to big again and it already started to elongate.

Also since the moving face is a sonotrode in my case it wouldnt make sense to set both faces to move. but still thank you so much for your answer and have a nice weekend
Iggy_LR 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
Moving wall vs. SRF vs. Moving mesh ghost82 Main CFD Forum 18 February 5, 2022 08:48
Wrong flow in ratating domain problem Sanyo CFX 17 August 15, 2015 07:20
stationary wall vs. moving wall user0314 FLUENT 0 August 26, 2011 10:42
Get position of a moving wall every time step in UDF schemer Fluent UDF and Scheme Programming 2 August 10, 2011 03:41
Multicomponent fluid Andrea CFX 2 October 11, 2004 06:12


All times are GMT -4. The time now is 19:04.