|
[Sponsors] |
April 28, 2012, 15:31 |
Wave Generation via Flapping Wall UDF
|
#1 |
New Member
Join Date: Mar 2011
Posts: 4
Rep Power: 15 |
Hello All,
Long story short... I'm working on developing a 2D cfd model via fluent 13, that models surface waves interacting with various geometries lying on the free surface. The model consists of a tank, with wall boundary's at the front and end walls, the bottom, and a pressure outlet for the top. The trick is I need the model to be robust enough that the waves being developed reflect off the end wall, and combine with oncoming waves, and I need to run this until a standing wave develops in the tank. I would like to accomplish this by generating the waves via a udf, which causes the front wall to oscillate like a hinged flap. Reading the udf manual, the DEFINE_CG_MOTION macro, appears to allow this to occur, however something I can't explain is occuring. When I preview the motion, the wall begins to move as intended, but when it attempts to pass back through the vertical plane, it changes direction and heads back in the direction in which it came. It's as if the sign on the angular velocity has suddenly changed, however I can confirm that hasn't. Before people ask, I've played with the phase angle to no avail, and it doesn't matter which direction the motion starts (ie. into the tank or out of the tank), it always changes direction unexpectedly. I've included the UDF below. If anyone has any thoughts on this, or suggestions on other ways to accomplish my goal please comment. I welcome all suggestions. #include"udf.h" real pi, freq, phase, Ampdeg, Amprad, w, AVel; DEFINE_CG_MOTION(wallmotion, dt, vel, omega, time, dtime) { NV_S(vel, =, 0.0); NV_S(omega, =, 0.0); /* Defined Constants*/ pi = 3.141592654; freq = .97; Ampdeg = 11.195; phase = 0; /*Define Wall Motion via. Angular Velocity */ Amprad = Ampdeg*pi/180; /*Convert amplitude to radians */ w=2.0*pi*freq; /*angular freq in radians*/ AVel = Amprad*w*cos(w*time + phase); omega[2] = AVel; /*Assign AVel to omegaz */ Message("time:%f omegaz:%f \n", time, omega[2]); } Thanks for your time. Len |
|
April 29, 2012, 15:30 |
|
#2 |
New Member
Join Date: Mar 2011
Posts: 4
Rep Power: 15 |
Well I solved my problem rather unexpectedly. There appears to be a bug with in Fluent 13, because I have no other way to explain it. When I previewed the wall motion using the display zone motion option, it gave me the problem I listed above. When I used the preview mesh motion option though, the motion ran as expected.
Len |
|
May 11, 2012, 08:13 |
|
#3 | |
New Member
Patrick
Join Date: Apr 2012
Posts: 28
Rep Power: 14 |
Quote:
|
||
June 11, 2012, 11:08 |
|
#4 | |
New Member
Join Date: Mar 2011
Posts: 4
Rep Power: 15 |
Quote:
To answer your question, the only trick to using a moving mesh, that they don't jump right out and tell you is that the mesh has to be a tri grid, not an H-Grid for the smoothing function to work. If you don't use a tri grid, when you run the motion or the simulation the mesh will not deform and the simulation will fail as soon as the moving object crosses over into the next element (creates a negative volume). Other than that my mesh is setup very much like the falling box example. I used ICEM to make a separate region around my moving flap, which has an H-grid that moves with the flap, and then created a region around that which is all a tri grid that I've allowed to deform. I subject both the flap and the H-grid region to the macro I wrote (I've since modified it slightly to account for the flap having a thickness and being hinged at the back instead of the middle, but its general function is the same). As for the waves, I've successfully run several models up to the 1 min mark, and they are reflecting and creating a standing wave. However I've yet to compare the results to wave theory yet or results from a wave tank, so I don't really know how good my results are, but it's a start. Len |
||
April 11, 2017, 17:21 |
|
#5 |
New Member
Siddani Bhargav Sriram
Join Date: Feb 2017
Posts: 2
Rep Power: 0 |
Hello LenDawg0220,
Can you please let me know how you had created the prism layer using ICEM in detail? I'm working on a similar project, but I'm carrying out 2D analysis. As I couldn't generate a prism layer, I had generated an inflation but had faced a problem in FLUENT solver (Negative Cell Volume). I would be glad if anyone can give me some inputs. Thanks in advance. |
|
June 26, 2017, 17:05 |
|
#6 |
New Member
Usama
Join Date: Jun 2017
Posts: 6
Rep Power: 9 |
Help me please
How writing UDF for: w=A(t)*sin(n*pi*x/L) Sent from my iPhone using CFD Online Forum mobile app |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Accessing wall shear stress using UDF | Robert | Fluent UDF and Scheme Programming | 2 | July 31, 2013 09:34 |
UDF parallel error: chip-exec: function not found????? | shankara.2 | Fluent UDF and Scheme Programming | 1 | January 16, 2012 23:14 |
Wall motion as a UDF, is it possible? | linch | FLUENT | 1 | August 31, 2009 10:18 |
How to write udf of slip wall condition | cxzhao | FLUENT | 0 | April 27, 2005 22:20 |
Vibrating / Deforming Wall UDF | Qureshi | FLUENT | 2 | January 16, 2004 05:48 |