# Uds boundary flux

 Register Blogs Members List Search Today's Posts Mark Forums Read January 11, 2022, 14:43 Uds boundary flux #1 New Member   goksu Join Date: Jan 2022 Posts: 3 Rep Power: 3 Hello! I have to define the boundary condition of my UDS (Φ) as Specified Flux at the pipe wall. The flux is -f(T)*Φ*∂T/∂r where f is just a function dependent on temperature. To retrieve the temperature gradient at the face boundary, I have used the following approximation: (∂^2T/∂r^2)_cell = ( (∂T/∂r)_face - (∂T/∂r)_cell ) / (r_face - r_cell ) this corresponds to : (∂T/∂r)_face = C_UDSI(c0,t0,3)+dr0*C_UDSI_G(c0,t0,3) Bcs my C_UDSI(c0,t0,3) stored the temperature gradient. But this code gives fatal error. Could you please help me? Where am I doing wrong? #include "udf.h" DEFINE_PROFILE(my_wall_flux, thread, position) { face_t f; Thread *t0; cell_t c0; real dr0[ND_ND]; real T, alpha, beta, k_w, mu_w, k_p, Dt; begin_f_loop (f,thread) { c0 = F_C0(f,thread); t0 = THREAD_T0(thread); C_UDSI(c0,t0,3) = C_T_G(c0,t0); T = F_T(f,thread); alpha = 1e-9; beta = -6.3516e-5 + 1.6839e-5*(T-273.15) - 1.9824e-7*(T-273.15)*(T-273.15) + 1.6867e-9*(T-273.15)*(T-273.15)*(T-273.15) - 5.7744e-12*(T-273.15)*(T-273.15)*(T-273.15)*(T-273.15); k_w = 0.5609 - 1.9488e-3*(T-273.15) - 1.0133e-6*(T-273.15)*(T-273.15) - 1.2840e-7*(T-273.15)*(T-273.15)*(T-273.15) + 6.2118e-10*(T-273.15)*(T-273.15)*(T-273.15)*(T-273.15); mu_w = 1.7825e-3 - 5.8439e-5*(T-273.15) + 1.2592e-6*(T-273.15)*(T-273.15) - 1.6986e-8*(T-273.15)*(T-273.15)*(T-273.15) + 1.2480e-10*(T-273.15)*(T-273.15)*(T-273.15)*(T-273.15) - 3.7458e-13*(T-273.15)*(T-273.15)*(T-273.15)*(T-273.15)*(T-273.15); k_p = 5.5 + 34.5*exp(-0.0033*T); Dt = alpha*beta*k_w/(mu_w*(2*k_w+k_p)); F_PROFILE(f,thread,position) = -Dt*F_UDSI(f,thread,0)*(C_UDSI(c0,t0,3)+dr0*C_UDSI_G(c0,t0,3)); } end_f_loop (f,t) }  Tags boundary, define_profile, flux, specified flux, uds Thread Tools Search this Thread Show Printable Version Email this Page Search this Thread: Advanced Search Display Modes Linear Mode Switch to Hybrid Mode Switch to Threaded 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 Off Pingbacks are On Refbacks are On Forum Rules Similar Threads Thread Thread Starter Forum Replies Last Post Nadun19 FLUENT 0 June 23, 2017 01:38 Mmaragann CFX 5 January 20, 2017 10:20 mshahed91 CFX 3 January 10, 2015 11:19 IndrajitW Fluent UDF and Scheme Programming 3 January 30, 2013 02:08 Mark CFX 6 November 15, 2004 15:55

All times are GMT -4. The time now is 16:59.