|
[Sponsors] |
August 2, 2018, 13:32 |
Vary velocity at inlet based on position
|
#1 |
New Member
Join Date: Dec 2017
Posts: 12
Rep Power: 8 |
I'm new to FLUENT and creating UDFs, but I'm trying to setup a 2D problem where the velocity on the inlet varies with x-position. I have the velocity and x-position data I need, but I'm not sure how to utilize that in FLUENT using a UDF. Most of the functions I've seen are functions of time. Even then I'm not sure I need a true function, as all I really want it to do is: at x=## on the inlet edge use this velocity, at x=### on the inlet edge use that velocity.
What's the best way to go about this? I got the data from a 3D model I have in FLUENT so I have more than just velocities and x-position data if I need to grab more or different data. Thanks. |
|
August 2, 2018, 20:36 |
|
#2 |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,761
Rep Power: 66 |
This could just as easily be done using a boundary PROFILE.
In the Fluent customization manual (in the help) you can find likes of examples. For example here is one for making a pressure profile. Code:
#include "udf.h" DEFINE_PROFILE(pressure_profile,t,i) { real x[ND_ND]; /* this will hold the position vector */ real y; face_t f; begin_f_loop(f,t) { F_CENTROID(x,f,t); y = x[1]; F_PROFILE(f,t,i) = 1.1e5 - y*y/(.0745*.0745)*0.1e5; } end_f_loop(f,t) } Use x[0] for x-coordinate and x[2] for z-coordinate. And update the line F_PROFILE(f,t,i) = 1.1e5 - y*y/(.0745*.0745)*0.1e5; |
|
Tags |
fluent, udf, velocity let |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
serial udf to parallel udf | radioss | Fluent UDF and Scheme Programming | 10 | January 19, 2019 09:56 |
Defined inlet velocity is different with inlet velocity on CFX post | jonpewpew | CFX | 2 | November 2, 2017 17:40 |
A new wall function based on the velocity field----strange result | huangxianbei | OpenFOAM Programming & Development | 6 | September 30, 2015 08:52 |
is there any method give node based velocity BC? | daniel | FLUENT | 2 | July 18, 2006 22:21 |
what the result is negatif pressure at inlet | chong chee nan | FLUENT | 0 | December 29, 2001 06:13 |