# Boundary condition

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 May 2, 2002, 01:55 Boundary condition #1 Srinivas Guest   Posts: n/a Hello, In order to set the boundary condition at inlet and outlet of porous media, I developed the following UDF's .But when I try to run the program it shows a segmntation violation.Could any body help in this matter. The condensed source code is as follows... DEFINE_ADJUST(in_outb,domain) { Thread *t; Thread *t0; Thread *t1; real y, dv,area,kf,kt,x[ND_ND],U; real ff,constt,l,Rep,Pr; face_t f; cell_t c,c0,c1; area = (20.346*(1-zeta)*pow(zeta,2))/Dp; dv = (4*zeta)/area; constt = 1.29*pow((dv/Dp),0.5); kf = zeta*0.0242; t = Lookup_Thread(domain,3); begin_f_loop(f, t) { real RE,PR; F_CENTROID(x,f,t); y=x[1]; l = 1 - (exp((-(y + 0.005))/(1.5*Dp))); U = sqrt(pow(F_V(f,t),2.)+pow(F_U(f,t),2.)); kt = 0.375*1.225*1006.43*U*Dp*l; Rep = (U*Dp*1.225)/(1.7894e-05); Pr = ((1.7894e-05)*1006.43)/0.0242; if(c0 = F_C0(f,t) && (t0 = t->t0)) C_T_G(c0,t0)[0]= 0; RE = pow(Rep,0.5); PR = pow(Pr,0.4); C_UDSI_G(c0,t0,0)[0] = (constt)*RE*PR*(kf+kt)*(F_UDSI(f,t,0) -300)/(dv*(1-zeta)*TKS); } end_f_loop(f, t) t = Lookup_Thread(domain,2);//outlet constt = -(0.2776); begin_f_loop(f, t) { real RE,PR; F_CENTROID(x,f,t); y=x[1]; l = 1 - (exp((-(y + 0.005))/(1.5*Dp))); U = sqrt(pow(F_V(f,t),2.)+pow(F_U(f,t),2.)); kt = 0.375*1.225*1006.43*U*Dp*l; Rep = (U*Dp*1.225)/(1.7894e-05); Pr = ((1.7894e-05)*1006.43)/0.0242; RE = pow(Rep,0.5); PR = pow(Pr,0.4); if(c0 = F_C0(f,t) && (t0 = t->t0)) C_T_G(c0,t0)[0]= 0; /*if(c1 = F_C1(f,t) && (t1 = t->t1)) C_T_G(c1,t1)[0] =0;*/ //F_T_G(f,t,0) = 0.0; C_UDSI_G(c0,t0,0)[0] = constt*(kf+kt)*RE*PR*(F_UDSI(f,t,0)-F_T(f,t))/Dp; } end_f_loop(f, t) } The source code works fine when I comment the gradient term of my UDS and the gradient of the fluid temperature.

 May 2, 2002, 19:45 Re: Boundary condition #2 Srinivas Guest   Posts: n/a Hello, I couold partially resolve the problem by making two DEFINE_PROFILE functions one for inlet and the other for oultlet, but when I use the UDF for outlet it gives me an segmentation violation. Could any body expound on how to use a UDF for outlet boundary condition. Srinivas

 Thread Tools Display Modes Linear Mode

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

 Similar Threads Thread Thread Starter Forum Replies Last Post HMR CFX 5 October 10, 2016 05:57 Thomas P. Abraham Main CFD Forum 20 July 7, 2013 05:05 Mukund Pondkule Main CFD Forum 0 March 16, 2011 04:23 yating9901 FLUENT 3 June 28, 2010 12:26 Peiyong FLUENT 1 November 10, 2006 12:44

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

 Contact Us - CFD Online - Privacy Statement - Top