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

Two UDF at the same time

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 1 Post By Bionico
  • 1 Post By ghost82
  • 1 Post By Kokemoor

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 8, 2014, 01:17
Unhappy Two UDF at the same time
  #1
Member
 
Siamak
Join Date: Jul 2014
Location: Australia
Posts: 36
Rep Power: 11
siamak1438 is on a distinguished road
Hey.
I want to simulate a geometry with two different velocity inlets. Because of the time variable velocities in both of the inlets, I have to write separate UDF for both of them. So, my question is that how can I use two unsteady velocity UDF? Or how can I allocate two different unsteady_velocity for two different faces?
siamak1438 is offline   Reply With Quote

Old   October 8, 2014, 04:06
Default
  #2
Senior Member
 
Bionico's Avatar
 
Flavio
Join Date: Sep 2011
Location: Brescia, Italy
Posts: 181
Rep Power: 15
Bionico is on a distinguished road
Hello siamak1438,
you can write two different Velocity-Profiles in 1 UDF: you have just to name them with different names and then select the correct profile in boundary condition!
For example:

DEFINE_PROFILE(unsteady_velocity1, thread, position)
{
face_t f;
real t = CURRENT_TIME;
...

DEFINE_PROFILE(unsteady_velocity2, thread, position)
{
face_t f;
real t = CURRENT_TIME;
...


Best regards
siamak1438 likes this.
__________________
Bionico
Bionico is offline   Reply With Quote

Old   October 8, 2014, 04:08
Default
  #3
Senior Member
 
ghost82's Avatar
 
Rick
Join Date: Oct 2010
Posts: 1,016
Rep Power: 26
ghost82 will become famous soon enough
Flavio is right,
I add only 2 things:
write only one line for #define "udf.h" and put all the code in one file.

Daniele
siamak1438 likes this.
ghost82 is offline   Reply With Quote

Old   October 8, 2014, 10:31
Default
  #4
Senior Member
 
Andrew Kokemoor
Join Date: Aug 2013
Posts: 122
Rep Power: 13
Kokemoor is on a distinguished road
You might be able to use profiles instead of UDFs. They're less powerful, but simpler. Check out Section 6.6 of the Fluent User's Guide.
siamak1438 likes this.
Kokemoor 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
AMI speed performance danny123 OpenFOAM 21 October 24, 2020 04:13
Sudden jump in Courant number NJG OpenFOAM Running, Solving & CFD 7 May 15, 2014 13:52
Micro Scale Pore, icoFoam gooya_kabir OpenFOAM Running, Solving & CFD 2 November 2, 2013 13:58
mixerVesselAMI2D's mass is not balancing sharonyue OpenFOAM Running, Solving & CFD 6 June 10, 2013 09:34
DPM UDF particle position using the macro P_POS(p)[i] dm2747 FLUENT 0 April 17, 2009 01:29


All times are GMT -4. The time now is 19:12.