CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (http://www.cfd-online.com/Forums/fluent-udf/)
-   -   How to show the properties in the specific zone ID using UDF (Define_adjust) (http://www.cfd-online.com/Forums/fluent-udf/70998-how-show-properties-specific-zone-id-using-udf-define_adjust.html)

sagga18 December 11, 2009 12:58

How to show the properties in the specific zone ID using UDF (Define_adjust)
 
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)
}

dmoroian December 12, 2009 03:52

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)
  }


sagga18 December 12, 2009 17:01

To dmoroian, I thank you for your help. It is what I want.
Thank you so much

Sagga


All times are GMT -4. The time now is 18:26.