Transient pressure UDF for parallel fluent
1 Attachment(s)
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. 
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. 
UDF pressure
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 
I think the simplest way would be to use a linear interpolation between your data and the CURRENT_TIME.

I didn't get your point, how come we can do this in UDF. Doesn't it require formula?

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! 
All times are GMT 4. The time now is 12:59. 