CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   Robin B.C. (http://www.cfd-online.com/Forums/fluent/30020-robin-b-c.html)

Yu July 12, 2002 11:43

Robin B.C.
 
Hi,

I have a trouble with boundary condition.

I'm setting a system with Robin Boundary condition, which is mixing the Dilichlet and Neumann B.C.

I tried to using udf, but I couldn't do that.

Please find the problem for me

Thanks.

iker July 19, 2002 02:22

Re: Robin B.C.
 
Hi Sonnie..

I've already tried it.. I had a UDS with a RObin BC.. I'll send you the UDF I set as soon as possible.. I'm not in my usual working place..

i^ll do it before this we..

by..

iker

iker July 19, 2002 06:12

Re: Robin B.C.
 
/************************************************** *****************************/ /** UDF for Fibre's wall boundary condition. Mass transfer coefficient dependent.*/ /************************************************** *****************************/

#include "udf.h" #include "sg.h" #include "prop.h"

/* We define the flux across the wall.kw[cm/s]=5.0e-4 [cm/s] */

#define kw 5.e-8 #define rho 998.2 #define Pgi 200. #define Pgo 150. #define L 2.

/* Define which UDS defined to use */ enum {

PO2,

N_REQUIRED_UDS };

/* We'll use the PO2_source variable in fluent to define the source term */ /* this variable will appear in the Fluid panel, when we'll specify the */ /* source term (drop-down list under Source Terms in Fluid panel */

DEFINE_PROFILE(kw_3dtubebnc,thread, position) { real x[ND_ND]; real Pg_source=0.0; real z=0.0; real Pdot; face_t f; //Thread *tc0; //cell_t c0;

/*Define gas phase pressure as function on axial location */ /************************************************** *****************************/ /** UDF for Fibre's wall boundary condition. Mass transfer coefficient dependent.*/ /************************************************** *****************************/

#include "udf.h" #include "sg.h" #include "prop.h"

/* We define the flux across the wall.kw[cm/s]=5.0e-4 [cm/s] */

#define kw 5.e-8 #define rho 998.2 #define Pgi 200. #define Pgo 150. #define L 2.

/* Define which UDS defined to use */ enum {

PO2,

N_REQUIRED_UDS };

/* We'll use the PO2_source variable in fluent to define the source term */ /* this variable will appear in the Fluid panel, when we'll specify the */ /* source term (drop-down list under Source Terms in Fluid panel */

DEFINE_PROFILE(kw_3dtubebnc,thread, position) { real x[ND_ND]; real Pg_source=0.0; real z=0.0; real Pdot; face_t f; //Thread *tc0; //cell_t c0;

/*Define gas phase pressure as function on axial location */ /* x[2] represents the axial coordinate value, Z coordinate. */

begin_f_loop(f,thread)

{

cell_t c0=F_C0(f,thread);

Thread *tc0=THREAD_T0(thread);

F_CENTROID(x,f,thread);

z=x[2];

Pg_source=Pgi-((Pgi-Pgo)/L)*z;

F_PROFILE(f,thread,position)=rho*kw*(Pg_source-C_UDSI(c0,tc0,PO2));

Pdot=rho*kw*(Pg_source-C_UDSI(c0,tc0,PO2));

// printf("UDS_PO2= %f\n",C_UDSI(c0,tc0,PO2));

//printf("Pdot= %f\n",Pdot);

}

end_f_loop(f,thread)

}/* x[2] represents the axial coordinate value, Z coordinate. */

/************************************************** *****************************/ /** UDF for Fibre's wall boundary condition. Mass transfer coefficient dependent.*/ /************************************************** *****************************/

#include "udf.h" #include "sg.h" #include "prop.h"

/* We define the flux across the wall.kw[cm/s]=5.0e-4 [cm/s] */

#define kw 5.e-8 #define rho 998.2 #define Pgi 200. #define Pgo 150. #define L 2.

/* Define which UDS defined to use */ enum {

PO2,

N_REQUIRED_UDS };

/* We'll use the PO2_source variable in fluent to define the source term */ /* this variable will appear in the Fluid panel, when we'll specify the */ /* source term (drop-down list under Source Terms in Fluid panel */

DEFINE_PROFILE(kw_3dtubebnc,thread, position) { real x[ND_ND]; real Pg_source=0.0; real z=0.0; real Pdot; face_t f; //Thread *tc0; //cell_t c0;

/*Define gas phase pressure as function on axial location */ /* x[2] represents the axial coordinate value, Z coordinate. */

begin_f_loop(f,thread)

{

cell_t c0=F_C0(f,thread);

Thread *tc0=THREAD_T0(thread);

F_CENTROID(x,f,thread);

z=x[2];

Pg_source=Pgi-((Pgi-Pgo)/L)*z;

F_PROFILE(f,thread,position)=rho*kw*(Pg_source-C_UDSI(c0,tc0,PO2));

Pdot=rho*kw*(Pg_source-C_UDSI(c0,tc0,PO2));

// printf("UDS_PO2= %f\n",C_UDSI(c0,tc0,PO2));

//printf("Pdot= %f\n",Pdot);

}

end_f_loop(f,thread)

} begin_f_loop(f,thread)

{

cell_t c0=F_C0(f,thread);

Thread *tc0=THREAD_T0(thread);

F_CENTROID(x,f,thread);

z=x[2];

Pg_source=Pgi-((Pgi-Pgo)/L)*z;

F_PROFILE(f,thread,position)=rho*kw*(Pg_source-C_UDSI(c0,tc0,PO2));

Pdot=rho*kw*(Pg_source-C_UDSI(c0,tc0,PO2));

// printf("UDS_PO2= %f\n",C_UDSI(c0,tc0,PO2));

//printf("Pdot= %f\n",Pdot);

}

end_f_loop(f,thread)

}

moun139 May 27, 2012 04:19

Hi,

I want to introduce robin's boundary condition ,i wrote a UDF profile wich decrib it .When i interpreta it and hook it at wall boundary condition ,after lunch iteration ,fluent display : Error: Floating point error: invalid number ,and there is note a coenvergence.

Please what is the problem ,can you help me?

thx


All times are GMT -4. The time now is 15:37.