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 Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By vinerm

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 18, 2020, 22:28
Default Inlet Velocity Profile UDF
  #1
New Member
 
Chris
Join Date: Apr 2020
Posts: 29
Rep Power: 2
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, 3 views)
File Type: png Screen Shot 2020-05-18 at 10.24.41 PM.png (155.4 KB, 4 views)
buckngnr11 is offline   Reply With Quote

Old   May 19, 2020, 02:18
Default Better Way
  #2
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,554
Blog Entries: 1
Rep Power: 28
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 on the Forum
vinerm is online now   Reply With Quote

Old   May 19, 2020, 06:00
Default UDF for slip velocity and temperature jump
  #3
New Member
 
Homayoon sohrabi
Join Date: May 2020
Posts: 13
Rep Power: 2
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, 08:03
Default Slip Velocity
  #4
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,554
Blog Entries: 1
Rep Power: 28
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 on the Forum
vinerm is online now   Reply With Quote

Old   May 19, 2020, 10:48
Default
  #5
New Member
 
Homayoon sohrabi
Join Date: May 2020
Posts: 13
Rep Power: 2
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, 11:12
Default Old Posts
  #6
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,554
Blog Entries: 1
Rep Power: 28
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 on the Forum
vinerm is online now   Reply With Quote

Old   May 19, 2020, 13:49
Default
  #7
New Member
 
Chris
Join Date: Apr 2020
Posts: 29
Rep Power: 2
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, 14:57
Default CSV and TXT
  #8
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,554
Blog Entries: 1
Rep Power: 28
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 on the Forum
vinerm is online now   Reply With Quote

Reply

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


All times are GMT -4. The time now is 08:42.