|
[Sponsors] |
January 11, 2022, 15:43 |
Uds boundary flux
|
#1 |
New Member
goksu
Join Date: Jan 2022
Posts: 3
Rep Power: 4 |
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[1]*C_UDSI_G(c0,t0,3)[1] 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)[1]; 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[1]*C_UDSI_G(c0,t0,3)[1]); } end_f_loop (f,t) } |
|
Tags |
boundary, define_profile, flux, specified flux, uds |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Flux boundary condition for UDS | Nadun19 | FLUENT | 0 | June 23, 2017 02:38 |
Out File does not show Imbalance in % | Mmaragann | CFX | 5 | January 20, 2017 11:20 |
Waterwheel shaped turbine inside a pipe simulation problem | mshahed91 | CFX | 3 | January 10, 2015 12:19 |
Flux boundary condition for UDS equation | IndrajitW | Fluent UDF and Scheme Programming | 3 | January 30, 2013 03:08 |
Convective Heat Transfer - Heat Exchanger | Mark | CFX | 6 | November 15, 2004 16:55 |