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

Transient pressure UDF for parallel fluent

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 29, 2010, 09:05
Default Transient pressure UDF for parallel fluent
  #1
New Member
 
Join Date: Jun 2010
Posts: 5
Rep Power: 16
droberts is on a distinguished road
Hey,

I am trying to model resonance of a pipe using Fluent. In order to do this I am driving the flow with a transient pressure on one boundary using a UDF. I have managed to get this to work as a serial process, however I am now scaling up the grid and require this to run on a parallel system. Please can some one let me know how I can adapt the UDF below to run in parallel?

I have included the output from fluent in the attachment to show the error messages.

************************************************** ********
#include "udf.h" /* must be at the beginning of every UDF you write */

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

begin_f_loop(f, thread)
{
F_PROFILE(f, thread, position) = 3362*cos(6.28318531*1000*t); /*P=Acos(2pi*f*t)*/
}
end_f_loop(f, thread)
}
************************************************** ********

Thanks for any help.
Attached Files
File Type: txt output.txt (3.5 KB, 69 views)
droberts is offline   Reply With Quote

Old   June 29, 2010, 12:17
Default
  #2
Senior Member
 
dmoroian's Avatar
 
Dragos
Join Date: Mar 2009
Posts: 648
Rep Power: 20
dmoroian is on a distinguished road
You seem to use an interpreted udf.
There are few limitations when running interpreted udf's, so I suggest to compile it first.
By the way, I suspect that line 1 in your source is not "**************", because that would always result in a syntax error.
dmoroian is offline   Reply With Quote

Old   October 10, 2010, 10:05
Default UDF pressure
  #3
Senior Member
 
Shamoon Jamshed
Join Date: Apr 2009
Location: Karachi
Posts: 381
Rep Power: 18
Shamoon Jamshed is on a distinguished road
Send a message via Skype™ to Shamoon Jamshed
Hi, I also want to use the udf for pressure but the problem is that i dont have formula for it rather i have data at different time steps. How can I manage this data of pressure in the UDF? I have data of pressure like that

101325
100000
099999
099950
080000 and so on
Shamoon Jamshed is offline   Reply With Quote

Old   October 10, 2010, 11:39
Default
  #4
Senior Member
 
dmoroian's Avatar
 
Dragos
Join Date: Mar 2009
Posts: 648
Rep Power: 20
dmoroian is on a distinguished road
I think the simplest way would be to use a linear interpolation between your data and the CURRENT_TIME.
dmoroian is offline   Reply With Quote

Old   October 10, 2010, 13:13
Default
  #5
Senior Member
 
Shamoon Jamshed
Join Date: Apr 2009
Location: Karachi
Posts: 381
Rep Power: 18
Shamoon Jamshed is on a distinguished road
Send a message via Skype™ to Shamoon Jamshed
I didn't get your point, how come we can do this in UDF. Doesn't it require formula?
Shamoon Jamshed is offline   Reply With Quote

Old   October 11, 2010, 05:13
Default
  #6
Senior Member
 
dmoroian's Avatar
 
Dragos
Join Date: Mar 2009
Posts: 648
Rep Power: 20
dmoroian is on a distinguished road
Yes, you are right, you will need a formula.
An interpolation will give you that formula, for any set of discrete data.
I suggested a linear interpolation (spline linear interpolation - just to keep it simple).
Put that interpolation inside DEFINE_PROFILE, and you're done!
dmoroian is offline   Reply With Quote

Reply

Tags
parallel, transient bc, udf, unsteady


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
pressure inlet bc in fluent nikhil FLUENT 0 June 28, 2010 17:30
Parallelizing Transient UDF eliasmontoya FLUENT 2 October 20, 2009 10:47
UDF in Fluent subha_meter Main CFD Forum 0 October 18, 2009 00:54
UDF problem caused by various version of Fluent Yurong FLUENT 3 January 15, 2006 11:57
UDF in Fluent to Match Mass Flow at Pressure Outlet Jonas Larsson Main CFD Forum 1 April 29, 1999 11:44


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