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

Mathematical Operation for Oscillating wall

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 16, 2019, 12:15
Default Mathematical Operation for Oscillating wall
  #1
New Member
 
Ruari Skinner
Join Date: Apr 2019
Posts: 2
Rep Power: 0
buerskin is on a distinguished road
Hi,

I am trying to simulate a wave flume experiment in FLUENT.

I have the present udf which i have found online (shown below),

#include "udf.h"
#include "dynamesh_tools.h"
DEFINE_CG_MOTION(oscillate,dt,vel,omega,time,dtime )
{
Thread *t;
face_t f; /* define the variables */
t = DT_THREAD(dt);
begin_f_loop(f,t) /* loop over each face in the zone to create an array of data */
{
vel[0]=-2;
}
end_f_loop(f,t)
}

This currently only gives velocity in one direction (x-direction at - 2m/s)

However, I want a mathematical operation for an oscillating wall.

The wall is to move 0.3m to the left and then 0.3m to the right. The frequency used in the experiment is 0.45Hz, so each loop should take 2.2s. I have looked at COS() functions for this but i am struggling to understand this.

Any help with this mathematical operation would be appreciated.

Thank you

Ruari
buerskin is offline   Reply With Quote

Old   April 17, 2019, 02:13
Default
  #2
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
Code:
0.3*cos(2.827*x)
best regards
AlexanderZ is offline   Reply With Quote

Reply

Tags
moving bodies, oscillating wall, wave flume


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
Radiation in semi-transparent media with surface-to-surface model? mpeppels CFX 11 August 22, 2019 08:30
Water subcooled boiling Attesz CFX 7 January 5, 2013 04:32
[Commercial meshers] tmerge utility creates unwanted interface/walls comes in the final mesh Shoonya OpenFOAM Meshing & Mesh Conversion 11 January 20, 2012 07:23
UDF for wall slipping HFLUENT Fluent UDF and Scheme Programming 0 April 27, 2011 13:03
Wall functions Abhijit Tilak Main CFD Forum 6 February 5, 1999 02:16


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