|
[Sponsors] |
April 16, 2019, 12:15 |
Mathematical Operation for Oscillating wall
|
#1 |
New Member
Ruari Skinner
Join Date: Apr 2019
Posts: 2
Rep Power: 0 |
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 |
|
April 17, 2019, 02:13 |
|
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
Code:
0.3*cos(2.827*x) |
|
Tags |
moving bodies, oscillating wall, wave flume |
|
|
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 |