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

Defining UDF for boundary with varying velocity

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By AlexanderZ

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 8, 2020, 12:21
Default Defining UDF for boundary with varying velocity
  #1
New Member
 
sina hassanpoor
Join Date: Jun 2019
Posts: 4
Rep Power: 6
sinaited is on a distinguished road
hi

i want to set up a simulation for a tank with varying velocity boundary. the velocity depends on the tank pressure. velocity is a power law function of pressure in tank and also the tank is expanding(the wall is moving).
1-what UDF should i use?
2- can i use "named expression" in UDF?( i defined an average pressure in named expression and i want my UDF to be able to read this average pressure.)
3- when i define the mass flow rate as an expression, this error shows up {Incorrect expression unit. Expression Unit [m s^-1], Required Unit [m s^-1]}. the dimensions are correct and error seems unreasonable. have you ever encountered this problem?
sinaited is offline   Reply With Quote

Old   June 9, 2020, 01:05
Default
  #2
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
1. if you are going to use UDF read Ansys Fluent Customization manual, look for DEFINE_PROFILE macro
2. if you are going to use UDF, you may define all boundary conditions here. Or calculate pressure again
3. show expression which you put
sinaited likes this.
__________________
best regards


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

Old   June 9, 2020, 06:49
Default
  #3
New Member
 
sina hassanpoor
Join Date: Jun 2019
Posts: 4
Rep Power: 6
sinaited is on a distinguished road
this is my expressions i defined, can i use one of my expressions like "P_avg" in UDF profile?
Attached Images
File Type: jpg Untitled.jpg (65.5 KB, 9 views)
sinaited is offline   Reply With Quote

Old   June 15, 2020, 04:23
Default Udf
  #4
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 35
vinerm will become famous soon enough
I am unsure if the expression could be used if it depends on another expression that uses field values, such as, pressure in the domain.

Prefer UDF. For most of the boundary conditions, you need to use DEFINE_PROFILE. Since the pressure in the tank is not a single value, you need to reduce it to a scalar, either using an average or maximum or minimum, depending upon your requirement.
__________________
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

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 inlet velocity by UDF not the same as via GUI? h0rst Fluent UDF and Scheme Programming 0 April 24, 2017 01:45
Creating UDF with changing velocity with time jabeztan Fluent UDF and Scheme Programming 8 March 9, 2017 09:46
Creating UDF with changing velocity with time jabeztan Main CFD Forum 0 March 8, 2017 11:34
Simulation with UDF for species mass fraction and velocity profile virgy Fluent UDF and Scheme Programming 8 February 7, 2012 04:30
UDF for varying inlet velocity with z-distance Peter Wilkins FLUENT 1 May 18, 2006 11:10


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