|
[Sponsors] |
Using UDF to define velocity gradient boundary condition (not velocity inlet profile) |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 20, 2018, 01:51 |
Using UDF to define velocity gradient boundary condition (not velocity inlet profile)
|
#1 |
New Member
David
Join Date: Nov 2017
Posts: 14
Rep Power: 9 |
Dear all,
I am simulating a y-velocity contour in a flat plate laminar flow field to compare with Blasius solution. I am using Velocity Inlet at the inlet boundary, Pressure Outlet at the outlet boundary, Wall at the flat plate, and Symmetry at the top boundary. Symmetry boundary gives me all right setting except it forces the y-velocity to be zero at the top boundary. I have tried to set top boundary to be Outflow or Pressure Outlet, however, the results are not correct since the reversed flow appears. I am wondering if I can do anything to get a free shear boundary on the top, which means the gradient of x-velocity and y-velocity are zero, whereas x-velocity and y-velocity are non-zero on the top boundary. I do not know how can I implement it although I have read a bunch of threads in the forums. What UDF should I use? Define_profile or Define_adjust? Hope someone can give me a useful hint. Thanks. |
|
March 21, 2018, 21:50 |
attempt to implement by DEFINE_ADJUST
|
#2 |
New Member
David
Join Date: Nov 2017
Posts: 14
Rep Power: 9 |
Dear all,
I have written a UDF of DEFINE_ADJUST to let the y-velocity at the boundary equal to the y-velocity values in the boundary adjacent cells. It interpreted and hooked without error. However, error message popped out at the beginning of the computation. Here are the fault message and my UDF. Any comments would be appreciated. Error: received a fatal signal (Segmentation fault). Error Object: #f Registering Udf, ("C:\Users\Axis\2-D_0209\dp0\FLU-9\Fluent\adjust2.c") Calculation complete. #include "udf.h" DEFINE_ADJUST(top_y_velocity_adjust2, d) { face_t f; cell_t c, c0; int ID = 261; /* Zone ID for top from Boundary Conditions task page */ Thread *t, *t0; t = Lookup_Thread(d, ID); /* this loop over all cells adjacent to top */ begin_f_loop(f, t) { /* c0 and t0 identify the adjacent cell */ c0 = F_C0(f, t); t0 = THREAD_T0(t); F_V(f, t) = C_V(c0, t0); /* set cell value to face value on the top */ } end_f_loop(f, t) } |
|
March 26, 2018, 12:29 |
|
#3 |
New Member
David
Join Date: Nov 2017
Posts: 14
Rep Power: 9 |
Dear all,
After trying for several days, I prefer using DEFINE_PROFILE to impose a zero gradient velocity boundary at the top of the domain. Since there is no UDF hook selector under symmetry boundary condition's box, I use a velocity inlet to hook my UDF. I am wondering if it is possible to set a velocity inlet boundary condition for a non-inlet surface? (If considering the top surface is velocity inlet, the y-velocity will be negative respect to the inlet velocity boundary.) Thanks. Dv |
|
December 11, 2023, 13:56 |
|
#4 |
New Member
Kadi
Join Date: May 2014
Posts: 11
Rep Power: 12 |
Dear uconcorde,
Have you resolved your problem? If so, can you help me. Thanks |
|
Tags |
fluent, neumann boundary, udf, velocity bc |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF - Inlet Velocity Profile (Ansys Fluent) | vinayak4399 | Fluent UDF and Scheme Programming | 3 | August 25, 2020 15:15 |
UDF: Change boundary condition. Velocity inlet to pressure inlet at time "t" | jpina | FLUENT | 10 | April 11, 2015 15:19 |
Error finding variable "THERMX" | sunilpatil | CFX | 8 | April 26, 2013 08:00 |
ATTENTION! Reliability problems in CFX 5.7 | Joseph | CFX | 14 | April 20, 2010 16:45 |
what the result is negatif pressure at inlet | chong chee nan | FLUENT | 0 | December 29, 2001 06:13 |