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

How Ansys Flunet Calculte the Wall Heat Flux?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 24, 2023, 23:21
Lightbulb How Ansys Flunet Calculate the Wall Heat Flux?
  #1
New Member
 
Join Date: May 2022
Posts: 3
Rep Power: 4
eddie4160 is on a distinguished road
Hi all, I am currently working on a simulatoin case of "crossflow over a tube", the shematic geometry and boundary conditions are shown in following figure

https://www.dropbox.com/scl/fi/c0082...lcznbc3jp&dl=0

- Introduction -
I've develpoed a mathematical model ( in-house code ) to simulate the heat transfer of the tube solid region including external flow ( see above figure ) and aim to couple it with Ansys Fluent. The in-house code require the outer wall heat flux from Ansys Fluent as the boundary conditions.

- How I calculate the outer wall heat flux using UDF -
The whole process is control by DEFINE_ON_DEMAND ( a macro in UDF ) which is a general-purpose macro in Ansys Fluent. I calculate the outer wall heat flux as below:

https://www.dropbox.com/scl/fi/mhli8...71jx2s6zw&dl=0

Using right hand side of Eq. (1) in above figure, the snippet of code see
Code:
        // Phase domain
        Domain *domain = Get_Domain(1) ;

        // The ID of the BC created in ANSYS Fluent
        const int wall_ID = 21 ;

        // Get the thread from the domain, the thread is partitioned
        Thread *f_thread = Lookup_Thread( domain, wall_ID ) ;
        
        // Create face ID
        face_t f_ID ;
        
        /* Adjacent cell information */

        // adjacent cell index of the boundary face
        cell_t c0 ;  

        // thread index of adjacent cell
        Thread *t0 ; 
        
        // xf represents facets location array and xc is cell center locatoin array
        real xf[ND_ND] ;
        real xc[ND_ND] ;

        begin_f_loop( f_ID, f_thread )
        {
            /* Get the cell center 
            F_CENTROID( xf, f_ID, f_thread ) ;
   
            /* Get the cell id of the cell adjacent to the face*/
            c0 = F_C0( f_ID, f_thread ) ;         
            
            /* Get the Thread id of the cells adjacent to the face*/
            t0 = F_C0_THREAD( f_ID, f_thread ) ; 
            
            C_CENTROID( xc, c0, t0 ) ;

            /* dx is ignored because the cell center and face center are align in radial direction
            double dy = abs(xc[1] - xf[1]) ;
            double dz = abs(xc[2] - xf[2]) ;
            double dr = sqrt(dy*dy+dz*dz)  ;

            // Calculate the surface heat flux, k_f * (T_cell - T_face ) / dr
            q_array[ f_ID ] = C_K_L(c0, t0) * (C_T(c0, t0) - F_T(f_ID, f_thread)) / dr ; // C_K_L(c0, t0) is the UDF macro return fluid thermal conductivity
        }
        end_f_loop( f_ID, f_thread )
- Main Issue -
The difference between the outer wall heat flux calcuted by UDF and from Ansys ( using built-in function on GUI, File->export->solution data->Total Surface Heat Flux ) are shown below

https://www.dropbox.com/scl/fi/yva9r...xpomlujum&dl=0

The outer wall heat flux is represented in 2D and θ=180° is bottom region of the tube. Refer to the figure, most of the error occurs at θ=120°~240° and the maximum error of 5.33%.

Does anyone have any experience with this? I would appreciate your advice and suggestions.

Last edited by eddie4160; October 25, 2023 at 14:42.
eddie4160 is offline   Reply With Quote

Reply

Tags
fluent, heat flux udf


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[snappyHexMesh] How to draw a 3D-Drawing for Meshing Kahnbein.Kai OpenFOAM Meshing & Mesh Conversion 4 June 15, 2021 13:16
Ansys CFD-Post Application Error rushiCFD FLUENT 0 March 21, 2021 08:51
Difficulty In Setting Boundary Conditions Moinul Haque CFX 4 November 25, 2014 18:30
wall heat flux in openfoam hz283 OpenFOAM 1 January 4, 2014 08:51
Concentric tube heat exchanger (Air-Water) Young CFX 5 October 7, 2008 00:17


All times are GMT -4. The time now is 22:57.