CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

Inlet Velocity Profile UDF

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By vinerm

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 18, 2020, 23:28
Default Inlet Velocity Profile UDF
  #1
Member
 
j
Join Date: Apr 2020
Posts: 34
Rep Power: 0
buckngnr11 is on a distinguished road
Hi, I'm trying to read in a .csv file to transfer velocity components and turbulence settings from a different simulation in another CFD solver. A long time ago I was able to import a .txt file to read in the profile. I'm trying to use a UDF now, with Define_Profile function. I found a template to follow, but the first issue I'm having is reading the array of data from the .csv file. Is there a better way to do this than the way I'm trying to do it? I attached a picture of the start of my code and the .csv file I need to read in.

Thx
Attached Images
File Type: png Screen Shot 2020-05-18 at 10.23.12 PM.png (77.8 KB, 25 views)
File Type: png Screen Shot 2020-05-18 at 10.24.41 PM.png (155.4 KB, 22 views)
buckngnr11 is offline   Reply With Quote

Old   May 19, 2020, 03:18
Default Better Way
  #2
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 36
vinerm will become famous soon enough
A better way is not to use UDF. Use the text file as it is with a few minor changes. Put it in profile format and read it in Fluent. To use data in a file for boundaries, UDF is not required.

UDF has errors; it won't even compile because x, y, and z are being re-declared. And though file is being read, it is not being used.
buckngnr11 likes this.
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm is offline   Reply With Quote

Old   May 19, 2020, 07:00
Default UDF for slip velocity and temperature jump
  #3
Member
 
Homayoon sohrabi
Join Date: May 2020
Posts: 56
Rep Power: 6
homay95 is on a distinguished road
i need a udf for slip wall
i want to use udf for setting this boundary condition:
us=B*(du/dy)
what should i do?
homay95 is offline   Reply With Quote

Old   May 19, 2020, 09:03
Default Slip Velocity
  #4
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 36
vinerm will become famous soon enough
There are at least a couple of posts on Fluent forum where such a UDF is available.
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm is offline   Reply With Quote

Old   May 19, 2020, 11:48
Default
  #5
Member
 
Homayoon sohrabi
Join Date: May 2020
Posts: 56
Rep Power: 6
homay95 is on a distinguished road
can you please send the links for that posts to my mail?
homayoonsohrabi@yahoo.com
homay95 is offline   Reply With Quote

Old   May 19, 2020, 12:12
Default Old Posts
  #6
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 36
vinerm will become famous soon enough
I suppose you commented on those posts, so, you should look at your own old posts to find those out. It would be easier to search that way.

Furthermore, you can expect better help if you write a UDF yourself instead of just searching for a pre-written one exactly matching your requirement. Someone might have it but it would take longer to find out who and then its on that person if he or she wants to share it or not.
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm is offline   Reply With Quote

Old   May 19, 2020, 14:49
Default
  #7
Member
 
j
Join Date: Apr 2020
Posts: 34
Rep Power: 0
buckngnr11 is on a distinguished road
Thanks for the advice. I was hoping to import the .csv file without moving it to a text file, but it's not the end of the world to do so. Seems to be the easiest way
buckngnr11 is offline   Reply With Quote

Old   May 19, 2020, 15:57
Default CSV and TXT
  #8
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 36
vinerm will become famous soon enough
.csv and .txt are just extensions; both are text files.
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm is offline   Reply With Quote

Old   January 6, 2021, 22:22
Default
  #9
New Member
 
zhangdongjie
Join Date: Jan 2021
Posts: 22
Rep Power: 5
zhangdongjie is on a distinguished road
Quote:
Originally Posted by homay95 View Post
i need a udf for slip wall
i want to use udf for setting this boundary condition:
us=B*(du/dy)
what should i do?
How to load the temperature jump UDF in fluent? Is it directly loaded into the wall temperature
zhangdongjie is offline   Reply With Quote

Old   January 7, 2021, 04:10
Default
  #10
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
Quote:
Originally Posted by zhangdongjie View Post
How to load the temperature jump UDF in fluent? Is it directly loaded into the wall temperature
if you want to have temperature jump on the wall, you should apply it to the wall, for example using define_profile macro
__________________
best regards


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

Reply


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 velocity inlet sinusoidal profile dka14 Fluent UDF and Scheme Programming 0 March 27, 2017 07:58
Problem with assigned inlet velocity profile as a boundary condition Ozgur_ FLUENT 5 August 25, 2015 05:58
simpleFoam: Non-uniform mesh near inlet & outlet causes incorrect velocity profile? Zaphod'sSecondHead OpenFOAM Running, Solving & CFD 0 January 28, 2015 06:17
FSI- Pipe- uniform velocity profile inlet Absy Main CFD Forum 0 April 6, 2010 04:01
what the result is negatif pressure at inlet chong chee nan FLUENT 0 December 29, 2001 06:13


All times are GMT -4. The time now is 20:58.