|
[Sponsors] |
July 12, 2002, 11:43 |
Robin B.C.
|
#1 |
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. |
|
July 19, 2002, 02:22 |
Re: Robin B.C.
|
#2 |
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 |
|
July 19, 2002, 06:12 |
Re: Robin B.C.
|
#3 |
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) } |
|
May 27, 2012, 04:19 |
|
#4 |
New Member
moon
Join Date: Feb 2012
Posts: 26
Rep Power: 14 |
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 |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Robin B.C=Mixed B.C ? | ksookhak | OpenFOAM Running, Solving & CFD | 5 | January 12, 2011 10:33 |
Urgent! Help on UDF to set B.C. of 3rd type | Ray Hong | FLUENT | 0 | December 28, 2005 19:35 |
How to set B.C. of the 2nd or 3rd type in UDS? | Ray Hong | FLUENT | 0 | December 28, 2005 06: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 |