|
[Sponsors] |
November 27, 2018, 13:43 |
UDF Parabolic 2D Velocity Profile Issue
|
#1 |
New Member
Join Date: Jan 2018
Posts: 2
Rep Power: 0 |
Hi,
I am trying to specify a fully developed velocity at the inlet of my gradual expansion diffuser. The UDF is below. /************************************************** ******** udf_parabolicinlet.c UDF for specifying a steady-state velocity profile boundary condition ************************************************** ********/ #include "udf.h" DEFINE_PROFILE(inlet_x_xyvelocity, thread, index) { real x[ND_ND]; real y; face_t f; begin_f_loop(f, thread) { F_CENTROID(x,f,thread); y = x[1]; F_PROFILE(f, thread, index) = .21 - y*y/(.002*.002)*.21; } end_f_loop(f, thread) } I plotted the equation in MATLAB and got a nice parabolic profile. However, whenever I run this case, I do not get a smooth graph. I get the graph attached. Screenshot (375).jpg The steps I follow are: Write Code...save with file extension ".c" Interpret it in Setup Use it as the u component of the velocity inlet boundary condition Run Check Velocity Profile Does anyone know what may be happening here? |
|
November 29, 2018, 15:45 |
|
#2 |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,761
Rep Power: 66 |
To get a smooth curve, you simply need more points. Two things to consider:
Make sure your mesh is fine enough so that the curve appears smooth (it will always be jagged as shown). How do you produce this plot? Using a line probe or what? Check the settings. Better just, just plot the full velocity field and look at it and see if it makes sense. |
|
December 11, 2018, 13:11 |
|
#3 | |
New Member
Join Date: Jan 2018
Posts: 2
Rep Power: 0 |
Quote:
|
||
Tags |
fully developed inlet, udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
3D UDF Paraboilc Velocity Profile (Can't Maintain) | Sing | FLUENT | 12 | August 7, 2017 07:25 |
Parabolic velocity profile in 3d with UDF | mmk3818 | Fluent UDF and Scheme Programming | 1 | August 21, 2016 19:35 |
How to define a parabolic velocity inlet of particles with UDF | zumaqiong | FLUENT | 2 | February 22, 2010 10:46 |
Logarithmic velocity profile | cfdworker | Fluent UDF and Scheme Programming | 0 | April 23, 2009 20:09 |
udf for velocity profile in a geometry having two inlets | shubham208011 | Fluent UDF and Scheme Programming | 0 | April 6, 2009 16:13 |