|
[Sponsors] |
April 17, 2007, 07:06 |
user defined function
|
#1 |
Guest
Posts: n/a
|
Hello!
I have to modify the heat transfer coefficient function but I don't understand how to do that. You will find here below what I have to program in C. My questions are : 1. How can I get the variables used in Fluent ? The variables I need are defined here below in VARIABLES FROM FLUENT. 2. How must I define my new heat transfer coefficient function in my program ? 3. How can I use my program in Fluent? Thanks for your help, Thomas Lescot double H; /*Heat transfer coefficient in Fluent*/ /*------------------- VARIABLES FROM FLUENT -------------*/ u_g /* gas velocity - vector [m/s] */ u_m /* solid velocity - vector [m/s] */ double dp ;/* particle diameter [m] */ double epsilon_g ; /* void fraction [-] */ double rho_g ; /* gas density [kg/m³g] */ double rho_m ; /* solid density [kg/m³s] */ double cp_g ; /* specific heat of fluid [kJ/kg*K] */ double mu_g ; /* dynamic viscosity of the gas [kg/m*s] */ double k_g ; /* thermal conductivity [kJ/m*s*K] */ /*-------------------------------------------------------*/ /*-------------------- NEW VARIABLES --------------------*/ double PI = 3.1415926 ;/* pi */ double g = 9.81 ; /* gavity */ double w_g ; /* norme de u_g */ double w_m ; /* norme de u_m */ double a_m ; /* external surface of a particle */ double G ; /* superficial mass flow velocity */ double j_h ; /* Jh factor */ double hf ; /* heat transfer coefficient for film surrounding a particle */ double pr_g ; /* Prandtl number */ /*-------------------------------------------------------*/ /*-------------------------- PROGRAM --------------------*/ /*external surface of a particle*/ a_m = 4*PI*pow(dp/2,2); /*superficial mass flow velocity*/ w_g = sqrt(pow(u_g[0],2)+pow(u_g[1],2)+pow(u_g[2],2)); w_m = sqrt(pow(u_m[0],2)+pow(u_m[1],2)+pow(u_m[2],2)); G = epsilon_g*rho_g*(w_g-w_m) ; /*Jh factor*/ j_h = 0.0043*pow((dp*g*(rho_m-rho_g)*pow((1-epsilon_g),2)/(pow((epsilon_g*w_g),2)*rho_g)),0.25); /* heat transfer coefficent for film surrounding a particle */ pr_g = mu_g*cp_g/k_g; h = j_h*cp_g*G/pow(pr_g,2/3); /*heat transfer coefficient*/ H = h*a_m; |
|
May 4, 2007, 11:13 |
user defined function
|
#2 |
Guest
Posts: n/a
|
hello, i want to write a UDF for CG motion in dynamic mesh so that my mesh moves with the oscillation of the body that means remeshing.please help me in writing UDF thank you
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
LiencubiclowRemodel | nzy102 | OpenFOAM Bugs | 14 | January 10, 2012 09:53 |
OpenFOAM static build on Cray XT5 | asaijo | OpenFOAM Installation | 9 | April 6, 2011 13:21 |
ParaView for OF-1.6-ext | Chrisi1984 | OpenFOAM Installation | 0 | December 31, 2010 07:42 |
User defined function - CO level | hari | FLUENT | 0 | October 24, 2007 01:11 |
Help: user defined function | alice | FLUENT | 3 | December 13, 2000 01:10 |