CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Fluent variables (https://www.cfd-online.com/Forums/fluent/43722-fluent-variables.html)

HSeldon February 12, 2007 13:56

Fluent variables
 
Hi all, I need to get the values of the lift and grad coeff in order to complete an UDF. What are the name for those variables to include them in my UDF??

Thanks in advance.

Rizwan February 12, 2007 22:31

Re: Fluent variables
 
Can u please be a bit more elobarate? As far as I can guess, if u need to calculate drag force, then u need to find pressure distrution on the surface or region and multiply it with area vector.

force = 0.0 begin_f_loop (f, t)

{

F_AREA (A, f, t);

force = force + F_P (f, t) * NV_MAG (A);

} end_f_loop (f, t)


HSeldon February 13, 2007 10:04

Re: Fluent variables
 
Sorry for been so "short" in my explanation. Yes, basically I need what you put. Because I need to write into a file the Cd and/or Cl value to a txt. I know that fluent can do it, but this excersise is for college in order to practice C language and UDF stuff.

Regarding the code you put above: What F_P does? (pressure?)

Thank you for the input Rizwan!!

Rizwan February 13, 2007 12:44

Re: Fluent variables
 
F_P is the built in macro that will find pressure on the face and is available from solver whenevr it is called from the udf.

Regards

HSeldon February 13, 2007 13:14

Re: Fluent variables
 
Thank you very much!


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