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

retrieve, access flow variables on interior boundary

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By macfly

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   January 22, 2013, 01:34
Default retrieve, access flow variables on interior boundary
  #1
Senior Member
 
François Grégoire
Join Date: Jan 2010
Location: Canada
Posts: 392
Rep Power: 17
macfly is on a distinguished road
Hi all,

I'm looking for a way to retrieve temperature data along an interior boundary in a simple pipe flow. See figures 1 and 2, I would like to retrieve the temperature along the interior boundary ID 30. Figure 1 shows the location of the interior boundary, and figure 2 shows the mesh in this region. Here's my udf:

#include "udf.h"
DEFINE_ADJUST(Tint, domain)
{
real T=0;
cell_t c;
int ID = 30;
Thread *thread = Lookup_Thread(domain, ID);
begin_c_loop(c, thread)
{
T = C_T(c,thread);
printf("Température = %.4f\n", T);
}
end_c_loop(f,thread)
}

Which produces the following error messages when I start calculation:

FLUENT received fatal signal (ACCESS_VIOLATION)
1. Note exact events leading to error.
2. Save case/data under new name.
3. Exit program and restart to continue.
4. Report error to your distributor.
Error Object: #f


I understand that the temperature is defined on boundaries and cells, but not on faces where I loop. But I can't find a way to use F_C0 to get the adjacent cells temperature. I'm a rookie with C coding and I would appreciate a little help to make my udf working. It works just fine on external boundaries, but I'm missing something regarding the interior boundaries.

Thanks ahead,
François
Attached Images
File Type: jpg 1.jpg (9.2 KB, 32 views)
File Type: png 2.png (9.9 KB, 32 views)

Last edited by macfly; January 22, 2013 at 08:58.
macfly is offline   Reply With Quote

 


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
flow over a cylinder urgent! kevin FLUENT 8 August 11, 2015 13:00
How to access surrounding variables? chemycc CFX 0 April 30, 2009 01:42
transform navier-stokes eq. to euler-eq. pxyz Main CFD Forum 37 July 7, 2006 08:42
Question on 3D potential flow Adrin Gharakhani Main CFD Forum 13 June 21, 1999 05:18
computation about flow around a yawed cone Tylor Xie Main CFD Forum 0 June 9, 1999 07:33


All times are GMT -4. The time now is 12:04.