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 inlet velocity profile

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 15, 2013, 05:22
Default UDF for inlet velocity profile
  #1
Senior Member
 
Francisco
Join Date: Mar 2012
Location: Spain
Posts: 273
Rep Power: 15
Bollonga is on a distinguished road
Hi guys,

I'm using a UDF for a velocity profile to define the atmospheric boundary layer in a 2D problem. I've used the attached c code as explained in the user manual, apparently it's interpreted properly but results don't show any influence on the profile, it appears to be just a uniform velocity at the inlet (see attached picture for 5s).

1) Which can be the problem? Is there something wrong in the code?

2) What will happen if I modify the ymax coord in the code so it's higher than the domains's ymax?

3) Also I would like to use a profile for the turbulence intensity (TI), but Fluent only allows me to use it for k and epsilon. Is there a way to use TI and Turbulent Length Scale (TLS) instead of applying the formulae for (TI,TLS)\Rightarrow(k,epsilon).

4) I will need to apply the same profile to a 3D case. It will be exactly the same in the x-y plane and constant in the z-direction. Can I use directly the same code? If not, what do I have to modify?

Thanks you all!
Attached Images
File Type: jpg Uprofile_keR_U10_Iu15_TLS0.001-1-5.000000.jpg (62.4 KB, 215 views)
Attached Files
File Type: c inlet_x_velocity.c (751 Bytes, 287 views)
Bollonga is offline   Reply With Quote

Old   October 6, 2015, 12:53
Default TI Profile
  #2
Env
New Member
 
Join Date: Jul 2012
Posts: 5
Rep Power: 13
Env is on a distinguished road
Hello Bollonga: I have same problems as yours, and I see that you asked this question long time ago! so I assume you have found the answers although no one replied here. I appreciate if you could share what you found with me. My main problem is how to write a UDF to use a profile for TI of an inlet boundary condition.

If you have an example UDF, I appreciate if you share it here.

Thanks,
Env

Quote:
Originally Posted by Bollonga View Post
Hi guys,

I'm using a UDF for a velocity profile to define the atmospheric boundary layer in a 2D problem. I've used the attached c code as explained in the user manual, apparently it's interpreted properly but results don't show any influence on the profile, it appears to be just a uniform velocity at the inlet (see attached picture for 5s).

1) Which can be the problem? Is there something wrong in the code?

2) What will happen if I modify the ymax coord in the code so it's higher than the domains's ymax?

3) Also I would like to use a profile for the turbulence intensity (TI), but Fluent only allows me to use it for k and epsilon. Is there a way to use TI and Turbulent Length Scale (TLS) instead of applying the formulae for (TI,TLS)\Rightarrow(k,epsilon).

4) I will need to apply the same profile to a 3D case. It will be exactly the same in the x-y plane and constant in the z-direction. Can I use directly the same code? If not, what do I have to modify?

Thanks you all!
Env is offline   Reply With Quote

Old   March 12, 2019, 11:12
Default
  #3
New Member
 
Edmundo
Join Date: Jun 2014
Location: Mexico
Posts: 4
Rep Power: 11
eag.10 is on a distinguished road
Quote:
Originally Posted by Bollonga View Post
Hi guys,

I'm using a UDF for a velocity profile to define the atmospheric boundary layer in a 2D problem. I've used the attached c code as explained in the user manual, apparently it's interpreted properly but results don't show any influence on the profile, it appears to be just a uniform velocity at the inlet (see attached picture for 5s).

1) Which can be the problem? Is there something wrong in the code?

2) What will happen if I modify the ymax coord in the code so it's higher than the domains's ymax?

3) Also I would like to use a profile for the turbulence intensity (TI), but Fluent only allows me to use it for k and epsilon. Is there a way to use TI and Turbulent Length Scale (TLS) instead of applying the formulae for (TI,TLS)\Rightarrow(k,epsilon).

4) I will need to apply the same profile to a 3D case. It will be exactly the same in the x-y plane and constant in the z-direction. Can I use directly the same code? If not, what do I have to modify?

Thanks you all!
Hi, did you solved your problem? Let me know if I can help.
eag.10 is offline   Reply With Quote

Old   June 28, 2021, 03:24
Default Turbulent boundary layer 3d problem
  #4
New Member
 
Gutti Lokesh Kalyan
Join Date: Jun 2020
Posts: 1
Rep Power: 0
lokesh kalyan is on a distinguished road
Hello friends.

I am trying to use three velocity components code which is written in c language. Also, the Reynolds stress of R11, R21, R22, R33 was given to test the results. but I am getting wrong plots of u,v,w standard deviation, and UV Reynolds stress. I don't know what is the problem with this code. I am a beginner at coding. I guess the structure is wrong. I am using fluent software to run simulations.

Could anyone help me to solve the problem in the code is attached below?

Thanks in advance.
Attached Files
File Type: c udf.c (20.0 KB, 14 views)
lokesh kalyan is offline   Reply With Quote

Old   June 29, 2021, 04:40
Default
  #5
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
your code has 800+ line, I expect it will be hard to find person, who will debug this code instead of you

compilation log:
line(53) : warning C4716: 'sort' : must return a value
line(60) : warning C4715: 'findY' : not all control paths return a value


functions sort and findY could have some problems, check it
however, these warnings may not lead to errors.
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Reply

Tags
inclined flat plate, inlet, turbulence profile, udf, velocity profile

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
UDF problems - velocity profile Oli Fluent UDF and Scheme Programming 6 October 24, 2016 10:38
UDF Unsteady velocity profile Rashad FLUENT 0 February 27, 2008 14:57
How to specify the Velocity profile (eqn) by UDF Anant FLUENT 1 February 27, 2008 14:54
Multi step transient UDF velocity profile problem William177 FLUENT 1 February 3, 2008 06:47
UDF problem : inlet velocity in cyl. coord. system Jongdae Kim FLUENT 0 June 15, 2004 11:21


All times are GMT -4. The time now is 05:31.