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

How to show the properties in the specific zone ID using UDF (Define_adjust)

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree2Likes
  • 1 Post By sagga18
  • 1 Post By dmoroian

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 11, 2009, 12:58
Default How to show the properties in the specific zone ID using UDF (Define_adjust)
  #1
New Member
 
Suabsakul Gururatana
Join Date: Dec 2009
Posts: 4
Rep Power: 16
sagga18 is on a distinguished road
Hi all

I am a UDF & Fluent beginner. Now, I focus the conjugate heat problem.

I am studying the 2D channel flow with conduction from channel’s wall.
My objective, I needed to know the heat flux in x direction (streamwise), and then I created a interior boundary condition (edge). And I knew the zone ID number.

This interior line could show me a temperature profile; then I was using the lookup_thread (thread pointer to ID zone) for showing the temperature every iteration.

Problem is that in an example, it can show the coordinate x, y, but I need to see the temperature on my specific zone ID. I really need someone to help me.

Thanks in advance.


Sagga


This is the code

#include "udf.h"


DEFINE_ADJUST(print_f_centroids, domain,t)
{
real FC[2];
face_t f;
int ID = 11;
Thread *thread = Lookup_Thread(domain, ID);
begin_f_loop(f, thread)
{
F_CENTROID(FC,f,thread);
printf("x-coord = %f ,y-coord = %f \n",FC[0], FC[1]);
}
end_f_loop(f,thread)
}
mmhk@kth.se likes this.
sagga18 is offline   Reply With Quote

Old   December 12, 2009, 03:52
Default
  #2
Senior Member
 
dmoroian's Avatar
 
Dragos
Join Date: Mar 2009
Posts: 648
Rep Power: 20
dmoroian is on a distinguished road
Code:
  #include "udf.h"
  
  
  DEFINE_ADJUST(print_f_centroids, domain,t)
  {
   real FC[2];
   face_t f;
   int ID = 11; 
       Thread *thread = Lookup_Thread(domain, ID);
     begin_f_loop(f, thread)
          {
                F_CENTROID(FC,f,thread);
        printf("x-coord = %f,\ty-coord = %f ,\tT = %f\n",FC[0], FC[1], F_T(f,thread)); 
     }
       end_f_loop(f,thread)
  }
mmhk@kth.se likes this.
dmoroian is offline   Reply With Quote

Old   December 12, 2009, 17:01
Default
  #3
New Member
 
Suabsakul Gururatana
Join Date: Dec 2009
Posts: 4
Rep Power: 16
sagga18 is on a distinguished road
To dmoroian, I thank you for your help. It is what I want.
Thank you so much

Sagga
sagga18 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Calculation of the Governing Equations Mihail CFX 7 September 7, 2014 07:27
Two-Phase Buoyant Flow Issue Miguel Baritto CFX 4 August 31, 2006 13:02
UDF, UDF, UDF, UDF Luc SEMINEL Main CFD Forum 0 November 25, 2002 05:01
Accessing material properties in UDF Henrik Widell FLUENT 0 March 18, 2002 10:49
specific heat in UDF gino FLUENT 3 November 23, 2001 00:16


All times are GMT -4. The time now is 00:41.