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 Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 16, 2019, 10: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, 01: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, 22: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

Old   September 30, 2024, 01:05
Default ANSYS FLuent, regular wave
  #4
New Member
 
Join Date: Jul 2024
Posts: 1
Rep Power: 0
svinayan is on a distinguished road
I am currently using ANSYS Fluent to simulate regular waves, such as Stokes first and second-order waves, as well as Airy wave theories. While I have input parameters like water depth, wavelength, and wave height, the resulting surface elevation versus time plot does not appear as a regular wave. Instead, it shows unusual peaks and troughs, which differ significantly from the expected wave behavior. I suspect this irregularity may be due to the absence of a specified wave period in my setup. Unfortunately, I could not find an option to directly input the wave period in ANSYS Fluent. Could you please advise if the wave period is crucial for generating regular wave patterns and how I can correctly input it in the simulation settings? Any guidance would be greatly appreciated.
svinayan is offline   Reply With Quote

Reply

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


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 09:14.