CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

local thermal non equilibrium model in porous media

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 1, 2014, 15:00
Default local thermal non equilibrium model in porous media
  #1
Member
 
ad
Join Date: Apr 2014
Posts: 75
Rep Power: 12
adi.ptb is on a distinguished road
hi guys,im simulating a 2D transient problem,i have 9 different faces,i need to simulate 3 of these faces as a porous media using thermal non equilibrium model,and im using fluent6.3.26 and ansys fluent 15.0,fluent15 support the ltne model but its so heavy and slow,but fluent 6.3 is 2 times faster than fluent 15,my problem will take 17 days to reach the periodic state with fluent 6.3 (so 34 days with fluent 15.0),so i want to use fluent6.3 in order to reduce the time,going to the details of my problem i have to say that my porous solids are copper and steel and my working fluid is helium,and my solid walls are also copper and steel in non-porous zones,i have written some udf's and uds's to model the ltne in porous zones,but i dont know how to implement my codes,(specially the solid source term and solid diffusivity),i wonder if someone would help me,here is my code:
/********************************************/
/* user defined functions(UDFs) for LTNE MODEL */
#include "udf.h"
/******************************************/
/* Global definitions ***/
/************************************************** ***/
/****************** constants********************/
/* particle diameter (m)*/ #define dp 27.9e-6
/* porosity */ #define porosity 0.696
/* hydraulic diameter(m)*/ #define dh (porosity*dp)/(1.0-porosity)
/* c5,c6 copper thermal conductivity constants*/ #define c5 638.3495
/**********************************************/ #define c6 -0.0815
/* c7,c8 steel thermal conductivity constants*/ #define c7 1871.0374
/**********************************************/ #define c8 -0.5522
/****************** porous media:constants/functions for solid diffusivity******************/
#define COPPER_SOLID_DENSITY(T) 8933.0
#define COPPER_SOLID_THERMAL_COND(T) c5*pow(T,c6)
#define COPPER_SOLID_CP(T) 385.0
#define STEEL_SOLID_DENSITY(T) 7870.0
#define STEEL_SOLID_THERMAL_COND(T) c7*pow(T,c8)
# define STEEL_SOLID_CP(T) 447.0
/************************************************** *****************************/
/* Definition of user defined scalars (UDS) */
/************************************************** *********************/
enum
{
/*0*/ SOLID_TEMP, /*UDS for solid temperature*/

};
/************************************************** **********/
/** Diffusivity for UDS(SOLID_TEMP)*****************/
DEFINE_DIFFUSIVITY(UDS_diff_copper,cell,thread,i)
{
real source_copper,Ts,k_copper,rho_copper,cp_copper;
if(i==SOLID_TEMP)
{
Ts=C_UDSI(cell,thread,SOLID_TEMP);
k_copper=COPPER_SOLID_THERMAL_COND(Ts)*(1.0-porosity);
rho_copper=COPPER_SOLID_DENSITY(Ts)*(1.0-porosity);
cp_copper=COPPER_SOLID_CP(Ts);
source_copper=(k_copper)/(rho_copper*cp_copper);
}
else source_copper=0;
return source_copper;
}
DEFINE_DIFFUSIVITY(UDS_diff_steel,cell,thread,i)
{
real source_steel,Ts,k_steel,rho_steel,cp_steel;
if(i==SOLID_TEMP)
{
Ts=C_UDSI(cell,thread,SOLID_TEMP);
k_steel=STEEL_SOLID_THERMAL_COND(Ts)*(1.0-porosity);
rho_steel=STEEL_SOLID_DENSITY(Ts)*(1.0-porosity);
cp_steel=STEEL_SOLID_CP(Ts);
source_steel=(k_steel)/(rho_steel*cp_steel);
}
else source_steel=0;
return source_steel;
}
/************************************************** ***/
/* Helium properties ***/
/************************************************** ******/
/** Dynamic viscosity************************/
DEFINE_PROPERTY(helium_viscosity,cell,thread)
{
real mu,c1,c2,T;
c1=3.9928e-7;
c2=0.6853;
T=C_T(cell,thread);
mu=c1*pow(T,c2);
return mu;
}
/**Thermal conductivity of helium******************/
DEFINE_PROPERTY(helium_thermal_conductivity,cell,t hread)
{
real kh,c3,c4,T;
c3=2.3715e-3;
c4=0.7294;
T=C_T(cell,thread);
kh=c3*pow(T,c4);
return kh;
}

/************************************************** ******************/
/* Heat Transfer */
/************************************************** *****************/
/** Heat transfer coefficient between Solid and Gas *******************/
real HTC_solid_gas(cell_t cell,Thread*thread)
{
real Nu,Re,Pe,Pr,Us,hsf,asf,hv;
/* calculate superficial velocity*/
Us=sqrt(pow(C_U(cell,thread),2.0)+pow(C_V(cell,thr ead),2.0));
/* calculate Reynolds number*/
Re=Us*dh*C_R(cell,thread)/helium_viscosity(cell,thread);
/* calculate Prandtl number*/
Pr=C_CP(cell,thread)*helium_viscosity(cell,thread)/helium_thermal_conductivity(cell,thread);
/* calculate peclet number*/
Pe=Re*Pr;
/*calculate nusslet number*/
Nu=(1.0+((0.99)*(pow(Pe,0.66))))*pow(porosity,1.79 );
/* calculate HTC*/
asf=(4.0*porosity)/dh;
hsf=(Nu*C_K_L(cell,thread))/dh;
hv=hsf*asf;
return hv;
}
/** Heat source fluid **************************/
DEFINE_SOURCE(SRCE_fluid_heat,cell,thread,dS,eqn)
{
real hv,Ts,T,source;
hv=HTC_solid_gas(cell,thread);
Ts=C_UDSI(cell,thread,SOLID_TEMP);
T=C_T(cell,thread);
source=hv*(Ts-T);
dS[eqn]=-hv;
return source;
}
/** Heat source solid****************/
DEFINE_SOURCE(SRCE_solid_heat,cell,thread,dS,eqn)
{
real hv,Ts,T,source;
hv=HTC_solid_gas(cell,thread);
Ts=C_UDSI(cell,thread,SOLID_TEMP);
T=C_T(cell,thread);
source=-hv*(Ts-T);
dS[eqn]=-hv;
return source;
}
adi.ptb is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiphase Porous Media Flow - Convergence Issues VT_Bromley FLUENT 7 May 14, 2020 16:34
Porous media setup issues in Fluent Bernard Van FLUENT 29 January 26, 2017 04:09
Upgraded from Karmic Koala 9.10 to Lucid Lynx10.04.3 bookie56 OpenFOAM Installation 8 August 13, 2011 04:03
turbulence model in porous media zhzhguo FLUENT 2 November 1, 2004 07:10
porous media: Fluent or Star-CD? Igor Main CFD Forum 0 December 5, 2002 15:16


All times are GMT -4. The time now is 04:49.