CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > FLUENT

Robin B.C.

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   July 12, 2002, 11:43
Default Robin B.C.
  #1
Yu
Guest
 
Posts: n/a
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.
  Reply With Quote

Old   July 19, 2002, 02:22
Default Re: Robin B.C.
  #2
iker
Guest
 
Posts: n/a
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
  Reply With Quote

Old   July 19, 2002, 06:12
Default Re: Robin B.C.
  #3
iker
Guest
 
Posts: n/a
/************************************************** *****************************/ /** 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)

}
  Reply With Quote

Old   May 27, 2012, 04:19
Default
  #4
New Member
 
moon
Join Date: Feb 2012
Posts: 22
Rep Power: 5
moun139 is on a distinguished road
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
moun139 is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Robin B.C=Mixed B.C ? ksookhak OpenFOAM Running, Solving & CFD 5 January 12, 2011 11:33
Urgent! Help on UDF to set B.C. of 3rd type Ray Hong FLUENT 0 December 28, 2005 20:35
How to set B.C. of the 2nd or 3rd type in UDS? Ray Hong FLUENT 0 December 28, 2005 07:03
Robin B.C. yu Phoenics 0 July 16, 2002 06:39
Non-Reflecting B.C. in NSC2KE Zou Chu Main CFD Forum 2 May 27, 1999 21:26


All times are GMT -4. The time now is 06:38.