|
[Sponsors] |
June 29, 2010, 09:05 |
Transient pressure UDF for parallel fluent
|
#1 |
New Member
Join Date: Jun 2010
Posts: 5
Rep Power: 16 |
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. |
|
June 29, 2010, 12:17 |
|
#2 |
Senior Member
Dragos
Join Date: Mar 2009
Posts: 648
Rep Power: 20 |
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. |
|
October 10, 2010, 10:05 |
UDF pressure
|
#3 |
Senior Member
|
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 |
|
October 10, 2010, 11:39 |
|
#4 |
Senior Member
Dragos
Join Date: Mar 2009
Posts: 648
Rep Power: 20 |
I think the simplest way would be to use a linear interpolation between your data and the CURRENT_TIME.
|
|
October 10, 2010, 13:13 |
|
#5 |
Senior Member
|
I didn't get your point, how come we can do this in UDF. Doesn't it require formula?
|
|
October 11, 2010, 05:13 |
|
#6 |
Senior Member
Dragos
Join Date: Mar 2009
Posts: 648
Rep Power: 20 |
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! |
|
Tags |
parallel, transient bc, udf, unsteady |
|
|
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 |