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

Problem with UDF (BC with refering other BC )

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 11, 2010, 13:39
Post Problem with UDF (BC with refering other BC )
  #1
New Member
 
CH. Lee
Join Date: May 2010
Location: Seoul, Republic of Korea
Posts: 5
Rep Power: 16
cryfreer is on a distinguished road
Dear users

When I trying to define BC(Inlet) which is temperature as a function of Outlet temperature. as follow
T of Inlet = T of Outlet + 1.0 C

I don't have any problem in interpreting. But when I try to initializing, I have an error by Fluent : Fatal signal (Access_Violation)

Here is my UDF code

#include "udf.h"
DEFINE_PROFILE(temp, thread, i)
{
Thread *t;
int ID = 13; /* Zone ID of Oulet */
Domain *domain = Get_Domain(1);
face_t f;
t = Lookup_Thread(domain, ID);
begin_f_loop(f,thread)
{
F_PROFILE(f, thread, i) = F_T(f,t) + 1.0;
}
end_f_loop(f,thread)
}


I use a same shape of Inlet and Oulet face (mesh or number of grid).
How can I modify my UDF to escape this situation?
Is it possible to refer other Boundary Conditions such as temperature every steps?

please help me.. I don't know what to do this moment.
cryfreer is offline   Reply With Quote

Old   May 12, 2010, 02:09
Unhappy Initializing
  #2
New Member
 
CH. Lee
Join Date: May 2010
Location: Seoul, Republic of Korea
Posts: 5
Rep Power: 16
cryfreer is on a distinguished road
If I initialize with constant Temperature not UDF at First. There is no problem. and then I changed BC with UDF as above.
Because I think there is no value to refer at the begining of analysis.
But after analysis, it seems like UDF dose not effect. Outlet temperature decreased with iteration (physically temperature of Outlet should increase).
How can I modify my UDF if I want to change Inlet temperature with every iteration?
cryfreer is offline   Reply With Quote

Old   May 12, 2010, 02:27
Default
  #3
Senior Member
 
Join Date: Feb 2010
Posts: 164
Rep Power: 17
gearboy is on a distinguished road
Quote:
Originally Posted by cryfreer View Post
Dear users

When I trying to define BC(Inlet) which is temperature as a function of Outlet temperature. as follow
T of Inlet = T of Outlet + 1.0 C

I don't have any problem in interpreting. But when I try to initializing, I have an error by Fluent : Fatal signal (Access_Violation)

Here is my UDF code

#include "udf.h"
DEFINE_PROFILE(temp, thread, i)
{
Thread *t;
int ID = 13; /* Zone ID of Oulet */
Domain *domain = Get_Domain(1);
face_t f;
t = Lookup_Thread(domain, ID);
begin_f_loop(f,thread)
{
F_PROFILE(f, thread, i) = F_T(f,t) + 1.0;
}
end_f_loop(f,thread)
}


I use a same shape of Inlet and Oulet face (mesh or number of grid).
How can I modify my UDF to escape this situation?
Is it possible to refer other Boundary Conditions such as temperature every steps?

please help me.. I don't know what to do this moment.
Be assure the the number of the inlet faces (0....n) are same as those of the outlet (0...n) . I have tried on my simple case, tubular flow, there was no problem. So if problem still unresolved, you'd better attach your case file.
gearboy is offline   Reply With Quote

Reply

Tags
boundary condition, temperature, udf

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
ATTN ALL: SOLUTON TO UDF COMPILE PROBLEM Rizwan Fluent UDF and Scheme Programming 40 March 18, 2018 07:05
udf compiling problem akr FLUENT 3 August 22, 2007 08:14
Problem related with UDF for dynamic mesh Ryan FLUENT 6 April 29, 2004 10:29
udf problem shan FLUENT 6 March 17, 2004 04:01
UDF problem chiseung FLUENT 4 January 10, 2002 10:58


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