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

UDF for Wall Boundary moving Left and right to create wave Simulation in a Flume

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 16, 2019, 09:39
Default UDF for Wall Boundary moving Left and right to create wave Simulation in a Flume
  #1
New Member
 
Ruari Skinner
Join Date: Apr 2019
Posts: 2
Rep Power: 0
buerskin is on a distinguished road
Hi,

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

I need help with the following UDF function. I am new to the software but now have a basic understanding of what i need to do.

I have identified the UDF file as the driver for the Moving wall.

The Current UDF looks like this,

#include "udf.h"
#include "dynamesh_tools.h"
DEFINE_CG_MOTION(wave,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]=(0.037098)*((1 - exp(-2.303*time))*2.8274*cos(2.8274*time) + ((2.303*exp(-2.303*time))*sin(2.8274*time)));
}
end_f_loop(f,t)
}

I believe the operation that needs changing is the vel[0] function.

I want the wall to move at a frequency of 0.45 per second. The wall is to move 300mm from its original position. Once the wall is 300mm to the left (X direction), it is to return back to its original position at the same frequency.

The overall aim is to have a simulation for numerous waves in a wave flume over a 5 second period. Wave heights will be compared from a numerical model and laboratory approach.

Regards

Ruari Skinner
buerskin is offline   Reply With Quote

Old   April 17, 2019, 00:42
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
so any problems here? why did you post it?

best regards
AlexanderZ is offline   Reply With Quote

Old   July 3, 2019, 21:23
Default
  #3
Member
 
...
Join Date: Jan 2019
Posts: 31
Rep Power: 7
popa is on a distinguished road
Quote:
Originally Posted by AlexanderZ View Post
so any problems here? why did you post it?

best regards
He want to redefine the V0.
popa is offline   Reply With Quote

Reply

Tags
moving boundary, udf, wave boundary conditions, wave flume, wave generation

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



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