CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (http://www.cfd-online.com/Forums/fluent-udf/)
-   -   UDF basics - boundary conditions (http://www.cfd-online.com/Forums/fluent-udf/108285-udf-basics-boundary-conditions.html)

CMA October 18, 2012 11:31

UDF basics - boundary conditions
 
Hi,
I'm new to writing UDFs for Fluent 6.3.

I am trying to write a UDF for a Velocity Inlet boundary condition. For every time step, I want this boundary condition to be updated to a new temperature (same velocity). The new updated value should be a function of the average temperature of all cell faces in another boundary that is updated with a new calculated value at every time step.

Summary of what i want to write: T1(t) = f ( face_temp_average( T2(t) ) )

I do not know what define macro I should be using for the temperature update, how I can get the average of all faces on a face thread, and finally how I can call the values of another boundary when writing a UDF for a boundary condition.

I would reaeaealy appriciate it if someone can give me some help on this. Even some names of the macros I should be learning about helps.

Thanks

eng_s_sadeghi October 20, 2012 13:25

Hi.
You should first write a UDF to loop around the cell thread to calculate the average temperature. Then use the average in inlet profile.

CMA October 22, 2012 12:33

Quote:

Originally Posted by eng_s_sadeghi (Post 387677)
Hi.
You should first write a UDF to loop around the cell thread to calculate the average temperature. Then use the average in inlet profile.


Thank you so much for your reply. Now, how do I refer to another boundary condition when I am writing my UDF for velocity inlet boundary condition. I mean do boundary conditions have numbers or names so that I can use their name when using them in my UDF?


All times are GMT -4. The time now is 02:20.