CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   udf please (

vijay April 7, 2006 05:02

udf please

Can anybody tell me how to write a udf for pressure changing with time? It is an unsteady formulation problem.

Dan April 7, 2006 06:49

Re: udf please
If it's a basic function of t at an inlet you could use something like:

#include "udf.h"

DEFINE_PROFILE(inlet_x1_pressure, thread, index) { face_t f; real t = RP_Get_Real("flow-time");

begin_f_loop (f,thread) {

F_PROFILE(f,thread,index) = (some function of t) }

vijay April 7, 2006 06:57

Re: udf please

Could you please elaborate your explanation. I could not understand.

Dan April 7, 2006 08:25

Re: udf please
It depends on how your inlet varies with time, does it obey an algebraic function or have you just got values at different points in time?

vijay April 7, 2006 23:48

Re: udf please

I found the problem and I could rectify it. Thanks for ur help.

All times are GMT -4. The time now is 13:09.