没有合适的资源?快使用搜索试试~ 我知道了~
首页CFD论坛 —双能量方程
资源详情
资源评论
资源推荐

For those interested in some code for scalar transport eqns under Fluent v5 here's
some examples. . . I developed this for solving heat transfer between fluid and a
packed bed solid (after a few weeks I moved to Fluent v4.5 which is better for this
application).
Anyway this should allow you to solve for solid phase temperature as a scalar
transport eqn as a special user porous media model assuming a packed bed of spheres.
I've cut down the code so it may or may not compile and I don't provide any
guarantees . . it may be more confusing than helpful!!!
But if you play around I think you can get it to work - once compiled - use makefiles -
don't think it will work under interpreted mode (but try??) - then link the source terms
to the appropriate Fluent eqn. That's about it.
Unfortunately, if it doesn't work/doesn't work for you I can't provide detailed
responses to questions - sorry.
A bit on how it works: it uses two main UDS's - ZETA = local porosity and
SOLID_TEMP for local solid temperature. ZETA just stores the value, SOLID_TEMP
can be solved for. Another six UDS are required for other debug type results that I
found useful. So in total declare space for 8 UDS, but only solve for SOLID_TEMP -
turn off solution of all others. (with mods you can update ZETA due to reaction for
example) I would use the UDMI function in 5.4.8 for storing values at cells - but that
wasn't available until recently.
There are source terms for momentum - SRCE_Xmon etc. - these calculate the drag
due to the solid spheres on the fluid phase using the Ergun eqn. Link these into the
fluid domain sections in the Boundary Conditions panel.
There are source terms for energy - fluid and solid - this just calculates the interphase
heat transfer with a HTC correlation. Link these as source terms for fluid energy as
solved by Fluent and the SOLID_TEMP UDS. If you solve steady probs there's really
no point for this.
Use the diffusivity routine to tell Fluent how to calculate the diffusivity for your
UDS's. This only calculates for the SOLID_TEMP eqn where it uses alpha =
k/rho*Cp = thermal diffusivity.
You can use the init routine to help initialise the domain but will need mods
depending on what you try out. Then set some b/cs - note to set also your
SOLID_TEMP UDS b/c on each boundary - otherwise your solid temp will be 0
Kelvin which is not realistic!!!
Greg Perkins

ps: if you want to use a variable porosity use Fluent v4.5 - its toooo hard to implement
in Fluent v5.x
/**************************************************
**********************/ /* Reaction Module Source Code */ /* */ /* By Greg
Perkins */ /* CANCES, Australian Technology Park */ /* Ph: 02 9318 0004, Fax: 02
9319 2328 */ /* Email: perkinsg@cances.atp.com.au */ /* */ /* Started: 03-01-2000 */
/* */ /* Revisions: */ /* */ /* 14-02-2000
(i) Solid phase temperature and UDS
(ii) General species structure, material properties and reactions */
/**************************************************
**********************/
/* ---- These routines implement a hetrogeneous reaction model for the
combustion and gasification reactions of carbon together with a
porous media model */
#include "udf.h" #include "sg.h"
/* ------------------------ REACTION MODEL DEFINES --------------------- */
#define PI 3.141592654 #define KJCAL 4.184 #define UNIVERSAL_GAS_CONST
8.314 /* -- [J/mol-K] */
#define SOLID_DENSITY(T) 1200 /* -- Coal material density [kg/m3] */ #define
SOLID_THERMAL_COND(T) 1.47/1.0*pow(T/273,0.5)
/* -- Hobbs et al. 1993, [W/m-K] */ #define SOLID_CP(T)
3000.0*UNIVERSAL_GAS_CONST/12.0*(exp(1200/T)/pow((exp(1200/T)-1)*T/
1200,2.0))
/* -- Hobbs et al. 1993, [J/kg-K] */
#define alpha_s 0.5 /* -- fraction of energy released in solid phase */ #define alpha_f
0.5 /* -- fraction of energy released in fluid phase */
#define ZETA_CO 0.8 /* -- Initial coal vol. frac. */ #define ZETA_VO 0.2 /* -- Initial
void vol. frac. */ #define R_CO 0.01 /* -- Initial coal particle radius [m] */

#define ZETA_MAX 0.95 /* -- Maximum porosity without checks */ #define
DTHI_MAX -1.0e30
#define PERM_EXP_VOID 25.0 #define TEMP_KELVIN 0 #define TEMP_DEGC 1
#define TREF 273.0
/* -------------------- POROUS MEDIA MODEL DEFINES --------------------- */
/* ---- use a user defined scalar to track material properties of the domain */ enum
{ ZETA, SOLID_TEMP, SRCE_SOLID, SRCE_FLUID, DTEMP, DZETA, THI, RE,
N_REQUIRED_UDS };
/* ------------------------------------------------------------------------
Material Properties
This routine returns the local properties of the material (C2,C2) for
a given cell in the domain.
1. CHECK IMPLEMENTATION
------------------------------------------------------------------------ */ void
Material_Properties(cell_t c, Thread *t, real *C1, real *C2) {
real zeta, zeta3, temp1;
/* --- use this routine to return the permeability, alpha and the
co-efficient C2, for each location x,y,z in the domain. No
Modifications needed for 2D. For time dependent porous media
use the RP_Get_Real("flow time") function to find out t (secs) */
zeta = C_UDSI(c,t,ZETA);
zeta3 = pow(zeta,3.0);
temp1 = pow((1.0-((zeta-ZETA_VO)/ZETA_CO)),(1.0/3.0));
temp1 = 1.0; /* ---- Dp fixed */
剩余10页未读,继续阅读


















安全验证
文档复制为VIP权益,开通VIP直接复制

评论0