CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > ANSYS > FLUENT

Two UDF at the same time

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

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

LinkBack Thread Tools Display Modes
Old   October 8, 2014, 01:17
Unhappy Two UDF at the same time
Join Date: Jul 2014
Location: Australia
Posts: 36
Rep Power: 5
siamak1438 is on a distinguished road
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
Senior Member
Bionico's Avatar
Join Date: Sep 2011
Location: Brescia, Italy
Posts: 181
Rep Power: 8
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 is offline   Reply With Quote

Old   October 8, 2014, 04:08
Senior Member
ghost82's Avatar
Join Date: Oct 2010
Location: Italy
Posts: 1,003
Rep Power: 19
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.

siamak1438 likes this.
ghost82 is offline   Reply With Quote

Old   October 8, 2014, 10:31
Senior Member
Andrew Kokemoor
Join Date: Aug 2013
Posts: 122
Rep Power: 7
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


Thread Tools
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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
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 14:58
mixerVesselAMI2D's mass is not balancing sharonyue OpenFOAM Running, Solving & CFD 6 June 10, 2013 09:34
AMI speed performance danny123 OpenFOAM 19 October 24, 2012 07:44
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 16:01.